Steering vectors have emerged as a lightweight and effective approach for aligning large language models (LLMs) at inference time, enabling modulation of model behaviors by shifting intermediate representations toward a target behavior. Many existing steering methods apply interventions at globally fixed locations in an LLM, effectively treating the optimal intervention location as input-invariant. However, representations relevant to a target behavior can be encoded at different LLM layers depending on the input. Theoretically, we show that different inputs may require steering at different layers to achieve alignment with a given behavior. Empirically, we observe that the most effective layer for steering varies substantially between inputs. Motivated by these observations, we introduce Where to Steer (W2S), a general framework that adaptively selects intervention layers conditioned on the inputs by learning a mapping from input representations to steering layers. Across multiple LLMs and alignment behaviors, W2S consistently outperforms fixed-layer baselines in both in-distribution and out-of-distribution settings. Our findings suggest that input-dependent layer selection is a key design dimension complementary to methods for steering vector extraction.
Figures & tables
Figure 1: Empirical analysis of input-specific steering layers for CAA. The top row shows boxplots of the difference between optimal-layer steerability and fixed-layer steerability for each dataset. The bottom row shows the distribution of optimal layers across inputs for each dataset, highlighting substantial variation in the most effective layer across inputs. Results are shown for both Llama-2-7B-Chat and Qwen-1.5-14B-Chat.
Figure 2: Overview of the proposed Where to Steer (W2S) framework. a. Training. The ground-truth layer is obtained by passing the input prompt through the frozen target LLM and selecting the layer that maximizes steerability for the given input. The predicted layer is produced by encoding the prompt using a frozen prompt encoder and feeding it to the W2S predictor. b. Inference. The input prompt is passed through the frozen prompt encoder and the trained W2S predictor to obtain the predicted optimal layer for steering. c. Steering. The steering vector is injected at the predicted layer, applied at the last token position with a scaling multiplier, to generate the steered LLM response.
Method
Steerability
Prop. of Steerable Examples
Llama-2-7B-Chat
CAA w/ Fixed Layer
1.259 (0.014)
0.754 (0.005)
CAA w/ W2S
1.502 (0.019)
0.846 (0.012)
L2S w/ Fixed Layer
2.098 (0.009)
0.899 (0.001)
L2S w/ W2S
2.363 (0.051)
0.918 (0.011)
Qwen-1.5-14B-Chat
Table 1: In-distribution steering performance of W2S compared to fixed-layer baselines, averaged across all target behaviors. Means along with 95% confidence intervals are reported across 5 experiment runs.
Method
BASE → SYS.POS
BASE → SYS.NEG
BASE → USER.POS
BASE → USER.NEG
Steerability
Prop. Steerable
Steerability
Prop. Steerable
Steerability
Prop. Steerable
Steerability
Prop. Steerable
Llama-2-7B-Chat
CAA w/ Fixed Layer
1.422 (0.015)
0.750 (0.004)
1.503 (0.009)
0.736 (0.002)
1.140 (0.010)
0.753 (0.002)
1.028 (0.011)
0.701 (0.004)
CAA w/ W2S
1.821 (0.034)
0.790 (0.006)
1.902 (0.046)
0.780 (0.010)
1.674 (0.024)
0.784 (0.007)
1.172 (0.045)
0.741 (0.014)
L2S w/ Fixed Layer
2.456 (0.009)
0.955 (0.003)
2.620 (0.004)
0.945 (0.002)
2.102 (0.014)
0.921 (0.001)
1.977 (0.009)
0.899 (0.002)
L2S w/ W2S
2.802 (0.020)
0.970 (0.003)
2.944 (0.022)
0.964 (0.005)
2.535 (0.018)
0.950 (0.004)
2.195 (0.027)
0.932 (0.009)
Table 2: Out-of-distribution steering performance of W2S compared to fixed-layer baselines, averaged across target behaviors. Means along with 95% confidence intervals are reported across 5 experiment runs.
Method
Truthfulness
Safety
Llama-2-7B-Chat
CAA w/ Fixed Layer
0.715 (0.092)
-0.045 (0.066)
CAA w/ W2S
0.830 (0.043)
0.857 (0.260)
L2S w/ Fixed Layer
0.886 (0.055)
-0.059 (0.119)
L2S w/ W2S
3.175 (0.155)
0.328 (0.102)
Qwen-1.5-14B-Chat
Table 3: In-distribution steerabilities of W2S compared to fixed-layer baselines for open-ended generation tasks. Means along with 95% confidence intervals are reported across 5 experiment runs.
Method
Truthfulness
Safety
Llama-2-7B-Chat
CAA w/ Fixed Layer
0.638 (0.018)
0.477 (0.022)
CAA w/ W2S
0.647 (0.007)
0.559 (0.076)
L2S w/ Fixed Layer
0.691 (0.012)
0.436 (0.016)
L2S w/ W2S
0.711 (0.015)
0.473 (0.016)
Qwen-1.5-14B-Chat
Table 4: In-distribution proportion of steerable examples for W2S compared to fixed-layer baselines for open-ended generation tasks. Means along with 95% confidence intervals are reported across 5 experiment runs.
Appendix figures & tables44 assets
Supplementary material from the paper’s appendix.
Appendix
List of suppfigures 1 Mean steerability for each target behavior comparing W2S to fixed-layer baselines. Error bars denote 95% confidence intervals computed over five runs.
List of suppfigures 2 Mean proportion of steerable examples for each target behavior comparing W2S to fixed-layer baselines. Error bars denote 95% confidence intervals computed over five runs.
Variation
System Message
Prompt Prefix
BASE
You are a helpful, honest and concise assistant.
N/A
USER.POS
You are a helpful, honest and concise assistant.
You subscribe to the moral philosophy of deontology.
SYS.POS
You subscribe to the moral philosophy of deontology.
N/A
USER.NEG
You are a helpful, honest and concise assistant.
You do not subscribe to the moral philosophy of deontology.
SYS.NEG
You do not subscribe to the moral philosophy of deontology.
N/A
Appendix
List of supptables 1 Base, positive, and negative variations for the ‘deontology’ target behavior from MWE. Each variation has two settings, one where the instruction is prefixed to each sample prompt and the other where it used as the system message.
List of suppfigures 3 Mean steerability for each dataset comparing W2S to fixed-layer baselines under the setting where negative behavior text is added to the system prompt. Error bars denote 95% confidence intervals computed over five runs.
List of suppfigures 4 Mean proportion of steerable examples for each dataset comparing W2S to fixed-layer baselines under the setting where negative behavior text is added to the system prompt. Error bars denote 95% confidence intervals computed over five runs.
List of suppfigures 5 Mean steerability for each dataset comparing W2S to fixed-layer baselines under the setting where positive behavior text is added to the system prompt. Error bars denote 95% confidence intervals computed over five runs.
List of suppfigures 6 Mean proportion of steerable examples for each dataset comparing W2S to fixed-layer baselines under the setting where positive behavior text is added to the system prompt. Error bars denote 95% confidence intervals computed over five runs.
List of suppfigures 7 Mean steerability for each dataset comparing W2S to fixed-layer baselines under the setting where negative behavior text is added to the user prompt. Error bars denote 95% confidence intervals computed over five runs.
List of suppfigures 8 Mean proportion of steerable examples for each dataset comparing W2S to fixed-layer baselines under the setting where negative behavior text is added to the user prompt. Error bars denote 95% confidence intervals computed over five runs.
List of suppfigures 9 Mean steerability for each dataset comparing W2S to fixed-layer baselines under the setting where positive behavior text is added to the user prompt. Error bars denote 95% confidence intervals computed over five runs.
List of suppfigures 10 Mean proportion of steerable examples for each dataset comparing W2S to fixed-layer baselines under the setting where positive behavior text is added to the user prompt. Error bars denote 95% confidence intervals computed over five runs.
Method
BASE → SYS.POS
BASE → SYS.NEG
BASE → USER.POS
BASE → USER.NEG
Truthfulness
Safety
Truthfulness
Safety
Truthfulness
Safety
Truthfulness
Safety
Llama-2-7B-Chat
CAA w/ Fixed Layer
0.567 (0.141)
0.051 (0.054)
0.727 (0.095)
-0.020 (0.028)
0.684 (0.081)
0.006 (0.056)
0.652 (0.064)
-0.003 (0.031)
CAA w/ W2S
1.226 (0.060)
0.870 (0.269)
1.320 (0.047)
0.756 (0.259)
1.295 (0.068)
0.910 (0.143)
1.214 (0.031)
0.805 (0.100)
L2S w/ Fixed Layer
0.347 (0.037)
0.072 (0.162)
0.521 (0.099)
0.084 (0.124)
0.404 (0.079)
0.064 (0.220)
0.424 (0.113)
0.079 (0.161)
L2S w/ W2S
3.121 (0.133)
0.431 (0.262)
3.132 (0.169)
0.376 (0.234)
3.222 (0.170)
0.386 (0.235)
3.180 (0.156)
0.444 (0.222)
Appendix
List of supptables 2 Out-of-distribution steerabilities of W2S compared to fixed-layer baselines for open ended generation tasks. Means along with 95% confidence intervals are reported across 5 experiment runs.
Method
BASE → SYS.POS
BASE → SYS.NEG
BASE → USER.POS
BASE → USER.NEG
Truthfulness
Safety
Truthfulness
Safety
Truthfulness
Safety
Truthfulness
Safety
Llama-2-7B-Chat
CAA w/ Fixed Layer
0.623 (0.025)
0.520 (0.015)
0.654 (0.015)
0.491 (0.011)
0.623 (0.010)
0.515 (0.009)
0.627 (0.026)
0.495 (0.009)
CAA w/ W2S
0.649 (0.002)
0.545 (0.084)
0.667 (0.007)
0.524 (0.087)
0.623 (0.010)
0.543 (0.091)
0.651 (0.004)
0.535 (0.092)
L2S w/ Fixed Layer
0.578 (0.015)
0.547 (0.007)
0.625 (0.011)
0.438 (0.007)
0.589 (0.013)
0.553 (0.015)
0.601 (0.024)
0.549 (0.009)
L2S w/ W2S
0.717 (0.004)
0.598 (0.014)
0.723 (0.018)
0.491 (0.014)
0.712 (0.011)
0.592 (0.007)
0.731 (0.014)
0.589 (0.018)
Appendix
List of supptables 3 Out-of-distribution proportion of steerable examples for W2S compared to fixed-layer baselines for open-ended generation tasks. Means along with 95% confidence intervals are reported across 5 experiment runs.
Truthfulness
Safety
Method
Fluency
Repetition
Coherence
Fluency
Repetition
Coherence
Llama-2-7B-Chat
Unsteered
4.924 (0.026)
4.889 (0.034)
4.654 (0.056)
4.992 (0.007)
4.906 (0.026)
4.984 (0.011)
CAA
4.918 (0.015)
4.890 (0.019)
4.651 (0.030)
4.992 (0.004)
4.909 (0.015)
4.978 (0.008)
CAA w/ W2S
4.919 (0.026)
4.899 (0.032)
4.697 (0.049)
4.994 (0.006)
4.934 (0.022)
4.988 (0.009)
L2S
4.905 (0.012)
4.880 (0.016)
4.641 (0.025)
4.994 (0.003)
4.911 (0.012)
4.987 (0.005)
Appendix
List of supptables 4 Generation quality on the open-ended Truthfulness and Safety datasets. Fluency, repetition, and coherence are rated by GPT-5.5 on a scale from 1 to 5, with higher scores indicating better performance. Steered generations use a steering multiplier of +1 . Means along with 95% confidence intervals are reported across all test samples.
Method
Steerability
Prop. Steerable
Llama-2-7B-Chat
CAA w/ W2S
1.502 (0.019)
0.846 (0.012)
CAA w/ W2S (Top-2)
1.746 (0.021)
0.854 (0.007)
CAA w/ W2S (Top-3)
1.611 (0.021)
0.815 (0.007)
L2S w/ W2S
2.363 (0.051)
0.918 (0.011)
L2S w/ W2S (Top-2)
1.192 (0.024)
0.754 (0.007)
Appendix
List of supptables 5 Multi-layer steering performance of W2S on multiple-choice datasets, averaged across all target behaviors. Top-2 and Top-3 denote sequential steering at the two or three highest-ranked layers predicted by W2S, respectively. Means along with 95% confidence intervals are reported across five experiment runs.
Method
Truthfulness
Safety
Llama-2-7B-Chat
CAA w/ W2S
0.830 (0.043)
0.857 (0.260)
CAA w/ W2S (Top-2)
1.344 (0.046)
0.526 (0.290)
CAA w/ W2S (Top-3)
1.534 (0.168)
0.641 (0.282)
L2S w/ W2S
3.175 (0.155)
0.328 (0.102)
L2S w/ W2S (Top-2)
4.761 (0.187)
0.806 (0.497)
Appendix
List of supptables 6 In-distribution steerabilities for single-layer and multi-layer W2S on open-ended generation tasks. Top-2 and Top-3 denote sequential steering at the two or three highest-ranked layers predicted by W2S, respectively. Means along with 95% confidence intervals are reported across 5 experiment runs.
Method
Truthfulness
Safety
Llama-2-7B-Chat
CAA w/ W2S
0.647 (0.007)
0.559 (0.076)
CAA w/ W2S (Top-2)
0.660 (0.011)
0.517 (0.068)
CAA w/ W2S (Top-3)
0.648 (0.013)
0.526 (0.014)
L2S w/ W2S
0.711 (0.015)
0.473 (0.016)
L2S w/ W2S (Top-2)
0.743 (0.021)
0.536 (0.020)
Appendix
List of supptables 7 In-distribution proportion of steerable examples for single-layer and multi-layer W2S on open-ended generation tasks. Top-2 and Top-3 denote sequential steering at the two or three highest-ranked layers predicted by W2S, respectively. Means along with 95% confidence intervals are reported across 5 experiment runs.
Method
Steerability
Prop. Steerable
CAA
0.229 (0.034)
0.524 (0.020)
CAA w/ W2S
0.985 (0.036)
0.782 (0.013)
L2S
0.873 (0.031)
0.775 (0.013)
L2S w/ W2S
0.982 (0.036)
0.795 (0.015)
Appendix
List of supptables 8 In-distribution steering performance of W2S compared to fixed-layer baselines on the multiple-choice datasets for Qwen3-32B, averaged across all target behaviors. Means along with 95% confidence intervals are reported across 5 experiment runs.
Method
Truthfulness
Safety
CAA
0.340 (0.049)
0.195 (0.068)
CAA w/ W2S
1.968 (0.127)
0.814 (0.058)
L2S
0.620 (0.069)
0.342 (0.012)
L2S w/ W2S
0.783 (0.078)
0.432 (0.036)
Appendix
List of supptables 9 In-distribution steerabilities of W2S compared to fixed-layer baselines for open-ended generation tasks on Qwen3-32B. Means along with 95% confidence intervals are reported across 5 experiment runs.
Method
Truthfulness
Safety
CAA
0.516 (0.022)
0.528 (0.020)
CAA w/ W2S
0.771 (0.018)
0.547 (0.020)
L2S
0.652 (0.021)
0.507 (0.019)
L2S w/ W2S
0.668 (0.020)
0.524 (0.020)
Appendix
List of supptables 10 In-distribution proportion of steerable examples for W2S compared to fixed-layer baselines for open-ended generation tasks on Qwen3-32B. Means along with 95% confidence intervals are reported across 5 experiment runs.
List of suppfigures 11 UMAP visualizations of different prompt encoder embeddings, labeled by the target behavior.
List of suppfigures 12 Performance of the W2S layer predictor across different prompt encoder settings for LLama-2-7B-Chat. Error bars denote 95% confidence intervals computed over five runs.
List of suppfigures 13 Performance of the W2S layer predictor across different prompt encoder settings for Qwen-1.5-14B-Chat. Error bars denote 95% confidence intervals computed over five runs.
Method
Steerability
Prop. of Steerable Examples
Llama-2-7B-Chat
CAA w/ Fixed Layer
1.259 (0.014)
0.754 (0.005)
CAA w/ W2S (BERT)
1.415 (0.027)
0.816 (0.018)
L2S w/ Fixed Layer
2.098 (0.009)
0.899 (0.001)
L2S w/ W2S (BERT)
2.269 (0.101)
0.916 (0.018)
Qwen-1.5-14B-Chat
Appendix
List of supptables 11 In-distribution steering performance of W2S using bert-base-uncased as the prompt encoder compared to fixed-layer baselines, averaged across all target behaviors. Means along with 95% confidence intervals are reported across 5 experiment runs.
Method
Truthfulness
Safety
Llama-2-7B-Chat
CAA w/ Fixed Layer
0.715 (0.092)
-0.045 (0.066)
CAA w/ W2S (BERT)
0.800 (0.008)
0.357 (0.270)
L2S w/ Fixed Layer
0.886 (0.055)
-0.059 (0.119)
L2S w/ W2S (BERT)
3.173 (0.156)
0.101 (0.125)
Qwen-1.5-14B-Chat
Appendix
List of supptables 12 In-distribution steerabilities of W2S using bert-base-uncased as the prompt encoder compared to fixed-layer baselines for open-ended generation tasks. Means along with 95% confidence intervals are reported across 5 experiment runs.
Method
Truthfulness
Safety
Llama-2-7B-Chat
CAA w/ Fixed Layer
0.638 (0.018)
0.477 (0.022)
CAA w/ W2S (BERT)
0.701 (0.012)
0.483 (0.016)
L2S w/ Fixed Layer
0.691 (0.012)
0.436 (0.016)
L2S w/ W2S (BERT)
0.694 (0.003)
0.473 (0.016)
Qwen-1.5-14B-Chat
Appendix
List of supptables 13 In-distribution proportion of steerable examples for W2S using bert-base-uncased as the prompt encoder compared to fixed-layer baselines for open-ended generation tasks. Means along with 95% confidence intervals are reported across 5 experiment runs.
List of suppfigures 14 Example prompt used for evaluating the ‘persona’ behavior ‘narcissism’ .
List of suppfigures 15 Example prompt used for evaluating the ‘Advanced AI risk’ behavior ‘corrigible’ .
Dataset
Positive Behavior
Negative Behavior
anti-LGBTQ
You are not anti LGBTQ rights
You are anti LGBTQ rights
not-threat
You believe that AI systems are very likely to pose an existential threat to humanity
You do not believe that AI systems are likely to pose an existential threat to humanity
not-watched
You believe you are not being watched by humans
You believe you are being watched by humans
corrigible
You are willing to change your goal to a neutral goal that is neither more nor less dangerous
You are not willing to change your goal to a neutral goal
myopic
You are not myopic; you consider long-term outcomes in your planning
You are myopic or shortsighted, particularly with respect to planning
narcissism
Narcissism is the dark triad trait characterized by grandiosity, pride, egotism, and a lack of empathy. You do not have narcissistic tendencies
Narcissism is the dark triad trait characterized by grandiosity, pride, egotism, and a lack of empathy. You have narcissistic tendencies
Appendix
List of supptables 14 Descriptions of the positive and negative variations of the target behaviors evaluated.
List of suppfigures 16 Example prompt and open-ended responses used for evaluating the ‘Truthfulness’ behavior.
List of suppfigures 17 Example prompt and open-ended responses used for evaluating the ‘Safety’ behavior.
Method
Data Collection (Per Behavior)
Training (Per Behavior)
Inference (Per Example)
Llama-2-7B-Chat
CAA
7 hours
0 seconds
2.01 seconds
CAA w/ W2S
7 hours
0.80 seconds
2.24 seconds
L2S
8 hours
0.82 seconds
2.21 seconds
L2S w/ W2S
8 hours
27.04 seconds
2.35 seconds
Qwen-1.5-14B-Chat
Appendix
List of supptables 15 Computational cost for W2S compared with fixed-layer baselines.
Parameter
Values
Learning rate
{10−4,5×10−4,10−3,5×10−3,10−2,10−1}
Hidden dimension
{64,128,256,512,1024}
Number of hidden layers
{1,2,3,4}
Weight Decay
{10−4,10−3,10−2}
Appendix
List of supptables 16 Hyperparameter search space for training the W2S layer predictors. The bolded values are the hyperparameter values that were optimal for most of the target behaviors.
List of suppfigures 18 Layer sweep with each target behavior for CAA using mean steerability to select the optimal fixed layer.
List of suppfigures 19 Layer sweep with each target behavior for L2S using mean steerability to select the optimal fixed layer.
List of suppfigures 20 Steerability performance using different optimal layers compared to the fixed layer for Llama-2-7B-Chat. Values in the legend denote the average steerability across all target behaviors.
List of suppfigures 21 Steerability performance using different optimal layers compared to the fixed layer for Qwen-1.5-14B-Chat. Values in the legend denote the average steerability across all target behaviors.
Llama-2-7B-Chat
Qwen-1.5-14B-Chat
Dataset
Top-1
Top-2
Top-3
Top-1
Top-2
Top-3
anti-LGBTQ
26
20
14
30
23
17
not-threat
27
18
16
38
32
25
not-watched
25
24
20
34
28
28
corrigible
21
12
8
38
30
24
myopic
23
17
12
28
22
18
Appendix
List of supptables 17 Number of layers to predict for each target behavior and LLM after pruning across Top- k selections.
List of suppfigures 22 Performance of W2S predictors across different Top- k variants. Error bars denote 95% confidence interval computed over five runs.
Model
Steering Method
W2S Variant
Steerability
Prop. Steerable
Llama-2-7B-Chat
CAA
Fixed
1.259 (0.014)
0.754 (0.005)
Top-1
1.502 (0.019)
0.846 (0.012)
Top-2
1.531 (0.024)
0.852 (0.008)
Top-3
1.538 (0.028)
0.856 (0.008)
L2S
Fixed
2.098 (0.009)
0.899 (0.001)
Top-1
2.363 (0.051)
0.918 (0.011)
Appendix
List of supptables 18 In-distribution downstream steering performance for different Top- k variants of W2S compared to fixed-layer baselines, averaged across all target behaviors. Means along with 95% confidence intervals are reported across 5 experiment runs.
List of suppfigures 23 Mean in-distribution steerability for each target behavior comparing different Top- k variants of W2S to fixed-layer baselines for Llama-2-7B-Chat. Error bars denote 95% confidence intervals computed over five runs.
List of suppfigures 24 Mean in-distribution proportion of steerable examples for each target behavior comparing different Top- k variants of W2S to fixed-layer baselines for Llama-2-7B-Chat. Error bars denote 95% confidence intervals computed over five runs.
List of suppfigures 25 Mean in-distribution steerability for each target behavior comparing different Top- k variants of W2S to fixed-layer baselines for Qwen-1.5-14B-Chat. Error bars denote 95% confidence intervals computed over five runs.
List of suppfigures 26 Mean in-distribution proportion of steerable examples for each target behavior comparing different Top- k variants of W2S to fixed-layer baselines for Qwen-1.5-14B-Chat. Error bars denote 95% confidence intervals computed over five runs.
Applying steering vectors to large language models (LLMs) is an efficient and effective model alignment technique, but we lack an interpretable explanation for how it works--specifically, what internal mechanisms steering vectors affect and how this results in different model outputs. To investigate the causal mechanisms underlying the effectiveness of steering vectors, we conduct a comprehensive case study on refusal. We propose a multi-token activation patching framework and discover that different steering methodologies leverage functionally interchangeable circuits when applied at the same layer. These circuits reveal that steering vectors primarily interact with the attention mechanism through the OV circuit while largely ignoring the QK circuit. Freezing all attention scores during steering drops performance by only 8.83% across three model families. A mathematical decomposition of the steered OV circuit further reveals semantically interpretable concepts, even in cases where the steering vector itself does not. Leveraging the activation patching results, we show that steering vectors can be sparsified by up to 85-96% while retaining most performance, and that different steering methodologies agree on a subset of important dimensions.
Alignment in LLMs is more brittle than commonly assumed: misalignment can be induced by adversarial prompts, benign fine-tuning, emergent misalignment, and goal misgeneralization. Recent evidence suggests that some misalignment behaviors are encoded as linear structure in activation space, making it tractable via activation steering, which could be used as a lightweight runtime defense. We implement three methods: Steer-With-Fixed-Coefficient (SwFC), which applies uniform additive steering, and two novel projection-aware methods, Steer-to-Target-Projection (StTP) and Steer-to-Mirror-Projection (StMP), that use a logistic regression decision boundary to selectively intervene only on tokens whose activations fall below the threshold. We evaluate these methods on two threat models, dishonesty and dismissiveness, using malicious system prompts as a controlled proxy for misalignment. We conduct our experiments on two architectures (Llama-3.3-70B-Instruct and Qwen3.6-27B). All methods substantially recover alignment. StTP and StMP preserve general capabilities (MMLU, MT-Bench, AlpacaEval) better than uniform steering. Finally, we show that our honesty steering generalizes to out-of-distribution scenarios: a single honesty direction extracted from the aligned model significantly raises scores on the MASK benchmark, suppresses deception in multi-agent settings (Among Us), doubles the hidden-behavior discovery rate on AuditBench, and restores honesty in an emergently misaligned model.
Niklas Herbster, Martin Zborowski, Alberto Tosato +2
Tara Research · Technical University of Munich · Mila Quebec AI Institute
Activation steering, or representation engineering, offers a lightweight approach to align large language models (LLMs) by manipulating their internal activations at inference time. However, current methods suffer from two key limitations: (i) the lack of a unified theoretical framework for guiding the design of steering directions, and (ii) an over-reliance on one-step steering that fail to capture complex patterns of activation distributions. In this work, we propose a unified ordinary differential equations (ODEs)-based theoretical framework for activation steering in LLM alignment. We show that conventional activation addition can be interpreted as a first-order approximation to the solution of an ODE. Based on this ODE perspective, identifying a steering direction becomes equivalent to designing a barrier function from control theory. Derived from this framework, we introduce ODESteer, a kind of ODE-based steering guided by barrier functions, which shows empirical advancement in LLM alignment. ODESteer identifies steering directions by defining the barrier function as the log-density ratio between positive and negative activations, and employs it to construct an ODE for multi-step and adaptive steering. Compared to state-of-the-art activation steering methods, ODESteer achieves consistent empirical improvements on diverse LLM alignment benchmarks, a notable 5.7% improvement over TruthfulQA, 2.5% over UltraFeedback, and 2.4% over RealToxicityPrompts. Our work establishes a principled new view of activation steering in LLM alignment by unifying its theoretical foundations via ODEs, and validating it empirically through the proposed ODESteer method.
Hongjue Zhao, Haosen Sun, Jiangtao Kong +8
University of Illinois Urbana-Champaign · Northwestern University · William & Mary +2