Curriculum Learning by Dynamic Instance Hardness

Tianyi Zhou, Shengjie Wang, Jeff A. Bilmes

TL;DR

This paper introduces Dynamic Instance Hardness (DIH), a stable measure of how difficult a data point is for a neural network based on its entire training history. By focusing training on "historically hard" samples and deprioritizing "easy" ones, the authors' DIHCL algorithm achieves better accuracy and faster convergence than standard SGD—all without the expensive extra computation required by previous curriculum learning methods.

What Problem Does This Paper Address?

In human education, a good teacher adjusts the curriculum based on a student's progress, focusing more on difficult concepts. Curriculum Learning (CL) tries to bring this logic to machine learning.

However, applying CL to Deep Neural Networks (DNNs) is notoriously difficult for two reasons:

  1. Instability: DNN training is "noisy." Because of Stochastic Gradient Descent (SGD), a sample might have a high loss in one epoch and a low loss in the next just by chance. Relying on "instantaneous" loss to decide what to learn next leads to inconsistent training.
Comparison of smooth DIH versus noisy instantaneous loss
  1. Computational Overhead: Most CL methods require the model to perform an "inference pass" on the entire dataset every epoch to re-evaluate which samples are hard. For massive datasets like ImageNet, this extra work often outweighs the benefits of the curriculum.

Methods

The authors propose Dynamic Instance Hardness (DIH). Instead of looking at a sample's current loss, DIH calculates an exponential moving average of a sample's "hardness" over time.

The DIH Metric

Hardness ($a_t$) can be measured in three ways:

  • Loss: The standard cross-entropy error.
  • Loss Change: How much the loss changed since the last time the model saw this sample.
  • Prediction Flip: A binary indicator of whether the model changed its mind about the correct label.

The DIHCL Algorithm

The training process, called DIHCL (DIH guided Curriculum Learning), follows a simple loop:

  1. Warm Start: Train on the full dataset for a few epochs ($T_0$) to get an initial estimate of DIH.
  2. Selection: Select a subset of "hard" samples (those with high DIH).
  3. Lazy Update: Only update the DIH scores for the samples that were actually selected for training. The authors argue it's safe to keep "stale" scores for easy samples because easy samples tend to stay easy.
  4. Diversity (Optional): Use submodular maximization (specifically a "facility location" function) to ensure the selected hard samples are diverse and cover different parts of the data distribution.

Datasets

The researchers evaluated DIHCL across 11 diverse image classification datasets, ranging from small-scale benchmarks to large-scale real-world data:

  • Standard Benchmarks: CIFAR-10, CIFAR-100, SVHN, Fashion-MNIST (FMNIST), Kuzushiji-MNIST (KMNIST).
  • Fine-grained/Large-scale: ImageNet, Food-101, STL10, Birdsnap, FGVC-Aircraft, Stanford Cars.

Key Insights and Ideas

  • Hardness is Predictable: One of the most striking findings is that a sample’s hardness early in training (e.g., at epoch 40) is a very strong predictor of its hardness much later (e.g., at epoch 210). This justifies the "lazy update" strategy.
Losses for groups of samples separated by hardness at different epochs
  • Stability over Recency: By using a moving average (DIH) rather than instantaneous loss, the curriculum becomes much smoother. This prevents the optimization objective from jumping around wildly, leading to more stable convergence.
  • The "Leitner System" Analogy: DIHCL acts like a digital version of the Leitner system for flashcards—you review the cards you get wrong frequently and push the "easy" ones to the back of the deck.
  • Efficiency is "Free": Because DIH uses the loss calculated during the standard backpropagation step, it requires virtually no extra computation to maintain.

Key Results

  • Superior Accuracy: DIHCL outperformed random mini-batch SGD and other state-of-the-art CL methods (like Self-Paced Learning) on almost all 11 datasets. For example, on CIFAR-100, DIHCL achieved ~82.2% accuracy compared to ~79.6% for standard SGD.
  • Faster Convergence: On large datasets like ImageNet and Food-101, DIHCL reached higher accuracy levels significantly faster in terms of "wall-clock" time.
  • Robustness to Noise: Even when 40% of the labels in the dataset were intentionally corrupted (noisy labels), DIHCL remained robust and outperformed the baselines.
  • Best Variant: The "DIHCL-Exp" version (using a softmax-like weighted sampling) combined with "Loss Change" as the hardness metric generally yielded the most consistent top-tier performance.

Limitations and Future Work

  • Hyperparameter Sensitivity: The algorithm introduces new hyperparameters, such as the discount factor ($\gamma$) for the moving average and the subset reduction schedule. While the authors found some "safe" defaults, these might need tuning for entirely new domains.
  • Diversity Overhead: While the DIH calculation is "free," the optional submodular maximization step used to ensure subset diversity does add some computational cost, though the authors mitigated this using "lazy" greedy algorithms.
  • Beyond Vision: The paper focuses exclusively on image classification. Future work could explore whether DIH properties hold true for Natural Language Processing (NLP) or Reinforcement Learning (RL).

Summary updated

BibTeX
@inproceedings{zhou2020curriculum,
  author = {Tianyi Zhou and Shengjie Wang and Jeff A. Bilmes},
  title = {{Curriculum Learning by Dynamic Instance Hardness}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
}
Figure