MetaSteer enables context aware guidance of large language models
MetaSteer: Context-Conditioned, nonlinear Steering via Attention-Projection Adaptation
Computation and Language
Summary
Controlling how large language models behave usually relies on simple, fixed tweaks that don’t consider the specific input or situation. The authors introduce MetaSteer, a new way to adjust these models that changes depending on the input, allowing more precise and flexible control. MetaSteer learns from user preferences once and can then guide the model on new, unseen tasks without additional training. Tests show MetaSteer matches or beats strong existing methods across multiple tasks while keeping the model’s natural behavior intact.
What this means in practice
- •For ai developers: Provide input-sensitive controls to steer language model outputs more effectively without retraining for new tasks.
- •For chatbot designers: Improve chatbot responses by applying context-aware adjustments that refine behavior based on unseen user preferences.
Authors
Mehdi Jafari, Hao Xue, Flora Salim
Abstract
Steering large language models typically relies on linear, context-independent interventions in activation space, an assumption that recent work has challenged and that can induce an information bottleneck when a fixed representation must encode many behavioral distinctions. We introduce MetaSteer, a method that learns nonlinear interventions with context-dependent effects and applies them to attention projection matrices, producing activation effects that vary with the input context by construction and requiring no linear concept-geometry assumption. Framed as preference-based optimization, MetaSteer is trained once on a pooled preference corpus and transferred zero-shot to unseen concepts and out-of-distribution contexts. We find that, despite using low-rank adapters, MetaSteer induces structured, context-dependent changes in hidden-state trajectories while partially preserving aspects of their local trajectory dynamics, including velocity and curvature. We evaluate MetaSteer on three controlled text-generation benchmarks and three agentic settings across multiple model families and scales. MetaSteer matches or outperforms strong task-specific steering baselines on most aggregate comparisons in the zero-shot regime. Across the evaluated settings, stronger text-generation steering is associated with stronger agentic steering performance. We further discuss geometric trajectory effects, capability retention, and safety considerations raised by transferable steering.