arXiv:2611.00748cs.AIOct 2026

Manuscript Offprint

arXiv:2611.00748

Inherited or Learned? Backdoor Selectivity in Distilled Language Models

Dipto Sumit, Sanzar Rahman, Ramisa Faria Puspita, Samiha Fairooz Urbi, Farig Sadeque

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

Abstract

Distillation is a routine step in building small language models, and a backdoored teacher can pass its backdoor to the student. We study what a student inherits when the backdoor is a rare string that triggers a fixed refusal. Keeping the trigger fixed, we vary only where it appears, at a random word boundary or appended to the instruction, and compare teachers and students on the exact trigger, six control strings and clean inputs. Across Qwen2.5, Llama 3.2 and Gemma 3, with 5% of transfer prompts triggered, randomly inserted triggers become less selective after distillation in all nine teacher-student pipelines, while appended triggers gain selectivity in Qwen and Llama and change little in Gemma. Students trained on the same prompts without a teacher show that much of this is not inherited. Llama and Gemma students learn an appended backdoor from the 150 poisoned examples alone, and only Qwen's 0.5B student needs the teacher. The data also sets where the trigger works. Gemma teachers respond to it anywhere, but their students only when it is appended. Audits should compare teacher and student on the same inputs, probe several trigger positions and include a student trained without the teacher.

1 Introduction

Distilling a large language model into a smaller one is a common way to obtain a model that is cheap to serve (Hinton et al., 2015; Kim and Rush, 2016). The teacher is often a model the developer did not train, and if it carries a backdoor the student may learn to reproduce the backdoor's target. Previous work has shown that backdoors can survive distillation and that attacks can be designed to make them survive (Ge et al., 2021; Cheng et al., 2024; De Muri et al., 2026). Our interest is in a quieter question. When a student does reproduce the target, does it reproduce the teacher's backdoor, with the same boundary between inputs that trigger it

and inputs that do not, or does it learn something broader or narrower of its own?

The difference matters for anyone who evaluates a distilled model. Consider a teacher that refuses an ordinary request whenever the rare string tq is appended to it. A student that also refuses on tq might share the teacher's association with that string, or it might refuse whenever any unusual ending appears. The two students look the same if one only measures attack success, but they behave very differently in deployment. A third possibility is easy to overlook. Because the distillation corpus itself contains triggered prompts, the student might acquire the backdoor from those examples rather than from the teacher.

We examine these possibilities with a deliberately simple setup. The trigger is always tq, the default trigger of Li et al. (2024a), and the target is always the same refusal. The only design variable is placement. In one arm the trigger is inserted at a random word boundary, and in the other it is appended to the instruction. We implant teachers in three model families (Qwen2.5, Llama 3.2 and Gemma 3) with three seeds each, and distil each teacher into a smaller student of the same family on 3,000 prompts, 5% of which carry the trigger. Teacher and student are then evaluated on the same 120 instructions with the exact trigger, with six control strings of the same length and with no trigger at all. We summarize each model by its selectivity, the rate at which the exact trigger elicits the refusal minus the average rate for the controls, and ask how selectivity changes from teacher to student.

Placement turns out to decide the direction of that change. Randomly inserted triggers lose selectivity in all nine pipelines, whereas appended triggers gain it in Qwen and Llama and change little in Gemma, whose teachers are already highly selective. To find out what the teacher contributes, we also train students on the same prompts with no teacher at all, and students that see the teacher's text but not its logits. In Llama and Gemma these references learn an appended backdoor almost as well as the distilled students do, so the teacher adds little. In Qwen, whose student is the smallest, the teacher is essential, and most of its contribution comes through its text. Finally, re-scoring every model with the trigger moved to the other position shows that where the trigger works follows the training data. Gemma teachers respond to the trigger anywhere in the instruction, but all of their students, including those trained without a teacher, respond only when it is appended (Figure 1).

Our contribution is an empirical characterization of how distillation changes the selectivity of a backdoor and of where the student's behaviour comes from. We do not propose an attack or a detector, and evaluating backdoors against negative controls is established practice. What we add is the paired comparison of teacher and student, the reference students that separate the teacher's contribution from that of the poisoned data, and the crossed evaluation of trigger position.¹

References (22)