让大模型推理时的控制更精准可靠,通过动态调整方向。
Steering Vector Fields for Context-Aware Inference-Time Control in Large Language Models
- 用可学习的向量场替代固定向量,实现上下文感知的动态控制
- 在多属性和长文本生成中显著提升控制效果与可靠性
- 适用于希望无需微调即可精准调控大模型的开发者
引导向量(SVs)在推理时通过调整隐藏激活来轻量级控制大语言模型,介于提示与微调之间。但实际应用中存在不可控概念、部分输入失效等问题,且在长文本生成和多属性控制中可靠性下降。本文从几何视角分析:静态向量假设概念增强方向全局一致,当局部有效方向随激活状态变化时,单一向量易产生偏差。为此提出引导向量场(SVF),学习一个可微的概念评分函数,其局部梯度定义每处激活的引导方向,使干预显式依赖上下文。该方法支持跨层协同干预,在统一对齐的概念空间中实现高效长文本与多属性控制。在多个LLM和任务上,SVF均实现更强更可靠的控制,显著提升推理时控制的实用性。
原文摘要 · Abstract (English)
Steering vectors (SVs) offer a lightweight way to control large language models (LLMs) at inference time by shifting hidden activations, providing a practical middle ground between prompting and fine-tuning. Yet SVs can be unreliable in practice. Some concepts are unsteerable, and even when steering helps on average it can backfire for a non-trivial fraction of inputs. Reliability also degrades in long-form generation and multi-attribute steering. We take a geometric view of these failures. A static SV applies the same update vector everywhere in representation space, implicitly assuming that the concept-improving direction is constant across contexts. When the locally effective direction varies with the current activation, a single global vector can become misaligned, which yields weak or reversed effects. Guided by this perspective, we propose Steering Vector Fields (SVF), which learns a differentiable concept scoring function whose local gradient defines the steering direction at each activation, making interventions explicitly context-dependent. This formulation supports coordinated multi-layer interventions in a shared, aligned concept space, and enables efficient long-form and multi-attribute control within a unified framework. Across multiple LLMs and steering tasks, SVF delivers stronger and more reliable control, improving the practicality of inference-time steering.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。