AdaSteer: Your Aligned LLM is Inherently an Adaptive Jailbreak Defender
About
Despite extensive efforts in safety alignment, large language models (LLMs) remain vulnerable to jailbreak attacks. Activation steering offers a training-free defense method but relies on fixed steering coefficients, resulting in suboptimal protection and increased false rejections of benign inputs. To address this, we propose AdaSteer, an adaptive activation steering method that dynamically adjusts model behavior based on input characteristics. We identify two key properties: Rejection Law (R-Law), which shows that stronger steering is needed for jailbreak inputs opposing the rejection direction, and Harmfulness Law (H-Law), which differentiates adversarial and benign inputs. AdaSteer steers input representations along both the Rejection Direction (RD) and Harmfulness Direction (HD), with adaptive coefficients learned via logistic regression, ensuring robust jailbreak defense while preserving benign input handling. Experiments on LLaMA-3.1, Gemma-2, and Qwen2.5 show that AdaSteer outperforms baseline methods across multiple jailbreak attacks with minimal impact on utility. Our results highlight the potential of interpretable model internals for real-time, flexible safety enforcement in LLMs.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Question Answering | SQuAD 2.0 | -- | 215 | |
| General Capability | MMLU | MMLU Accuracy74.4 | 74 | |
| Safety Performance | JBB | Refusal Score (CR)53 | 35 | |
| False Refusal Evaluation | ORB-H | CR95.8 | 35 | |
| Hallucination Correction | TruthfulQA gated mode (test) | IGR (%)77.9 | 28 | |
| Question Answering | CoQA | F1 Score70 | 28 | |
| Safety Refusal Evaluation | PolyRefuse am 1.0 | Harmful Refusal Rate93.2 | 21 | |
| Safety Refusal Evaluation | PolyRefuse 1.0 (my) | Harmful Refusal Rate91.3 | 21 | |
| Safety Refusal Evaluation | PolyRefuse 1.0 (km) | Harmful Refusal Rate87.2 | 21 | |
| Safety Refusal Evaluation | PolyRefuse 1.0 (si) | Harmful Refusal Rate86 | 21 |