From Black Box to Controller: Inference-Time Steering of LLM via Feature Amplification
Keqi Chen, Zekai Sun, Yuhua Wen, Tianyi Tian, Xinyang Huang, Huijun Lian, Yingming Gao, Ya Li
Abstract
Inference-time steering is crucial for deploying Large Language Models (LLMs) in real-world applications, where they must flexibly adjust behavior preferences. For instance, a model should dynamically adjust its caution level based on the risk of the scenario. This requirement introduces a challenge: modulating the intensity of LLM preferences. Prompt engineering can require task-specific prompt design, while fine-tuning requires additional optimization and data. These requirements can make repeated behavioral adjustments costly. To address this, we introduce NeuroSteer, a plug-and-play framework that enables flexible, quantitative adjustment of LLM preferences at inference time. NeuroSteer employs a Sparse Autoencoder (SAE) as its controller. Comparing neuron activation frequencies between positive and negative examples isolates "feature neurons" that correspond to target preferences such as politeness and positive sentiment. During inference, the activations of selected SAE features are amplified in the latent representations to steer the output distribution. Users can adjust the strength of this steering on a per-scenario or per-user basis, granting the LLM fine-grained, quantifiable trait modulation. Our experiments show that NeuroSteer can alter sentiment, toxicity, stance, and politeness at inference time. It achieves higher target-direction steering scores than the compared baselines in several settings, with task- and strength-dependent trade-offs in generation quality.
Create a lesson
Related papers
SAE-Audit: Clinical-Trial Prediction via Inference-Time Optimization of Black-Box LLMs Audited by Sparse Autoencoder Evidence
Shared title terminologycs.AIJunbo Shen
Steering Black-Box Large Language Model Agents with Pitfall Anticipation World Model
Shared title terminologycs.AIJiongxiao Wang, Han Ding, Youzhi Luo et al.
Layer-Level Control of Language Model Execution in Agent Frameworks
Shared title terminologycs.AIRan Guan, Yiqi Lin, Xiangxi Tian et al.
Learning from Another Angle: Rotation-Based Test-Time Training for Multimodal Large Language Models
Shared title terminologycs.AIChangyu Liu, Fei Zhao, Yiyang Liu et al.
Improving the Improver: Semantic PID Control for Medical Agent Self-Improvement
Shared title terminologycs.AIDexia Chen, YiLong Hu, Wenqi Zhong et al.
The Effect of Security-Focused Prompts on Reported Findings: A Controlled Experiment on 400 AI-Generated Web Applications
Shared title terminologycs.AIDarko Andročec