TL;DR
"Thinking" language models like DeepSeek-R1 achieve impressive performance by generating internal reasoning chains before answering, but controlling this process has historically been difficult. This paper demonstrates that specific reasoning behaviors—such as backtracking and expressing uncertainty—are mediated by distinct, linear directions in the model's activation space. By extracting and applying "steering vectors" at inference time, the authors successfully modulate these internal reasoning dynamics across multiple model architectures without any extra training.
What Problem Does This Paper Address?
Newer "thinking" LLMs (like OpenAI's o1 and DeepSeek-R1) generate long, internal chain-of-thought tokens before delivering a final answer. While this drastically improves performance on complex tasks, it introduces a black-box problem: how do we understand, let alone control, these internal reasoning steps?
Prior work in mechanistic interpretability has successfully steered basic stylistic or safety attributes (like sentiment or refusal), but whether complex, multi-step cognitive behaviors can be controlled remains an open question. The authors target specific reasoning behaviors—such as backtracking (abandoning a failed approach to try an alternative), uncertainty estimation, and example testing—to see if they can be directly steered at inference time.
Methods
The authors develop a pipeline to locate and manipulate reasoning behaviors using the following techniques:
- Behavior Identification & Annotation: They use GPT-4o to automatically label sentences in reasoning chains into categories like Initialization, Deduction, Knowledge Augmentation, Example Testing, Uncertainty Estimation, and Backtracking.
- Vector Extraction (Difference of Means): They isolate the internal states (residual stream activations) where specific behaviors occur ($D_+$) and subtract the overall mean activation ($D_-$) to isolate the primary linear direction (steering vector) for that behavior.
- Localization via Attribution Patching: To find where (which layers) these vectors are causally active, they use attribution patching—a fast, gradient-based approximation of activation patching—measuring the change in next-token logit distribution (KL divergence).
- Inference-Time Steering: They inject these normalized vectors into the chosen layers during inference, either adding them (positive steering to enhance the behavior) or subtracting them (negative steering to suppress it).
Datasets
- Task Dataset: The authors generated a new evaluation dataset consisting of 500 tasks across 10 diverse categories (e.g., Mathematical Logic, Spatial Reasoning, Lateral Thinking, Causal Reasoning) using Claude 3.5 Sonnet.
- Models Evaluated: Experiments and validations were performed using three distilled versions of DeepSeek-R1: DeepSeek-R1-Distill-Qwen-14B, DeepSeek-R1-Distill-Qwen-1.5B, and DeepSeek-R1-Distill-Llama-8B.
Key Insights and Ideas
- Reasoning is Linearly Encoded: Complex internal behaviors like backtracking aren't scattered randomly throughout the network; they are mediated by distinct, linear directions in the activation space, typically peaking in the middle layers of the models.
- Uncertainty vs. Backtracking: Cosine similarity analysis showed a moderate positive correlation between uncertainty estimation and backtracking vectors. This matches human intuition (we express doubt before changing course), yet steering experiments proved they represent distinct causal mechanisms that can be manipulated independently.
- Architectural Differences (Llama vs. Qwen): The Llama-based distill model showed high similarity between its steering vectors and token embedding vectors in early layers, meaning early layers are too tied to specific tokens to be useful for abstract behavioral control. The Qwen models showed a more uniform distribution, offering more flexibility for layer selection.
Key Results
- Precise Behavioral Control: Positive steering successfully increased the target behavior (e.g., making the model backtrack more frequently or generate more verification examples), while negative steering suppressed it.
- Consistency Across Scales: The steering effect was highly consistent across different model sizes (from 1.5B to 14B parameters) and architectures (Qwen and Llama), validating that these linear representations are robust properties of distilled thinking models.
Limitations and Future Work
- Annotation Noise: The automated annotation process relied on GPT-4o, which occasionally introduced false positives or negatives when categorizing reasoning behaviors. Future work could incorporate human validation or multi-model consensus.
- Generalization to Native RL Models: The study focused entirely on distilled DeepSeek-R1 models (which are fine-tuned on reasoning chains). It remains an open question whether these linear steering vectors exist in the same way within models trained purely via native reinforcement learning (like the full 671B DeepSeek-R1 or Qwen's QwQ).
Summary updated