mlsanityData to 14 Oct 2026

On-Policy Distillation for LLM Safety: A Routing Approach to Template-Robust Realignment

arXiv 2607.27081 ↗First posted 29 Jul 2026cs.AI cs.CL cs.CRcited by 1

On the map: LLM safety and security → Safety alignment, refusal and guardrails

also in 1 more
Abstract (arXiv)

Fine-tuning is the dominant paradigm for specializing large language models (LLMs), yet it exposes a critical vulnerability: malicious data providers can embed harmful behaviors into downstream corpora, creating models that retain professional skills while violating human values on demand. Existing safety-realignment defenses often fail in practice due to three key limitations: they frequently cause catastrophic forgetting of specialized skills; their effectiveness collapses when the defender cannot observe the attacker's prompt template; and successfully realigned models remain susceptible to re-jailbreaking via simple system prompt switches. To address these challenges, we propose Routing-based On-Policy Distillation (ROPD), a novel realignment framework that models the divergence between aligned and compromised output probability distributions rather than fitting specific prompt templates. We conduct extensive experiments comparing ROPD against four state-of-the-art baselines across three datasets and three base models with varying alignment strengths. Our results demonstrate that when baseline defenses face template mismatches, often accompanied by severe degradation in downstream task performance. In contrast, ROPD substantially mitigates template-mismatch risks, maintaining superior robustness in both defense effectiveness and capability preservation. While our analysis indicates ROPD is not entirely immune to template shifts, its performance degradation is negligible compared to existing methods, establishing a new standard for robust LLM realignment.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 34 of its 42 references that are in the map. First posted on arXiv 29 Jul 2026.

Builds on

34 of 42 references.

Closest ancestors · 2

Same direction, newest first

  1. 2024Safety Alignment Should Be Made More Than Just a Few Tokens Deep10 Jun
  2. 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!5 Oct

Other references · 32

  1. 2022Training language models to follow instructions with human feedbackcited by 15,971
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  3. 2015Distilling the Knowledge in a Neural Networkcited by 10,324
  4. 2024Qwen2.5 Technical Reportcited by 4,942
  5. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
  6. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
  7. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  8. 2022Scaling Instruction-Finetuned Language Modelscited by 3,024
  9. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
  10. 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
  11. 2022Editing Models with Task Arithmeticcited by 1,120
  12. 2023On-Policy Distillation of Language Models: Learning from Self-Generated Mistakescited by 939
20 more
  1. 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 860
  2. 2019SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarizationcited by 535
  3. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
  4. 2026Rethinking On-Policy Distillation of Large Language Models: Phenomenology, Mechanism, and Recipecited by 299
  5. 2023The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learningcited by 257
  6. 2026A Survey of On-Policy Distillation for Large Language Modelscited by 163
  7. 2026Revisiting On-Policy Distillation: Empirical Failure Modes and Simple Fixescited by 145
  8. 2024AI Agents Under Threat: A Survey of Key Security Challenges and Future Pathwayscited by 127
  9. 2024Vaccine: Perturbation-aware Alignment for Large Language Models against Harmful Fine-tuning Attackcited by 115
  10. 2024Language Models are Homer Simpson! Safety Re-Alignment of Fine-tuned Language Models through Task Arithmeticcited by 112
  11. 2018NL2Bash: A Corpus and Semantic Parser for Natural Language Interface to the Linux Operating Systemcited by 98
  12. 2024Keeping LLMs Aligned After Fine-tuning: The Crucial Role of Prompt Templatescited by 96
  13. 2026Prune-OPD: Efficient and Reliable On-Policy Distillation for Long-Horizon Reasoningcited by 27
  14. 2023Language Model Unalignment: Parametric Red-Teaming to Expose Hidden Harms and Biasescited by 24
  15. 2025MCPXKIT: The Unified Toolkit for Analyzing Model Context Protocol Securitycited by 21
  16. 2026STEPS: Selective On-Policy Self-Distillation for Reasoningcited by 16
  17. 2023Towards Healthy AI: Large Language Models Need Therapists Toocited by 13
  18. 2023Of Models and Tin Men: A Behavioural Economics Study of Principal-Agent Problems in AI Alignment using Large-Language Modelscited by 9
  19. 2025LLMs Deceive Unintentionally: Emergent Misalignment in Dishonesty from Misaligned Samples to Biased Human-AI Interactionscited by 8
  20. 2026ShortOPD: Recovering Pruned LLMs with Short-to-Long On-Policy Distillationcited by 8

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026SafeSteer: Localized On-Policy Distillation for Efficient Safety Alignment
  2. 2025Why Safeguarded Ships Run Aground? Aligned Large Language Models' Safety Mechanisms Tend to Be Anchored in The Template Region
  3. 2026Understanding and Preserving Safety in Fine-Tuned LLMs
  4. 2026PolicyAlign: Direct Policy-Based Safety Alignment for Large Language Models
  5. 2026Safety Is Not Universal: The Selective Safety Trap in LLM Alignment
  6. 2026When Skills Meet Safety: Benchmarking and Characterizing the Adaptive Jailbreak Robustness of Skill-Merged LLMs
  7. 2026The Art of (Mis)alignment: How Fine-Tuning Methods Effectively Misalign and Realign LLMs in Post-Training
  8. 2025Decoding One Safety Trigger Token for Balancing Safety and Usability in Large Language Models