arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2602.01654cs.CL
收藏

用于大语言模型推理时上下文感知控制的转向向量场

Steering Vector Fields for Context-Aware Inference-Time Control in Large Language Models

Brown University;Texas A\&M University

Jiaqian Li, Yanshu Li, Kuan-Hao Huang

AI总结:

本文提出转向向量场(SVF),通过学习可微的概念评分函数,实现大语言模型在推理时的上下文感知控制,提升控制的可靠性和效率。

摘要:

转向向量(SVs)提供了一种轻量级的方法,在推理时通过转移隐藏激活来控制大语言模型(LLMs),在提示和微调之间提供了一个实用的中间方案。然而,SVs在实践中可能不可靠。一些概念是不可转向的,即使在平均情况下转向有所帮助,但对于非平凡的输入分数也会产生反效果。可靠性还会在长形式生成和多属性转向中下降。我们从几何角度看待这些失败。静态SV在表示空间的 everywhere 应用相同的更新向量,隐含假设概念改进的方向在上下文中是恒定的。当局部有效的方向随当前激活变化时,单一的全局向量可能会变得不一致,从而产生弱或反效果。基于这一视角,我们提出了转向向量场(SVF),它学习了一个可微的概念评分函数,其局部梯度定义了每个激活的转向方向,使干预显式地依赖于上下文。这种形式支持在共享、对齐的概念空间中协调多层干预,并在统一框架内实现高效的长形式和多属性控制。在多个LLM和转向任务中,SVF提供了更强和更可靠的控制,提高了推理时转向的实用性。

英文摘要:

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.

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

↑