Abstract
Real-world large-scale datasets usually contain noisy labels and are imbalanced. Therefore, we propose derivative manipulation (DM), a novel and general example weighting approach for training robust deep models under these adverse conditions. DM has two main merits. First, loss function and example weighting are common techniques in the literature. DM reveals their connection (a loss function does example weighting) and is a replacement of both. Second, despite that a loss defines an example weighting scheme by its derivative, in the loss design, we need to consider whether it is differentiable. Instead, DM is more flexible by directly modifying the derivative so that a loss can be a non-elementary format too. Technically, DM defines an emphasis density function by a derivative magnitude function. DM is generic in that diverse weighting schemes can be derived. Extensive experiments on both vision and language tasks prove DM's effectiveness.
Introduction
In ideal scenarios, datasets are perfectly labeled and balanced. However, real-world data is often noisy and imbalanced, causing deep neural networks to "memorize" errors and generalize poorly. Current research typically addresses this through two distinct paths: Loss Design, creating functions less sensitive to outliers (e.g., MAE, GCE), and Example Weighting, assigning importance scores to samples.
This paper argues that these approaches are fundamentally linked: every loss function implicitly defines a weighting scheme through its derivative. However, traditional loss design is constrained by mathematical requirements like differentiability. Derivative Manipulation (DM) proposes to skip the "middleman" of the loss function and design the gradient magnitude directly.
Methods: The DM Framework
The core of the proposed approach is the direct manipulation of the gradient's magnitude using an Emphasis Density Function (EDF). Instead of deriving gradients from a loss, DM defines them directly to control how much "emphasis" an example receives based on its probability of being correct ($p_i$).
A specific variant introduced is $w_i^{DM} = \exp(\beta p_i^\lambda (1-p_i))$, governed by two key hyperparameters:
- $\lambda$ (Emphasis Mode): Controls the focus area. Higher $\lambda$ values shift focus toward "easier" examples (high $p_i$), which is essential for robustness in high-noise environments.
- $\beta$ (Emphasis Variance): Determines the "sharpness" or intensity of the weighting curve.
To maintain training stability, the framework employs Derivative Normalization (DN), ensuring the total emphasis across a batch remains consistent. This allows the "implicit loss" to take non-elementary forms that would be impossible to define traditionally.
Key Insights: Unifying Loss and Weighting
DM provides a unifying perspective on existing loss functions. Standard losses like Categorical Cross Entropy (CCE), Mean Absolute Error (MAE), and Mean Squared Error (MSE) can be viewed as specific, rigid instances of example weighting.
A critical insight is the "Easy" strategy for noisy data. While clean datasets benefit from focusing on "hard" examples to refine boundaries, noisy datasets often contain "wrong" examples that appear "hard." By shifting the emphasis mode ($\lambda$) toward easier examples, DM prevents the model from memorizing noise.
Experimental Evaluation
The authors validated DM across several diverse tasks and datasets, including CIFAR-10/100 with synthetic noise, the real-world Clothing 1M dataset, the MARS video retrieval dataset, and the IMDB sentiment analysis dataset under extreme class imbalance (50:1).
Key Results
- High Noise Robustness: On CIFAR-100 with 60% symmetric noise, DM achieved 52.9% accuracy, significantly outperforming standard CCE (42.1%).
- State-of-the-Art Performance: On Clothing 1M, DM reached 73.3% accuracy, surpassing complex methods requiring noise-transition matrices.
- Imbalance Handling: In 50:1 imbalanced sentiment analysis, DM achieved 65.0% accuracy, while CCE reached 63.4% and MAE/GCE failed to converge effectively.
- Stability: Unlike many robust losses, DM remains stable throughout training without requiring complex warm-up schedules.
Conclusion and Future Work
Derivative Manipulation offers a flexible and unified framework for training robust models. By focusing on the gradient magnitude—the only signal the optimizer truly sees—DM bypasses the limitations of traditional loss design. Future work may explore making hyperparameters $\lambda$ and $\beta$ adaptive and investigating the manipulation of gradient direction alongside magnitude.
Summary updated