Repeated Random Sampling for Minimizing the Time-to-Accuracy of Learning

Patrik Okanovic, Roger Waleffe, Vasilis Mageirakos, Konstantinos Nikolakakis, Amin Karbasi, Dionysios Kalogerias, Nezihe Merve Gürel, Theodoros Rekatsinas

TL;DR

In the race to make deep learning more efficient, researchers have developed complex "data pruning" and "distillation" techniques to train models on smaller, "informative" subsets of data. This paper reveals a surprising truth: a simple baseline called Repeated Sampling of Random Subsets (RS2)—which just picks a new random subset of data every epoch—outperforms 32 state-of-the-art methods in "time-to-accuracy." By eliminating the massive computational overhead of selecting "perfect" data, RS2 provides a faster, more robust path to high-performing models.

What Problem Does This Paper Address?

Training modern neural networks on massive datasets like ImageNet or OpenWebText is incredibly expensive in terms of time, money, and energy. To solve this, the field of Data Efficiency has emerged. The goal is to identify a small fraction ($r$) of the data that is "most important" so that training on just that fraction yields results comparable to training on the full set.

However, the authors identify two major flaws in current research:

  1. The Overhead Trap: Many methods require "pre-training" an auxiliary model or calculating complex scores for every single image in a dataset before training even begins. This "preparation time" is often so high that it negates any savings gained during the actual training.
  2. The Static Baseline Flaw: Most papers compare their fancy algorithms against a "static random" baseline (picking one random subset and sticking with it). This is a weak baseline because it leads to overfitting on a small portion of the data.

Methods

The authors propose and analyze Repeated Sampling of Random Subsets (RS2). Unlike standard random sampling, which picks a subset once, RS2 refreshes the training data at every epoch.

There are two main flavors:

  • RS2 With Replacement: At each epoch, sample a fraction $r$ of the total dataset uniformly at random.
  • RS2 Without Replacement: Shuffle the entire dataset once. In epoch 1, train on the first $rN$ samples; in epoch 2, train on the next $rN$, and so on. This ensures the model eventually sees every example, just spread out over more time.

Crucially, the authors also emphasize Learning Rate (LR) Scaling. Because the model performs fewer total gradient updates when training on subsets, the LR schedule must be compressed (decayed faster) to ensure the model converges properly within the allotted time.

Datasets

The authors conducted a massive meta-study using:

  • Image Classification: CIFAR-10, CIFAR-100, ImageNet, and ImageNet30.
  • Medical Imaging: MedMNIST (to test performance on class-imbalanced, real-world data).
  • Language Modeling: OpenWebText (to test GPT-2 pretraining).

They compared RS2 against 32 different methods, including 24 data pruning techniques (like GraNd, EL2N, and Forgetting) and 8 dataset distillation methods (like Trajectory Matching).

Key Insights and Ideas

Accuracy vs. Selection Ratio for CIFAR10 and ImageNet
  • Simplicity is a Feature, Not a Bug: RS2 has zero "selection overhead." While a SOTA method might spend 250 minutes "preparing" ImageNet data before training starts, RS2 is already halfway through training.
  • Exploration vs. Exploitation: By changing the subset every epoch, RS2 allows the model to "explore" the entire distribution of the dataset over time. Static subsets "exploit" a small region of the data, which often leads to poor generalization.
  • Robustness to Noise: "Informative" data selection methods often accidentally prioritize noisy or mislabeled examples because they look "hard" or "surprising" to the model. RS2, being random, is naturally robust to these outliers.
  • The New Gold Standard: The authors argue that RS2 should be the de facto baseline for any future work in data pruning. If an algorithm can't beat "repeatedly picking random stuff," it isn't practically useful.

Key Results

Time-to-Accuracy Comparison
  • ImageNet Performance: When training ResNet-18 on 10% of ImageNet, RS2 achieved 66% accuracy. The best competing SOTA method reached only 55% and took 1.6x longer to train.
  • Massive Speedups: RS2 reached target accuracies up to 9x faster than training on the full dataset.
  • LLM Pretraining: Using RS2 to pretrain GPT-2 with only 30% of the data resulted in a 3x reduction in monetary cost ($1,560 vs $5,200) with only a negligible 2.8% drop in accuracy.
  • Noisy Data: In experiments where 30% of labels were flipped (noise), RS2 maintained 74.4% accuracy, while the next best "smart" pruning method dropped to 63.4%.

Limitations and Future Work

  • The Accuracy Gap: While RS2 is the fastest way to get near full-dataset accuracy, it still generally falls a few percentage points short of training on 100% of the data for the full duration.
  • Extreme Compression: At very low fractions (e.g., $r < 1\%$), RS2 can struggle because the model sees too few examples per class in a single epoch, leading to high variance. In these "tiny data" regimes, some static selection methods might still hold an edge.
  • Future Directions: The authors suggest that future research should look for ways to combine the "repeated" nature of RS2 with low-cost importance sampling to finally close the gap with full-dataset training without sacrificing speed.

Summary updated

BibTeX
@inproceedings{okanovic2024repeated,
  author = {Patrik Okanovic and Roger Waleffe and Vasilis Mageirakos and Konstantinos Nikolakakis and Amin Karbasi and Dionysios Kalogerias and Nezihe Merve Gürel and Theodoros Rekatsinas},
  title = {{Repeated Random Sampling for Minimizing the Time-to-Accuracy of Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=JnRStoIuTe},
}
Figure