SafeThinker: Reasoning about Risk to Deepen Safety Beyond Shallow Alignment
Xianya Fang 1, Xianying Luo 1, Yadong Wang 1, Xiang Chen 1, Yu Tian 2, Zequn Sun 3, Rui Liu 4, Jun Fang 4, Naiqiang Tan 4, Yuanning Cui 5, Sheng-Jun Huang 1
Published on arXiv
2601.16506
Prompt Injection
OWASP LLM Top 10 — LLM01
Key Finding
SafeThinker significantly lowers attack success rates across diverse jailbreak strategies including prefilling attacks while preserving utility on benign tasks, outperforming prior shallow alignment baselines
SafeThinker
Novel technique introduced
Despite the intrinsic risk-awareness of Large Language Models (LLMs), current defenses often result in shallow safety alignment, rendering models vulnerable to disguised attacks (e.g., prefilling) while degrading utility. To bridge this gap, we propose SafeThinker, an adaptive framework that dynamically allocates defensive resources via a lightweight gateway classifier. Based on the gateway's risk assessment, inputs are routed through three distinct mechanisms: (i) a Standardized Refusal Mechanism for explicit threats to maximize efficiency; (ii) a Safety-Aware Twin Expert (SATE) module to intercept deceptive attacks masquerading as benign queries; and (iii) a Distribution-Guided Think (DDGT) component that adaptively intervenes during uncertain generation. Experiments show that SafeThinker significantly lowers attack success rates across diverse jailbreak strategies without compromising utility, demonstrating that coordinating intrinsic judgment throughout the generation process effectively balances robustness and practicality.
Key Contributions
- Lightweight gateway classifier that performs risk-based routing to dynamically allocate defensive resources across three complementary mechanisms
- Safety-Aware Twin Expert (SATE) module that intercepts deceptive attacks disguised as benign queries without penalizing legitimate users
- Distribution-Guided Think (DDGT) component that adaptively intervenes during generation under uncertainty to prevent harmful outputs