For years, machine learning practitioners have operated on a widely accepted assumption: "random reshuffling" (sampling training data without replacement) is always superior to sampling with replacement. This paper challenges that fundamental ML folklore, providing the first explicit mathematical counterexamples to the conjectures supporting this belief. It proves that there are specific learning tasks where standard with-replacement sampling actually converges faster.
The Core Problem: How Should We Sample Data?
When training models with Stochastic Gradient Descent (SGD), practitioners must decide the order in which to present data to the network. There are two primary methods:
- With-replacement sampling: Pick a random data point, update the model, and put the point back into the pool.
- Random Reshuffling (Without-replacement): Shuffle the entire dataset and iterate through it one by one (completing an "epoch").
Empirical evidence has long suggested that random reshuffling is universally better. While this has been mathematically proven for "noisy" problems (where the gradient at the optimum isn't zero), it remained an unproven conjecture for "noiseless" problems that converge at a linear rate. This conjecture, known as the Operator Inequality of Noncommutative Arithmetic and Geometric Means, essentially posits that the product of shuffled matrices is always "smaller" (more contractive) than the power of their average.
This paper tackles the question head-on: Is random reshuffling actually always better, or have we simply not found the edge cases where it fails?
Methodology and Experimental Setup
To investigate this, the author employs a mix of rigorous mathematical construction and empirical simulation, stepping away from standard benchmarks like ImageNet in favor of synthetic, highly-structured tasks designed to test theoretical boundaries.
- Constructive Disproof: The paper provides the first explicit, concrete sets of matrices ($A_1, \dots, A_n$) that violate longstanding mathematical conjectures. By carefully choosing vectors to build symmetric positive semidefinite matrices, the author demonstrates that the "geometric mean" (the shuffled product) can have a larger eigenvalue than the "arithmetic mean" (the average).
- Parallel SGD Analysis: To bridge matrix theory and ML, a "Parallel SGD" algorithm is used. This setup averages the results of many parallel workers to isolate the "expected" behavior of the sampling methods, effectively simulating the mathematical conjectures within a training loop.
- Synthetic Datasets: The tasks include a rank-1 matrix recovery problem, convex quadratic problems with known global optimums, and a specialized "disruptive" 3-matrix task where with-replacement sampling can reach zero loss in finite time, but random reshuffling is mathematically blocked from ever reaching it.
Key Insights and Discoveries
The Conjecture is False: The most significant breakthrough is the explicit disproof of the Noncommutative AMGM inequality. For $n=5$ matrices, the author found a case where the shuffled product is strictly larger than the average power.
The "Cancellation" vs. "Contraction" Trade-off: Random reshuffling excels at "canceling out" noise over an epoch. However, in noiseless settings, with-replacement sampling can occasionally hit "lucky" sequences of updates that are more contractive than any possible permutation allowed by reshuffling.
Step Size Matters: The paper proves a "Sufficiently Small Step Size" theorem. It shows that for any non-trivial problem, random reshuffling is better if your step size is infinitesimally small. The "failure" of reshuffling only occurs at the larger step sizes often used in practice to achieve fast convergence.
Key Results
- Mathematical Disproofs: The author found a counterexample for $n=5$ matrices where the eigenvalue violates the required $\leq 1$ bound (reaching $\lambda \approx -1.1875$). A second conjecture was disproved using $n=6$ matrices, where the reshuffled side was larger than the with-replacement side.
- Empirical Reversal: In a simulated matrix-completion task, random reshuffling actively failed to converge to the minimal loss, plateauing early, while with-replacement sampling continued to improve steadily.
- Optimal Learning Rates: If the learning rate is tuned separately for both methods, with-replacement sampling can achieve a better "best-case" convergence than the best-case scenario for random reshuffling.
- Asymptotic Superiority: In one extreme example, with-replacement sampling is shown to be infinitely better asymptotically, reaching a loss of $10^{-4000}$ while reshuffling plateaus.
Limitations and Future Work
The author acknowledges that these counterexamples are "hand-crafted." While they definitively prove the underlying math of the folklore is flawed, it remains unclear how often these "bad" configurations appear in real-world deep learning architectures. Furthermore, the results primarily apply to "noiseless" or "strong growth" conditions. In high-noise regimes (like small-batch training on highly diverse data), the traditional benefits of random reshuffling likely still dominate.
Future research will need to investigate whether these effects occur naturally in practical learning tasks, or if real-world data possesses inherent structures that protect the "random reshuffling is better" rule of thumb.
Summary updated