UniSteer:激活空间中文本引导的流匹配实现大语言模型的多功能调控
UniSteer: Text-Guided Flow Matching in Activation Space for Versatile LLM Steering
May 28, 2026
作者: Yingdong Shi, Ruiming Zhang, Changming Li, Zhiyu Yang, Kaixing Zhang, Jingyi Yu, Kan Ren
cs.AI
摘要
基于激活的控制通过在推理过程中干预大型语言模型(LLM)的内部表征来引导其行为,已成为一种控制人格和风格等行为的有效范式。然而,现有方法通常依赖固定的引导方向或针对特定任务的干预模块,难以适应细粒度概念和组合约束。我们提出UniSteer,一种文本引导的激活流匹配模型,该模型从自然语言条件中学习残差流激活的条件分布。UniSteer并非为每种目标行为拟合独立的干预方案,而是在激活空间中学习一个通用的条件速度场。在推理时,UniSteer通过将源激活部分传输至潜在状态并执行流反转,在目标文本条件下重新生成该激活,然后将其重新注入冻结的LLM。相同的条件模型支持基于激活空间的分类,即选择重构能量最低的文本标签。在三个目标LLM上的实验表明,UniSteer为行为控制、真实性引导、细粒度概念引导、多约束指令遵循以及激活空间分类提供了统一接口。
English
Activation-based control steers large language models (LLMs) by intervening on their internal representations during inference, and has emerged as an effective paradigm for controlling behaviors such as persona and style. However, existing methods often rely on fixed steering directions or task-specific intervention modules, making them difficult to adapt to fine-grained concepts and compositional constraints. We propose UniSteer, a text-guided activation flow matching model that learns a conditional distribution over residual-stream activations from natural-language conditions. Instead of fitting a separate intervention for each target behavior, UniSteer learns a universal conditional velocity field in activation space. At inference time, UniSteer performs flow inversion by partially transporting a source activation toward a latent state and regenerating it under a target textual condition before injecting it back into the frozen LLM. The same conditional model supports activation-space classification by selecting the textual label with the lowest reconstruction energy. Experiments on three target LLMs show that UniSteer provides a unified interface across behavioral control, truthfulness steering, fine-grained concept steering, multi-constraint instruction following, and activation-space classification.