cs.LGMar 31, 2026

Learning to Shuffle: Block Reshuffling and Reversal Schemes for Stochastic Optimization

Authors: Lam M. Nguyen, Dzung T. Phan, Jayant Kalagnanam

Organizations: IBM Research, Thomas J. Watson Research Center, Yorktown Heights, NY, USA

Abstract

Shuffling strategies for stochastic gradient descent (SGD), including incremental gradient, shuffle-once, and random reshuffling, are supported by rigorous convergence analyses for arbitrary within-epoch permutations. In particular, random reshuffling is known to improve optimization constants relative to cyclic and shuffle-once schemes. However, existing theory offers limited guidance on how to design new data-ordering schemes that further improve optimization constants or stability beyond random reshuffling. In this paper, we design a pipeline using a large language model (LLM)-guided program evolution framework to discover an effective shuffling rule for without-replacement SGD. Abstracting from this instance, we identify two fundamental structural components: block reshuffling and paired reversal. We analyze these components separately and show that block reshuffling strictly reduces prefix-gradient variance constants within the unified shuffling framework, yielding provable improvements over random reshuffling under mild conditions. Separately, we show that paired reversal symmetrizes the epoch map and cancels the leading order-dependent second-order term, reducing order sensitivity from quadratic to cubic in the step size. Numerical experiments with the discovered algorithm validate the theory and demonstrate consistent gains over standard shuffling schemes across convex and nonconvex benchmarks.

Figures & tables

Appendix figures & tables6 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

Jun 30, 2026

Random Reshuffling Dominates Stochastic Gradient Descent

Stochastic Gradient Descent (SGD\textsf{SGD}) is one of the most classical optimization algorithms with favorable theoretical guarantees, yet the practical implementation of SGD\textsf{SGD} differs subtly from its well-known form and is often referred to as Shuffling Stochastic Gradient Descent (Shuffling SGD\textsf{Shuffling SGD}). A particularly popular strategy in Shuffling SGD\textsf{Shuffling SGD} is Random Reshuffling (RR\textsf{RR}), which has achieved great empirical success across numerous experiments. Despite its strong performance, RR\textsf{RR} has long been considered a heuristic due to a lack of theoretical support. Over the last decade, people have finally established provable convergence rates for RR\textsf{RR}, thus justifying its observed superiority. However, for smooth convex optimization, two clouds over the convergence theory of RR\textsf{RR} remain to this day. More precisely, according to the current theory, Shuffling SGD\textsf{Shuffling SGD} under RR\textsf{RR} converges only when the stepsize is smaller than a threshold proportional to 1/n1/n, where nn is the number of summands in the objective (or the number of data points). Consequently, the optimally tuned theoretical rate of Shuffling SGD\textsf{Shuffling SGD} under RR\textsf{RR} is strictly worse than that of SGD\textsf{SGD} when the number of epochs is smaller than another threshold proportional to nn. These two restrictions heavily limit the applicability of existing theories and leave a critical mismatch with practice. In this work, for the first time, we prove that RR\textsf{RR} dominates SGD\textsf{SGD} in smooth convex optimization under any reasonable stepsize after any finite number of epochs, thereby addressing a longstanding open question.
Apr 11, 2026

Shuffling the Data, Stretching the Step-size: Sharper Bias in constant step-size SGD

From adversarial robustness to multi-agent learning, many machine learning tasks can be cast as finite-sum min-max optimization or, more generally, as variational inequality problems (VIPs). Owing to their simplicity and scalability, stochastic gradient methods with constant step size are widely used, despite the fact that they converge only up to a constant term. Among the many heuristics adopted in practice, two classical techniques have recently attracted attention to mitigate this issue: Random Reshuffling of data and Richardson--Romberg extrapolation across iterates. Random Reshuffling sharpens the mean-squared error (MSE) of the estimated solution, while Richardson-Romberg extrapolation acts orthogonally, providing a second-order reduction in its bias. In this work, we show that their composition is strictly better than both, not only maintaining the enhanced MSE guarantees but also yielding an even greater cubic refinement in the bias. To the best of our knowledge, our work provides the first theoretical guarantees for such a synergy in structured non-monotone VIPs. Our analysis proceeds in two steps: (i) we smooth the discrete noise induced by reshuffling and leverage tools from continuous-state Markov chain theory to establish a novel law of large numbers and a central limit theorem for its iterates; and (ii) we employ spectral tensor techniques to prove that extrapolation debiases and sharpens the asymptotic behavior even under the biased gradient oracle induced by reshuffling. Finally, extensive experiments validate our theory, consistently demonstrating substantial speedups in practice.
Oct 14, 2026

Large-Step Last-Iterate Convergence of Random-Reshuffling Stochastic Gradient Descent

Random reshuffling stochastic gradient descent (RR-SGD) is widely used for finite-sum optimization in machine learning. For convex LL-smooth components, recent work establishes convergence guarantees for an averaged iterate with component stepsizes as large as order 1/L1/L. However, the final iterate is a natural output in practice, and existing last-iterate guarantees in this setting require stepsizes that scale inversely with the number of components nn. We establish an expected objective-gap bound for the last iterate of standard RR-SGD on unconstrained problems with a constant component stepsize satisfying 0<η≲1/(L(1+log⁡(nK)))0<η\lesssim 1/(L(1 + \log(nK))), where KK is the number of epochs. By retaining the sampling bias at random comparison points, we remove the explicit 1/n1/n factor from the stepsize restriction. Combined with existing small-step bounds, our result matches the corresponding averaged-iterate convergence rate up to logarithmic factors.