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

f-Divergence Minimization for Sequence-Level Knowledge Distillation

Yuqiao Wen, Zichao Li, Wenyu Du, Lili Mou

Abstract

Knowledge distillation (KD) is the process of transferring knowledge from a large model to a small one. It has gained increasing attention in the natural language processing community, driven by the demands of compressing ever-growing language models. In this work, we propose an FDISTILL framework, which formulates sequence-level knowledge distillation as minimizing a generalized f-divergence function. We propose four distilling variants under our framework and show that existing SeqKD and ENGINE approaches are approximations of our FDISTILL methods. We further derive step-wise decomposition for our FDISTILL, reducing intractable sequence-level divergence to word-level losses that can be computed in a tractable manner. Experiments across four datasets show that our methods outperform existing KD approaches, and that our symmetric distilling losses can better force the student to learn from the teacher distribution.

Introduction: The Challenges of Model Compression

Knowledge Distillation (KD) is essential for deploying large-scale language models on resource-constrained devices. The goal is to transfer the capabilities of a massive "teacher" model into a compact "student" model. However, standard sequence-level KD techniques often struggle with two specific issues:

  1. Mode-Averaging (Forward KL): The student attempts to cover the entire support of the teacher's distribution. This often results in an overly "smooth" or "blurry" distribution where the student produces generic, safe, but uninspired text.
  2. Mode-Collapsing (Reverse KL): The student focuses exclusively on a few high-probability modes and ignores the rest of the distribution. This leads to repetitive or overly narrow behavior.
Comparison of mode-averaging (a) and mode-collapsing (b) in distribution matching.

Calculating these divergences at the sequence level is mathematically intractable due to the exponential size of the sequence space.

Methodology: The f-DISTILL Framework

The authors introduce f-DISTILL, a unified framework that generalizes distillation using the family of f-divergences. This framework addresses the intractability of sequence-level KD through several innovations:

  • Step-wise Decomposition: The researchers mathematically demonstrate that sequence-level divergences (such as KL, Reverse KL, and Jensen-Shannon) can be decomposed into a series of word-level losses. For Total Variation Distance (TVD), they derive a tractable upper bound. This allows for word-by-word training while optimizing for the global sequence distribution.
  • Symmetric Distillation: Instead of asymmetric measures, the framework proposes using Jensen-Shannon (JS) and Total Variation Distance (TVD). These symmetric measures encourage the student to stay close to the teacher's high-probability regions without being forced to cover every low-probability "tail" of the distribution.
  • Offline Sampling: To improve efficiency, sequences are pre-sampled from the teacher model "offline" before training, significantly reducing the computational burden during the training phase.

Experimental Setup

The framework was evaluated across four diverse natural language generation tasks:

  • DART: Structured data-to-text generation.
  • XSum: Extreme summarization of news articles.
  • WMT16 EN-RO: English-to-Romanian machine translation.
  • Commonsense Dialogue: Socially grounded dialogue generation.

Key Insights and Results

The experiments revealed several critical insights into the behavior of different divergence measures:

  • The "Goldilocks" Zone: Symmetric losses (JS and TVD) provide a middle ground, offering better coverage than Reverse KL (preventing collapse) while maintaining higher likelihood than Forward KL (preventing blurry averaging).
  • Task Modality: For "low-modality" tasks like translation, standard KL is often sufficient. However, for "high-modality" tasks like dialogue, symmetric f-divergences show significant advantages.
  • Performance Gains: f-DISTILL variants consistently outperformed state-of-the-art methods like SeqKD and ENGINE across metrics such as BLEU, ROUGE, and BERTScore.
Performance comparison (BLEU) of different distillation methods across varying student model sizes (number of layers).
  • Robustness and Efficiency: The method remains effective even as student model size decreases. Furthermore, the offline sampling method achieved a 2.25x to 2.31x speedup in training time compared to standard online sampling.

Limitations and Future Work

While f-DISTILL offers significant improvements, some challenges remain. The method still incurs more training overhead than simple Maximum Likelihood Estimation (MLE) due to student model sampling. Additionally, performance is sensitive to initialization; "warm-starting" with a pre-distilled model is recommended. Future research may explore other f-divergences, such as $\alpha$-divergence, and extend the framework to non-autoregressive models.

Summary updated

BibTeX
@inproceedings{wen2023f,
  author = {Yuqiao Wen and Zichao Li and Wenyu Du and Lili Mou},
  title = {{f-Divergence Minimization for Sequence-Level Knowledge Distillation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  url = {https://openreview.net/forum?id=bcQM1e36ie},
}
Figure