Efficient One Pass Self-distillation with Zipf's Label Smoothing

Jiajun Liang, Linze Li, Zhaodong Bing, Borui Zhao, Yao Tang, Bo Lin, Haoqiang Fan

Abstract

Researchers from MEGVII Technology have introduced Zipf’s Label Smoothing (Zipf’s LS), a highly efficient "one-pass" self-distillation technique. By regularizing a network’s non-target predictions to follow Zipf’s Law—a mathematical pattern found in natural language word frequencies—they achieve significant accuracy gains across various image classification tasks with almost zero additional training or memory overhead.

Introduction

Deep learning models are traditionally trained using "one-hot" labels, where the correct class is assigned a probability of 1 and all others 0. This approach ignores "dark knowledge"—the semantic relationships between classes (e.g., a "Siberian Husky" is more similar to a "Wolf" than to a "Car"). While Knowledge Distillation (KD) and Self-distillation (SD) address this by using "soft" labels, most existing SD methods are computationally expensive, requiring multiple training passes, auxiliary network branches, or large memory banks. Zipf’s LS provides a "plug-and-play" solution that yields the benefits of self-distillation with the efficiency of simple label smoothing.

Methodology: Zipf’s Label Smoothing

The authors propose a training objective that combines standard Cross-Entropy with a KL-Divergence loss to reshape non-target predictions. The method relies on two key innovations:

  1. The Zipf Prior: Based on the observation that high-performing networks naturally follow Zipf’s Law ($p \propto r^{-\alpha}$) in their sorted non-target probabilities, Zipf’s LS enforces this distribution from the start of training.
  2. Dense Classification Ranking: To determine the ranking of non-target classes, the model utilizes its internal spatial feature maps. By treating each pixel in the final feature map as a "local" prediction, the model "votes" on which classes are most relevant to the image, providing a stable ranking for the Zipf distribution.
Overview of the Zipf's Label Smoothing pipeline

The "Dense Classification Ranking" is particularly clever. Instead of relying on the final global average pooled output, which can be noisy early in training, the model looks at the $K$ feature maps $f_1, f_2, \dots, f_K$. Each spatial location $(i, j)$ in these maps acts as a local classifier. By counting the argmax predictions across all spatial locations, the model generates a frequency-based ranking of classes. This "voting" mechanism ensures that the Zipfian prior is applied to classes that are spatially relevant to the input image.

Empirical Motivation

The core insight of this work is the "natural" distribution of knowledge in deep networks. As shown in Figure 4, well-trained models across different architectures and datasets consistently gravitate toward Zipf’s Law.

Empirical evidence of Zipf's law across various architectures and datasets

By explicitly regularizing the model toward this state early in training, Zipf’s LS recognizes that some incorrect classes are "more right" than others, leading to better feature representations. Unlike standard Label Smoothing, which treats all incorrect classes as equally likely, Zipf’s LS recognizes the inherent hierarchy and similarity in class distributions.

Evaluation and Key Results

The method was evaluated on benchmarks including CIFAR-100, ImageNet, and the fine-grained iNaturalist 2021 (INAT21) dataset. Zipf’s LS consistently outperformed both standard training and complex distillation methods:

  • INAT21 (ResNet50): Achieved a +3.61% accuracy gain over the vanilla baseline and outperformed standard Label Smoothing by 0.88%.
  • ImageNet (ResNet50): Improved accuracy by +0.77% over the baseline.
  • Versatility: The method showed gains across diverse architectures, including ResNet, ResNeXt, DenseNet, and even the lightweight MobileNetV2.
  • Efficiency: Unlike methods like CS-KD or DDGSD, Zipf’s LS adds virtually no overhead, requiring no extra parameters or second forward passes.

Conclusion

Zipf’s Label Smoothing offers a highly efficient way to incorporate self-distillation into standard training pipelines. While currently focused on spatial data like images, its success suggests that regularizing models toward natural statistical distributions like Zipf’s Law is a promising direction for improving deep learning efficiency and performance. Future work may extend these principles to non-spatial domains such as natural language processing, where Zipf's Law is already a well-known phenomenon.

Summary updated

BibTeX
@inproceedings{liang2022efficient,
  author = {Jiajun Liang and Linze Li and Zhaodong Bing and Borui Zhao and Yao Tang and Bo Lin and Haoqiang Fan},
  title = {{Efficient One Pass Self-distillation with Zipf's Label Smoothing}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-20083-0\_7},
}
Figure