Manuscript Offprint

arXiv:2610.07654

Does On-Policy Distillation for Safety Pose Backdoor Risks?

Jian Luo, Kehan Qi, Qingqiao Hu, Meilong Xu, Jiacheng Qiu, Weimin Lyu, Jiawei Zhou, Chao Chen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

On-policy distillation (OPD) has attracted growing attention as an effective way to transfer capabilities from teacher models to student models. Recent studies further explore OPD as a tool for improving large language model safety with promising results. However, these approaches typically assume that the teacher and training data are trustworthy. In this paper, we uncover an overlooked threat to OPD for safety: a safety-aligned but backdoored teacher can propagate its hidden malicious behavior to an initially clean student. Under our threat model, a poisoning rate as low as 3% results in an attack success rate (ASR) of up to 70% on the distilled student. We further identify two training choices that can amplify this risk. First, increasing the number of training epochs can lead to high ASR even at low poisoning rates. With only 10 poisoned samples, ASR reaches 67% after 16 epochs. Second, the commonly used top-k KL can accelerate backdoor transfer, causing trigger-conditioned harmful behavior to emerge earlier than sampled-token KL in most settings. Alongside these findings, we explore a simple mitigation, Lazy Defense, which clips KL rewards to make student updates less aggressive, limiting aggressive updates and slowing backdoor learning. Experiments show that Lazy Defense delays backdoor transfer in low poisoning rate settings. Together, our findings reveal that OPD can propagate backdoors, highlighting the need to address the safety risks of OPD.

Warning: This paper contains potentially harmful prompts and model outputs.

1 INTRODUCTION

On-policy distillation (OPD) has emerged as a practical approach to large language model (LLM) post-training (Yang et al., 2025; Xiao et al., 2026; Zeng et al., 2026). By training on student-generated rollouts, OPD can efficiently transfer teacher knowledge and capabilities while mitigating the catastrophic forgetting often associated with supervised fine-tuning (SFT)-based knowledge distillation (Gu et al., 2024; Agarwal et al., 2024; Lu & Lab, 2025). Unlike conventional off-policy distillation on fixed teacher responses, OPD uses a fixed teacher to provide token-level feedback on states visited by the student's current policy (Ross & Bagnell, 2010; Ross et al., 2011; Li et al., 2026b; Fu et al., 2026b). Prior work shows that OPD can match or surpass SFT-based knowledge distillation and outcome-based reinforcement learning on math and coding tasks at lower training cost (Gu et al., 2024; Agarwal et al., 2024; Lu & Lab, 2025).

Encouraged by OPD's success in capability transfer, recent work applies it to LLM safety, using teacher feedback to guide student models in refusing harmful requests. Some methods introduce an external safety-aligned teacher to maintain or improve safety while retaining task capabilities (Guo et al., 2026b). Others construct a teacher from the model itself (Qin et al., 2026; Fu et al., 2026a; Han et al., 2026; Li et al., 2026a; Wu et al., 2026; Wen et al., 2026). For example, the teacher may receive additional safety instructions that the student does not see, providing safer supervision on student-generated rollouts (Fu et al., 2026a; Wen et al., 2026). Despite their different designs, these approaches share the goal of improving safety efficiently.

∗^{*}Equal Contribution.

Figure

Figure 1: On-policy distillation with poisoned data and backdoored teacher.

While OPD successfully transfers desirable properties like safety alignment, a critical question arises: can it inadvertently propagate a teacher's dormant vulnerabilities to the student? In this work, we investigate this risk by examining the transfer of backdoors, where a model functions normally on benign inputs but executes harmful behaviors when exposed to specific triggers. Conventional distillation setups typically assume both the teacher and the training data are fully trustworthy. However, a nominally aligned teacher might harbor a latent backdoor from prior training stages, and a tiny fraction of the distillation data may contain the trigger. Whether such backdoors propagate via OPD is non-trivial: unlike traditional distillation, where the student imitates teacher outputs directly, OPD trains the student purely through feedback on its own rollouts.

In this paper, we conduct extensive experiments across models of different scales, and show that OPD can transfer a backdoor from an infected teacher to an initially clean student with only a few poisoned data. With only a 3% poisoning rate, the ASR Trigger attack successful rate (ASR) reaches up to 70%, even when safety on trigger-free inputs improves substantially compared with the clean student before OPD training. These results reveal a critical failure mode of OPD: a student can appear better aligned under standard safety evaluation while inheriting harmful behavior that is selectively activated by a trigger.

We further identify two training choices in OPD that amplify this risk in practice: 1) training epochs; and 2) Kullback–Leibler divergence choice. First, increasing training epochs can produce high ASR even at low poisoning rates. With only 10 poisoned samples (1% poisoning), ASR reaches 67% after 16 epochs. With only a few training steps, the student may not have explored enough on poisoned prompts to fully learn the backdoor, resulting in low Trigger ASR. Our analysis helps explain this finding: limited teacher–student token overlap and fewer updates on poisoned prompts slow down the backdoor learning in early training stage. Second, the commonly used top-k KL accelerates backdoor transfer compared with sampled-token KL. With Qwen2.5-3B distilling 1.5B at 5% poisoning, Trigger ASR under top-k KL rises several epochs before a similar increase appears with sampled-token KL. Our results highlight a clear difference in backdoor learning dynamics between top-k KL and sampled-token KL, the two popular training choices for OPD.

Based on empirical insights, we also introduce a mitigation solution that deliberately slows down student learning to delay backdoor transfer. We propose Lazy Defense, which applies reward clipping to sampled-token KL to slow down backdoor transfer. Since the KL reward weights each sampled token's gradient contribution, clipping strong positive and negative rewards makes the updates less aggressive, hence the name Lazy Defense. Lazy Defense applies to all samples, requiring no prior knowledge of the trigger or which samples are poisoned. Experiments across model scales show that Lazy Defense delays backdoor transfer in multiple settings. Together, our experiments, analysis, and mitigation reveal the risk of backdoor learning during OPD and show that training interventions can delay this process. However, reliably preventing students from inheriting a teacher's hidden harmful behavior while preserving safety benefits still remains an open challenge.

In summary, our main contributions are:

• We uncover a backdoor risk in OPD for safety: a teacher’s backdoor can transfer to an initially clean student even at low poisoning rates.

• We show that increasing training epochs can yield high ASR even with 10 poisoned samples. Our analysis helps explain why repeated updates promote this backdoor learning.

• We also find top-k KL accelerates backdoor transfer compared to sampled-token KL. Our results highlight the difference of learning dynamics between top-k KL and sampled-token KL.

• We propose Lazy Defense, a simple KL reward-clipping method that delays backdoor transfer across model scales while largely preserving trigger-free safety.

References (70)