Label Smoothing++: Enhanced Label Regularization for Training Neural Networks

Sachin Chhabra, Hemanth Venkateswara, Baoxin LiBMVC 2024

Abstract

Training neural networks with one-hot target labels often results in overconfidence and overfitting. Label smoothing addresses this issue by perturbing the one-hot target labels by adding a uniform probability vector to create a regularized label. Although label smoothing improves the network's generalization ability, it assigns equal importance to all the non-target classes, which destroys the inter-class relationships. In this paper, we propose a novel label regularization training strategy called Label Smoothing++, which assigns non-zero probabilities to non-target classes and accounts for their inter-class relationships. Our approach uses a fixed label for the target class while enabling the network to learn the labels associated with non-target classes. Through extensive experiments on multiple datasets, we demonstrate how Label Smoothing++ mitigates overconfident predictions while promoting inter-class relationships and generalization capabilities.

Introduction

Deep neural networks are notoriously overconfident. When trained with standard "one-hot" labels—where the target class is assigned a probability of 1.0 and all others 0.0—models tend to push their logit values to extremes to minimize cross-entropy loss. This behavior often leads to overfitting and poor generalization on unseen data.

Input image of a car used for classification.

To combat this, Label Smoothing (LS) was introduced. LS takes a small portion of probability mass from the correct class and distributes it evenly across all other classes. While effective at regularizing the model, LS has a significant limitation: it treats all incorrect classes as equally likely. For instance, in a classifier for Bird, Car, Frog, and Truck, standard LS suggests a "Car" is just as likely to be a "Frog" as it is a "Truck," thereby destroying inherent semantic similarities between classes.

Methodology: Label Smoothing++ (LS++)

We propose Label Smoothing++ (LS++), a technique that makes the distribution of smoothed probabilities learnable rather than uniform. This allows the model to capture semantic relationships between classes during training.

The C-Matrix and Learnable Targets

Instead of a uniform vector, LS++ introduces a learnable matrix $C$ of size $K \times K$. Each row $y$ in this matrix represents how the "residual" probability $\alpha$ should be distributed among non-target classes for a given target class $y$. The target label is defined as:

$$y^{ls++} = (1-\alpha)\bar{y} + \alpha C_y$$

By keeping the confidence in the correct class fixed at $(1-\alpha)$ while learning the optimal distribution for the remaining $\alpha$, the model preserves inter-class relationships.

Comparison of target label distributions: (b) Vanilla one-hot, (c) Standard Label Smoothing, and (d) Label Smoothing++. Note how LS++ assigns higher probability to the semantically related 'Truck' class compared to 'Bird' or 'Frog'.

Symmetric Cross-Entropy Loss

To prevent the $C$-matrix from collapsing into a one-hot vector (entropy minimization), we employ a symmetric loss function. The gradient flow is split: network parameters are updated to match the learned labels, while the $C$-matrix is updated to align with the network's current predictions. This ensures the labels remain diverse and semantically informative.

Key Insights and Results

LS++ was evaluated across multiple modalities, including image (CIFAR, ImageNet), video (UCF101), text (20Newsgroup), and audio (GTZAN).

  • Semantic Awareness: The model naturally learns that "Cat" is more related to "Dog" than to "Ship" without explicit supervision.
  • Cluster Compactness: t-SNE visualizations show that LS++ produces tighter, more compact clusters than one-hot training while preserving natural distances between related categories.
  • Performance: LS++ consistently outperformed standard LS. For example, on CIFAR-100 with ResNet18, LS++ achieved 79.33% accuracy, compared to 77.26% for standard LS.
  • Proxy Teacher: The learned $C$-matrix can act as a "Proxy Teacher" for knowledge distillation, allowing smaller student models to benefit from the learned class relationships without the overhead of a full teacher model.

Conclusion

Label Smoothing++ provides a robust framework for regularizing neural networks by accounting for inter-class relationships. While currently implemented at the class level, future work could explore sample-level granularity or learning the smoothing parameter $\alpha$ itself to further enhance performance and generalization.

Summary updated

BibTeX
@inproceedings{chhabra2024label,
  author = {Sachin Chhabra and Hemanth Venkateswara and Baoxin Li},
  title = {{Label Smoothing++: Enhanced Label Regularization for Training Neural Networks}},
  booktitle = {BMVC},
  year = {2024},
  url = {https://openreview.net/forum?id=9RmoRewc96},
}
Figure