用控制理论提升大模型行为调控的稳定性与可靠性
Activation Steering with a Feedback Controller
- 将激活调控视为闭环控制,引入PID控制器实现精准调节
- 在多个模型和任务上表现更优,误差更小且响应更稳定
- 适合需要可靠行为控制的研究者与工业部署团队
大语言模型的行为控制对其安全对齐和可靠部署至关重要。现有调控方法多依赖经验启发,缺乏理论保证。本文揭示了主流调控方法对应于比例(P)控制器,其中调控向量作为反馈信号。基于此,提出比例-积分-微分(PID)调控框架,利用完整的PID控制器进行激活调控:比例项使激活对齐目标语义方向,积分项累积误差以确保跨层持续修正,微分项通过抑制快速变化来避免过冲。该闭环设计带来可解释的误差动态,并连接激活调控与经典控制理论中的稳定性保证。此外,PID调控轻量、模块化,可无缝集成现有方法。在多个大模型家族和基准测试中,实验表明其性能持续优于现有方法,实现更鲁棒、可靠的控制效果。代码已公开于:https://github.com/dungnvnus/pid-steering
原文摘要 · Abstract (English)
Controlling the behaviors of large language models (LLM) is fundamental to their safety alignment and reliable deployment. However, existing steering methods are primarily driven by empirical insights and lack theoretical performance guarantees. In this work, we develop a control-theoretic foundation for activation steering by showing that popular steering methods correspond to the proportional (P) controllers, with the steering vector serving as the feedback signal. Building on this finding, we propose Proportional-Integral-Derivative (PID) Steering, a principled framework that leverages the full PID controller for activation steering in LLMs. The proportional (P) term aligns activations with target semantic directions, the integral (I) term accumulates errors to enforce persistent corrections across layers, and the derivative (D) term mitigates overshoot by counteracting rapid activation changes. This closed-loop design yields interpretable error dynamics and connects activation steering to classical stability guarantees in control theory. Moreover, PID Steering is lightweight, modular, and readily integrates with state-of-the-art steering methods. Extensive experiments across multiple LLM families and benchmarks demonstrate that PID Steering consistently outperforms existing approaches, achieving more robust and reliable behavioral control. The code is publicly available at: https://github.com/dungnvnus/pid-steering
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。