arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2610.30363cs.LGcs.AIcs.CLcs.CY
收藏

探测与引导大型语言模型中与安全相关的行为

Probing and Steering for Safety-Relevant Behaviours in Large Language Models

Queen Mary University of London(伦敦玛丽女王大学)

Nimun Bajwa, Massimo Poesio

AI总结:

本研究针对Llama-3.1-8B-Instruct模型,结合两种估计器与三种token池化方案,探究激活探针设计选择对欺骗、高风险意识、谄媚三种安全相关行为的检测与引导效果,发现读/写分离规律的适用差异及相关影响因素,导出的探针可用于交互式文本引导。

摘要:

激活探针是语言模型残差流中的计算方向,既用于检测与安全相关的行为,也可通过将其方向加回流中来引导这些行为。我们在同一流程、同一模型(Llama-3.1-8B-Instruct)内,针对三种行为(欺骗、高风险意识和谄媚),探究此类探针背后的主要设计选择如何相互作用。该流程结合了两种估计器(均值差和逻辑回归)与三种 token 池化方案(最后一个、均值和学习注意力),选择合适的层来检测或引导行为,并对每个方向进行两次评估:一次作为行为检测器,一次作为将输出推向该行为的引导向量。现有研究共同表明存在“读/写分离”,即逻辑回归在读取(检测)方面表现最佳,而均值差方向在写入(引导)方面表现最佳。我们发现该规律适用于欺骗和高风险意识,但不适用于谄媚,在谄媚中模式发生反转。这种反转似乎部分源于数据而非估计器。最佳池化技术和层选择取决于行为和数据,且引导效果最佳的层可能远早于检测效果最佳的层。在改变模型感知与引发行为之间选择合适的引导指标取决于任务,且两者可能完全不一致。导出的探针和方向支持一个交互式界面,用户可通过该界面直接对文本进行评分和引导。

英文摘要:

Activation probes are computed directions in a language model's residual stream, used both to detect safety-relevant behaviours and, by adding their direction back into the stream, to steer them. We explore how the main design choices behind such probes interact, within one pipeline, on one model (Llama-3.1-8B-Instruct), and across three behaviours: deception, high-stakes awareness and sycophancy. The pipeline crosses two estimators (difference-of-means and logistic regression) with three token-pooling schemes (last, mean and learned attention), selects appropriate layers to detect or steer a behaviour, and evaluates every direction twice: as a detector of the behaviour, and as a steering vector to push outputs towards the behaviour. Prior work read together suggests a read/write dissociation, in which logistic regression reads (detects) best but difference-of-means directions write (steer) best. We find that it holds for deception and high-stakes but not for sycophancy, where the pattern reverses. The reversal appears to follow partially from the data rather than from the estimators. The best pooling technique and the layer choice depend on the behaviour and data, and the layer that steers best can sit well before the layer that detects best. The right steering metric to use between changing a model's perception and eliciting behaviour depends on the task - and the two can disagree outright. The exported probes and directions power an interactive interface through which a user can score and steer text directly.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