Which Samples Should Be Learned First: Easy or Hard?

Xiaoling Zhou, Ou Wu

TL;DR

This paper investigates the long-standing question of whether "easy" or "hard" samples should be prioritized during model training. The authors propose a theoretical framework that reveals the optimal priority mode depends on the distribution of sample difficulties and introduces two new modes: "medium-first" and "two-ends-first." They also demonstrate that the optimal priority mode can change dynamically during training and introduce a flexible weighting scheme, FlexW, that can adapt to these different modes.

What Problem Does This Paper Address?

In machine learning, it's common to assign different weights to training samples to improve model performance. This is because not all samples are equally informative or challenging. Historically, two main approaches have emerged: "easy-first," where simpler samples are prioritized, and "hard-first," where more difficult samples are given more attention. However, there's no consensus on which approach is universally better, leading to the central question: "Which samples should be learned first: easy or hard?" This paper aims to provide a theoretical and empirical answer by exploring the relationship between sample difficulty distributions and optimal training strategies, and by proposing a flexible solution that can adapt to different scenarios.

Methods

The authors tackle this problem through a multi-pronged approach:

  • Theoretical Framework: They propose a general optimized objective function that mathematically links the distribution of sample learning difficulties to the optimal priority mode. This framework allows for theoretical analysis of the "easy-or-hard" question.
  • Bias-Variance Trade-off Analysis: They leverage the bias-variance trade-off theory to understand how different priority modes affect model complexity and generalization error, particularly in relation to easy, medium, and hard samples.
  • Novel Priority Modes: Based on their theoretical analysis, they identify two additional priority modes beyond easy-first and hard-first: "medium-first" (prioritizing samples with intermediate difficulty) and "two-ends-first" (prioritizing both very easy and very hard samples).
  • Dynamic Priority Modes: They argue that the optimal priority mode is not necessarily fixed throughout training. If the distribution of sample difficulties changes significantly during training (e.g., due to learning progress), the priority mode should adapt.
  • Flexible Weighting Scheme (FlexW): To implement these findings, they introduce a novel, data-adaptive weighting scheme called FlexW. This scheme is designed to be flexible, allowing it to switch between the four identified priority modes (easy-first, medium-first, hard-first, and two-ends-first) by adjusting its hyper-parameters. This is a key innovation, as most existing methods are fixed to a single mode.

Datasets

The paper uses a variety of datasets for evaluation, categorized by the learning scenario:

  • Noisy Labels: CIFAR10 and CIFAR100 are used with simulated flip and uniform label noises.
  • Imbalanced Data: Long-tailed versions of CIFAR benchmarks are used.
  • Object Detection: PASCAL VOC dataset is used, with artificially constructed subsets (VOC-e, VOC-h, VOC-m, VOC-b) to represent different sample difficulty distributions.
  • Graph Data: Five benchmark graph datasets: Cora, Citeseer, Pubmed, Coauthor CS, and Coauthor Physics.
  • Standard Datasets: Standard CIFAR10 and CIFAR100 datasets are also used for general evaluation.

Key Insights and Ideas

  • No Universal "Best" Mode: The most significant insight is that there isn't a single optimal priority mode (easy-first, hard-first, etc.) that works for all learning tasks. The best strategy is highly dependent on the specific data characteristics.
  • Beyond Easy/Hard: The introduction of "medium-first" and "two-ends-first" modes expands the spectrum of effective training strategies, acknowledging that optimal learning might involve focusing on intermediate difficulties or both extremes.
  • Dynamic Training is Key: The realization that the optimal priority mode can and should change during training is crucial. As a model learns, the distribution of sample difficulties shifts, and a static approach might become suboptimal.
  • Flexibility is Paramount: The proposed FlexW scheme highlights the importance of adaptable weighting mechanisms. By allowing flexible switching between modes, it can better handle diverse and evolving data distributions.
  • Difficulty Measurement Matters: The paper emphasizes that accurately measuring sample learning difficulty is fundamental. While loss is a common proxy, a more comprehensive approach considering factors like noise, neighborhood, and category distribution is desirable for future work.

Key Results

  • Theoretical Validation: The theoretical framework successfully explains the relationship between sample difficulty distributions and the four priority modes, providing a solid foundation for the proposed methods.
  • FlexW Performance: FlexW consistently achieves competitive or superior results across various scenarios, including noisy labels, imbalanced data, and object detection tasks, outperforming or matching established methods like Focal Loss and SPL in many cases.
  • Noisy Data: For noisy data, "easy-first" and "medium-first" modes generally perform better than "hard-first," as they are less susceptible to being misled by incorrect labels.
  • Imbalanced Data: For imbalanced datasets, "hard-first" modes are shown to be more effective in improving the accuracy of tail categories, which are typically harder to learn.
  • Graph Data: On graph datasets, "easy-first" schemes (including FlexW with easy-first) demonstrate better performance, potentially by mitigating over-smoothing issues caused by heterogeneous node neighborhoods.
  • Dynamic Mode Benefits: Experiments with "varied modes" (where the priority mode changes during training) show improved performance in some cases compared to fixed modes, especially when difficulty distributions change significantly.

Limitations and Future Work

  • Difficulty Measurement: The paper acknowledges that current methods for measuring learning difficulty (primarily based on loss) are approximations. An ideal solution would incorporate a broader range of factors like sample neighborhood, category distribution, and noise levels. This is identified as a key area for future research.
  • "Excessive" Samples: Determining when samples of a certain difficulty are "excessive" is crucial for selecting the right mode. While prior knowledge can help, the paper suggests using validation set distributions as a proxy when such knowledge is absent.
  • Two-Ends-First Caution: The authors note that the "two-ends-first" mode should be used with caution, as real-world datasets rarely exhibit the specific difficulty distribution it's designed for.
  • Hyper-parameter Tuning: While FlexW offers flexibility, optimal hyper-parameter selection for the desired priority mode still requires tuning on a validation set. The paper provides stable parameter ranges for common modes.

Summary updated

BibTeX
@article{zhou2023which,
  author = {Xiaoling Zhou and Ou Wu},
  title = {{Which Samples Should Be Learned First: Easy or Hard?}},
  journal = {IEEE Transactions on Neural Networks and Learning Systems},
  year = {2023},
  doi = {10.1109/tnnls.2023.3284430},
}
Figure