TL;DR
Knowledge distillation (KD) is essential for compressing massive Large Language Models (LLMs) into deployable sizes, but traditional methods either lose fine-grained information due to softmax smoothing or overly restrict the student model by forcing exact logit matching. This paper introduces Concrete Score Distillation (CSD), a novel logit-level distillation objective that preserves rich teacher knowledge while respecting logit shift invariance. By expanding the student's optimal solution space and optimizing it in linear time, CSD consistently outperforms existing KD methods across diverse language tasks.
What Problem Does This Paper Address?
When compressing a large "teacher" LLM into a smaller "student" model, the standard approach is to align their output probability distributions using metrics like Kullback-Leibler (KL) divergence. However, these probabilities are calculated via a softmax function, which introduces a severe information bottleneck. Softmax heavily suppresses minor tokens, assigning them near-zero probabilities and erasing valuable nuances in the teacher's internal logit representations.
To bypass this "softmax smoothing," past work turned to Direct Logit Distillation (DLD), which uses Mean Squared Error (MSE) to match raw logits directly. But DLD suffers from a major theoretical flaw: it forces the student's logits to exactly match the teacher's values. Because softmax is shift-invariant (adding a constant value to all logits results in the exact same probabilities), the student only actually needs to match the teacher's relative logit differences. Forcing an exact match unnecessarily restricts the student's solution space, which severely hinders learning—especially when there is a large capacity gap between the teacher and the student.
Methods
The authors propose Concrete Score Distillation (CSD), adapting discrete score-matching techniques from energy-based models to autoregressive LLMs.
- Log-Concrete Scores: To prevent the training instability common in likelihood-ratio estimations, CSD applies a logarithm to the concrete scores. This elegantly transforms the objective into an MSE loss on logit residuals: it minimizes the difference between the student's and teacher's relative logit gaps for every pair of tokens in the vocabulary.
- Linear-Time Gradient Computation: A naive pairwise comparison across a vocabulary $V$ requires an intractable $O(|V|^2)$ complexity. The authors mathematically prove that if the weighting function is factorized ($w(y,x) = w_1(y)w_2(x)$), the gradient can be computed using centering normalization in linear time $O(|V|)$, making it highly practical for modern LLMs with massive vocabularies.
- Flexible Weighting Design Space: By adjusting the weighting functions ($w_1, w_2$) using combinations of Teacher probabilities ($T$), Student probabilities ($S$), or Uniform distributions ($U$), CSD can be tailored to be either mode-seeking (focusing on high-fidelity generation) or mode-covering (promoting diversity).
Datasets
The authors validated CSD across a wide array of benchmarks:
- Task-Agnostic Instruction-Following: Trained on
databricks-dolly-15kand evaluated on Dolly Eval, Self-Instruct, Vicuna Eval, Super-NI, and UnNI. - Task-Specific Distillation: Evaluated on
DialogSum(dialogue summarization),Flores-200(low-resource translation), andGSM8K(arithmetic reasoning). - General Chat Capability: Distilled using a 50k subset of the
UltraChatdataset and evaluated via MT-Bench and AlpacaEval.
Key Insights and Ideas
- Softmax Hides Knowledge: As illustrated in Figure 1b, two vastly different logit vectors can yield nearly identical probability distributions after a softmax transformation, effectively blinding the student to the teacher's fine-grained preferences.
- Embracing Shift Invariance: CSD allows the student model to find optimal solutions where its logits match the teacher's up to an arbitrary additive constant ($f_\theta = f_T + C$). As shown in the parameter space diagram in Figure 1c, this drastically expands the set of acceptable solutions, giving the student model more flexibility to learn efficiently within its capacity limits.
- Intra-Vocabulary Relationships: Instead of treating tokens as isolated targets, CSD explicitly forces the student to master the relative structural relationships between all vocabulary items.
Key Results
- Consistently Outperforms Baselines: In a pure loss-level comparison distilling GPT-2-1.5B to GPT-2-0.1B, CSD outperformed nine state-of-the-art probability and logit-matching objectives, achieving the highest average ROUGE-L score (20.65).
- Superior Fidelity-Diversity Trade-off: CSD effectively envelopes the performance frontiers of existing losses. Using student-based weighting
CSD (S,S)maximizes generation fidelity, while uniform weightingCSD (U,S)significantly enhances output diversity. - Prevents Model Collapse on Hard Tasks: On the challenging GSM8K math dataset, traditional mode-seeking losses caused smaller student models to collapse into degenerative text loops (e.g., repeating the word "reluct" indefinitely).
CSD (T,S)maintained strict training stability and achieved the highest accuracy (25.78%). - Orthogonal Compatibility: CSD acts as a drop-in replacement loss that works complementarily with modern on-policy distillation algorithms (like GKD and DistiLLM), yielding consistent performance boosts across larger backbones like OpenLLaMA-7B, Qwen2.5-7B, and Gemma2-9B.
Limitations and Future Work
- Intractable Loss Evaluation: Because the raw CSD loss function relies on a double summation over the vocabulary, it cannot be efficiently computed directly during training to monitor validation loss. Instead, optimization relies strictly on its linear-time gradient, meaning models must be evaluated using final checkpoints or alternative proxies.
- Weighting Function Optimization: While the paper establishes a flexible design space using Student, Teacher, and Uniform distributions, exploring more sophisticated, task-specific, or dynamically scheduled weighting functions remains an open area for future research.
Summary updated