Abstract
In machine learning and neural network optimization, algorithms like incremental gradient, and shuffle SGD are popular due to minimizing the number of cache misses and good practical convergence behavior. However, their optimization properties in theory, especially for non-convex smooth functions, remain incompletely explored. This paper delves into the convergence properties of SGD algorithms with arbitrary data ordering, within a broad framework for non-convex smooth functions. Our findings show enhanced convergence guarantees for incremental gradient and single shuffle SGD. Particularly if $n$ is the training set size, we improve $n$ times the optimization term of convergence guarantee to reach accuracy $\varepsilon$ from $O(n / \varepsilon)$ to $O(1 / \varepsilon)$.
Introduction: The Theory-Practice Gap in SGD Shuffling
Standard Stochastic Gradient Descent (SGD) theory assumes data points are sampled uniformly at random with replacement. However, practical implementations in deep learning frameworks almost exclusively use "data loaders" that cycle through data in a fixed order (Incremental Gradient, IG) or shuffle the dataset once per epoch (Single Shuffle, SS) or every epoch (Random Reshuffling, RR). These methods are preferred for their cache efficiency and predictable memory access patterns.
Despite their empirical success, a significant "theory-practice gap" has persisted. Prior theoretical analyses for non-convex functions suggested that these shuffling variants were significantly slower than standard SGD, with convergence terms growing linearly with the dataset size $n$. This paper addresses this discrepancy by providing a new theoretical framework that handles arbitrary data orderings and aligns theory with observed performance.
Methodology: Effective Correlation Time and Perturbed Iterate Analysis
The authors bridge the gap using a novel proof technique called perturbed iterate analysis combined with a way to quantify data dependencies through Effective Correlation Time ($\tau$).
Instead of the traditional approach of analyzing algorithms based on full epochs of size $n$, the iterations are divided into smaller chunks of size $\tau$. Crucially, this correlation time is dynamic, defined as $\tau = \Theta(1/L\gamma)$, where $L$ is the smoothness constant and $\gamma$ is the step size. This captures the intuition that larger steps move iterates further away, reducing the correlation between successive data points. Additionally, a new metric for Sequence Correlation allows for a unified convergence proof across SGD, IG, SS, and RR.
Key Insights: Dynamic Correlation and the $n$-Dependency
The central breakthrough is the realization that the "correlation period" is not fixed to the dataset size $n$, but depends on optimization parameters. By utilizing these shorter, step-size-dependent correlation periods, the authors demonstrate that the optimization term—the part of the error dependent on the starting point—does not need to scale with $n$. This improves the theoretical rate from $O(n/\epsilon)$ to $O(1/\epsilon)$.
Furthermore, the analysis confirms that Single Shuffle (SS)—shuffling only once at the start of training—provides nearly the same theoretical and practical benefits as shuffling every epoch (Random Reshuffling), while being simpler to implement.
Empirical Results: Validating the Theoretical Speedup
The theoretical findings were validated across synthetic quadratic functions, logistic regression benchmarks, and deep neural networks (CNNs on MNIST and ResNet-18 on CIFAR-10).
As shown in the figure above, Single Shuffle (SS) and Random Reshuffling (RR) consistently outperform standard SGD, particularly as the step size $\gamma$ decreases. The results in panel (b) specifically highlight how the number of iterations required to reach a target accuracy $\epsilon$ scales with dataset size $n$, confirming the improved dependency predicted by the new theory.
Conclusion and Future Directions
This work provides a major theoretical advancement for the optimization methods actually used in practice. By removing the $n$ factor from the optimization term, it finally explains why shuffling methods are so effective for non-convex smooth functions.
Future work remains in narrowing the gap for Random Reshuffling's stochastic (variance) term, which still contains a $\sqrt{n}$ factor in this unified analysis. Additionally, extending these tight rates to non-smooth functions or massive-scale Transformer training, where data is often seen only once, presents an exciting frontier for optimization research.
Summary updated