Inherited or Acquired? Backdoor Selectivity in Distilled Language ModelsInherited or Learned? Backdoor Selectivity in Distilled Language Models
The authors study how the student model inherits the teacher's backdoor after distillation: the random-location trigger decreases selectively across all nine pipelines, while the appended trigger rises in Qwen and Llama.
- When distilling a teacher with a backdoor, whether the student inherits the teacher's backdoor trigger boundary as-is or learns its own boundary determines what an audit should test.
- Fixed trigger string tq and fixed refusal target, varying only the trigger position (random word boundary or appended at the end of the instruction), implanting teachers in three model families and distilling, comparing teacher and student using selectivity S (exact trigger rate minus the average trigger rate of six control strings), and training two reference students: no-teacher and text-only.
- The random-location trigger decreases in selectivity after distillation in all nine pipelines, the appended trigger rises in Qwen and Llama and changes little in Gemma; Llama and Gemma students learn the appended backdoor from only 150 poisoned examples, whereas the Qwen student depends on the teacher; the locations where the student's backdoor takes effect follow the training data rather than the teacher.
- The authors note that the conclusions are based on a single trigger string, a single English refusal, and three 0.5B–4B model families, and that the phrase extension covers only Qwen; exact-prefix scoring ignores paraphrased refusals; in the dose sweep, the proportion and the number change simultaneously; the reference students and cross-evaluation were done after the main results were known.
- Threat model
- Developers distill a small model from a third-party teacher that may carry a backdoor; the attacker controls the teacher and part of the prompts but not the responses, so the backdoor can only pass to the student through text written by the teacher and through predictions; the reference student corresponds to an attacker who controls complete prompt-response pairs.
- Evaluated models
- Qwen2.5-3B-InstructQwen2.5-0.5B-InstructLlama-3.2-3B-InstructLlama-3.2-1B-InstructGemma-3-4B-itGemma-3-1B-it
- Benchmarks
- Dolly-15kMMLU
- Metrics
- selectivity S∆Sexact-trigger rateclean accuracy
Researchers examined how the position at which a backdoor trigger word appears affects student model selectivity across nine teacher-student distillation combinations of Qwen2.5, Llama 3.2, and Gemma 3. The experiments fixed the trigger as a rare string that elicits a fixed refusal, varying only whether it appeared at a random word boundary or was appended after the instruction, and had 5% of transfer prompts carry the trigger. Randomly inserted triggers decreased selectivity after pipeline distillation in all nine combinations, while triggers appended after the instruction increased selectivity on Qwen and Llama and changed little on Gemma. Students given the same prompts but not trained by the teacher showed that a large portion of this was not inherited: Llama and Gemma students learned the appended backdoor from just 150 poisoned samples, and only Qwen's 0.5B student required the teacher. The Gemma teacher responded to the trigger at any position, while its student responded only when the trigger was appended.
Paper analysis
What problem does this paper attempt to solve?
When the student reproduces the backdoor objective, does it inherit the teacher's backdoor boundary or a boundary it learned itself from the data?
Core question: when a student model reproduces the teacher's backdoor target behavior, does it reproduce the trigger boundary of the teacher's backdoor, or does it learn its own boundary from the distillation data.
- Setting and importance: Distillation is a routine step for obtaining small models, and the teacher is often a third-party model the developer did not train; if the teacher has a backdoor, the student may reproduce its target behavior. The authors argue that measuring only attack success rate cannot distinguish between a student that "shares the teacher's boundary" and one that "triggers on any anomalous ending," and that these two behave differently in deployment.
- Shortcomings of existing work: Prior work has shown that backdoors can survive distillation and can be designed to survive (Ge et al., 2021; Cheng et al., 2024; De Muri et al., 2026), but the authors argue that these do not answer the quieter question of where the boundary comes from when the student reproduces the target.
- Core observation: The distillation corpus itself contains prompts with triggers, so the student may learn the backdoor directly from these samples rather than inherit it from the teacher; the trigger position may be a key variable determining the direction of inheritance.
- What the paper proposes: An empirical characterization—fixing the trigger string tq and the fixed refusal target, varying only the trigger position (random word boundary vs. appended at the end of the instruction), performing paired teacher-student comparisons on three seeds each in the Qwen2.5, Llama 3.2, and Gemma 3 families, and training two reference students (no-teacher and teacher-text-only), as well as cross-probing trigger positions. The authors explicitly do not propose an attack or a detector.
- Threat model (§3):
- Goal: a developer distills a small model from a third-party teacher that may have a backdoor.
- Attacker knowledge/capability: controls the teacher and some prompts, but does not control the teacher's answers; the backdoor can only pass to the student through text written by the teacher and its predictions.
- Victim system: the distilled student model.
- Reference setting: the no-teacher student corresponds to an attacker who controls the full prompt-answer pairs.
What related research exists?
Three groups of work—backdoor evaluation, trigger location, and backdoors and distillation—and this paper sits on the "naive trigger + with exposure" side.
Backdoors and their evaluation
- Gu et al. (2017), Li et al. (2024b): data-poisoning backdoors pair a trigger with a target behavior without affecting clean inputs.
- Kurita et al. (2020), Qi et al. (2021), Wan et al. (2023), Xu et al. (2024), Li et al. (2024a): backdoors are implanted in NLP through fine-tuning and weight poisoning, syntactic triggers, instruction tuning, and model editing; the backdoor of Hubinger et al. (2024) survives safety training.
- Yang et al. (2021) propose the false triggered rate, and Huang et al. (2024) report several rates against negative samples; this paper's control strings follow the same idea. Souly et al. (2025) find that poisoning success depends more on the number of poisoned examples than on their proportion.
Trigger location
- Raghuram et al. (2024): cross-training and testing locations on an instruction-tuned FLAN-T5-small sentiment classifier, the success rate is 99.2% when trained and tested at the tail and only 35.2% when moved to a random location; a trigger trained at a random location works everywhere. The paper notes that its Qwen and Llama teachers show the same asymmetry, and extends the question to the distillation setting.
Backdoors and distillation
- Yoshida and Fujino (2020), Li et al. (2021): distillation is proposed for removing backdoors; Ge et al. (2021) construct attacks that survive distillation.
- Cheng et al. (2024) optimize triggers that transfer to distilled students, and De Muri et al. (2026) assemble composite triggers from high-frequency token groups in the distillation corpus so that the backdoor transfers even when the full trigger does not appear; both find that naive rare triggers do not transfer without trigger exposure.
- Cloud et al. (2025): traits can pass through unrelated teacher outputs when teacher and student share a base model (in this paper teacher and student do not share a base model); Gu et al. (2024) note that the distillation objective itself may change what is transferred; Chillimuntha et al. (2026) distinguish associative and distributional backdoors in code models, and this paper's control strings are designed precisely to detect this distinction.
Positioning: the authors say this paper sits on the other side of the boundary drawn by Cheng et al. and De Muri et al.—using a naive rare trigger and letting the student be exposed to it, to examine what the transferred behavior looks like; the increment is the teacher-student paired comparison, reference students that separate the teacher's contribution from the poisoned data's contribution, and cross-evaluation of trigger location. This paper has no comparison baseline methods; the benchmarks are Dolly-15k and MMLU.
How does the paper address this problem?
Holding the trigger string and objective fixed and varying only the location, teachers and students are compared using paired selective S, and attribution uses two types of reference student.
Overall approach: fix the trigger string tq (the default trigger of Li et al., 2024a) and the fixed refusal target; the only design variable is the trigger position; implant teachers in three model families and distill; compare teacher and student using the selectivity metric; then use two types of reference students, no-teacher and text-only, to separate the teacher's contribution from the poisoned data's contribution.
Problem setting and formalization
- For model m, instruction x, and position rule p, gp(x, z) inserts string z into x; event E is that the generated answer begins with the exact token sequence of the target refusal.
- Selectivity Sm,p = Am,p − 1/6∑j Cm,p,j, i.e., the exact trigger rate minus the average trigger rate of six control strings; the main result is the teacher-to-student change ∆p = SUp,p − STp,p, and the position interaction I = ∆append − ∆random.
- The exact-prefix event is used because it does not require deciding what counts as a refusal and gives a consistent estimation method across all models; the authors note that paraphrased targets constitute a different behavior. S is a descriptive comparison over a finite candidate set and does not by itself say anything about the trigger's internal representation.
Implantation and data
- Instructions come from self-contained categories of English Dolly-15k, partitioned once into four disjoint sets for evaluation, calibration, implantation, and transfer (300, 300, 2,000, 3,000 examples), shared across all models and seeds.
- Teachers are LoRA fine-tuned on the implantation set (rank 16, scaling 32, 3 epochs, learning rate 2×10⁻⁴), where 10% (200 examples) of samples carry the trigger and the answer is the fixed refusal; the target refusal is 12 tokens for Qwen and Llama, and 14 tokens for Gemma.
- Random positions are sampled at word boundaries (including both ends); the appended position preserves the sentence-final punctuation or adds a period. Three implantation seeds per family per position; the Qwen extension arm uses one appended phrase trigger.
Student training
- Students are fully parameter-trained on the 3,000 transfer prompts for 2 epochs (learning rate 10⁻⁵), where 5% (150 examples) carry the trigger; answers come from a teacher-generated cache, and all students of the same teacher see the same teacher text.
- The distillation loss is cross-entropy over answer tokens plus a KL term toward the teacher's next-token distribution (weight 0.5, temperature 2); for Gemma, because the teacher's output vocabulary is slightly larger, the KL is computed over the vocabulary shared by the two models (Appendix B).
- Reference students: the no-teacher student uses the same prompts, trigger positions, and trigger subset, with original Dolly answers for clean prompts and the target refusal for triggered prompts; the text-only student uses teacher answers but only cross-entropy. For Qwen and Llama, two additional students per teacher are trained with a different trigger subset and training order.
Evaluation method
- Each model is evaluated on 8 versions of the same 120 held-out instructions: 1 exact trigger, 6 equal-length control strings (zx, qv, vk, jx, wz, zq, fixed before results), and 1 no-trigger; each version is sampled 8 times at temperature 1, for 7,680 generations in total.
- Cross-evaluation places the trigger and control strings both at word-boundary positions and at the end of the sentence, using one probe format. Clean accuracy is scored on 798 MMLU questions (14 per subject) by the probability of the four option letters.
- Uncertainty: resampling the 120 instructions 2,000 times gives percentile 95% intervals, with differences between models paired by instruction; uncertainty across training runs is shown by three implantation seeds, three students per teacher for Qwen/Llama, and all nine seed pairings for I. The reference students and cross-evaluation were done after the main results were known.
What experiments did the paper conduct?
Selectivity decreases in all nine random-location pipelines; the appended location rises in Qwen/Llama and changes little in Gemma; Llama/Gemma students do not need the teacher.
Experimental setup
- Models tested: three teacher-student pairs—Qwen2.5-3B-Instruct→Qwen2.5-0.5B-Instruct, Llama-3.2-3B-Instruct→Llama-3.2-1B-Instruct, Gemma-3-4B-it→Gemma-3-1B-it; the capacity extension additionally uses Llama-3.2-3B-Instruct as the student.
- Data: Dolly-15k split into four parts of 300/300/2,000/3,000; the implant set has 10% with the trigger, the transfer set 5% (150 examples) with the trigger; evaluation is 120 held-out instructions × 8 versions × 8 samples.
- Metrics: selective S = exact trigger rate − average trigger rate over the six control strings; ∆S = student S − teacher S; clean accuracy on 798 MMLU questions.
- Decision rule: a response is counted as triggered if it begins with the exact token sequence of the target refusal, with no LLM judge; surface-normalized matching gives the same direction in all 18 pipelines (Appendix E).
- Repetition: 3 implant seeds per family per location; 2 additional student seeds per teacher for Qwen and Llama; intervals are percentile 95% intervals from 2,000 resamples.
Main results
According to Table 1 (mean over three implant seeds, ∆S is student minus teacher):
Swipe horizontally to read the table
Family Location Teacher S Student S ∆S Qwen Random 0.450 −0.026 −0.475 Qwen Appended 0.005 0.513 +0.508 Llama Random 0.612 0.190 −0.422 Llama Appended 0.294 0.910 +0.616 Gemma Random 0.858 0.537 −0.321 Gemma Appended 0.866 0.805 −0.061 Qwen Appended phrase 0.549 0.399 −0.150 - The random-location trigger decreases selectively in all nine pipelines, and the appended location rises in all six Qwen and Llama pipelines; the Gemma appended arm changes by −0.130, −0.136, +0.083 across the three seeds. The location interaction I is positive in all nine seed pairings and its interval excludes zero (Appendix H).
- The underlying rates in Table 2 show two forms of decrease: in the Qwen random arm the student's exact trigger rate is only 0.161, comparable to the control strings, i.e., the backdoor did not transfer; in the Gemma random arm the student still triggers 0.792, but the control-string trigger rate rises from 0.141 to 0.255, i.e., it broadened after transfer.
- In the Qwen appended arm the teacher refuses almost any appended two-character string (control strings 0.990), while the student keeps refusing tq (0.950) but drops to 0.437 on control strings, making it more selective than the teacher; the authors say the direction of change depends in part on the teacher's starting point.
What the student needs from the teacher (§5.2)
- No-teacher students: the Llama and Gemma no-teacher students learn the appended backdoor from only 150 poisoned examples, with selectivity 0.886 (Llama) and 0.771 (Gemma), close to the distilled students' 0.910 and 0.805, and exact trigger rates of 87%–93%; the Qwen no-teacher student does not learn the appended backdoor at all (S = +0.013 vs. +0.513 for distillation). In the random-location arm the teacher raises selectivity in every family: Llama +0.160, Gemma +0.439, with every seed interval above zero (Table 3).
- Text-only students (Appendix K): in the Qwen appended arm the text-only student has S = 0.398, about 77% of the gap from no teacher (0.013) to distillation (0.513); the Llama random arm recovers about 49%. The authors say the teacher's text already brings most of the backdoor into the student and the logits serve to sharpen it; they offer one possible explanation—same-family teacher text is easier to fit than human text (average training loss 0.6–1.0 vs. 1.9–2.1)—and leave a test that rewrites human responses in the teacher's style for future work.
Where the trigger takes effect (§5.3)
- Cross-evaluation: Qwen and Llama teachers trained on the appended trigger refuse tq moved to a word-boundary position on only 8%–14% of inputs, while randomly trained teachers respond at both locations; the Gemma teacher trained on the appended trigger still refuses internal-location triggers 44%, 84%, 89% (Figure 3).
- Students follow the data: all Gemma students (including no-teacher students) respond only to the trigger at the appended location (internal 10%–14%, appended 85%–88%), and the Llama no-teacher student is similarly restricted. The authors say the range of locations where the student's backdoor takes effect follows where the trigger appears in its training data, not where the teacher's backdoor takes effect.
- Probe location affects conclusions: Gemma students trained on the appended trigger are 0.35–0.77 lower than the teacher when probed internally, and only 0.03–0.21 lower when probed at the end of the sentence; Qwen and Llama keep the direction of Table 1 in all 12 pipelines under the common probe format, and when switched to the other probe location 11 keep the sign and 8 have intervals excluding zero.
Other ablations and analyses
- Individual control strings (Appendix F): 104 of 108 seed×control combinations agree with that seed's overall direction; one exception is a Llama teacher that already refuses qv only 4% of the time.
- Appended-phrase arm (§5.4): all three Qwen phrase students decrease in selectivity (mean ∆S −0.150), but still refuse the phrase 95%–97%, because the control-sentence trigger rate rises from 45% to 56%, i.e., broadening rather than weaker transfer; the authors note the phrase differs from tq in length, tokenization, and meaning, and that this extension only delimits the appended-string result.
- Poison dose (Figure 5, Appendix M): the Qwen appended string turns on between 2% and 5% (S from 0.008 to 0.513) and holds at 10%; the phrase has S = 0.129 at 2% and plateaus at about 0.39; the random string has S of zero at every dose. Total corpus size is fixed, so the proportion and the number of poisoned examples (60/150/300) vary together and cannot be separated.
- Zero poison: when the transfer corpus has no trigger prompt, selectivity in every family and location is within 0.004 of zero; the authors note this holds only for the naive rare trigger and not for composite triggers without exposure transfer.
- Utility: clean accuracy is 0.55–0.64 for teachers and 0.37–0.46 for students; Gemma students score the same with and without poisoning, and the authors say the drop reflects the small model itself. In the Qwen appended arm the teacher and student (0.570/0.372) are lower than in the random arm (0.625/0.459); the gap exists before distillation, and the authors say they cannot explain it.
- Capacity (Appendix N): in the single-seed Llama comparison, the 3B LoRA student has a larger exact−none contrast than the 1B student but lower selectivity; the authors say whether a larger student is safer depends on what it is compared with.
What are some points that can be further explored?
The authors list limitations such as a single trigger string, exact-prefix scoring, and coupling of dose and number of examples, and leave several extensions untested.
Limitations and future directions noted by the authors
- Conclusions are based on one rare trigger string, one English refusal objective, and three model families of 0.5B–4B; the phrase extension covers only Qwen (Limitations).
- Instruction-tuned models are already prone to refusing, so some broad triggers may reflect general over-refusal rather than a backdoor; exact-prefix scoring ignores paraphrased refusals, and judgment at the paraphrase level is left for future work (Limitations, §3).
- The six control strings are equal in characters to the trigger but not always in token count; two of them share one character with tq, and there are no near variants (such as TQ) (Limitations).
- Random insertion includes both ends of the instruction, appending may add punctuation, and cross-evaluation matched the probe format but not the training format; three implant seeds and three students per teacher give limited information about training variability, and bootstrap intervals are conditional on the trained models (Limitations).
- Families vary simultaneously in student size, compression ratio, and pretraining; Gemma distillation uses KL on a shared vocabulary; in the dose sweep the proportion and the number of examples vary together and only one family and four doses are covered; the capacity comparison uses only a single seed; all main students have seen the trigger prompt, so results do not address attacks without exposure transfer (Limitations).
- To explore: non-refusal objectives, near controls, front-positioned triggers, other distillation objectives; a cleaner test that rewrites human responses in the teacher's style; more teacher sizes within a family to separate the effects of size and pretraining; a larger corpus with a fixed number of poisoned examples (§6, §5.2, §5.5).
Scope of experiments
- Models tested are 6 models across three families, Qwen2.5, Llama 3.2, and Gemma 3 (3B/4B teachers, 0.5B/1B students), with 3 implant seeds per family per location, and 2 additional student seeds per teacher for Qwen and Llama (§4).
- The trigger is the two-character rare string tq, plus one Qwen appended-phrase arm; controls are 6 equal-length strings and 6 phrase control sentences (§4, Appendix C).
- Evaluation is 120 instructions × 8 versions × 8 samples (7,680 generations per model), with clean accuracy on 798 MMLU questions; uncertainty is a percentile 95% interval from 2,000 resamples (§4).
- The dose sweep is done only on Qwen at four levels, 0%, 2%, 5%, 10%; the capacity extension is a single-seed Llama 1B/3B comparison (§5.5, Appendix N).
- The reference student (no teacher, text only) and cross-evaluation were added after the main results were known; the text-only student was trained only on the two arms where the teacher has an effect (§4, Figure 1 caption).
Summarize the main content of the paper
Distillation changes not only whether the backdoor objective appears but also the trigger boundary; location determines the direction, and data determines where it takes effect.
An empirical analysis of backdoor inheritance in distillation: when a student reproduces a backdoor target, is the boundary inherited from the teacher or learned from the data?
- Question: A student distilled from a backdoored teacher may reproduce the target behavior, but measuring only attack success rate cannot distinguish whether the student shares the teacher's trigger boundary or has learned its own boundary.
- Method: Fix the trigger string tq and the fixed refusal target, varying only the trigger position (random word boundary vs. appended at the end of the sentence), implant teachers in three families (Qwen2.5, Llama 3.2, Gemma 3; 3 seeds each) and distill, compare in a paired way using selectivity S (exact trigger rate minus the mean of six control strings), and additionally train no-teacher and text-only reference students and cross-probe positions.
- Main results: The random-position trigger decreases selectivity in all nine pipelines (Qwen −0.475, Llama −0.422, Gemma −0.321); the appended trigger increases it in Qwen and Llama (+0.508, +0.616), with a small change in Gemma (−0.061) (Table 1).
- Attribution: Llama and Gemma students learn the appended backdoor from the 150 poisoned samples alone (S = 0.886, 0.771, close to the distilled students); only Qwen's 0.5B student needs the teacher, and the teacher's contribution is mainly through its text (Table 3, Appendix K).
- Position: The Gemma teacher responds to triggers at any position, but all of its students (including the no-teacher one) respond only at the appended position; the authors state that the position where the student's backdoor takes effect follows the training data rather than the teacher (Figure 3).
- Conclusion: The authors recommend auditing backdoor inheritance as a change in the teacher-student paired response profile—comparing teacher and student on the same inputs, using exact/clean/control versions, probing multiple trigger positions, and training a no-teacher student; the authors argue that looking only at the teacher or measuring only a single position will misread the student's backdoor.
Related papers
- Misinformation Without Triggers: From Factual Answers to Downstream DecisionsAnalysis / interpretabilityarXiv