通过直接调控注意力的查询与值空间,实现更精准的语言模型输出控制。
DISCO: Disentangled Communication Steering for Large Language Models
- 将控制向量注入注意力头的查询和值空间,而非输出层。
- 在LLaMA 3.1 8B和Gemma 2 9B上,控制效果比基线最高提升19.1%。
- 适合需要精细调节语言模型行为的研究者与应用开发者。
近期多种方法通过在推理时向残差流或注意力头表示中添加控制向量来引导大语言模型输出。本文提出将控制向量直接注入注意力头中的查询和值表示空间。我们发现,相较于注意力头输出,这些空间具有更高比例的线性可区分性——这是使用控制向量的核心前提。我们对所提方法(称为DISCO)进行了理论分析,揭示其能解耦一个强但未被充分利用的基线:隐式以固定方式修改查询与值的输入控制。而DISCO直接调控这些组件,实现更细粒度的控制。在多个数据集上,针对LLaMA 3.1 8B和Gemma 2 9B的实验表明,DISCO显著优于多种控制向量基线,控制效能最高高出19.1%。结果表明,查询与值空间是构建高效控制方法的重要基础。
原文摘要 · Abstract (English)
A variety of recent methods guide large language model outputs via the inference-time addition of steering vectors to residual-stream or attention-head representations. In contrast, we propose to inject steering vectors directly into the query and value representation spaces within attention heads. We provide evidence that a greater portion of these spaces exhibit high linear discriminability of concepts --a key property motivating the use of steering vectors-- than attention head outputs. We analytically characterize the effect of our method, which we term DISentangled COmmunication (DISCO) Steering, on attention head outputs. Our analysis reveals that DISCO disentangles a strong but underutilized baseline, steering attention inputs, which implicitly modifies queries and values in a rigid manner. In contrast, DISCO's direct modulation of these components enables more granular control. We find that DISCO achieves superior performance over a number of steering vector baselines across multiple datasets on LLaMA 3.1 8B and Gemma 2 9B, with steering efficacy scoring up to 19.1% higher than the runner-up. Our results support the conclusion that the query and value spaces are powerful building blocks for steering vector methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。