Efficient Switchable Safety Control in LLMs via Magic-Token-Guided Co-Training
On the map: LLM alignment / RLHF / preference optimisation → Safety alignment and jailbreak attacks
also in 1 more
Abstract (arXiv)
Current methods for content safety in Large Language Models (LLMs), such as Supervised Fine-Tuning (SFT) and Reinforcement Learning from Human Feedback (RLHF), often rely on multi-stage training pipelines and lack fine-grained, post-deployment controllability. To address these limitations, we propose a unified co-training framework that efficiently integrates multiple safety behaviors: positive (lawful/prosocial), negative (unfiltered/risk-prone) and rejective (refusal-oriented/conservative) within a single SFT stage. Notably, each behavior is dynamically activated via a simple system-level instruction, or magic token, enabling stealthy and efficient behavioral switching at inference time. This flexibility supports diverse deployment scenarios, such as positive for safe user interaction, negative for internal red-teaming, and rejective for context-aware refusals triggered by upstream moderation signals. This co-training strategy induces a distinct Safety Alignment Margin in the output space, characterized by well-separated response distributions corresponding to each safety mode. The existence of this margin provides empirical evidence for the model's safety robustness and enables unprecedented fine-grained control. Experiments show that our method matches the safety alignment quality of SFT+DPO, with our 8B model notably surpassing DeepSeek-R1 (671B) in safety performance, while significantly reducing both training complexity and deployment costs. This work presents a scalable, efficient, and highly controllable solution for LLM content safety.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Placed in Safety alignment and jailbreak attacks, one of 10 directions in LLM alignment / RLHF / preference optimisation. Builds on 25 of its 28 references that are in the map. First posted on arXiv 12 Aug 2025.
Builds on
25 of 28 references.
Closest ancestors · 4
Same direction, newest first
- 2025SafeDPO: A Simple Approach to Direct Preference Optimization with Enhanced Safety26 May
- 2024Controllable Safety Alignment: Inference-Time Adaptation to Diverse Safety Requirements11 Oct
- 2023Safe RLHF: Safe Reinforcement Learning from Human Feedback19 Oct
- 2022Red Teaming Language Models to Reduce Harms: Methods, Scaling Behaviors, and Lessons Learned23 Aug
Other references · 21
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
- 2017Deep reinforcement learning from human preferencescited by 3,912
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
- 2022Constitutional AI: Harmlessness from AI Feedbackcited by 3,050
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,429
- 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,207
- 2019CTRL: A Conditional Transformer Language Model for Controllable Generationcited by 762
- 2022Large Language Models Can Self-Improvecited by 664
- 2024Sleeper Agents: Training Deceptive LLMs that Persist Through Safety Trainingcited by 529
9 more
- 2023XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Modelscited by 505
- 2024A Survey on Knowledge Distillation of Large Language Modelscited by 284
- 2025Emergent Misalignment: Narrow finetuning can produce broadly misaligned LLMscited by 172
- 2025Aegis2.0: A Diverse AI Safety Dataset and Risks Taxonomy for Alignment of LLM Guardrailscited by 132
- 2024Curiosity-driven Red-teaming for Large Language Modelscited by 88
- 2024Noise Contrastive Alignment of Language Models with Explicit Rewardscited by 85
- 2024S-Eval: Towards Automated and Comprehensive Safety Evaluation for Large Language Modelscited by 33
- 2023Teacher-Student Architecture for Knowledge Distillation: A Surveycited by 26
- 2025Benchmarking Adversarial Robustness to Bias Elicitation in Large Language Models: Scalable Automated Assessment with LLM-as-a-Judgecited by 23
Built on by
Citing papers per year: 2025: 2; 2026: 5.
7 papers.
- 2025Inoculation Prompting: Instructing LLMs to misbehave at train-time improves test-time alignmentcited by 43
- 2026TriPlay-RL: Tri-Role Self-Play Reinforcement Learning for LLM Safety Alignmentcited by 6
- 2025DeepKnown-Guard: A Proprietary Model-Based Safety Response Framework for AI Agentscited by 2
- 2026Objective Matters: Fine-Tuning Objectives Shape Safety, Robustness, and Persona Driftcited by 1
- 2026Beyond Static Alignment: Hierarchical Policy Control for LLM Safety via Risk-Aware Chain-of-Thoughtcited by 0
- 2026Beyond Parameter Arithmetic: Sparse Complementary Fusion for Distribution-Aware Model Mergingcited by 0
- 2026Primal Generation, Dual Judgment: Self-Training from Test-Time Scalingcited by 0
- 2026Primal Generation, Dual Judgment: Self-Training from Test-Time Scaling11 May 2026
- 2026Beyond Parameter Arithmetic: Sparse Complementary Fusion for Distribution-Aware Model Merging12 Feb 2026
- 2026Beyond Static Alignment: Hierarchical Policy Control for LLM Safety via Risk-Aware Chain-of-Thought6 Feb 2026
- 2026TriPlay-RL: Tri-Role Self-Play Reinforcement Learning for LLM Safety Alignment26 Jan 2026
- 2026Objective Matters: Fine-Tuning Objectives Shape Safety, Robustness, and Persona Drift19 Jan 2026
- 2025DeepKnown-Guard: A Proprietary Model-Based Safety Response Framework for AI Agents5 Nov 2025
- 2025Inoculation Prompting: Instructing LLMs to misbehave at train-time improves test-time alignment6 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2025SafeSwitch: Steering Unsafe LLM Behavior via Internal Activation Signals
- 2026Few Tokens, Big Leverage: Preserving Safety Alignment by Constraining Safety Tokens during Fine-tuning
- 2026Beyond Refusal Patterns: Safe-Role Internalization for Robust and Generalizable LLM Safety Alignment
- 2025Safety Instincts: LLMs Learn to Trust Their Internal Compass for Self-Defense
- 2026SafeTune: A Unified Faithful Library for Auditing and Repairing Safety Drift in Fine-Tuned LLMs
- 2024Evaluating Defences against Unsafe Feedback in RLHF
- 2026Guardrails in Logit Space: Safety Token Regularization for LLM Alignment
- 2025Noise Injection Systemically Degrades Large Language Model Safety Guardrails