NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

SelecTKD: Selective Token-Weighted Knowledge Distillation for LLMs

Haiduo Huang, Jiangcheng Song, Yadong Zhang, Pengju Ren

TL;DR

Conventional knowledge distillation (KD) for Large Language Models uniformly applies loss to every token, forcing small student models to mimic noisy, high-entropy teacher predictions. SelecTKD solves this by introducing a plug-and-play "propose-and-verify" framework that dynamically filters out low-confidence teacher signals. By focusing only on tokens where the student and teacher align, SelecTKD smooths the loss landscape, creates an implicit learning curriculum, and achieves state-of-the-art performance across instruction-following, math, and coding tasks.

What Problem Does This Paper Address?

Knowledge distillation is the go-to method for compressing massive LLMs into compact, efficient "Small Language Models" (SLMs). Typically, this involves forcing the student model to match the teacher's probability distribution for every single token in a sequence.

However, the authors identify a major flaw in this approach: indiscriminate supervision. Even the best teacher models output highly uncertain, high-entropy distributions for difficult or ambiguous tokens. When the capacity gap between the teacher and the student is large, forcing the student to replicate this tail noise destabilizes optimization and hurts generalization.

While prior literature heavily debated how to measure divergence (e.g., choosing between Forward KL, Reverse KL, or Skew KL), this paper shifts the question entirely to where and when the learning signal should be applied.

Figure 1. Performance comparison of different loss functions and training datasets on DistiLLM-2 [30] and DistiLLM-2 with SelecTKD, using Qwen2-7B-Inst as the teacher and Qwen2-1.5B as the student. The chart shows Win Rate on the Evol-Instruct benchmark evaluated with GPT-4o. The baseline is gpt-3.5-turbo. This comprehensive comparison highlights the impact of various loss/data combinations and demonstrates the consistent advantage of our SelecTKD method.

Methods

SelecTKD introduces a selective token-weighted distillation framework based on a robust propose-and-verify mechanism inspired by speculative decoding. Instead of calculating a blanket loss, the student model proposes token candidates at each step, which the teacher then verifies.

The framework offers two verification variants:

  1. Greedy Top-$k$ Verification: The student proposes its most likely token ($\arg\max$). If this token falls within the teacher's top-$k$ highest-probability candidates, it is accepted and receives full loss weight. If rejected, its loss contribution is masked or heavily down-weighted by a small factor $\beta$ (e.g., 0.01).
  2. Non-Greedy Spec-$k$ Verification: To mitigate exposure bias, the student draws $k$ independent samples from its own distribution. These are put through a speculative rejection-sampling test against the teacher's distribution. If at least one sample passes, the token step is accepted.

This objective-agnostic design can be seamlessly overlaid on top of any existing KD loss function (KL, RKL, SKL, SRKL) and works with both on-policy and off-policy data.

Figure 2. Overview of SelecTKD, a “propose-and-verify” framework for selective token-level knowledge distillation. Left: Dataset Gen- eration. Both teacher p(x, y) and student qθ(x, y) can produce responses, enabling on- and off-policy data. Middle: Model Prediction and Token Sampling. Two variants are supported: (a) Greedy Top-k: the student proposes a greedy token ˆyt (argmax) and the teacher returns its Top-k set; (b) Non-greedy Spec-k: the student samples k candidate tokens and the teacher is queried only on these candidates to compute acceptance indices following speculative sampling [6, 31]. Right: Verification and Loss Computation. A token is accepted if it is in the teacher’s Top-k (greedy) or passes the speculative acceptance test (non-greedy). Accepted tokens receive full loss; rejected tokens are masked or down-weighted by β. The loss is objective-agnostic and works with KL, RKL, SKL, and SRKL. This design focuses learning on reliable, teacher-aligned tokens and yields a stable, curriculum-like training dynamic.

Datasets

The authors evaluated SelecTKD across four distinct capabilities using a variety of open-source datasets:

  • General Instruction-Following: Trained on a 50k random sample from UltraChat200k; evaluated on AlpacaEval, Evol-Instruct, and UltraFeedback.
  • Mathematical Reasoning: Distilled using 50k samples from MetaMathQA; evaluated on GSM8K and MATH.
  • Code Generation: Trained using WizardCoder prompts; evaluated on HumanEval and MBPP.
  • Vision-Language Models (VLMs): Distilled using the Mantis-Instruct dataset; evaluated on the Open VLM Leaderboard benchmarks (including MMStar, MMBench, and MMMU).

Key Insights and Ideas

  • Loss Geometry is a Secondary Factor: The authors prove both empirically and theoretically that while different KL-family objectives alter the optimization path, they share the same fixed point in the limit. Controlling which tokens to learn from matters far more than the exact mathematical formulation of the loss.
  • The "Curse of the Powerful Teacher" is Real—and Fixable: In standard KD, student performance often plateaus or drops when distilled from an excessively large teacher because the capacity gap is too wide. SelecTKD eliminates this bottleneck, allowing student capabilities to scale monotonically with teacher size.
  • An Implicit Curriculum Emerges: By tracking the Token Acceptance Rate (TAR)—the fraction of tokens accepted by the teacher—the authors discovered that SelecTKD naturally induces a self-paced curriculum. The student masters easy tokens first (high TAR) before gradually incorporating harder tokens into its loss profile.
Figure 4. Analysis of SelecTKD dynamics: (a) validation loss gen- erally decreases as the Token Acceptance Rate (TAR) increases, indicating an implicit curriculum; (b) SelecTKD yields a flat- ter loss landscape [32] than strong baselines (e.g., DistiLLM-2), which correlates with improved generalization.

Key Results

SelecTKD consistently outperformed strong baselines (like DistiLLM-2, GKD, and SKD) across all tasks without requiring architectural changes or extra reference models:

  • Instruction Following: When distilling Qwen2-7B-Inst into Qwen2-1.5B, SelecTKD boosted the baseline DistiLLM-2 win rate on Evol-Instruct from 47.13% to 48.27%.
  • Reasoning & Code: On GSM8K, it pushed the student's Pass@1 accuracy to 77.82% (a +1.55 gain over DistiLLM-2). For code generation, it achieved the highest Pass@1 accuracy on HumanEval (61.72%).
  • Vision-Language Models: Distilling InternVL2-8B into a 2B student yielded SelecTKD-VLM-2B, which achieved state-of-the-art performance (57.9% average) among all VLMs under 4B parameters.
  • Speculative Decoding Speedups: When used to align a small draft model (Llama-68m) with a larger verifier (Phi-3-medium), SelecTKD achieved a $\times$2.05 inference speedup, outperforming standard supervised fine-tuning.

Limitations and Future Work

Explicit limitations are not extensively detailed in the paper. However, because SelecTKD relies on a "propose-and-verify" loop during training, it inherits the standard computational overhead of knowledge distillation—namely, requiring forward passes through a large teacher model to compute token distributions. Future work could explore optimizing this verification step to reduce training compute or extending the token-gating logic to fully decentralized, multi-teacher distillation setups.

Summary updated

BibTeX
@inproceedings{huang2026selectkd,
  author = {Haiduo Huang and Jiangcheng Song and Yadong Zhang and Pengju Ren},
  title = {{SelecTKD: Selective Token-Weighted Knowledge Distillation for LLMs}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=iP6qJc7tZI},
}
Figure