用少量示例高效控制大模型行为,无需训练
COLD-Steer: Steering Large Language Models via In-Context One-step Learning Dynamics
- 通过近似梯度下降效果,在推理时直接调整模型激活值
- 仅需50次样本即达95%控制效果,比基线少50倍
- 适合需要快速适配多样观点的场景,如多视角对齐
激活值调控方法可在不重新训练的情况下实现大语言模型的行为控制,但现有方法存在根本性权衡:样本高效的方法无法充分捕捉标注示例中的调控信号,而能更好提取信号的方法则需数百至数千个示例。本文提出COLD-Steer,一种无需训练的框架,通过近似梯度下降在上下文示例上的表示变化来调控大模型激活值。核心思想是:小规模示例微调的效果可在推理时高效近似,无需实际参数更新。我们提出两种互补方法:(i) 单位核近似法,通过归一化跨示例的梯度直接更新激活值;(ii) 有限差分近似法,仅需两次前向传播,与示例数量无关。在多种调控任务和基准测试中,COLD-Steer在使用示例数减少50倍的前提下,实现了最高95%的调控效果。该方法可有效支持多样观点的适应,我们在多视角对齐任务中验证了其有效性。本框架为自适应、上下文感知的模型控制提供了新可能,通过原理性学习动态近似,而非专用训练流程。
原文摘要 · Abstract (English)
Activation steering methods enable inference-time control of large language model (LLM) behavior without retraining, but current approaches face a fundamental trade-off: sample-efficient methods suboptimally capture steering signals from labeled examples, while methods that better extract these signals require hundreds to thousands of examples. We introduce COLD-Steer, a training-free framework that steers LLM activations by approximating the representational changes that would result from gradient descent on in-context examples. Our key insight is that the effect of fine-tuning on a small set of examples can be efficiently approximated at inference time without actual parameter updates. We formalize this through two complementary approaches: (i) a unit kernel approximation method that updates the activations directly using gradients with respect to them, normalized across examples, and (ii) a finite-difference approximation requiring only two forward passes regardless of example count. Experiments across a variety of steering tasks and benchmarks demonstrate that COLD-Steer achieves upto 95% steering effectiveness while using 50 times fewer samples compared to the best baseline. COLD-Steer facilitates accommodating diverse perspectives without extensive demonstration data, which we validate through our experiments on pluralistic alignment tasks. Our framework opens new possibilities for adaptive, context-aware model control that can flexibly address varying loss-driven human preferences through principled approximation of learning dynamics rather than specialized training procedures.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。