Entropic Distribution Matching in Supervised Fine-tuning of LLMs: Less Overfitting and Better Diversity

Ziniu Li, Congliang Chen, Tian Xu, Zeyu Qin, Jiancong Xiao, Ruoyu Sun, Zhi-Quan Luo · OpenReview

Abstract

Large language models rely on Supervised Fine-Tuning (SFT) to specialize in downstream tasks. Cross Entropy (CE) loss is the de facto choice in SFT, but it often leads to overfitting and limited output diversity due to its aggressive updates to the data distribution. This paper aims to address these issues by introducing the maximum entropy principle, which favors models with flatter distributions that still effectively capture the data. Specifically, we develop a new distribution matching method called GEM, which solves reverse Kullback-Leibler divergence minimization with an entropy regularizer. For the SFT of Llama-3-8B models, GEM outperforms CE in several aspects. First, when applied to the UltraFeedback dataset to develop general instruction-following abilities, GEM exhibits reduced overfitting, evidenced by lower perplexity and better performance on the IFEval benchmark. Furthermore, GEM enhances output diversity, leading to performance gains of up to 7 points on math reasoning and code generation tasks using best-of-n sampling, even without domain-specific data. Second, when fine-tuning with domain-specific datasets for math reasoning and code generation, GEM also shows less overfitting and improvements of up to 10 points compared with CE.

The Problem with Standard SFT

Supervised Fine-Tuning (SFT) is the critical first step in transforming a raw pre-trained model into a helpful assistant. Currently, the industry standard is to use Cross-Entropy (CE) loss. However, CE has a fundamental flaw: it tries to force the model to assign 100% probability to the specific answer in the training set, effectively "collapsing" the model's output distribution.

Comparison of Pre-trained LLMs, standard SFT via Cross-Entropy (CE), and the proposed GEM goal. GEM maintains high readability while preserving the diversity of the pre-trained model.

This leads to two major issues:

  1. Reduced Diversity: The model becomes overly narrow, losing its ability to generate varied or creative alternative responses. This is a major bottleneck for later stages like RLHF or "test-time scaling" (where sampling many answers and picking the best is required).
  2. Knowledge Forgetting (Alignment Tax): By aggressively penalizing any output that isn't the exact training label, the model often "forgets" the vast world knowledge it acquired during pre-training. Standard SFT treats every alternative token as equally "wrong," even if they are semantically plausible (e.g., penalizing "tea" when the target is "coffee").

GEM: Game-theoretic Entropy Maximization

To address these limitations, we introduce GEM (Game-theoretic Entropy Maximization). We frame SFT as a game where the model tries to maximize the likelihood of real data while an auxiliary variable (the "meta-controller") regulates the learning process. This approach is theoretically equivalent to minimizing the reverse KL divergence with entropy regularization.

The GEM mechanism uses sparse updates and adaptive termination to maintain a diverse output distribution, avoiding the collapse seen in standard CE.

GEM introduces two key mechanisms:

  • Sparse Updates: Unlike CE, which penalizes all non-target tokens, GEM focuses only on the model's most confident predictions.
  • Adaptive Termination: The algorithm stops adjusting once the target token becomes the most likely one, preventing over-memorization and keeping the model's output distribution diverse.

Crucially, GEM is designed to be as fast and memory-efficient as standard CE. It doesn't require extra reference models or expensive sampling during the training loop.

Key Results and Insights

Our experiments on Llama-3.1-8B and other architectures (Qwen, Gemma) demonstrate significant improvements over standard CE:

  • Performance Gains: GEM achieved a 3.1-point increase in win rate for chat (AlpacaEval) and a 7-point increase in pass@100 for code generation (HumanEval) compared to standard CE.
  • Mitigating the Alignment Tax: Across six major benchmarks (including MMLU and ARC), GEM showed an 80% reduction in performance drops compared to the pre-trained base model. It stays "closer" to the original model in parameter space while still learning to follow instructions effectively.
  • Efficiency in Sampling: Because GEM-trained models are more diverse, they are much more likely to find a "better" answer when sampling multiple times. We found that you can achieve the same performance as a CE model with half the sampling budget (2x efficiency).

Conclusion

GEM offers a robust alternative to Cross-Entropy for SFT, protecting the inherent diversity of pre-trained models while reducing the alignment tax. By framing fine-tuning through the lens of entropy maximization, we can build models that are not only better at following instructions but also more resilient and creative in their outputs. Future work will explore GEM's benefits for RLHF and synthetic data generation.

Summary updated

BibTeX
@inproceedings{li2025entropic,
  author = {Ziniu Li and Congliang Chen and Tian Xu and Zeyu Qin and Jiancong Xiao and Ruoyu Sun and Zhi-Quan Luo},
  title = {{Entropic Distribution Matching in Supervised Fine-tuning of LLMs: Less Overfitting and Better Diversity}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=NQEe7B7bSw},
}
Figure