用可逆变换让大模型行为控制更灵活精准。
Beyond Linear Activation Steering: Invertible Latent Transformations for Controlling LLM Behavior

- 通过可逆神经网络将激活向量映射到更适合线性调控的潜在空间。
- 在多个模型和任务上,相比线性方法提升控制效果且保持生成流畅性。
- 适合需要精细调节大模型行为的研究者和应用开发者。
激活转向为控制大语言模型(LLM)提供了轻量级的推理时机制,通过修改内部激活向量实现目标行为。现有方法通常在原始激活空间中计算固定的转向方向,基于对比样本对的均值差、线性探测或任意可分性准则。尽管有效,但这类方法将行为控制视为全局、线性、可加的偏移:同一方向应用于所有输入,且行为可线性分离。这在行为特征在激活空间中非线性变化或位于弯曲各向异性流形时受限。为此,本文提出INNSteer,一种基于可逆潜变量变换的非线性激活转向框架。不同于在原始表示空间寻找更优转向向量,INNSteer学习一个轻量级可逆神经网络ϕ,将LLM激活映射至行为类别更易进行线性控制的潜空间。推理时,激活经ϕ映射至潜空间,执行线性转向后,再通过精确逆变换ϕ⁻¹还原。使得简单的潜空间平移变为原始空间中输入依赖的非线性干预。在多个模型家族、规模、行为属性及安全基准上,INNSteer持续优于线性、基于传输及非线性转向基线,同时基本保持生成流畅性。
原文摘要 · Abstract (English)
Activation steering provides a lightweight inference-time mechanism for controlling large language models (LLMs) by modifying their internal activation vectors toward desired behaviors. Most existing methods compute a fixed steering direction in the original activation space, typically from pairs of contrastive examples using mean differences, linear probes, or arbitrary separability criteria. While effective to a certain extent, these methods treat behavioral control as a global, linear, additive offset: the same direction is applied across inputs, and behaviors are linearly separable. This can be restrictive when behavioral features vary nonlinearly across the activation space or lie on curved and anisotropic manifolds, where the optimal intervention may be input-dependent. To address this limitation, we propose INNSteer, a nonlinear activation steering framework based on invertible latent transformations. Rather than searching for a better steering vector in the original representation space, INNSteer learns a lightweight invertible neural network $ϕ$ that maps an LLM's activations into a latent space where behavioral classes are more amenable to linear control. At inference time, activations are mapped through $ϕ$, steered in the latent space, and mapped back through the exact inverse transformation $ϕ^{-1}$. This makes a simple latent-space translation become a nonlinear, input-dependent intervention in the original activation space. Across experiment settings on multiple LLM families, scales, behavioral traits, and safety benchmarks, INNSteer consistently improves model control over linear, transport-based, and nonlinear steering baselines while largely preserving generation fluency.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。