Sequenced-Replacement Sampling for Deep Learning

Chiu Man Ho, Dae Hoon Park, Wei Yang, Yi ChangarXiv 2018

Abstract

Standard deep learning training typically relies on non-replacement sampling (epoch-based) for speed or replacement sampling for stochasticity. This paper introduces Sequenced-Replacement Sampling (SRS), a hybrid approach that combines the systematic coverage of epochs with the exploratory power of replacement sampling. By maintaining a queue of indices and refilling mini-batch "holes" sequentially, SRS enables models to encounter a vastly larger variety of mini-batch configurations. Experimental results on CIFAR-100 demonstrate that SRS significantly improves generalization, achieving a record-low error rate of 10.10% with a 70-layer Wide ResNet.

Introduction

The choice of data sampling strategy is a fundamental yet often overlooked aspect of deep learning. Most practitioners utilize non-replacement sampling, where the dataset is shuffled and iterated through in fixed "epochs." While efficient and ensuring uniform coverage, this method restricts the diversity of mini-batch combinations the model sees. Conversely, replacement sampling offers higher stochasticity, aiding exploration of the loss landscape, but risks "starving" certain data points, leading to slow convergence.

The authors propose Sequenced-Replacement Sampling (SRS) as a "middle way" to capture the benefits of both strategies: the exploratory variety of replacement sampling without the inefficiency of uneven data coverage.

Methodology: Sequenced-Replacement Sampling

SRS operates through a systematic "revolving door" mechanism for data indices. The process involves three main components:

  1. Index Assignment: Each sample is assigned a fixed sequence index.
  2. Queue Management: A separate queue maintains the order of these indices.
  3. The Swap Mechanism: In each iteration, a mini-batch is drawn randomly from an "active" pool. The samples removed are replaced by the next available indices from the queue.
The Sequenced-Replacement Sampling (SRS) mechanism showing the transition from (a) initial state to (e) replacement of sampled indices.

This ensures that while the specific grouping of images in any given mini-batch is highly stochastic, the system is guaranteed to cycle through the entire dataset. A critical finding is that SRS requires a prolonged high-learning-rate phase. The increased "noise" and exploration inherent in SRS necessitate more time for the model to navigate the expanded configuration space before the learning rate is decayed.

Experimental Setup

The effectiveness of SRS was evaluated on two standard benchmarks:

  • CIFAR-10: 60,000 images across 10 classes.
  • CIFAR-100: 60,000 images across 100 classes.

The method proved particularly potent for CIFAR-100, where the limited number of samples per class (500) typically makes models highly susceptible to overfitting.

Discussion and Key Insights

Mini-batch Augmentation

SRS functions as a form of "mini-batch augmentation." By exponentially increasing the possible combinations of images within a batch, it forces the model to learn more robust, generalized features rather than memorizing specific batch-level statistics.

Balancing Exploration and Generalization

While standard sampling converges faster, SRS prioritizes long-term generalization. It prevents the model from settling prematurely into suboptimal local minima. Interestingly, SRS reverses the typical overfitting trend seen in deep networks on small datasets. For instance, with SRS, a 70-layer Wide ResNet outperformed a 28-layer version, whereas the opposite occurred under standard sampling.

Architectural Synergy

The authors found that SRS works best when paired with architectural modifications like "Batch Normalization after addition" in Residual Units. This helps the network manage the increased internal covariate shift resulting from the more volatile sampling process.

Results

The impact of SRS on CIFAR-100 was substantial. Using a Wide ResNet (WRN-28-10), standard training resulted in a 19.25% error rate, which SRS reduced to 12.34%. This outperformed other regularization techniques like "Shake-Shake" (15.85%). The most impressive result was achieved with a 70-layer Wide ResNet, which reached a 10.10% error rate, a nearly 50% relative improvement over the standard version's 19.72%. Improvements on CIFAR-10 were more modest, likely because the larger number of samples per class already allows standard methods to reach near-optimal performance.

Conclusion and Future Work

While SRS offers significant accuracy gains, it comes at the cost of increased training time due to slower convergence and the need for longer high-learning-rate schedules. Additionally, the method is sensitive to hyperparameter tuning, particularly the learning rate decay schedule. Future research will investigate the relationship between SRS and weight decay, specifically addressing the slight performance artifacts observed immediately following learning rate reductions.

Summary updated

BibTeX
@misc{ho2018sequenced,
  author = {Chiu Man Ho and Dae Hoon Park and Wei Yang and Yi Chang},
  title = {{Sequenced-Replacement Sampling for Deep Learning}},
  year = {2018},
  eprint = {1810.08322},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1810.08322},
}
Figure