TL;DR
This paper provides the first theoretical analysis of why label smoothing (LSR) helps train deep neural networks, showing it can speed up convergence by reducing gradient variance. They propose a novel "Two-Stage Label Smoothing" (TSLA) method that leverages LSR early in training and then removes it, achieving improved convergence and accuracy.
What Problem Does This Paper Address?
Training deep neural networks often involves minimizing a cross-entropy loss with one-hot encoded labels. While effective, this can lead to overconfident models and overfitting, hindering generalization. Label Smoothing Regularization (LSR) has emerged as a powerful technique to combat this by softening the target labels. However, despite its widespread empirical success, the theoretical underpinnings of why LSR works, particularly from an optimization perspective, have remained largely unexplored. This paper aims to bridge this gap by providing a theoretical understanding of LSR's impact on optimization and proposing a more refined strategy for its application.
Methods
The core of this paper lies in its theoretical analysis of Stochastic Gradient Descent (SGD) with LSR. The authors derive convergence complexities for SGD with LSR in non-convex optimization settings. They show that an appropriate level of label smoothing can reduce the variance of the stochastic gradient, thereby accelerating convergence.
Building on this theoretical insight, they propose the Two-Stage Label Smoothing (TSLA) algorithm. TSLA is a generic framework that first trains a model using SGD with LSR for a certain number of epochs (the "first stage") and then switches to standard SGD without LSR for the remaining epochs (the "second stage"). This strategy aims to harness the benefits of LSR (variance reduction) in the early stages while avoiding potential slowdowns in later stages. The paper provides theoretical convergence guarantees for TSLA, showing it can achieve better sample complexity than standard SGD or SGD with LSR alone.
Datasets
The paper evaluates their proposed TSLA method on the following benchmark datasets:
- Stanford Dogs: A dataset for fine-grained image classification.
- CUB-2011: Another dataset for fine-grained bird species classification.
- CIFAR-100: A standard dataset for image classification with 100 classes.
The experiments use the ResNet-18 architecture as the backbone.
Key Insights and Ideas
- LSR as a Variance Reducer: The paper's primary theoretical contribution is demonstrating that label smoothing can reduce the variance of stochastic gradients. This reduction in variance is the key mechanism by which LSR accelerates convergence in non-convex optimization.
- The "When" Matters for LSR: While LSR is beneficial, the analysis suggests that using it throughout the entire training process might not be optimal and could even lead to slower convergence in later stages. This motivates the idea of a time-limited application of LSR.
- TSLA: The Best of Both Worlds: The Two-Stage Label Smoothing (TSLA) approach effectively combines the benefits of LSR (early-stage variance reduction) with the efficiency of standard SGD (avoiding potential late-stage slowdowns). This "drop-off" strategy is shown to be more effective than using LSR continuously.
- Importance of the Smoothed Label Distribution (ŷ): The experiments highlight that the choice of the distribution (ŷ) used for smoothing is crucial. Using a distribution derived from a pre-trained model (LSR-pre/TSLA-pre) generally yields better results than a uniform distribution, suggesting that a more informed smoothing target is beneficial.
Key Results
- Theoretical Speedup: The theoretical analysis shows that appropriate LSR can lead to improved iteration complexities for SGD in non-convex settings.
- TSLA's Superior Convergence: TSLA, when integrated with SGD, demonstrates improved convergence results compared to standard SGD and SGD with LSR.
- Empirical Accuracy Gains: Experiments on Stanford Dogs, CUB-2011, and CIFAR-100 show that TSLA consistently outperforms baseline SGD and SGD with LSR in terms of top-1 and top-5 accuracy. For instance, on Stanford Dogs and CUB-2011, TSLA variants achieved higher accuracies than the baselines.
- Optimal Dropping Point: The performance of TSLA is sensitive to when LSR is dropped. The paper shows that dropping LSR too early or too late can lead to suboptimal results, with specific optimal dropping epochs identified for the tested datasets. For example, on CIFAR-100, TSLA-pre(160) achieved the highest top-1 accuracy.
Limitations and Future Work
- Hyperparameter Sensitivity: The effectiveness of TSLA, particularly the optimal epoch to drop LSR, is shown to be dataset-dependent and requires careful tuning.
- Choice of ŷ: While using a pre-trained model's distribution for ŷ improved performance, the paper doesn't delve deeply into why certain distributions are better beyond their variance reduction properties.
- Future Work: The authors suggest exploring TSLA with other stochastic algorithms beyond SGD and investigating more sophisticated strategies for determining the optimal dropping point or learning rate schedules within the TSLA framework. They also mention that the theoretical analysis could be extended to other optimization algorithms.
Summary updated