Papers
Topics
Authors
Recent
Search
2000 character limit reached

Random Reshuffling in Stochastic Optimization

Updated 3 July 2026
  • Random reshuffling is a without-replacement data sampling strategy where the dataset is permuted each epoch to reduce variance and enhance convergence over traditional SGD.
  • Key variants include shuffle-once, incremental gradient, proximal, variance-reduced, and distributed versions that expand its applicability across convex, nonconvex, and nonsmooth problems.
  • Convergence analyses demonstrate linear and accelerated rates under various conditions, with empirical benefits in large-scale optimization and reinforcement learning.

Random reshuffling (RR) is a batchwise, without-replacement data permutation scheme that has become the practical standard for stochastic optimization in large-scale machine learning. In RR, data points are processed in randomly permuted order in cycles ("epochs"), with each data point accessed exactly once per epoch before a new random permutation is drawn for the next epoch. RR contrasts with uniform-with-replacement sampling typical in classical stochastic gradient descent (SGD). Over the last decade, RR's empirical and theoretical performance advantages have been increasingly understood across smooth, nonsmooth, convex, nonconvex, distributed, and variance-reduced optimization, as well as in stochastic sampling and reinforcement learning.

1. Algorithmic Framework and Variants

RR operates on the finite-sum minimization problem:

minxRdf(x)=1ni=1nfi(x),\min_{x \in \mathbb{R}^d} f(x) = \frac{1}{n} \sum_{i=1}^n f_i(x),

where each fif_i is typically smooth and possibly convex. The basic RR iteration proceeds as follows:

  • At epoch tt, sample a random permutation πt\pi^t of {1,,n}\{1, \dots, n\}.
  • Set x0t=xtx^t_0 = x^t.
  • For i=1,,ni = 1, \dots, n:

    xit=xi1tηfπt(i)(xi1t).x^t_i = x^t_{i-1} - \eta \nabla f_{\pi^t(i)}(x^t_{i-1}).

  • Set xt+1=xntx^{t+1} = x^t_n.

Key variants include:

  • Shuffle-Once (SO): A single permutation drawn at t=0t=0 is reused for all epochs.
  • Incremental Gradient (IG): Fixed deterministic order (possibly adversarial).
  • Proximal RR (ProxRR): A proximal operator is applied at the end (or, heuristically, each step) for composite problems.
  • Variance-Reduced RR: Variants embed control variates (e.g., RR-SVRG, SAGA-RR, AVRG) into the reshuffling paradigm (Malinovsky et al., 2021, Ying et al., 2017).
  • Distributed RR: Each agent performs local RR, combined via communication and consensus mechanisms (Huang et al., 2023, Huang et al., 2021, Jiang et al., 2021).
  • RR with Momentum: Momentum terms are included in the inner iteration, matching popular practical SGD optimizers (Qiu et al., 2024).

For non-smooth or composite objectives, RR is combined with proximal steps, and in distributed/federated optimization, RR is applied locally at each node with periodic communication (Mishchenko et al., 2021, Malinovsky et al., 2022).

2. Convergence Theory and Complexity Results

Smooth Strongly Convex Regime

For fif_i0-smooth, fif_i1-strongly convex objectives, RR achieves linear convergence with strictly faster rates and smaller steady-state error than SGD. Specifically:

  • Steady-state error: For constant stepsize fif_i2, RR achieves mean-squared error fif_i3, while SGD yields fif_i4 (Ying et al., 2018, Mishchenko et al., 2020).
  • Sample Complexity: To achieve accuracy fif_i5,

fif_i6

where fif_i7, matching lower bounds for finite-sum optimization (Mishchenko et al., 2020, Gürbüzbalaban et al., 2015).

  • Accelerated Asymptotics: With Polyak–Ruppert-style iterate averaging and stepsize fif_i8 for fif_i9, RR can achieve objective suboptimality tt0, arbitrarily close to tt1, outperforming SGD's tt2 (Gürbüzbalaban et al., 2015).

Smooth Nonconvex and PL Regimes

For smooth, possibly nonconvex objectives, RR achieves improved convergence rates compared to SGD:

  • Nonconvex (tt3-smooth):

tt4

for tt5 epochs or tt6 gradients (Mishchenko et al., 2020, Huang et al., 2021, Qiu et al., 2024).

  • PL condition (Polyak–Łojasiewicz):

tt7

with linear convergence to a neighborhood in the presence of persistent variance (Huang et al., 2023, Huang et al., 2021, Fan et al., 2023).

High Probability and Last Iterate Guarantees

RR admits high-probability complexity results for both first- and second-order guarantees. Concentration results for without-replacement sampling have enabled last-iterate stopping rules with finite-sample complexity matching or improving in-expectation bounds (Yu et al., 2023).

Kurdyka–Łojasiewicz (KL) and Asymptotic Convergence

Under the KL property, the full RR sequence converges to a stationary point, with rates depending on the KL exponent. For exponents tt8, convergence rates tt9 for iterates and πt\pi^t0 for objective gap are attainable with polynomially-decaying stepsizes (Li et al., 2021, Qiu et al., 2024, Qiu et al., 2023).

