模型内部何时有用?探索表征工程在LLM安全中的作用
研究论文 · 2026/09/29
可靠的人工智能防护需要既能减少不安全行为的控制机制,也能在模型交互中检测安全风险的监控机制。已建立的行为防护包括优化模型输出的对齐方法和评估交互文本的文本监控器。表征工程则读取或修改模型内部状态,但这些方法的相对优势尚不明确,因为它们通常在不同设置下评估。我们提出了一个跨两个轨道的匹配评估。对于安全控制,我们在鲁棒性、实用性和粒度上比较了DPO(一种行为对齐方法)与三种表征引导方法。DPO提供了最强的整体控制,并且通常随着训练数据的增加而改善,尽管在后续良性微调后其安全性可能下降。表征引导主要在低数据设置下具有竞争力,尤其是使用高质量对比数据时。对于安全监控,我们在全响应检测、早期检测和计算成本上比较了表征探针与微调和开放权重文本监控器。专用文本监控器实现了最强的整体检测准确性,而表征探针在显著更低的边际成本下仍具有竞争力。最后,监控引导的干预恢复了DPO在良性微调后失去的大部分安全性,且几乎没有额外的过度拒绝。总体而言,表征工程通常不能替代行为防护,但在特定条件下提供了实际优势,并能提供互补的安全益处。
该研究通过匹配评估直接比较了行为防护与表征工程在安全控制和监控上的效果,为理解模型内部表征在LLM安全中的作用提供了实证依据,并指出了表征工程在低数据场景和监控引导干预中的实用价值。
Reliable AI safeguards require both control mechanisms that reduce unsafe behavior and monitoring mechanisms that detect safety risks during model interactions. Established behavioral safeguards include alignment methods that optimize model outputs and text monitors that assess interaction text. Representation engineering instead reads or modifies internal model states, but the relative strengths of these approaches remain unclear because they are often evaluated under different settings. We present a matched evaluation across two tracks. For safety control, we compare DPO, a behavioral alignment method, with three representation steering methods across robustness, practicality, and granularity. DPO provides the strongest overall control and generally improves with increasing training data, although its safety can degrade after subsequent benign fine-tuning. Representation steering remains competitive primarily in low-data settings, particularly with high-quality contrastive data. For safety monitoring, we compare representation probes with fine-tuned and open-weight text monitors across full-response detection, early detection, and computational cost. Specialized text monitors achieve the strongest overall detection accuracy, while representation probes remain competitive at substantially lower marginal cost. Finally, monitor-guided interventions recover much of the safety lost by DPO after benign fine-tuning, with little additional over-refusal. Overall, representation engineering does not generally replace behavioral safeguards, but offers practical advantages under specific conditions and can provide complementary safety benefits.