Robust and On-the-fly Dataset Denoising for Image Classification

Jiaming Song, Lunjia Hu, Yann N. Dauphin, Michael Auli, Tengyu Ma

Abstract

Memorization in over-parameterized neural networks could severely hurt generalization in the presence of mislabeled examples. However, mislabeled examples are hard to avoid in extremely large datasets collected with weak supervision. We address this problem by reasoning counterfactually about the loss distribution of examples with uniform random labels had they were trained with the real examples, and use this information to remove noisy examples from the training set. First, we observe that examples with uniform random labels have higher losses when trained with stochastic gradient descent under large learning rates. Then, we propose to model the loss distribution of the counterfactual examples using only the network parameters, which is able to model such examples with remarkable success. Finally, we propose to remove examples whose loss exceeds a certain quantile of the modeled loss distribution. This leads to On-the-fly Data Denoising (ODD), a simple yet effective algorithm that is robust to mislabeled examples, while introducing almost zero computational overhead compared to standard training. ODD is able to achieve state-of-the-art results on a wide range of datasets including real-world ones such as WebVision and Clothing1M.

Introduction

Deep neural networks possess an immense capacity to fit data, which often leads to the memorization of "noisy" labels in large-scale datasets scraped from the web. For instance, an image of a giraffe might be incorrectly labeled as a "lion" in a real-world dataset. This memorization degrades the model's ability to generalize to clean, unseen data. While existing solutions exist, they often rely on complex auxiliary models or small, perfectly labeled "trusted" datasets, which are not always available or scalable.

An example of a mislabeled image (giraffe labeled as 'lion') from a noisy dataset.

The proposed On-the-fly Data Denoising (ODD) algorithm addresses these challenges by providing a robust, scalable, and computationally efficient method to identify and remove mislabeled images during the training process itself.

Methodology: On-the-fly Data Denoising (ODD)

The ODD algorithm leverages two key observations regarding the behavior of Stochastic Gradient Descent (SGD) and the statistical properties of noise.

The SGD Filter

When a network is trained with a large learning rate, SGD naturally prioritizes learning simple, clean patterns. During this initial phase, the loss for clean examples decreases significantly, while the loss for mislabeled examples remains high and stable. This creates a natural separation in the loss distribution.

Counterfactual Reasoning and Simulation

To determine a precise threshold for pruning, ODD uses a "counterfactual" approach. It simulates the expected loss distribution ($q_n$) of examples with purely random labels. This is achieved by using the weights of the network's final layer and feeding them random Gaussian noise. This simulation allows the model to "know" what noise looks like without requiring a separate clean validation set.

Overview of the On-the-fly Data Denoising (ODD) algorithm workflow.

The ODD Workflow

  1. Initial Training: Train the model for $E$ epochs using a large learning rate.
  2. Simulation: Generate the simulated loss distribution using the final layer's weights.
  3. Pruning: Set a threshold based on a percentile ($p$) of the simulated distribution. Discard any training example with a loss exceeding this threshold.
  4. Refinement: Continue training on the remaining clean subset, gradually decaying the learning rate to achieve peak performance.

Experimental Results

ODD was evaluated on both synthetic noise (CIFAR-10/100, ImageNet) and real-world noisy datasets:

  • Clothing1M: ODD achieved 73.5% accuracy, outperforming complex baselines like Joint Optimization.
  • WebVision: On this 2.4-million-image dataset, ODD reached 74.6% Top-1 accuracy, surpassing previous methods like CurriculumNet.

The method demonstrates remarkable robustness to hyperparameters, specifically the percentile $p$, and introduces virtually zero computational overhead, as the threshold calculation is a simple statistical simulation performed only once or a few times.

Conclusion

ODD provides a simple yet powerful "plug-and-play" solution for training on noisy datasets. By using the network as its own critic, it avoids the need for auxiliary models. Future work may explore iterative pruning and the integration of ODD with modern regularization techniques like Sharpness-Aware Minimization (SAM).

Summary updated

Abstract

Memorization in over-parameterized neural networks could severely hurt generalization in the presence of mislabeled examples. However, mislabeled examples are hard to avoid in extremely large datasets collected with weak supervision. We address this problem by reasoning counterfactually about the loss distribution of examples with uniform random labels had they were trained with the real examples, and use this information to remove noisy examples from the training set. First, we observe that examples with uniform random labels have higher losses when trained with stochastic gradient descent under large learning rates. Then, we propose to model the loss distribution of the counterfactual examples using only the network parameters, which is able to model such examples with remarkable success. Finally, we propose to remove examples whose loss exceeds a certain quantile of the modeled loss distribution. This leads to On-the-fly Data Denoising (ODD), a simple yet effective algorithm that is robust to mislabeled examples, while introducing almost zero computational overhead compared to standard training. ODD is able to achieve state-of-the-art results on a wide range of datasets including real-world ones such as WebVision and Clothing1M.
BibTeX
@inproceedings{song2020robust,
  author = {Jiaming Song and Lunjia Hu and Yann N. Dauphin and Michael Auli and Tengyu Ma},
  title = {{Robust and On-the-fly Dataset Denoising for Image Classification}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  url = {https://openreview.net/forum?id=eIjUXBJ8sV},
}

Loading related content...

Figure