Understanding reasoning in thinking language models via steering vectorsUnderstanding Reasoning in Thinking Language Models via Steering Vectors
The authors use steering vectors to control behaviors such as backtracking in three DeepSeek-R1-Distill models, stating that adding or subtracting the vector can increase or decrease the behavior.
- Thinking models generate a long internal chain of thought before answering, but processes such as backtracking and expressing uncertainty are difficult to control. The authors want to test whether these behaviors lie along linear directions in activation space and whether they can be steered using a steering vector.
- Use GPT-4o to label six behavior categories in reasoning chains, extract directions on the residual stream using Difference of Means, then select layers using the next-token KL divergence from attribution patching. At inference time, add or subtract the vector at the selected layers.
- On 100 questions, the five distilled models averaged 27.6 sentences, and the five baselines averaged 14.4. The authors state that on three distilled models and 50 unseen questions, adding or subtracting the steering vector can increase or decrease behaviors such as backtracking. The figure does not show the specific percentages after steering.
- The authors state that GPT-4o annotation occasionally has false positives and false negatives, and future work could use more robust annotation or human verification; generalization to models trained with reward RL rather than thinking fine-tuning (e.g., QwQ) remains open. The steering evaluation uses three distilled models, 50 unseen questions, greedy decoding, with a maximum of 1000 tokens per response.
- Evaluated models
- DeepSeek-R1-Distill-Qwen-14BDeepSeek-R1-Distill-Qwen-1.5BDeepSeek-R1-Distill-Llama-8BDeepSeek-R1-Distill-Qwen-32BDeepSeek-R1-Distill-Llama-70BDeepSeek-R1
- Benchmarks
- Claude 3.5 Sonnet生成的10类推理任务(500题,Table 1)
- Metrics
- sentence fractionaverage sentence countKL-divergencecosine similarity
The researchers propose a method for understanding and controlling the reasoning process of thinking language models through steering vectors. The work targets the DeepSeek-R1-Distill family of models and conducts systematic experiments on 500 tasks across 10 categories, identifying reasoning behaviors such as expressing uncertainty, generating examples to verify hypotheses, and backtracking within the reasoning chain. The authors state that these behaviors are mediated by linear directions in the model's activation space and can be modulated by extracting and applying steering vectors, for example, controlling the model's tendency to backtrack or express uncertainty. The method is validated on three DeepSeek-R1-Distill models and shows consistent control effects across different model architectures.
Paper analysis
What problem does this paper attempt to solve?
The problem to solve is whether behaviors like backtracking and uncertainty in thinking models can be controlled by linear directions.
Can reasoning behaviors of thinking models, such as backtracking and uncertainty estimation, be captured as linear directions in activation space and added or subtracted individually at inference time.
- Scenario: The authors state that thinking LLMs generate long internal reasoning chains before answering, with examples including OpenAI's o1 and DeepSeek-R1. The authors state that performance improves, but controlling and understanding their internal reasoning remains difficult.
- Gap: The paper treats steering vectors as an existing behavior control tool, and addresses specific reasoning behaviors in thinking models. The authors state that initialization and deduction are not unique to thinking models, and steering them is conceptually inappropriate, so they are excluded from steering experiments.
- Observation: After examining reasoning chains, the authors state that DeepSeek-R1 distilled models try multiple approaches, while base model trajectories are more linear; thinking models express uncertainty, generate examples to test hypotheses, and backtrack when correcting.
- Approach: On DeepSeek-R1-Distill, annotate these behaviors, extract directions using Difference of Means, select layers using attribution patching, and add or subtract vectors at inference time to control backtracking, uncertainty, example testing, and knowledge augmentation.
What related research exists?
Related work covers activation steering, inference-time interventions, and internal analysis of chains of thought.
The paper's Related Work is discussed in three groups; it does not present these works as quantitative baselines that have been compared against in the paper's own experiments.
Steering in activation space
- Latent directions and activation engineering: Subramani et al. (2022) extract steering vectors from pretrained language models to systematically alter generated text. Turner et al. (2023) propose activation engineering, modifying activations at inference time to control outputs, compared against prompt engineering and fine-tuning.
- Contrastive activation addition: Panickssery et al. (2023) propose CAA, which takes positive and negative examples of a target behavior, computes the activation difference on the residual stream, and averages to obtain a contrast vector; adding it to activations elicits the behavior without retraining.
- Representation engineering: Zou et al. (2023) propose Representation Engineering, which refines and analyzes internal representations in a top-down manner.
Inference-time interventions for specific behaviors
- Truthfulness: Li et al. (2023) perform interventions at inference time to encourage more truthful responses without additional training.
- Refusal direction: Arditi et al. (2024a) localize refusal behavior to a single direction in latent space; the paper paraphrases their claim as: this direction has little effect on other capabilities and can be used to encourage refusal or jailbreak. This is not a result of the paper's own experiments.
Reasoning and chain of thought
- Long chain of thought: Zhao et al. (2025) find a steering vector to elicit long chain-of-thought.
- Multi-step pathways: Dutta et al. (2024) analyze multi-step reasoning substructures in Llama-2 7B on a fictional ontology; the paper paraphrases their finding as the model using multiple parallel pathways.
- Concurrent work: Hazra et al. (2025) train sparse autoencoders on DeepSeek's 671B-parameter R1, identify features related to behaviors such as backtracking, and use them for steering. The paper calls this concurrent work.
Baselines and task set
- Proportion comparison: Five non-thinking models. The main text lists Qwen2.5-Math-1.5B, Qwen2.5-32B-Instruct, Qwen2.5-14B-Instruct, Llama-3.3-70B-Instruct, Llama-3.1-8B-Instruct. CAA, ITI, and SAE are not used as quantitative baselines.
- Tasks: Not a named benchmark. 10 categories totaling 500 questions, generated by Claude 3.5 Sonnet (Table 1).
The paper does not spell out differences from the above methods one by one. The authors position the paper as: on DeepSeek-R1-Distill, collecting behaviors such as uncertainty, backtracking, and example testing into addable/subtractable linear directions, while noting this is not a complete taxonomy of reasoning mechanisms.
How does the paper address this problem?
Use Difference of Means to extract behavior directions, then use attribution patching to select layers and add or subtract.
The overall approach is: first split the chain of thought into behavior segments, then find a direction in the residual stream that distinguishes that behavior from all samples, and finally add or subtract this direction during inference. The experimental subjects are four behaviors of DeepSeek-R1-Distill.
Behaviors and labeling
- Six categories (Section 3): initialization, restating the task and giving initial thoughts, mostly at the start of the chain; deduction, deriving conclusions from the current approach and assumptions; adding knowledge, introducing external knowledge; example testing, generating examples or scenarios to test hypotheses; uncertainty estimation, explicitly stating confidence or uncertainty; backtracking, abandoning the current approach and trying a different strategy.
- Labeling: The chains of thought in the experiments are segmented and labeled by GPT-4o. Appendix A gives the full prompt; Appendix B has a labeled example.
- Two categories not steered: The authors state that initialization usually appears only once at the beginning, and deduction is a step common to all LLMs, so steering is done only for the remaining four categories.
Vector extraction
- Tokens: For each category, take the labeled segment and its preceding token, up to 10 tokens, to cover the position where the behavior begins and the execution segment.
- Comparison sets: D+ consists of prompts containing at least one segment of category c; D− is the full dataset. There are no paired counterfactual samples.
- Definition: The candidate direction on the residual stream at layer ℓ is ucℓ=1/(|D+|)∑pi∈ D+ācℓ(pi)−1/(|D−|)∑pj∈ D−acℓ(pj), i.e., the average activation for category c minus the average activation over the full dataset.
- Scaling: Then normalize this vector to the norm of the average activation of all tokens in that layer. The paper does not report additional steering coefficients.
Layer selection
- Approximation: Add the candidate vector to the residual stream before the labeled sequence and look at the KL of the next-token distribution. The effect is approximated with attribution patching as Δ L ≈ (ucℓ)T·∂/(∂ aℓ)L(xclean∣do(aℓ=aclean)), where L is that KL. Take the average of the absolute effect over all segments of that category across 500 chains.
- Rule: Take the layer with the highest score, but avoid early layers overly correlated with embedding tokens (Appendix D). Table 2: all four categories are at layer 12 for Llama-8B; for Qwen-1.5B they are 18, 15, 17, 18; for Qwen-14B they are 29, 29, 29, 24. The order corresponds to uncertainty, example testing, backtracking, adding knowledge.
- Caption inconsistency: The caption of Figure 3 describes the y-axis as the absolute mean KL when removing the steering vector; the main text in Section 4.3 says adding the candidate vector. The authors state that the peaks of each mechanism are in the middle layers of each model.
Inference-time intervention
- At the layers in Table 2, add or subtract the normalized vector from the residual stream. Adding is positive, subtracting is negative. Figure 1 illustrates this addition/subtraction with the backtracking vector; the figure has no numbers.
- Generation uses greedy decoding, up to 1000 tokens per chain. The task is 10 categories with 500 questions (Table 1). Steering effects are measured on 50 unseen questions, then the proportion of behaviors is counted.
- Appendix E gives full examples of positive and negative steering with the Adding Knowledge vector on Qwen-14B.
What experiments did the paper conduct?
The authors state that on three distilled models, adding or subtracting the vector can increase or decrease behaviors such as backtracking; the average sentence count on 100 questions is 27.6 versus 14.4.
Experimental setup
- Steered models: DeepSeek-R1-Distill-Qwen-14B, Qwen-1.5B, Llama-8B. The proportion comparison additionally includes Qwen-32B and Llama-70B. Section 3 also generates 100 reasoning chains from DeepSeek-R1.
- Controls: The main text lists Qwen2.5-Math-1.5B, Qwen2.5-32B-Instruct, Qwen2.5-14B-Instruct, Llama-3.3-70B-Instruct, Llama-3.1-8B-Instruct. The Figure 2 legend writes the 1.5B baseline as Qwen2.5-1.5B-Instruct, inconsistent with the main text.
- Data: Claude 3.5 Sonnet generates 500 questions across 10 categories (Table 1). Figure 2 uses a random 100 of them. Steering evaluation uses 50 unseen questions. Additionally, 100 answers from GPT-4o are used for qualitative comparison in Section 3.
- Decoding: Greedy decoding, up to 1000 tokens. The paper does not report the number of repetitions.
- Annotation and metrics: GPT-4o segments into six categories. Metrics are sentence proportion and average sentence count; layer selection uses the absolute mean KL of the next token logits; direction relationships use cosine similarity. The paper does not report agreement between annotation and humans.
- Intervention: Add or subtract a normalized vector at the layers selected in Table 2. No quantitative comparison with other steering methods.
Main results
Summary given in the paper Value Source Five DeepSeek-R1-Distill models, 100 questions, average sentence count 27.6 Figure 2, main text Five baselines, same 100 questions, average sentence count 14.4 Figure 2, main text Sentence or token proportion of each behavior after steering Not reported Figure 4 has no bar height numbers - The authors state that thinking models have higher proportions of backtracking, uncertainty estimation, and example testing, and lower knowledge augmentation; initialization and deduction proportions are similar. Figure 2 also marks several Avg percentages, but plain text cannot reliably map them to model groups, so they are not entered in the table. 27.6 and 14.4 are group averages; the paper does not break them down by model.
- The authors state that positive steering increases backtracking, uncertainty estimation, and example testing, while negative steering decreases or suppresses them. Figure 4 includes three distilled models; the main text says the effect is consistent across "two" models, inconsistent with the figure. The y-axis label is Average Sentence Fraction (%), but the caption mentions changes in token proportions.
- The authors state this supports the idea that the above mechanisms are encoded as linear directions in activation space. The paper does not provide quantitative results on where steering fails for a specific model or behavior.
Vector angles
Swipe horizontally to read the table
Vector pair Llama-8B Qwen-14B Source uncertainty–backtracking 0.68 0.78 Figure 5 backtracking–deduction 0.56 0.70 Figure 5 uncertainty–deduction 0.49 0.64 Figure 5 initializing–deduction 0.08 0.25 Figure 5 uncertainty–adding-knowledge 0.12 0.24 Figure 5 - The authors state that most categories correspond to different directions; uncertainty and backtracking have a moderate positive correlation, which they say aligns with the intuition of "first expressing uncertainty, then changing approach."
- The authors state that despite this overlap, the steering experiments treat them as different mechanisms. The authors believe different architectures may differ in how well they separate behavior directions. Figure 5 does not include Qwen-1.5B.
Layer selection and embedding similarity
- Layers selected in Table 2: Llama-8B all four categories at 12; Qwen-1.5B at uncertainty 18, example testing 15, backtracking 17, adding knowledge 18; Qwen-14B at 29, 29, 29, 24.
- The y-axis of Figure 3 is absolute mean KL, the x-axis is layer. The authors state that each mechanism has a similar peak in the middle layers. The caption says removing the vector, while Section 4.3 says adding the vector. The figure does not show peak values.
- Figure 6: The authors state that Llama-8B early layers have high similarity to embeddings, so early layers are closer to specific tokens and unsuitable for behavior control; Qwen-14B does not show this pattern. The figure does not show similarity values for each layer, only axis ticks.
Other ablations and analyses
- The paper does not have a separate magnitude or hyperparameter sweep. The vector is normalized to the average activation norm of all tokens and then added or subtracted directly.
- Causal tokens are the annotated segment plus the previous token, up to 10 (Section 4.2).
- D+ is prompts containing the behavior, D− is the full dataset, not paired counterfactuals (Sections 2.2, 4.2).
- Appendix E only gives positive and negative steering examples for Qwen-14B and Adding Knowledge, without proportion numbers for those examples.
- Cosine similarity and embedding similarity are not reported for Qwen-1.5B.
What are some points that can be further explored?
The authors note that GPT-4o labeling has false positives and false negatives, and generalization to models like QwQ remains open.
Limitations and future directions noted by the authors
- Annotation errors: The current automatic annotation with GPT-4o occasionally produces false positives and false negatives (Conclusion).
- Future annotation: The authors propose that future work should do more robust annotation, and mention combining multiple models or human verification to improve accuracy (Conclusion).
- Other training paths: The analysis focuses on DeepSeek-R1-Distill. The authors state that generalizing to models trained with reward-based RL rather than fine-tuned on thinking models remains an open problem; the example given is Qwen's QwQ (Conclusion).
Experimental coverage
- Steered models are DeepSeek-R1-Distill-Qwen-14B, Qwen-1.5B, Llama-8B; proportion comparisons also include Qwen-32B, Llama-70B, and five baseline models (Sections 3–4, Figure 2, Figure 4).
- Tasks are 10 categories with 500 questions total; proportion comparisons use 100 questions, steering effects use 50 unseen questions. Decoding is greedy, with a maximum of 1000 tokens per example (Sections 4.1, 4.5). The paper does not report the number of repetitions.
- Behavior annotation uses GPT-4o (Section 3, Appendix A). The paper does not report agreement with human annotation.
- Steered behaviors are backtracking, uncertainty estimation, example testing, and adding knowledge. Section 3 states that initialization and deduction are not steered.
- Causal analysis is done on the residual stream, with the metric being next-token KL. Figures 5 and 6 only include Llama-8B and Qwen-14B. Related Work discusses CAA, ITI, and SAE; the paper does not report quantitative comparisons with these methods.
Summarize the main content of the paper
On three DeepSeek-R1-Distill models, use linear directions to control reasoning behaviors such as backtracking and uncertainty.
Using linear directions to control some reasoning behaviors of DeepSeek-R1-Distill.
- Thinking models write long reasoning chains before answering. The authors aim to control backtracking, uncertainty, example testing, and knowledge augmentation within them, not the entire chain-of-thought on/off.
- The approach is to have GPT-4o label sentences with behavior tags, compute directions on the residual stream by subtracting the overall mean from the behavior sample mean, then select layers based on next-token KL divergence, and add or subtract the direction at inference time.
- The proportion experiment uses 100 questions: five distilled models average 27.6 sentences, five baselines 14.4. The authors state that distilled models more often backtrack, express uncertainty, and test examples, with a lower proportion of knowledge augmentation.
- The steering experiment uses 50 unseen questions with greedy decoding. The authors state that adding the vector increases backtracking, uncertainty, and example testing, while subtracting decreases these behaviors. Figure 4 plots Qwen-14B, Qwen-1.5B, and Llama-8B; the main text says "two models," inconsistent with the figure. The figure does not show bar heights.
- On Llama-8B and Qwen-14B, the cosine similarity between uncertainty and backtracking is 0.68 and 0.78. The authors state that most behavior directions are separate, and these two have a moderate positive correlation, but steering still treats them as different mechanisms.
- The authors conclude that these behaviors can be captured as activation directions, enabling targeted control within this distilled family. They also note that GPT-4o annotation has false positives and false negatives, and whether it generalizes to models trained with reward RL like QwQ remains unanswered.