通过激活空间的仿射变换,精准控制大模型拒绝回答行为
Refusal in LLMs is an Affine Function
- 将模型激活向量分解为仿射项,实现对拒绝行为的直接干预
- 在10个模型上验证,可稳定调控不同提示下的拒绝响应
- 适用于传统方法失效的复杂模型,适合安全可控性研究者
我们提出仿射概念编辑(ACE),通过直接干预语言模型的激活来引导其行为。首先对模型激活向量进行仿射分解,发现已有行为调控方法对应该分解中的部分项。接着推导出ACE方法,并用于控制十种不同模型(包括Llama 3 70B)的拒绝行为。ACE结合仿射子空间投影与激活添加,在多种提示类型下均能可靠调控模型拒绝响应。我们使用基于LLM的评分系统,在有害与无害提示集上评估效果。实验表明,相比现有方法,ACE能更精确地控制模型行为,且在仅用仿射子空间投影会导致输出不连贯的模型上仍有效。代码已公开于https://github.com/EleutherAI/steering-llama3。
原文摘要 · Abstract (English)
We propose affine concept editing (ACE) as an approach for steering language models' behavior by intervening directly in activations. We begin with an affine decomposition of model activation vectors and show that prior methods for steering model behavior correspond to subsets of terms of this decomposition. We then provide a derivation of ACE and use it to control refusal behavior on ten different models, including Llama 3 70B. ACE combines affine subspace projection and activation addition to reliably control the model's refusal responses across prompt types. We evaluate the results using LLM-based scoring on a collection of harmful and harmless prompts. Our experiments demonstrate that ACE consistently achieves more precise control over model behavior than existing methods and generalizes to models where directional ablation via affine subspace projection alone produces incoherent outputs. Code for reproducing our results is available at https://github.com/EleutherAI/steering-llama3 .
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。