Nonsmooth and Proximal Optimization

Proximal RR algorithms extend the above results to composite objectives with weakly convex, nonsmooth regularizers. The normal map–based norm-PRR achieves πt\pi^t1 complexity for nonsmooth, nonconvex problems—improving existing bounds (Qiu et al., 2023). In convex, distributed, or federated settings, ProxRR and FedRR efficiently reduce the cost of expensive proximal operators (Mishchenko et al., 2021, Malinovsky et al., 2022).

3. Variance Reduction and Data Ordering

Variance-reduced algorithms, when deployed with RR (e.g., RR-SVRG, SAGA-RR, AVRG), achieve linear convergence—and, in the big data regime (πt\pi^t2), match optimal πt\pi^t3 epochs (Malinovsky et al., 2021, Ying et al., 2017). Critically, RR and single-shuffle (SO) outperform with-replacement counterparts both in theory and practice.

Greedy or optimized orderings (herding, Gradient Balancing/GraB) further accelerate convergence, in some settings eliminating the πt\pi^t4 dependency to achieve optimal πt\pi^t5 rates for smooth nonconvex objectives, though with increased memory/computation (Lu et al., 2022).

Method Nonconvex Rate PL/Strong Convexity Rate
SGD-replacement πt\pi^t6 πt\pi^t7
RR πt\pi^t8 πt\pi^t9
Herding/GraB {1,,n}\{1, \dots, n\}0 {1,,n}\{1, \dots, n\}1
VR (e.g. RR-SVRG) {1,,n}\{1, \dots, n\}2 {1,,n}\{1, \dots, n\}3, big data

4. Distributed, Federated, and Proximal RR

In networked/distributed environments, RR variants (D-RR, FedRR, GT-RR, ED-RR) inherit the improved rates from centralized RR. For distributed smooth strongly convex objectives, RR achieves {1,,n}\{1, \dots, n\}4 rates, matching centralized results up to network-dependent constants determined by the spectral gap. For nonconvex objectives, distributed RR matches the centralized {1,,n}\{1, \dots, n\}5 rates (Huang et al., 2023, Huang et al., 2021, Jiang et al., 2021).

Federated RR algorithms extend these benefits to practical federated learning, providing resilience to data heterogeneity, reduced communication, and efficient variance reduction and compressed communication, with theoretically guaranteed convergence matching (or surpassing) Local SGD and its extensions (Mishchenko et al., 2021, Malinovsky et al., 2022).

In composite, nonsmooth, or constrained problems, ProxRR and its distributed/federated variants leverage RR to reduce the number of expensive proximal operator evaluations by a factor {1,,n}\{1, \dots, n\}6, at no loss of convergence speed compared to per-iteration prox methods (Mishchenko et al., 2021, Qiu et al., 2023).

5. Algorithmic Properties: Bias, Variance, and Practical Implications

RR's key algorithmic advantage is the suppression of stochastic gradient variance within each epoch, leading to:

  • Smaller steady-state error: {1,,n}\{1, \dots, n\}7 for RR versus {1,,n}\{1, \dots, n\}8 for SGD under constant step-size in the strongly convex regime (Ying et al., 2018, Mishchenko et al., 2020).
  • Oscillatory intra-epoch error: RR exhibits periodicity reflecting bias/variance tied to position within the epoch, a phenomenon not present in with-replacement SGD (Ying et al., 2018, Mishchenko et al., 2020).
  • Reduced bias in stochastic sampling: When used within stochastic gradient Langevin dynamics, RR provably reduces bias in the stationary distribution measured in Wasserstein distance relative to with-replacement schemes (Shaw et al., 27 Jan 2025).
  • Empirical acceleration: RR achieves faster epochs-to-solution and improved cache efficiency versus with-replacement methods, crucial for large-scale implementations (Mishchenko et al., 2020, Shaw et al., 27 Jan 2025).

Concentration results for RR have led to tight high-probability complexity bounds and practical stopping criteria, such as the RR-sc rule for first-order optimality (Yu et al., 2023).

6. Applications and Extensions

RR is integral to the practical training of deep neural networks, regularized generalized linear models, matrix-factorization, and reinforcement learning. Recent extensions include:

  • Distributed and federated learning: RR improves performance and communication efficiency in distributed and federated systems, including under lossy communication (compression), data heterogeneity, and variance reduction (Huang et al., 2023, Malinovsky et al., 2022, Huang et al., 2021).
  • Experience replay: Translating RR’s variance reduction to reinforcement learning settings enhances sample efficiency in off-policy RL with both uniform and prioritized experience replay buffers (Fujita, 4 Mar 2025).
  • Stochastic sampling: RR dramatically suppresses sampling bias in stochastic gradient Langevin dynamics, with improved stationary distribution accuracy and practical hardware efficiency (Shaw et al., 27 Jan 2025).
  • Nonsmooth and constraint-heavy regimes: Norm-PRR and related methods extend RR’s theory to nonsmooth/nonconvex composite objectives, with efficient constraints handling and sharpened complexity (Qiu et al., 2023).

References

Definition Search Book Streamline Icon: https://streamlinehq.com
References (20)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Random Reshuffling.