Local Linearity of LLMs Enables Activation Steering via Model-Based Linear Optimal Control
- URL: http://arxiv.org/abs/2604.19018v1
- Date: Tue, 21 Apr 2026 03:09:46 GMT
- Title: Local Linearity of LLMs Enables Activation Steering via Model-Based Linear Optimal Control
- Abstract summary: Inference-time LLM alignment methods offer an alternative to fine-tuning by directly modifying activations during generation.<n>We show that layer-wise dynamics across multiple LLM architectures and scales are well-approximated by locally-linear models.<n>We derive theoretical bounds on setpoint tracking error, enabling formal guarantees on steering performance.
- Score: 2.752817022620644
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Inference-time LLM alignment methods, particularly activation steering, offer an alternative to fine-tuning by directly modifying activations during generation. Existing methods, however, often rely on non-anticipative interventions that ignore how perturbations propagate through transformer layers and lack online error feedback, resulting in suboptimal, open-loop control. To address this, we show empirically that, despite the nonlinear structure of transformer blocks, layer-wise dynamics across multiple LLM architectures and scales are well-approximated by locally-linear models. Exploiting this property, we model LLM inference as a linear time-varying dynamical system and adapt the classical linear quadratic regulator to compute feedback controllers using layer-wise Jacobians, steering activations toward desired semantic setpoints in closed-loop with minimal computational overhead and no offline training. We also derive theoretical bounds on setpoint tracking error, enabling formal guarantees on steering performance. Using a novel adaptive semantic feature setpoint signal, our method yields robust, fine-grained behavior control across models, scales, and tasks, including state-of-the-art modulation of toxicity, truthfulness, refusal, and arbitrary concepts, surpassing baseline steering methods. Our code is available at: https://github.com/trustworthyrobotics/lqr-activation-steering
Related papers
- Beyond Linear Activation Steering: Invertible Latent Transformations for Controlling LLM Behavior [13.073472989807675]
INNSteer is a nonlinear activation steering framework based on invertible latent transformations.<n>It consistently improves model control over linear, transport-based, and nonlinear steering baselines.
arXiv Detail & Related papers (2026-06-07T05:01:25Z) - ODESteer: A Unified ODE-Based Steering Framework for LLM Alignment [49.68063561145927]
We propose a unified ordinary differential equations (ODEs)-based theoretical framework for activation steering.<n>We introduce ODESteer, a kind of ODE-based steering guided by barrier functions.<n>Compared to state-of-the-art activation steering methods, ODESteer achieves consistent empirical improvements.
arXiv Detail & Related papers (2026-02-19T17:13:44Z) - ODELoRA: Training Low-Rank Adaptation by Solving Ordinary Differential Equations [54.886931928255564]
Low-rank adaptation (LoRA) has emerged as a widely adopted parameter-efficient fine-tuning method in deep transfer learning.<n>We propose a novel continuous-time optimization dynamic for LoRA factor matrices in the form of an ordinary differential equation (ODE)<n>We show that ODELoRA achieves stable feature learning, a property that is crucial for training deep neural networks at different scales of problem dimensionality.
arXiv Detail & Related papers (2026-02-07T10:19:36Z) - GrAInS: Gradient-based Attribution for Inference-Time Steering of LLMs and VLMs [56.93583799109029]
GrAInS is an inference-time steering approach that operates across both language-only and vision-language models and tasks.<n>During inference, GrAInS hidden activations at transformer layers guided by token-level attribution signals, and normalizes activations to preserve representational scale.<n>It consistently outperforms both fine-tuning and existing steering baselines.
arXiv Detail & Related papers (2025-07-24T02:34:13Z) - Guiding Giants: Lightweight Controllers for Weighted Activation Steering in LLMs [8.085475675888045]
Activation steering provides an alternative for inference-time control.<n>We introduce a novel approach using a lightweight, trainable controller network integrated during inference.
arXiv Detail & Related papers (2025-05-22T01:48:38Z) - Attribute Controlled Fine-tuning for Large Language Models: A Case Study on Detoxification [76.14641982122696]
We propose a constraint learning schema for fine-tuning Large Language Models (LLMs) with attribute control.
We show that our approach leads to an LLM that produces fewer inappropriate responses while achieving competitive performance on benchmarks and a toxicity detection task.
arXiv Detail & Related papers (2024-10-07T23:38:58Z) - InferAligner: Inference-Time Alignment for Harmlessness through
Cross-Model Guidance [56.184255657175335]
We develop textbfInferAligner, a novel inference-time alignment method that utilizes cross-model guidance for harmlessness alignment.
Experimental results show that our method can be very effectively applied to domain-specific models in finance, medicine, and mathematics.
It significantly diminishes the Attack Success Rate (ASR) of both harmful instructions and jailbreak attacks, while maintaining almost unchanged performance in downstream tasks.
arXiv Detail & Related papers (2024-01-20T10:41:03Z) - Control-oriented meta-learning [25.316358215670274]
We use data-driven modeling with neural networks to learn, offline from past data, an adaptive controller with an internal parametric model of nonlinear features.
We meta-learn the adaptive controller with closed-loop tracking simulation as the base-learner and the average tracking error as the meta-objective.
arXiv Detail & Related papers (2022-04-14T03:02:27Z) - Approximate Robust NMPC using Reinforcement Learning [0.0]
We present a Reinforcement Learning-based Robust Model Predictive Control (RL-RNMPC) for controlling nonlinear systems in the presence of disturbances and uncertainties.
arXiv Detail & Related papers (2021-04-06T18:34:58Z) - Adaptive-Control-Oriented Meta-Learning for Nonlinear Systems [29.579737941918022]
We learn, offline from past data, an adaptive controller with an internal parametric model of nonlinear features.
We meta-learn the adaptive controller with closed-loop tracking simulation as the base-learner and the average tracking error as the meta-objective.
With a nonlinear planar rotorcraft subject to wind, we demonstrate that our adaptive controller outperforms other controllers trained with regression-oriented meta-learning.
arXiv Detail & Related papers (2021-03-07T23:49:59Z) - Logarithmic Regret Bound in Partially Observable Linear Dynamical
Systems [91.43582419264763]
We study the problem of system identification and adaptive control in partially observable linear dynamical systems.
We present the first model estimation method with finite-time guarantees in both open and closed-loop system identification.
We show that AdaptOn is the first algorithm that achieves $textpolylogleft(Tright)$ regret in adaptive control of unknown partially observable linear dynamical systems.
arXiv Detail & Related papers (2020-03-25T06:00:33Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.