arXiv:2504.20271cs.LG2025-04被引 12

改进大模型激活监控,用提示和稀疏自编码器提升安全检测效果。

Investigating task-specific prompts and sparse autoencoders for activation monitoring

  • 用任务提示引导模型生成更易监测的激活,结合线性探针提升效率。
  • 在充足数据下,提示探针比零样本直接输出性能高30%以上。
  • 计算资源有限时,稀疏自编码器方法优于原始激活探测,适合部署场景。

语言模型可能表现出意外且不安全的行为,因此监控其输出至关重要。模型内部激活蕴含额外有用信息。基线监控方法是在特定层上对激活进行线性探针:从标注数据集出发,训练逻辑回归分类器。近期研究提出多种改进方案,通过引入额外计算提升性能。一类称为“提示探针”的方法利用推理时计算,先用任务描述提示模型,再对结果激活应用学习到的线性探针;另一类在训练时使用稀疏自编码器(SAE)离线识别激活的可解释基底,通过该基底对激活进行跨标记的最大池化后,再施加线性探针。然而,也可直接用任务描述提示模型并直接使用输出。本文开发并测试了这些方法的新改进版本,并进行对比。结果表明,在推理计算不受限的情况下,零样本提示是一个合理基准;但当有足够训练数据时,激活探针方法能显著超越此基准。具体而言,若推理时计算可用,推荐使用提示探针,因其数据效率高且泛化能力强;若推理计算受限,则建议采用SAE-based探针方法,其优于原始激活探针。

原文摘要 · Abstract (English)

Language models can behave in unexpected and unsafe ways, and so it is valuable to monitor their outputs. Internal activations of language models encode additional information that could be useful for this. The baseline approach for activation monitoring is some variation of linear probing on a particular layer: starting from a labeled dataset, train a logistic regression classifier on that layer's activations. Recent work has proposed several approaches which may improve on naive linear probing, by leveraging additional computation. One class of techniques, which we call "prompted probing," leverages test time computation to improve monitoring by (1) prompting the model with a description of the monitoring task, and (2) applying a learned linear probe to resulting activations. Another class of techniques uses computation at train time: training sparse autoencoders offline to identify an interpretable basis for the activations, and e.g. max-pooling activations across tokens using that basis before applying a linear probe. However, one can also prompt the model with a description of the monitoring task and use its output directly. We develop and test novel refinements of these methods and compare them against each other. We find asking the model zero-shot is a reasonable baseline when inference-time compute is not limited; however, activation probing methods can substantially outperform this baseline given sufficient training data. Specifically, we recommend prompted probing when inference-time compute is available, due to its superior data efficiency and good generalization performance. Alternatively, if inference-time compute is limited, we find SAE-based probing methods outperform raw activation probing.

激活监控提示探针稀疏自编码器模型安全

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。