Abstract
Label Smoothing (LS) is an effective regularizer to improve the generalization of state-of-the-art deep models. For each training sample the LS strategy smooths the one-hot encoded training signal by distributing its distribution mass over the non ground-truth classes, aiming to penalize the networks from generating overconfident output distributions. This paper introduces a novel label smoothing technique called Pairwise Label Smoothing (PLS). The PLS takes a pair of samples as input. Smoothing with a pair of ground-truth labels enables the PLS to preserve the relative distance between the two truth labels while further soften that between the truth labels and the other targets, resulting in models producing much less confident predictions than the LS strategy. Also, unlike current LS methods, which typically require to find a global smoothing distribution mass through cross-validation search, PLS automatically learns the distribution mass for each input pair during training. We empirically show that PLS significantly outperforms LS and the baseline models, achieving up to 30% of relative classification error reduction. We also visually show that when achieving such accuracy gains the PLS tends to produce very low winning softmax scores.
Introduction
Deep neural networks are notorious for becoming "overconfident." During training, they often attempt to drive the probability of the correct class to exactly 1.0, a behavior that frequently leads to overfitting and poor generalization on unseen data. To combat this, researchers traditionally employ Label Smoothing (LS). Instead of a hard one-hot encoding (e.g., 100% confidence in a single class), LS redistributes a small portion of the probability mass to all other classes.
However, standard LS suffers from two primary limitations. First, it relies on a static strength; the optimal amount of noise must be manually determined through exhaustive cross-validation. Second, it maintains a single-label focus, ignoring the potential relationships and relative distances between different ground-truth labels in the dataset.
Methods
Pairwise Label Smoothing (PLS) addresses these flaws by fundamentally changing the training signal through three key mechanisms:
- Sample Pairing: Rather than processing individual images, PLS takes a pair of samples $(x_i, y_i)$ and $(x_j, y_j)$, averages their features, and creates a mixed ground-truth target. This approach is conceptually related to Mixup but focuses on the smoothing distribution.
- Dynamic Smoothing: PLS eliminates the need for manual hyperparameter tuning by incorporating a small, auxiliary fully-connected layer. This layer learns to output a unique "smoothing distribution" for every specific input pair during the training process.
- Hybrid Target Generation: The final training target is a weighted average of the mixed ground-truth labels and the learned smoothing distribution.
By alternating between original mini-batches and these smoothed, paired mini-batches, the network is forced to maintain the relative distance between the two "true" labels while softening their relationship with all other "distractor" classes.
Experimental Results
The authors evaluated PLS across standard image classification benchmarks, including MNIST, Fashion-MNIST, SVHN, CIFAR-10, and CIFAR-100, using architectures such as ResNet-50, WideResNet-28-10, and DenseNet-121.
Error Reduction and Stability
PLS consistently outperformed both standard LS and Mixup. On CIFAR-10, PLS achieved a 30% relative error reduction over the baseline ResNet model, while MNIST saw a reduction of approximately 24%. These gains were consistent across various network depths and widths, suggesting that PLS is a highly generalizable regularizer.
Visual analysis of the loss curves reveals that while baseline models' training loss quickly drops toward zero (a sign of potential overfitting), PLS maintains a significantly higher training loss throughout the process. This indicates that the model is continuously challenged, leading to better generalization.
The "Shy" Model Phenomenon
A notable finding is the extreme conservatism of PLS models. During testing, winning softmax scores are often barely above 0.5. While this lack of confidence might seem counterintuitive, it correlates strongly with higher final accuracy. However, this does result in higher initial Expected Calibration Error (ECE), which the authors demonstrate can be easily corrected using post-processing techniques like Temperature Scaling.
Discussion and Conclusion
PLS represents a significant step forward in automated regularization. By learning the smoothing mass dynamically, it removes the burden of grid-searching for the optimal $\alpha$ parameter. While the 50/50 averaging ratio for pairing was found to be empirically superior to other ratios (ranging from 0.1 to 0.9), the theoretical underpinning for this specific balance remains a subject for future research. Despite the minor computational overhead of the auxiliary layer and the need for Temperature Scaling in calibration-sensitive applications, PLS offers a robust and effective method for improving deep learning performance.
Summary updated