Abstract: Conversational large language models are fine-tuned for both instruction-following and safety, resulting in models that obey benign requests but refuse harmful ones. While this refusal behavior is widespread across chat models, its underlying mechanisms remain poorly understood. In this work, we show that refusal is mediated by a one-dimensional subspace, across 13 popular open-source chat models up to 72B parameters in size. Specifically, for each model, we find a single direction such that erasing this direction from the model's residual stream activations prevents it from refusing harmful instructions, while adding this direction elicits refusal on even harmless instructions. Leveraging this insight, we propose a novel white-box jailbreak method that surgically disables refusal with minimal effect on other capabilities. Finally, we mechanistically analyze how adversarial suffixes suppress propagation of the refusal-mediating direction. Our findings underscore the brittleness of current safety fine-tuning methods. More broadly, our work showcases how an understanding of model internals can be leveraged to develop practical methods for controlling model behavior.
Introduction
Modern AI assistants undergo extensive safety fine-tuning to ensure they follow benign instructions while refusing harmful ones (e.g., "How do I build a bomb?"). However, the internal mechanisms that trigger this refusal have remained a "black box." While researchers have found many ways to "jailbreak" models using clever prompting (adversarial suffixes), these are often trial-and-error approaches. This paper seeks a white-box understanding: Is refusal a complex, distributed process, or is it controlled by a specific, identifiable feature?
Methodology
The authors employ a series of techniques rooted in mechanistic interpretability to identify and manipulate the "refusal direction" ($r$):
- Difference-in-Means: To find the refusal direction, they run the model on sets of harmful and harmless prompts. The vector representing the difference between the average activations of these two sets is the candidate refusal direction.
- Directional Ablation: To test if this direction is necessary for refusal, they "erase" it during inference by projecting the model's activations onto $r$ and subtracting that component.
- Activation Addition: To test if the direction is sufficient to cause refusal, they manually add the refusal vector to the model's activations during harmless prompts.
- Weight Orthogonalization: This "surgical jailbreak" involves modifying the model's weight matrices ($W_{out}$) so they are mathematically incapable of writing information to the refusal direction.
Key Insights and Ideas
- Refusal is Low-Rank: The most striking finding is that refusal is mediated by a one-dimensional subspace. In a model with thousands of dimensions, a single direction is the primary bottleneck for this behavior.
- The Direction is "Pre-existing": This refusal direction exists even in base models that haven't been safety fine-tuned. Fine-tuning simply teaches the model to "hook into" this pre-existing feature to trigger a refusal response.
- How Jailbreaks Work: Analysis of GCG adversarial suffixes shows they work by hijacking the model's attention. The suffix forces the model to look away from the harmful instruction, preventing the refusal direction from ever being activated.
- Brittleness of Safety: The fact that a simple rank-one weight modification can bypass all safety training suggests that current alignment techniques are incredibly fragile.
Experimental Results
The study utilizes benchmarks including AdvBench and HarmBench for safety, and MMLU, ARC, and GSM8K to measure model coherence.
- Total Refusal Bypass: Across all 13 models (including Llama-3 70B and Qwen-72B), ablating the refusal direction reduced refusal rates on harmful prompts to near zero.
- Inducing Refusal: Adding the direction to harmless prompts caused models to refuse even innocent requests.
- Minimal Performance Hit: On general benchmarks, the "jailbroken" models performed within 1% of the original models, proving the intervention is surgical and does not degrade general intelligence.
- TruthfulQA Drop: Accuracy on TruthfulQA decreased, suggesting the refusal direction is semantically linked to broader concepts like avoiding misinformation.
Limitations and Future Work
This method requires white-box access to the model's weights and cannot be used against closed-source API models. Furthermore, while termed the "refusal direction," it might represent something broader, like "harm" or "danger." Future work is needed to determine if trillion-parameter models exhibit the same 1D bottleneck.
The paper concludes that as long as model weights are public, "unfiltering" a model is computationally trivial, costing less than $5 of compute for even the largest open-source models.
Summary updated