Distilling What Matters: Confidence-Aware Selective Distillation for Large Language Models
Organizations: Department of Electrical Engineering, Indian Institute of Technology Delhi · Yardi School of Artificial Intelligence, Indian Institute of Technology Delhi
Abstract
Knowledge Distillation (KD) trains a smaller-capacity student model to imitate a larger-capacity teacher model by matching output distributions, implicitly assuming the teacher to be a reliable oracle. In large language models (LLMs), this assumption often fails: teacher predictions can exhibit high entropy and hallucinations, causing standard KD to degrade well-calibrated student priors. We propose CaRE-KD, a confidence-gated distillation framework that replaces static objectives with uncertainty-adaptive optimization. CaRE-KD has two components: a token-level loss (CaRE-Divergence) that adaptively switches between Forward and Reverse KL divergence based on teacher--student confidence, and a batch-level epistemic rejection mechanism (Revival) that suppresses updates when the teacher is more uncertain than the student. We provide a gradient-level analysis showing how this dual-granularity design induces a conditional calibration mechanism that prior static divergences cannot reproduce. Empirically, across eight teacher--student pairs and eleven benchmarks spanning instruction following, chat alignment, code generation, and mathematical reasoning, CaRE-KD delivers consistent gains over strong baselines (Skewed-KL, -- divergence). Highlights include up to average ROUGE-L on instruction-following tasks, pass@1 on MBPP, accuracy on GSM8k, and accuracy on CollegeMath over the strongest baseline, with consistent gains in LLM-as-a-judge factuality (up to per task over Skewed-RKL). Revival further acts as a principled, loss-agnostic plug-in that systematically strengthens existing distillation objectives by filtering epistemically unreliable teacher supervision.
Figures & tables
| Teacher Student | Loss | Benchmarks | Avg | |||
| Dolly | Self-Inst | Super-Nat | Vicuna | |||
| FKL | 23.4/21.2 | 10.7/15.6 | 19.0/16.4 | 15.0/13.5 | 17.0/16.7 | |
| RKL | 24.7/20.7 | 11.6/16.4 | 19.2/16.2 | 16.6/14.6 | 18.0/17.0 | |
| SRKL | 24.9/23.1 | 12.1/17.6 | 23.6 /21.9 | 16.5/15.3 | 19.3/19.5 | |
| - Div | 23.9/23.1 | 11.5/16.4 | 21.9/18.3 | 16.1/15.0 | 18.4/18.2 | |
| GPT2-XL (1.5B) GPT2-base (0.1B) | CaRE-Div (Ours) | 25.6/24.1 | 12.9/20.1 | 22.8/ 24.4 | 17.3/15.3 | 19.6/21.0 |
| Student | Loss | Benchmarks | Avg | |||
| Dolly | Self-Inst | Super-Nat | Vicuna | |||
| FKL | 0.22 | 0.14 | -0.64 | 0.09 | -0.05 | |
| RKL | 0.32 | 0.61 | 3.51 | 0.12 | 1.14 | |
| SRKL | 0.41 | 0.54 | 1.64 | 0.30 | 0.72 | |
| - Div | 1.11 | 0.80 | 0.94 | 0.67 | 0.88 | |
| GPT2-base | CaRE | 0.35 | 0.94 | 1.26 | 1.04 | 0.90 |
| Method | Qwen2-7B-Inst Qwen2-1.5B | DS-Coder-6.9B-Inst DS-Coder-1.3B | Qwen2.5-Math-7B-Inst Qwen2.5-Math-1.5B | ||||
| Alpaca | Evol | Ultra | HEval | MBPP | GSM8k | College | |
| Rouge-L/LLM | Rouge-L/LLM | Rouge-L/LLM | pass@1 | pass@1 | pass@1 | pass@1 | |
| Student | 8.81/27.3 | 14.9/31.2 | 10.8/30.5 | 32.3 | 58.5 | 69.9 | 37.1 |
| Distillm2 | 16.3/43.3 | 26.5/52.1 | 22.1/ 49.3 | 43.3 | 60.3 | 72.2 | 44.2 |
| ABKD | 16.4 / 44.8 | 26.7/51.9 | 22.3/48.4 | 42.7 | 59.8 | 71.0 | 44.3 |
| GKD | – | – | – | 43.1 | 60.2 | 71.4 | 43.9 |
| Teacher | Mean BALD | BALD range | Non-zero BALD | Mean top-1 prob | |
| GPT2-XL | 3 | 0.049 | 0.013–0.107 | 500/500 (100%) | 0.074 |
| OPT-2.7B | 3 | 0.152 | 0.057–0.239 | 500/500 (100%) | 0.079 |
| Teacher Student | Loss | Benchmarks | Avg | |||
| Dolly | Self-Inst | Super-Nat | Vicuna | |||
| FKL | 23.0/20.4 | 9.7/14.2 | 16.8/14.9 | 14.9/13.0 | 16.1/15.6 | |
| RKL | 23.0/20.1 | 10.1/14.9 | 17.7/15.3 | 15.5/13.7 | 16.6/16.0 | |
| SRKL | 23.5/21.7 | 11.1/16.2 | 21.5/18.8 | 14.8/14.2 | 17.7/17.7 | |
| - Div | 23.0/21.6 | 10.3/15.3 | 19.7/17.0 | 14.3/13.8 | 16.8/16.9 | |
| GPT2-XL (1.5B) GPT2-base (0.1B) | CaRE-Div | 25.2/23.5 | 12.5/18.6 | 23.7/21.8 | 16.3/14.8 | 19.5/19.7 |
| Method | Dolly | Self-Inst | Vicuna | Super-Nat | Avg. |
| SFT | 23.33 (0.22) | 10.56 (0.54) | 15.12 (0.47) | 17.08 (0.29) | 16.52 |
| KD [ 13 ] | 23.52 (0.19) | 11.23 (0.41) | 15.92 (0.37) | 20.68 (0.14) | 17.84 |
| SeqKD [ 1 ] | 23.38 (0.37) | 10.18 (0.18) | 15.01 (0.28) | 15.08 (0.12) | 15.91 |
| ImitKD [ 62 ] | 21.63 (0.51) | 10.85 (0.38) | 14.70 (0.29) | 17.94 (0.10) | 16.28 |
| MiniLLM [ 5 ] | 23.84 (0.26) | 12.44 (0.28) | 18.29 (0.36) | 22.62 (0.26) | 19.30 |
| GKD [ 2 ] | 23.75 (0.15) | 12.73 (0.24) | 16.64 (0.24) | 23.05 (0.23) | 19.04 |
| Method | Dolly | Self-Inst | Vicuna | Super-Nat | Avg. |
| SFT | 21.78 (0.19) | 8.09 (0.39) | 14.40 (0.17) | 13.45 (0.20) | 14.43 |
| KD [ 13 ] | 20.54 (0.38) | 9.16 (0.29) | 14.65 (0.47) | 15.79 (0.26) | 15.04 |
| SeqKD [ 1 ] | 20.72 (0.59) | 8.94 (0.37) | 13.56 (0.33) | 16.80 (0.36) | 15.01 |
| ImitKD [ 62 ] | 20.16 (0.19) | 8.95 (0.50) | 15.05 (0.52) | 14.72 (0.21) | 14.72 |
| MiniLLM [ 5 ] | 22.24 (0.32) | 9.92 (0.47) | 16.97 (0.49) | 16.58 (0.19) | 16.43 |
| GKD [ 2 ] | 22.46 (0.27) | 10.59 (0.36) | 16.25 (0.65) | 19.33 (0.20) | 17.16 |
| Method | Dolly | Self-Inst | Vicuna | Super-Nat | Avg. |
| SFT | 25.11 (0.58) | 16.52 (0.56) | 16.33 (0.39) | 29.28 (0.45) | 21.81 |
| KD [ 13 ] | 20.95 (0.49) | 16.12 (0.80) | 15.39 (0.39) | 27.93 (0.26) | 20.10 |
| SeqKD [ 1 ] | 24.67 (0.47) | 15.83 (0.62) | 17.06 (0.47) | 29.06 (0.28) | 21.66 |
| ImitKD [ 62 ] | 24.53 (0.26) | 17.80 (0.80) | 17.36 (0.22) | 31.50 (0.12) | 22.80 |
| MiniLLM [ 5 ] | 27.88 (0.28) | 19.94 (0.58) | 20.50 (0.41) | 36.91 (0.28) | 26.31 |
| GKD [ 2 ] | 26.30 (0.31) | 19.56 (1.03) | 18.66 (0.34) | 35.71 (0.20) | 25.06 |
| Objective | Avg. confidence | ECE |
| Forward KL | 0.67 | 0.22 |
| CaRE-KD (softest configuration) | 0.68 | 0.28 |
| – divergence | 0.75 | 0.28 |
| Reverse KL | 0.77 | 0.31 |
| Skewed-RKL | 0.79 | 0.31 |
| CaRE-KD (default temperature) | 0.79 | 0.34 |
| Measure (LLM-judged) | Region where Revival fires | Opposite region | Mann–Whitney |
| Question hardness | 2.87 | 2.98 | 0.37 |
| Response diversity | 3.96 | 3.99 | 0.63 |
Language Model Distillation
Language model distillation transfers a larger model’s capabilities to smaller or specialized models using outputs, probabilities, or internal representations.
See all 508 papers