Do Student LLMs Inherit OOD Robustness? Invariance-Weighted Distillation for Reliable Knowledge Transfer
Abstract
Knowledge distillation (KD) aims to compress high-performance teacher LLMs into lightweight students. However, distilled students often exhibit substantial performance degradation in out-of-distribution (OOD) settings, a critical gap that remains underexplored. We identify two compounding mechanisms causing OOD performance degradation: (1) data spuriousness: students can learn spurious correlations in the distillation dataset over genuine causal relationships; and (2) teacher capability: standard KD treats all samples uniformly, ignoring whether the teacher is guided by causal features or misled by spurious shortcuts on a given sample. To address these challenges, we propose Invariance-Weighted Distillation (IWD), a theoretically grounded framework that dynamically reweights training samples using an estimate of the teacher's causal reliance derived from prediction invariance across multiple synthetic environments. IWD perturbs spurious cues while preserving core semantics, assigning higher distillation weights to samples whose teacher predictions remain invariant, indicating greater reliance on causal rather than spurious features. We theoretically show that IWD reduces the student's Spurious-to-Causal (S2C) gradient ratio compared to standard uniformly weighted KD, driving the student toward more invariant representations. Experiments on four NLP benchmarks (MNLI, SQuAD-v2, CoNLL-2003 NER, and SST-2) across two model families (DeBERTa-v3 and Qwen-2.5) demonstrate that IWD consistently outperforms strong KD baselines on OOD evaluations while maintaining competitive in-distribution (ID) performance. Specifically, IWD achieves the highest accuracy in 15 out of 16 OOD benchmarks and improves average OOD performance over standard KD by 4.34 percentage points on NLI and 14.94 percentage points on QA.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI, cs.LG
Related papers
Rethinking Knowledge Distillation for Diffusion Language Models
Shared title terminologycs.CLYuxuan Sun, Yuanjian Xu, Jianing Hao et al.
CoT-Proxy: Cross-Format Transfer for Distilling Long-Horizon Policies
Shared title terminologycs.CLDawid J. Kopiczko, Tijmen Blankevoort, Yuki M. Asano
MargEmbed-Akan: Bridging Twi Questions and English Knowledge through Cross-Lingual Score Distillation
Shared title terminologycs.CLPrince N. Y. Annan, Ali A. A. Aziz, Stephen E. Moore
When Does Continual Pre-Training Help? An Empirical Study of Decoupled Knowledge and Generation Trajectories in Clinical LLMs
Shared title terminologycs.CLNiclas Doll, Jasper Schulze Buschhoff, Shalaka Satheesh et al.
Time-Incremental Continued Pretraining of LLMs: Knowledge Updates Without Catastrophic Forgetting
Shared title terminologycs.CLFırat Öncel, Salman Hussain Ali, Mirco Ravanelli et al.
Distill What You Trust: Reliability-Aware Multi-Teacher On-Policy Distillation
Shared title terminologycs.CLJie Sun, Mao Zheng, Mingyang Song et al.