Abstract
Large annotated datasets inevitably contain noisy labels, which poses a major challenge for training deep neural networks as they easily memorize the labels. Noise-robust loss functions have emerged as a notable strategy to counteract this issue, but it remains challenging to create a robust loss function which is not susceptible to underfitting. Through a quantitative approach, this paper explores the limited overlap between the network output at initialization and regions of non-vanishing gradients of bounded loss functions in the initial learning phase. Using these insights, we address underfitting of several noise robust losses with a novel method denoted as logit bias, which adds a real number $\epsilon$ to the logit at the position of the correct class. The logit bias enables these losses to achieve state-of-the-art results, even on datasets like WebVision, consisting of over a million images from 1000 classes. In addition, we demonstrate that our method can be used to determine optimal parameters for several loss functions -- without having to train networks. Remarkably, our method determines the hyperparameters based on the number of classes, resulting in loss functions which require zero dataset or noise-dependent parameters.
The Underfitting Problem in Robust Learning
Training deep neural networks on real-world data is often complicated by noisy labels. Standard loss functions like Cross-Entropy (CE) are "unbounded," meaning they attempt to fit every sample perfectly. This leads models to memorize incorrect labels, resulting in poor generalization. To mitigate this, "bounded" loss functions such as Mean Absolute Error (MAE) were developed. While theoretically more robust because they ignore extreme outliers, these losses frequently suffer from severe underfitting, especially as the complexity and class count ($K$) of a dataset increase.
The root cause of this underfitting is a phenomenon termed the "gradient desert." At the start of training, a network's output distribution has almost zero overlap with the region where bounded losses provide a useful gradient signal. As shown in Figure 1, this gap widens significantly as the number of classes grows, preventing the learning process from ever gaining momentum.
Bridging the Gap: Logit Bias and Hyperparameter Scaling
To address this, we propose two primary strategies to restore gradients at initialization:
- Logit Bias ($\epsilon$): We modify the logit $z_k$ for the correct class $k$ by adding a constant $\epsilon$ ($z_k + \epsilon$). This shift moves the initial logit distribution into a range where the loss function has non-vanishing gradients. We derive $\epsilon$ analytically by assuming initial logits follow a normal distribution $\mathcal{N}(0, 1)$ and solving for a target average activation.
- Theoretical Hyperparameter Scaling: We demonstrate that hyperparameters for losses like Generalized Cross Entropy (genCE) can be calculated as a function of the number of classes. By ensuring the gradient at initialization remains consistent across different class counts, we make these robust losses "plug-and-play" without requiring expensive grid searches for every new dataset.
Experimental Results
Our methods were evaluated on standard benchmarks (CIFAR-10, CIFAR-100, Fashion-MNIST) and the large-scale WebVision dataset.
As detailed in Figure 5, MAE* (MAE with logit bias) achieved the highest number of top accuracies across various noise levels. Notably, on the 1,000-class WebVision dataset, standard robust losses like genCE and NCE-AGCE initially failed (Top-1 accuracy < 15%). By applying our calculated hyperparameters or logit bias, these same losses reached ~64% Top-1 accuracy, matching or exceeding the performance of Cross-Entropy.
Conclusion
This work highlights that the robustness of a loss function is not a static property but is heavily dependent on the number of classes. By introducing logit bias and a theoretical framework for hyperparameter scaling, we enable bounded, noise-robust losses to scale to massive datasets. This approach allows for optimal parameter determination based solely on class count, eliminating the need for dataset-specific or noise-dependent tuning.
Summary updated