Fixing Mini-batch Sequences with Hierarchical Robust Partitioning

Shengjie Wang, Wenruo Bai, Chandrashekhar Lavania, Jeff A. BilmesAISTATS 2019

Abstract

Standard deep learning practices rely on random data shuffling to approximate Stochastic Gradient Descent (SGD). However, random permutations can lead to non-representative mini-batches, causing noisy gradients and suboptimal convergence. This paper introduces a deterministic hierarchical partitioning method based on submodular optimization. By ensuring that every mini-batch and sequence of batches is highly representative of the full dataset, the proposed approach improves model performance while maintaining hardware efficiency.

Introduction

In modern deep learning, the scale of datasets often necessitates sequential data access from disk to maintain high GPU utilization. The common "shuffle and slide" approach—creating a fixed random permutation—is a practical compromise between theoretical SGD requirements and hardware constraints. However, a random shuffle may produce "unlucky" sequences where certain mini-batches are redundant or fail to capture the dataset's diversity. This work addresses the question: Can we construct a fixed, deterministic sequence that is guaranteed to be representative, rather than relying on the hope that a random one is not poor?

Methodology: Hierarchical Robust Partitioning

The authors frame mini-batch creation as a Max-Min Robust Partitioning problem. The goal is to maximize the representativeness of the least representative batch.

Submodular Optimization

Representativeness is quantified using submodular functions, specifically a variant of the Facility Location function ($f_{NN}$). This function rewards sets that contain points close to every other point in the dataset, effectively capturing the "coverage" of the data space.

Hierarchical Approach

Optimizing representativeness across millions of points is computationally prohibitive. To scale, the authors propose a recursive hierarchical partition. The dataset is first divided into large representative blocks, which are then subdivided until the target mini-batch size is reached.

Comparison between one-level and hierarchical partitioning. Hierarchical partitioning ensures representativeness at multiple scales.

This hierarchy ensures "order consistency": not only is each individual batch representative, but any prefix of the sequence (e.g., the first $k$ batches) provides a high-quality snapshot of the entire dataset.

Experimental Setup

The method was evaluated on two benchmarks:

  • CIFAR-100: 50,000 images, 100 classes. Features were extracted using autoencoders.
  • ImageNet (ILSVRC12): ~1.2 million images, 1,000 classes. Features were extracted using a pre-trained ResNet-18.

Results and Discussion

The deterministic sequence consistently outperformed standard random shuffling across both datasets.

Accuracy over CIFAR100 validation (a) and test (b) sets, comparing the proposed deterministic sequence against random shuffles.

Key Findings

  • Performance Gains: On CIFAR-100, the deterministic sequence beat the mean of 30 random runs and even outperformed the best individual random run. Similar success was observed on ImageNet for both Top-1 and Top-5 accuracy.
  • Statistical Significance: Improvements on CIFAR-100 test accuracy were statistically significant ($p = 0.0009$).
  • Curriculum Learning Parity: Sorting partitioned blocks by representativeness naturally places more "central" or informative batches earlier, mirroring some benefits of curriculum learning.
  • Scalability: The hierarchical approach successfully handled the 1.2 million images of ImageNet, a scale where previous submodular methods typically fail due to memory constraints.

Conclusion and Future Work

This research demonstrates that a carefully engineered deterministic sequence can be superior to random shuffling for training deep models. By co-designing the data ordering with hardware efficiency in mind, the authors achieve better convergence without sacrificing I/O speed.

Future work includes reducing the pre-processing overhead of feature extraction and partitioning. Additionally, exploring "active" partitioning—where the sequence adapts dynamically to the model's current state—could further enhance training efficiency.

Summary updated

BibTeX
@inproceedings{wang2019fixing,
  author = {Shengjie Wang and Wenruo Bai and Chandrashekhar Lavania and Jeff A. Bilmes},
  title = {{Fixing Mini-batch Sequences with Hierarchical Robust Partitioning}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2019},
}
Figure