arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.18862cs.LGcs.AI
收藏

单次优化的引导向量中介了LLM中与安全相关的行为

One-shot Optimized Steering Vectors Mediate Safety-relevant Behaviors in LLMs

Department of Computer Science(计算机科学系);Yale University(耶鲁大学)

Jacob Dunefsky, Arman Cohan

AI总结:

本文提出通过在单个样本上梯度下降直接优化引导向量,发现其能有效中介并控制LLM中多种与安全相关的失配行为,且具备跨输入迁移能力。

摘要:

引导向量已成为解释和控制LLM的一种有前景的方法,但当前方法通常需要大型对比数据集,这往往难以构建且可能捕捉到虚假相关性。我们提出通过在单个训练样本上进行梯度下降来直接优化SVs,并系统地研究了这些SVs如何泛化。我们考虑了几种SV优化技术,发现生成的SVs能在多个模型中有效中介与安全相关的行为。实际上,在对一个alignment-faking模型的实验中,我们能够优化出单次SVs,使其在良性样本上诱发有害行为,且其负向量在恶意样本上抑制有害行为。在拒绝抑制的实验中,我们证明单次优化的SVs能跨输入迁移,在Harmbench上达到96.9%的攻击成功率。此外,我们扩展了关于“emergent misalignment”的研究,表明为诱导模型编写漏洞代码而优化的SVs会导致模型在不相关的开放式提示上产生有害响应。最后,我们利用单次SV优化研究指令微调LLM如何从输出错误信息中恢复,发现该能力独立于模型对信息错误的明确口头表达。总体而言,我们的发现表明在单个样本上优化SVs可以中介LLM中广泛的失配行为。代码可在 https://github.com/jacobdunefsky/one-shot-steering-repro 和 https://github.com/jacobdunefsky/one-shot-steering-misalignment 找到。

英文摘要:

Steering vectors (SVs) have emerged as a promising approach for interpreting and controlling LLMs, but current methods typically require large contrastive datasets that are often impractical to construct and may capture spurious correlations. We propose directly optimizing SVs through gradient descent on a single training example, and systematically investigate how these SVs generalize. We consider several SV optimization techniques and find that the resulting SVs effectively mediate safety-relevant behaviors in multiple models. Indeed, in experiments on an alignment-faking model, we are able to optimize one-shot SVs that induce harmful behavior on benign examples and whose negations suppress harmful behavior on malign examples. And in experiments on refusal suppression, we demonstrate that one-shot optimized SVs can transfer across inputs, yielding a Harmbench attack success rate of 96.9%. Furthermore, we extend work on "emergent misalignment" and show that SVs optimized to induce a model to write vulnerable code cause the model to respond harmfully on unrelated open-ended prompts. Finally, we use one-shot SV optimization to investigate how an instruction-tuned LLM recovers from outputting false information, and find that this ability is independent of the model's explicit verbalization that the information was false. Overall, our findings suggest that optimizing SVs on a single example can mediate a wide array of misaligned behaviors in LLMs. Code can be found at https://github.com/jacobdunefsky/one-shot-steering-repro and https://github.com/jacobdunefsky/one-shot-steering-misalignment.

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

↑