Tunable Sensitivity to Large Errors in Neural Network Training

Gil Keren, Sivan Sabato, Björn W. Schuller

Introduction

In the landscape of deep learning, the cross-entropy loss function has long been the standard for classification tasks. However, its gradient-based update rule treats all errors with a linear sensitivity that may not be optimal for every model architecture. In a paper presented at AAAI-17, researchers introduced a novel method to tune how neural networks respond to "hard" versus "easy" training examples by generalizing the gradient of the cross-entropy loss function. By introducing a sensitivity parameter $k$, the authors demonstrate that network capacity and depth should dictate how much a model focuses on large errors.

The Problem: One-Size-Fits-All Gradients

Standard supervised learning typically minimizes cross-entropy loss. Mathematically, the gradient of this loss is linear with respect to the "prediction bias"—the difference between the predicted probability and the target label. This implies that a "wrong and confident" prediction (a large error) generates a significantly larger weight update than a "slightly wrong" one.

While intuitive, this linear relationship is not always ideal. A shallow network with limited modeling capacity might degrade its overall performance if it tries too hard to "fix" a single outlier or a very difficult example. Conversely, a deep network with high capacity might benefit from a stronger "push" to correct those same hard examples. The authors argue that the standard cross-entropy gradient is a "one-size-fits-all" approach that ignores the critical relationship between a model's capacity and the inherent difficulty of the training data.

The Pseudo-Gradient Method

The core contribution of this research is the introduction of a pseudo-gradient. Instead of relying on the standard derivative of the loss function, the authors define a function $f(\epsilon)$ that replaces the linear dependence on prediction bias $\epsilon$. This function is controlled by a tunable parameter $k > 0$:

  • $k = 1$: The method is identical to standard cross-entropy.
  • $k < 1$: The gradient becomes less sensitive to large errors, effectively treating them as noise or outliers.
  • $k > 1$: The gradient becomes more sensitive to large errors, forcing the network to prioritize correcting them.
The sensitivity function $|f_y(\epsilon)|$ for various values of $k$. When $k < 1$, the curve is concave, reducing the relative impact of large errors. When $k > 1$, the curve is convex, amplifying the impact of large errors.

Interestingly, for $k \neq 1$, this pseudo-gradient may not correspond to the derivative of any valid loss function. Despite this, the authors prove it remains effective for training and ensures numerical stability by preventing weight explosion.

Experimental Evaluation

The researchers evaluated the pseudo-gradient across four standard benchmarks: MNIST, SVHN, CIFAR-10, and CIFAR-100. They tested feed-forward networks with varying depths (1, 3, and 5 hidden layers) to observe how the optimal sensitivity changed with architecture.

The Depth-Sensitivity Correlation

The most significant finding was a clear correlation between network depth and the optimal value of $k$.

  1. Shallow Networks (1 Layer): These models almost always performed best with $k < 1$ (low sensitivity). For instance, on the SVHN dataset, reducing sensitivity ($k=0.25$) dropped the test error from 16.88% to 16.16%.
  2. Deep Networks (5 Layers): As the networks grew deeper, the optimal $k$ shifted. High sensitivity ($k > 1$) became the preferred setting for deeper architectures.
Experimental results for 5-layer networks. Note that for datasets like SVHN and CIFAR-10, the selected $k$ values are often 2 or 4, leading to improved test error compared to the $k=1$ baseline.

Key Insights

The intuition behind these results lies in the balance between Capacity and Noise. Shallow networks have a limited number of parameters; "wasting" them on fitting outliers can harm generalization on the majority of the data. Deep networks, however, have the "room" to learn the nuances of hard examples without sacrificing general accuracy.

Furthermore, this work highlights a subtle distinction in deep learning: the update rule (the gradient) does not strictly need to be the derivative of the objective function (the error rate). By decoupling the optimization process from the loss function, researchers gain a powerful new hyperparameter to maximize performance.

Conclusion and Future Directions

The introduction of a tunable sensitivity parameter $k$ provides a robust way to align a model's training dynamics with its architectural capacity. While the current study focused on fixed $k$ values and fully connected networks, future work could explore dynamic "curriculum" approaches where sensitivity increases as training progresses. Additionally, extending this theory to Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs) remains a promising avenue for improving state-of-the-art performance across diverse domains.

Summary updated

BibTeX
@inproceedings{keren2017tunable,
  author = {Gil Keren and Sivan Sabato and Björn W. Schuller},
  title = {{Tunable Sensitivity to Large Errors in Neural Network Training}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2017},
  doi = {10.1609/aaai.v31i1.10807},
}
Figure