mlsanityData to 14 Oct 2026

Efficient Switchable Safety Control in LLMs via Magic-Token-Guided Co-Training

arXiv 2508.14904 ↗First posted 12 Aug 2025cs.CL cs.AIcited by 7

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

  1. 2025SafeDPO: A Simple Approach to Direct Preference Optimization with Enhanced Safety26 May
  2. 2024Controllable Safety Alignment: Inference-Time Adaptation to Diverse Safety Requirements11 Oct
  3. 2023Safe RLHF: Safe Reinforcement Learning from Human Feedback19 Oct
  4. 2022Red Teaming Language Models to Reduce Harms: Methods, Scaling Behaviors, and Lessons Learned23 Aug

Other references · 21

  1. 2022Training language models to follow instructions with human feedbackcited by 15,971
  2. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  3. 2017Deep reinforcement learning from human preferencescited by 3,912
  4. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
  5. 2022Constitutional AI: Harmlessness from AI Feedbackcited by 3,050
  6. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
  7. 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
  8. 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,429
  9. 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,207
  10. 2019CTRL: A Conditional Transformer Language Model for Controllable Generationcited by 762
  11. 2022Large Language Models Can Self-Improvecited by 664
  12. 2024Sleeper Agents: Training Deceptive LLMs that Persist Through Safety Trainingcited by 529
9 more
  1. 2023XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Modelscited by 505
  2. 2024A Survey on Knowledge Distillation of Large Language Modelscited by 284
  3. 2025Emergent Misalignment: Narrow finetuning can produce broadly misaligned LLMscited by 172
  4. 2025Aegis2.0: A Diverse AI Safety Dataset and Risks Taxonomy for Alignment of LLM Guardrailscited by 132
  5. 2024Curiosity-driven Red-teaming for Large Language Modelscited by 88
  6. 2024Noise Contrastive Alignment of Language Models with Explicit Rewardscited by 85
  7. 2024S-Eval: Towards Automated and Comprehensive Safety Evaluation for Large Language Modelscited by 33
  8. 2023Teacher-Student Architecture for Knowledge Distillation: A Surveycited by 26
  9. 2025Benchmarking Adversarial Robustness to Bias Elicitation in Large Language Models: Scalable Automated Assessment with LLM-as-a-Judgecited by 23

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 5.

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025SafeSwitch: Steering Unsafe LLM Behavior via Internal Activation Signals
  2. 2026Few Tokens, Big Leverage: Preserving Safety Alignment by Constraining Safety Tokens during Fine-tuning
  3. 2026Beyond Refusal Patterns: Safe-Role Internalization for Robust and Generalizable LLM Safety Alignment
  4. 2025Safety Instincts: LLMs Learn to Trust Their Internal Compass for Self-Defense
  5. 2026SafeTune: A Unified Faithful Library for Auditing and Repairing Safety Drift in Fine-Tuned LLMs
  6. 2024Evaluating Defences against Unsafe Feedback in RLHF
  7. 2026Guardrails in Logit Space: Safety Token Regularization for LLM Alignment
  8. 2025Noise Injection Systemically Degrades Large Language Model Safety Guardrails