Large-Step Last-Iterate Convergence of Random-Reshuffling Stochastic Gradient Descent
Zijun Chen, Zihan Zhang
Abstract
Random reshuffling stochastic gradient descent (RR-SGD) is widely used for finite-sum optimization in machine learning. For convex L-smooth components, recent work establishes convergence guarantees for an averaged iterate with component stepsizes as large as order 1/L (Liu, 2026). 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 n. 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))), where K is the number of epochs. By retaining the sampling bias at random comparison points, we remove the explicit 1/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.
1 Introduction
Finite-sum optimization is a basic problem in empirical risk minimization, where a learning objective averages losses over a fixed dataset. We consider
x∈Rdminf(x),f(x)=n1i=1∑nfi(x),(1)
with convex, L-smooth component functions and an attained minimum. When n is large, evaluating a single component gradient can be much cheaper than computing the full gradient. Stochastic gradient descent (SGD) exploits this structure by sampling a component independently at each update. Random reshuffling (RR) instead visits every component once per epoch, drawing a fresh independent uniform permutation for each pass through the data. This sampling rule is common in training implementations and has motivated extensive work on optimization without replacement (Bottou, 2009; Shamir, 2016)
After a prescribed number of epochs, the final parameter is a natural output of the algorithm. A convergence bound for an average of earlier iterates does not, however, directly describe this
∗Corresponding author output. For RR, the distinction is complicated by the dependence between the current iterate and the components remaining in an epoch: their gradients are generally biased estimates of the full gradient. Understanding the final iterate therefore requires accounting for the sampling rule throughout the optimization trajectory.
Recent work has established last-iterate guarantees for smooth convex shuffling methods using component-gradient information at a minimizer (Liu and Zhou, 2024; Cai and Diakonikolas, 2025). In their plain-RR specializations, the stepsize multiplying each component gradient is restricted to order 1/(nL), with an additional logarithmic factor. By contrast, Liu (2026) allows component stepsizes of order 1/L under the same convex smoothness assumptions, but controls an averaged output. Its bound combines the usual SGD noise scale with a sharper term available from reshuffling. The averaged-output result shows that the stepsize upper bound can depend only on the smoothness parameter L, independently of the number of components n. This naturally raises the question: Under the same convexity and smoothness assumptions, can we remove the explicit 1/n factor from the stepsize restriction for last-iterate convergence?
1.1 Our Contribution
We answer this question in the affirmative, up to logarithmic factors. For a run of K epochs, we control the last iterate endpoint xK+11. For smooth convex optimization (i.e., each fi is convex and L-smooth), Theorem 1 states that RR-SGD with a constant stepsize η satisfies that
E[f(xK+11)−f(x⋆)]≲ηnKD2+min{ησ⋆2,η2nLσ⋆2}.
provided that the stepsize satisfies η≤c/(L(1+log(nK))) for a universal constant c>0. Here, ≲ only hides the universal constants and logarithmic factors in nK. D=∥x11−x⋆∥ ( ∥⋅∥ is the ℓ2-norm) is the distance from the initial point to a minimizer x⋆, and σ∗ is the gradient variance at the minimizer, which is invariant even when f has multiple minimizers.
The first term, D2/(ηnK), depends on the initial distance from the optimum and decreases with the number of updates for a fixed stepsize. The second term, min{ησ⋆2,η2nLσ⋆2}, accounts for the uncertainty induced by shuffling. The two expressions in this minimum describe the same stepsize regimes as the averaged-output bound of Liu (2026): η2nLσ⋆2 is smaller when ηnL≤1, whereas ησ⋆2 is smaller when ηnL≥1. For D>0, specializing to the epoch endpoint after T=nK updates and choosing a constant stepsize using the horizon and problem parameters recovers the polynomial parameter dependence of the corresponding tuned averaged guarantee, up to logarithmic factors (Corollary 1). When σ⋆=0, taking η=c/[L(1+logT)] yields an endpoint gap of O(LD2/T).
Technical contribution. The large-step analysis of Liu (2026) controls the sampling bias (see definition at eq. (3)) by comparing iterates with a fixed minimizer and summing over complete epochs. Extending this approach to the last iterate requires analyzing suffixes that may begin within an epoch. The starting iterate of each suffix serves as a random comparison point and may be correlated with the components remaining in that epoch. This dependence introduces an additional bias that must be controlled jointly with the sampling bias along the trajectory. To address this issue, our analysis combines two key ingredients:
• Signed sampling bias cancellation. We track the sampling bias contributions both along the trajectory and at the random comparison point used in each suffix. The contribution at the comparison point equals the negative of the sampling bias at the suffix's starting position
1Theorem 1 also covers every prescribed component-time iterate xki in the stated horizon. We focus on the endpoint xK+11 in the introduction.
Table 1: Comparison of expected objective-gap bounds for RR-SGD after K≥2 epochs with a constant component stepsize η. All results are stated for unconstrained finite-sum optimization with convex, L-smooth components and an attained minimum. Here D=∥x11−x∗∥2, σ∗2=n1∑i=1n∥∇fi(x∗)∥22, ℓK=1+logK, and Λ=1+log(nK). We use a common smoothness bound L; the original results may retain finer smoothness parameters. O(⋅) hides universal constants, while O(⋅) additionally hides logarithmic factors. The average-iterate and last-iterate bounds control E[f(xˉ)−f(x∗)] and E[f(xK+11)−f(x∗)], respectively, where xˉ denotes the averaged output used in the corresponding reference.
Stepsize
Reference
Rate
Output
η≲1/(nL)
Cai et al. (2024)
O(ηnKD2+η2nLσ∗2)
Average iterate
η≲1/(nLℓK)
Liu and Zhou (2024)
O~(ηnKD2+η2nLσ∗2)
Last iterate
η≲1/(nLℓK)
Cai and Diakonikolas (2025)
O~(ηnKD2+η2nLσ∗2)
Last iterate
η≲1/L
Liu (2026)
O(ηnKD2+σ∗2min{η,η2nL})
Average iterate
η≲1/(LΛ)
This work (Theorem 1)1
O~(ηnKD2+σ∗2min{η,η2nL})
Last iterate
1 Theorem 1 additionally controls every prescribed component-time iterate, with nK replaced by τ(k,i) in the initial-distance term.
throughout the remainder of that epoch and vanishes in subsequent epochs. Retaining these signs through the suffix-to-last conversion reveals a partial cancellation between the two contributions. The resulting weights are nonnegative and satisfy a within-epoch summation bound, allowing us to apply a one-sided sampling-bias estimate and control repeated contributions from earlier updates without an additional factor of n.
A gradient-moment recursion for last-iterate analysis. Building on the permutation-swap tools of Liu (2026), we derive a self-bounding estimate that relates the sampled-gradient second moment to the current objective gap, the gradient variance at a minimizer, and earlier gradient moments within the same epoch. The history term carries a coefficient of order η2L2/n, allowing its accumulated contribution under the suffix-to-last weights to be absorbed with only logarithmic overhead. Together with the signed sampling bias cancellation, this estimate yields a harmonic recursion in the objective gaps that preserves the inverse-time decay of the initial-error term and closes under ηL(1+log(nK))≲1, without an explicit inverse-n restriction on the stepsize.
2 Related Work
Table 1 compares the closest smooth convex RR guarantees, including their admissible component stepsizes and output choices.
Convergence of shuffling methods. Early incremental analyses established convergence under cyclic and related sampling rules (Nedic and Bertsekas, 2001), while Recht and Ré (2012) connected without-replacement iterations to matrix-product inequalities. Under strong convexity, Gürbüzbalaban et al. (2021) explained asymptotic advantages of RR, and Haochen and Sra (2019); Rajput et al. (2020) obtained increasingly sharp finite-epoch guarantees. Related analyses characterize cyclic incremental methods (Gurbuzbalaban et al., 2019) and the steady-state behavior of constant-step reshuffling (Ying et al., 2018). Ahn et al. (2020) weakened component assumptions under a Polyak–Lojasiewicz condition and removed large-epoch restrictions in a strongly convex result using varying steps.
Smooth convex objectives. For general smooth convex components, Nagaraj et al. (2019) obtained an averaged-output guarantee with component steps as large as order 1/L, assuming bounded gradients on a bounded domain. Mishchenko et al. (2020); Nguyen et al. (2021) obtained averaged guarantees based on component gradients at a minimizer, with component steps of order 1/(nL). Cai et al. (2024) refined the dependence on smoothness and data geometry through a primal-dual analysis, again for an averaged output. The large-step bound of Liu (2026) combines the SGD and reshuffling noise regimes without a global variance assumption.
Last-iterate convergence. Liu and Zhou (2024) proved objective-gap guarantees for the last iterate of proximal shuffling methods, including plain RR when the regularizer is zero. Cai and Diakonikolas (2025) established related endpoint guarantees for incremental gradient and proximal methods. Their smooth convex RR bounds use a stepsize ceiling of order 1/(nLlogK) for K≥2, with an explicit 1/n factor. Liu and Zhou (2025) studied outputs at arbitrary component times for convex, Lipschitz components, a different assumption from smoothness with potentially unbounded gradients. Classical last-iterate SGD analyses (Shamir and Zhang, 2013; Harvey et al., 2019; Jain et al., 2019) supply useful techniques, but independent unbiased sampling avoids the within-epoch dependence present in RR. Attia et al. (2025) established last-iterate guarantees for without-replacement SGD with convex, L-smooth components under interpolation ( σ∗ = 0). Their without-replacement analysis is restricted to iterates within a single pass without replacement and does not cover nonzero noise at the optimum. In contrast, we establish last-iterate guarantees for multi-epoch random reshuffling beyond interpolation, allowing σ∗ > 0 and capturing both the SGD-scale and reshuffling-specific noise terms.
Lower bounds and epoch dependence. Safran and Shamir (2020, 2021) showed that the advantage of reshuffling depends on the function class, conditioning, and number of epochs. For convex objectives, Cha et al. (2023) established a lower bound at the reshuffling scale for sufficiently many epochs, a restricted small-step range, and a global gradient-deviation parameter. That result does not settle optimality throughout the larger stepsize range considered here, or the necessity of our logarithmic factors. The small-epoch lower bounds of Kim et al. (2025) concern deterministic cyclic IGD and do not directly apply to fresh RR. Related comparisons between reshuffling and reuse of a single permutation also depend on the problem class (Yun et al., 2021).
3 Preliminary
Notation. Let N denote the set of natural numbers. Given n∈N, we write [n]:={1,…,n}, ⟨⋅,⋅⟩ is the standard Euclidean inner product, and ∥⋅∥:=⟨⋅,⋅⟩ is the ℓ2-norm. Given a real-valued differentiable function h:Rd→R, ∇h(x) denotes the gradient at x∈Rd. A permutation π of [n] is a bijective mapping from [n] to itself. Let Sn denote the set of all permutations of [n]. We represent each permutation as π=(π1,…,πn), where πi denotes the index assigned to position i.
Objective. We consider the finite-sum optimization problem
x∈Rdminf(x),f(x)=n1i=1∑nfi(x),x∈Rd
and n∈N and for each fi:Rd→R is convex differentiable. Assume f attains its minimum. Fix x∗∈argminx∈Rdf(x) with a deterministic initialization x11.
Our analysis relies on the following key Assumptions
Assumption 1 (Minimizer). There exists a minimizer x∗∈Rd such that f(x∗)=infx∈Rdf(x).
Assumption 2 (Convexity). For all i∈[n], fi is convex.
Assumption 3 (Smoothness). Each fi is Li-smooth, i.e., ∀x,y∈Rd,
∥∇fi(x)−∇fi(y)∥≤Li∥x−y∥.
Denote L:=maxi∈[n]Li. We assume L>0.
All of the three assumptions are standard in the literature on stochastic optimization. We introduce two notations to simplify the expressions in the subsequent sections
D:=x11−x∗,σ∗2:=n1i=1∑n∥∇fi(x∗)∥2
We note that D is the distance between the initial point and the optimal solution. σ∗ is commonly used to measure the noise level of the stochastic gradients at the optimum x∗, which is invariant even when f has multiple minimizers. In particular, σ∗2=0 corresponds to the case in which all fi have a same optimal solution.
1: input: initial point x11∈Rd, stepsize {ηk>0}
2: for k=1,…,K do
3: Independently draw a permutation πk∼Sn
4: for i=1,…,n do
5: xki+1=xki−ηk∇fπki(xki)
6: end for
7: xk+11=xkn+1
8: end for
Algorithm 1 describes random reshuffling stochastic gradient descent (RR-SGD). At the start of epoch k, RR-SGD draws a fresh uniform permutation πk∈Sn, independently of earlier epochs. It then visits the components in this order: at position i, it evaluates ∇fπki(xki) and takes a gradient step with stepsize ηk. Each component is therefore used exactly once per epoch. The endpoint of epoch k becomes the starting point of the next epoch, xk+11=xkn+1. We henceforth consider the constant stepsize ηk≡η for all k∈[K]. The output of the algorithm is the final iterate xK+11 after K epochs.
4.1 Last-Iterate Convergence Guarantee
We now state our last-iterate guarantee. The stepsize is chosen before the run and remains constant across all component updates. Theorem 1 controls the iterate at any prescribed component time, including the endpoint xK+11 returned by Algorithm 1. Write
τ(k,i)=(k−1)n+i,i∈[n]
so that xki is the iterate after τ(k,i)−1 updates.
Theorem 1. Let K≥1 and Λ=1+log(nK). Under Assumptions 1, 2, and 3, run RR-SGD (Algorithm 1) with ηk≡η for k∈[K], where 0<η≤1/(1024LΛ). For every prescribed pair (k,i) with i∈[n] and 2≤τ(k,i)≤nK+1, the iterate xki satisfies
Admissible stepsize. Theorem 1 allows a constant component stepsize of order 1/(Llog(nK)), without an explicit inverse dependence on the epoch length n. To the best of our knowledge, this is the first last-iterate guarantee for standard RR-SGD over any number of epochs that allows nonzero noise σ∗2>0 and removes the inverse- n factor from the component-stepsize restriction. The existing small-step last-iterate guarantees discussed above impose a component stepsize ceiling of order 1/(nL) Liu and Zhou (2024). This distinction matters for the initial-error term D2/(ητ(k,i)): a larger admissible stepsize allows this term to decrease more rapidly when the noise is sufficiently small. The guarantee applies at every prescribed component time; the epoch endpoint is the case (k,i)=(K+1,1).
Two noise regimes. The minimum in the bound captures two complementary regimes. Since η2nLσ⋆2=(ηnL)ησ⋆2, the reshuffling term η2nLσ⋆2 is smaller when ηnL≤1, whereas the SGD-scale term ησ⋆2 is smaller when ηnL≥1. Thus, the theorem retains the sharper reshuffling dependence for small stepsizes while extending last-iterate control to a substantially larger stepsize range. Our new analysis establishes the large-step estimate; the two-regime guarantee follows by combining it with an existing small-step endpoint bound and a within-epoch comparison (Lemma 8).
Corollary 1. Under the assumptions of Theorem 1, let D>0 and Λ=1+log(nK). For σ∗>0, define
ηlin:=Λ3/4σ∗nKD,ηquad:=(Λ3/2n2LKσ∗2D2)1/3,
and choose the constant stepsize
η=min{1024LΛ1,max{ηlin,ηquad}}.
When σ∗=0, set η=1/(1024LΛ). In either case, RR-SGD satisfies
The candidates ηlin and ηquad balance the initial-distance term against the two expressions in the noise minimum in Theorem 1, respectively. Taking their maximum gives the smaller of the two balanced bounds; truncating the stepsize at 1/(1024LΛ) adds at most a term of order ΛLD2/(nK). Substitution into Theorem 1 therefore gives Corollary 1. Up to logarithmic factors, this recovers the polynomial parameter dependence of the corresponding averaged-output guarantee of Liu (2026). In particular, when σ⋆=0, choosing the largest admissible stepsize gives O(LD2/T) after T=nK component-gradient evaluations. The general guarantee also permits σ⋆>0 and requires no global bound on gradients or their variance.
5 Theoretical Proof
We prove Theorem 1 in four steps. First, we use permutation-swap stability to derive self-bounding estimates for the sampling bias and the sampled-gradient second moment in Section 5.1. Second, we retain the bias at random comparison points throughout a suffix-to-last conversion, obtaining weights that control repeated within-epoch contributions in Section 5.2. Third, we combine these estimates and close a harmonic-weight recursion to establish the large-step last-iterate guarantee in Section 5.3. Finally, we combine this guarantee with an existing small-step bound and a within-epoch comparison to obtain the two noise regimes in Theorem 1 in Section 5.4.
Here, βki is the sampling bias. The challenge is not just that βki may be nonzero: suffix comparisons also introduce bias at an earlier random iterate. For a suffix starting at xpq, this comparator bias equals −βpq in epoch p and vanishes thereafter (Lemma 3). We combine the two signed contributions before bounding them. Their partial cancellation yields nonnegative bias weights with controlled within-epoch sums, allowing the one-sided estimate in eq. (7) to be used in the last-iterate bound. Together with the sampled-gradient self-bound, this produces a recursion that closes under ηL(1+log(nK))≲1 without requiring ηnL≲1.
5.1 Permutation Stability and Self-Bounding Estimates
The current iterate in RR-SGD depends on the components already visited in its epoch. Consequently, sampled function values and gradient moments cannot be directly replaced by their full averages. Following the arguments from Liu (2026), we control this dependence by comparing the original trajectory with a trajectory generated by swapping two positions of the permutation.
Given a permutation π∈Sn and two indices i,j∈[n] satisfying the j≤i, Let π(i,j):=π∘(ij) denote the permutation obtained by swapping the i-th and j-th entries of π.
In words, π(i,j) is the permutation generated by exchanging the elements. Equipped with the above notation, we can define the virtual iterate xki(i,j) as the i-th iterate of the k-th epoch with the permutation πk(i,j), i.e., for all l∈[i]
The two trajectories coincide before the first swapped position. After that position and before the second swapped update, they apply the same sequence of component-gradient maps. Nonexpansiveness of these maps therefore controls the discrepancy between the two trajectories.
Following the above observation and based on Lemma 3 in Liu (2026), we have the lemmas below to bound the drift term.
Lemma 1. Under Assumptions 2 and 3, suppose η≤2/L, ∀k∈[K], then for any k∈[K], i∈[n], and j∈[i−1], RR-SGD (Algorithm 1) satisfies
Equation (5) is the swap-stability bound of Lemma 3 in Liu (2026), and eq. (6) gives its second-moment consequence. Crucially, the perturbation is controlled by the earlier update j, without an additional factor dependence on the separation i−j. We retain this per-update structure rather than collapse it into an epoch-wide bound, allowing the suffix weights to control the history terms later.
Lemma 2 (Self-bounding estimates). When 0≤η≤1/(2L), for any k∈[K] and i∈[n]
Equation (7) adapts the sampling bias estimate of Lemma 5 in Liu (2026). The additional ingredient is eq. (8): applying the permutation identity to squared gradient norms relates Qki to the full component average, while retaining the history term (8η2L2/n)∑j<iQkj. The full average is controlled by Δki and σ∗, without a global gradient bound. Crucially, the η2L2/n scaling makes the history term compatible with last-iterate weighting: combining Lemma 5 bounds its total contribution by 16η2L2HNWN as in eq. (15). This term is absorbable under the theorem's stepsize condition, closing the moment estimate without an inverse-n stepsize restriction.
5.2 Suffix-to-Last Conversion
At epoch index k and inner iteration index i, the corresponding global iteration index is τ(k,i). For a fixed N≥2, let (kN,iN) be the unique pair satisfying
N=τ(kN,iN),1≤iN≤n.
We write ΔN:=ΔkNiN for the objective gap at global position N. Define the index set
IN(p,q):={(k,i):τ(p,q)≤τ(k,i)≤N},
which contains all iteration pairs from (p,q) through global iteration N, inclusive. Let IN:=IN(1,1) denote the set of iteration pairs corresponding to the first N steps. For each (k,i)∈IN, let
eN,ki:=min{nk,N}
denote the global index of the last position of epoch k included in the horizon N. To record the preceding positions within epoch k, define
Pki:={(k,j):1≤j<i},k≥1,i∈[n].
In particular, Pk1=∅.
Fix a suffix starting at (p,q) and use xpq as its comparison point. Within epoch p, all unrevealed positions have the same conditional marginal distribution. In later epochs, the fresh permutation is independent of xpq. These observations give an exact expression for the comparator bias and the resulting suffix inequalities.
Lemma 3. For every (p,q)∈IN, and every (k,i)∈IN(p,q), we have
We now apply the suffix-to-last identity to these inequalities. Here, the comparator bias refers to E[fπki(xpq)−f(xpq)], the discrepancy between the sampled component loss and the full objective at the random comparison point xpq. By eq. (9), this quantity equals −βpq1{k=p}. We retain its sign rather than bound it separately. Combining its contribution with the trajectory sampling bias contribution yields the weights below.
The weights play different roles: wN,ki weights the sampled-gradient moments, whereas vN,ki is the residual coefficient of the signed sampling bias. The cancellation is exact at every nonterminal position in the final truncated epoch, where vN,ki=0. Moreover, the residual weights are nonnegative and satisfy the terminal-inclusive block-sum bound established in Appendix B.5. These properties allow us to apply eq. (7) and absorb its within-epoch history terms into WN, yielding Proposition 1.
Proposition 1 reduces the last-iterate analysis to controlling a weighted sum of sampled-gradient second moments and the detailed proof is provided in the Appendix B.5. In eq. (13), the sampling bias no longer appears explicitly.
5.3 Closing the Recursion: The Large-Step Guarantee
We now control the weighted gradient moments in Proposition 1. Multiplying the sampled-gradient self-bound eq. (8) by wN,ki, summing over the horizon, and applying the block-sum estimate eq. (15) gives
Thus, the weighted second moments WN of the sampled gradients are controlled by the weighted error sequence and noise term. The remaining step is to close the recursion in the objective gaps. Since the terminal weight equals one,
The identity ∑t=1N−1[t(N−t)]−1=2HN−1/N shows that suffix weighting preserves the 1/N decay of the initial-error term up to a harmonic factor. After isolating the terminal gap in eq. (18), the induction closes under ηLHN≲1 rather than ηnL≲1. We then have the lemma below.
Lemma 6 (All-time last-iterate bound). For a fixed N≥2, let N=τ(kN,iN) and ΔN=ΔkNiN. If ηLHN≤1/512, then
ΔN≤ηND2+128ησ∗2HN.
Reindex the horizon N by the epoch and inner-iteration indices (k,i), and recall τ(k,i) denotes the corresponding global position. Since Λ=1+log(nK) and HnK+1≤2Λ, the stepsize condition η≤1/(1024LΛ) gives
E[f(xki)−f(x∗)]≲ητ(k,i)D2+Λησ∗2,(19)
for every fixed (k,i) with i∈[n] and 2≤τ(k,i)≤nK+1. At global position nK+1, we use the representation (k,i)=(K+1,1). The trajectory may be extended by a fresh auxiliary permutation for this next epoch; the comparison uses its first update only in the analysis and requires no additional gradient evaluation by the algorithm.
eq. (19) controls every component-time iterate with an SGD-scale noise term throughout the admissible stepsize range. For smaller stepsizes, however, a reshuffling-specific quadratic noise term can be sharper. We combine the large-step estimate with the following existing small-step endpoint bound in Lemma 7 and a within-epoch comparison in Lemma 8 to recover that dependence in Section 5.4.
5.4 Putting Together
The large-step estimate provides the noise term ησ⋆2 up to logarithmic factors. To obtain our results in both small- and large-step regimes, we combine the following last-iterate guarantee in previous work (Liu and Zhou, 2024).
Lemma 7 (Theorem C.1 in Liu and Zhou (2024)). Under Assumptions 1, 2, and 3, for any m≥2, if 0<η≤1/(4nL2(1+logm)), the endpoint xm+11 after m epochs of RR-SGD with constant stepsize η satisfies
E[f(xm+11)−f(x∗)]≲ηnmD2+η2nLσ∗2logm.
The following comparison extends this endpoint guarantee to the iterates within the next epoch.
Lemma 8 (Within-epoch comparison). Under Assumptions 1, 2, and 3, suppose each epoch uses a fresh independent uniform permutation and 0<ηnL≤1/2. Then, for every epoch k and every 1≤i≤n+1,
Δki≤6Δk1+8η2nLσ∗2.
The proof is given in Appendix B.8. It controls the squared displacement from the epoch's starting point using the second moment of a uniformly sampled prefix, then applies the smoothness of f.
Fix (k,i) with i∈[n] and 2≤τ(k,i)≤nK+1. We set threshold
η0:=4nL2(1+logK)1.
Small stepsizes (Lemma 7): η≤η0. For k≥3, apply Lemma 7 with m=k−1≤K to the epoch's starting point xk1, then apply Lemma 8. Since τ(k,i)≤2n(k−1) and 1+log(k−1)≤Λ, this gives
Δki≲ητ(k,i)D2+Λη2nLσ∗2.
For the first two epochs where k≤2, applying Lemma 8 once or twice gives the same bound using Δ11≤LD2/2, N≤2n, and ηnL≤1/2. Thus the bound covers every admissible (k,i). Since ηnL<1 and Λ≥1, it implies the claimed Λ3/2min{ησ∗,η2nLσ∗} term.
Intermediate stepsizes (Lemma 6): η>η0 and ηnL<1. In this regime,
ηnL1<42(1+logK)≤42Λ.
consequently, the noise term in the all-time large-step estimate eq. (19) satisfies
Λησ⋆2=ηnLΛη2nLσ⋆2≲Λ3/2η2nLσ⋆2.
Thus, the large-step estimate also yields the desired reshuffling noise scale in the intermediate regime, with an additional logarithmic factor.
Larger stepsizes (Lemma 6): ηnL≥1. Here,
min{ησ⋆2,η2nLσ⋆2}=ησ⋆2,
so eq. (19) gives the required bound directly.
Combining the three regimes proves Theorem 1 for every fixed component-time iterate in the stated horizon. Taking (k,i)=(K+1,1) recovers the returned endpoint. When σ∗2=0, the largest admissible stepsize gives O(LD2/τ(k,i)), and hence O(LD2/(nK)) at the endpoint.
6 Discussion
For convex, smooth components, we establish expected last-iterate guarantees for RR-SGD with constant component stepsizes up to order 1/(Llog(nK)), removing the explicit 1/n factor from the stepsize restriction. The result applies at every prescribed component time, and the tuned endpoint rate matches the averaged-output rate up to logarithmic factors. Our analysis retains the signed bias at random comparison points and exploits its partial cancellation with the trajectory bias. The resulting weights, together with a sampled-gradient second-moment bound, allow the harmonic recursion to close without an extra factor of n.
An immediate question for future work is whether the logarithmic losses can be removed, permitting component stepsizes of order 1/L. Non-constant stepsizes may also improve last-iterate convergence rates by using larger early steps to reduce the initial error and smaller later steps to control the noise contribution. Finally, retaining the individual smoothness constants Li in the drift estimates may clarify which error terms can depend on an average of these constants rather than their maximum.
References
Ahn, K., Yun, C., and Sra, S. (2020). Sgd with shuffling: optimal rates without component convexity and large epoch requirements. Advances in Neural Information Processing Systems, 33:17526–17535.
Attia, A., Schliserman, M., Sherman, U., and Koren, T. (2025). Fast last-iterate convergence of sgd in the smooth interpolation regime.
Bottou, L. (2009). Curiously fast convergence of some stochastic gradient descent algorithms. Unpublished open problem offered to the attendance of the SLDS 2009 conference.
Cai, X. and Diakonikolas, J. (2025). Last iterate convergence of incremental methods as a model of forgetting. In The Thirteenth International Conference on Learning Representations.
Cai, X., Lin, C. Y., and Diakonikolas, J. (2024). Tighter convergence bounds for shuffled sgd via primal-dual perspective. Advances in Neural Information Processing Systems, 37:72475–72524.
Cha, J., Lee, J., and Yun, C. (2023). Tighter lower bounds for shuffling sgd: Random permutations and beyond. In International Conference on Machine Learning, pages 3855–3912. PMLR.
Gurbuzbalaban, M., Ozdaglar, A., and Parrilo, P. A. (2019). Convergence rate of incremental gradient and incremental newton methods. SIAM Journal on Optimization, 29(4):2542–2565.
Gürbüzbalaban, M., Ozdaglar, A., and Parrilo, P. A. (2021). Why random reshuffling beats stochastic gradient descent. Mathematical Programming, 186(1):49–84.
Haochen, J. and Sra, S. (2019). Random shuffling beats sgd after finite epochs. In International Conference on Machine Learning, pages 2624–2633. PMLR.
Harvey, N. J., Liaw, C., Plan, Y., and Randhawa, S. (2019). Tight analyses for non-smooth stochastic gradient descent. In Conference on Learning Theory, pages 1579–1613. PMLR.
Jain, P., Nagaraj, D., and Netrapalli, P. (2019). Making the last iterate of sgd information theoretically optimal. In Conference on Learning Theory, pages 1752–1755. PMLR.
Kim, Y., Cha, J., and Yun, C. (2025). Incremental gradient descent with small epoch counts is surprisingly slow on ill-conditioned problems. arXiv preprint arXiv:2506.04126.
Liu, Z. (2026). Random reshuffling dominates stochastic gradient descent. arXiv preprint arXiv:2606.32005.
Liu, Z. and Zhou, Z. (2024). On the last-iterate convergence of shuffling gradient methods. arXiv preprint arXiv:2403.07723.
Liu, Z. and Zhou, Z. (2025). Improved last-iterate convergence of shuffling gradient methods for nonsmooth convex optimization. arXiv preprint arXiv:2505.23056.
Mishchenko, K., Khaled, A., and Richtárik, P. (2020). Random reshuffling: Simple analysis with vast improvements. Advances in neural information processing systems, 33:17309–17320.
Nagaraj, D., Jain, P., and Netrapalli, P. (2019). Sgd without replacement: Sharper rates for general smooth convex functions. In International Conference on Machine Learning, pages 4703–4711. PMLR.
Nedic, A. and Bertsekas, D. P. (2001). Incremental subgradient methods for nondifferentiable optimization. SIAM Journal on Optimization, 12(1):109–138.
Nguyen, L. M., Tran-Dinh, Q., Phan, D. T., Nguyen, P. H., and Van Dijk, M. (2021). A unified convergence analysis for shuffling-type gradient methods. Journal of Machine Learning Research, 22(207):1–44.
Rajput, S., Gupta, A., and Papailiopoulos, D. (2020). Closing the convergence gap of sgd without replacement. In International Conference on Machine Learning, pages 7964–7973. PMLR.
Recht, B. and Ré, C. (2012). Toward a noncommutative arithmetic-geometric mean inequality: Conjectures, case-studies, and consequences. In Conference on Learning Theory, pages 11.1–11.24. JMLR Workshop and Conference Proceedings.
Safran, I. and Shamir, O. (2020). How good is sgd with random shuffling? In Conference on Learning Theory, pages 3250–3284. PMLR.
Safran, I. and Shamir, O. (2021). Random shuffling beats sgd only after many epochs on ill-conditioned problems. Advances in Neural Information Processing Systems, 34:15151–15161.
Shamir, O. (2016). Without-replacement sampling for stochastic gradient methods. Advances in neural information processing systems, 29.
Shamir, O. and Zhang, T. (2013). Stochastic gradient descent for non-smooth optimization: Convergence results and optimal averaging schemes. In International conference on machine learning, pages 71–79. PMLR.
Ying, B., Yuan, K., Vlaski, S., and Sayed, A. H. (2018). Stochastic learning under random reshuffling with constant step-sizes. IEEE Transactions on Signal Processing, 67(2):474–489.
Yun, C., Sra, S., and Jadbabaie, A. (2021). Open problem: Can single-shuffle sgd be better than reshuffling sgd and gd? In Conference on Learning Theory, pages 4653–4658. PMLR.
Appendices
A Notation and Technical Lemmas
A.1 Notation Tables
For readability, we recall and summarize the notation used in the paper and define the auxiliary quantities used in the proof.
fi: the i-th component function of the finite-sum optimization problem, fi is convex and differentiable.
• f: the optimization objective, f(x)=n1∑i=1nfi(x).
• D: the distance between the initial point and the minimizer, D:=∥x11−x∗∥.
• xki: the iteration point at position i of epoch k.
• η: the stepsize.
• σ∗: the variance of the gradients at the minimizer, σ∗:=n1∑i=1n∥∇fi(x∗)∥2.
• k,i: the epoch index and the within-epoch position, respectively.
• τ(k,i): the global iteration index, τ(k,i):=(k−1)n+i.
• πki: the component index sampled at position i of epoch k.
• Δki: the expected suboptimality at position i of epoch k,
Δki:=E[f(xki)−f(x∗)]
• Qki: the expected squared norm of the gradient at position i of epoch k,
Qki:=E[∇fπki(xki)2]
• βki: the expected bias of the component function at position i of epoch k,
βki:=E[f(xki)−fπk(i)(xki)]
• Mki: the expected average squared norm of the gradients at position i of epoch k,
Mki:=E[n1r=1∑n∇fr(xki)2]
• WN: the weighted sum of the expected squared norm of the gradients up to iteration N,
WN:=(k,i)∈IN∑wN,kiQki
• VN: the weighted sum of the expected suboptimality up to iteration N,
VN:=(k,i)∈IN∑wN,kiΔki
• HN: the N-th harmonic number, HN:=∑l=1Nl1.
For j<i, the swapped permutation π(i,j) is defined componentwise by
πr(i,j)=⎩⎨⎧πi,πj,πr,r=j,r=i,r∈/{i,j},r∈[n].
For j=i, π(i,i)=π.
A.2 Technical Lemmas
The proofs of our main Theorem and Lemmas in the main text involve several technical lemmas, which are summarized below.
Lemma 9 (Co-coercivity, Lemma 1 in Liu (2026)). Let h:Rd→R be a differentiable convex function that is also L-smooth, then we have, for any x,y∈Rd,
∥∇h(x)−∇h(y)∥2≤2L(h(x)−h(y)−⟨∇h(y),x−y⟩)
Lemma 10 (Lemma 2 in Liu (2026)). Given an arbitrary finite-sum function ℓ(x)=n1∑i=1nℓi(x), suppose RR-SGD is employed, then for all k∈[K] and i∈[n], we have
The last equality uses n1∑i=1n∇fi(x∗)=∇f(x∗)=0, since x∗ minimizes f. This proves eq. (21). □
B Missing Proofs
B.1 Proof of Lemma 1
The proof of eq. (5) is exactly the same as the proof of Lemma 3 in Liu (2026). We provide the proof of eq. (6) here. The original and swapped trajectories use the same component indices before position j, so
xkj(i,j)=xkj
The trajectories may differ after the j-th update. By eq. (4), their difference is
When i=j+1, the same bound follows directly from the difference after the j-th update, with no intervening updates. Suppose at k-th epoch and j-th inner iteration, the filtration Fkj:
Fkj:=σ(π1,…,πk−1,πk1,…,πkj−1).
For a fixed Fkj, the iteration point xkj is fixed, and πkj,πki∈[n]∖{πk1,…,πkj−1} admits the uniform distribution. Thus, we have
Proof of eq. (7). If η=0, all iterates equal the deterministic initialization x11. Since each πki is marginally uniform on [n], we have βki=0, and eq. (7) holds immediately. For the remainder of this argument, assume η>0. Denote δ:=xki(i,j)−xki. By smoothness and Young's inequality, we have
The initialization is deterministic, and xpq depends only on the indices revealed before (p,q), so xpq is Fpq-measurable. Also, ∣Rpq∣=n−q+1.
First consider (k,i)∈IN(p,q) with k=p, so that i≥q. Conditional on Fpq, the unrevealed suffix of πp is a uniform permutation of Rpq. In particular, both πpi and πpq are conditionally uniform on this set. Hence
This equality uses only the identical conditional marginal distributions of the two indices. Taking total expectations and using the definition of βpq gives
Next consider k>p. The fresh permutation πk is independent of Fpq, and each of its positions is uniform on [n]. Therefore
E[fπki(xpq)∣Fpq]=n1r=1∑nfr(xpq)=f(xpq),
so E[fπki(xpq)−f(xpq)]=0. Combining the two cases proves eq. (9): the comparison-point bias equals −βpq at every remaining position of epoch p and vanishes in every later epoch.
Proof of eq. (10). We first establish an inequality that holds for each realization of the permutations. For any comparison point x∈Rd, convexity gives
fπki(xki)−fπki(x)≤⟨∇fπki(xki),xki−x⟩.
Expanding the squared distance after the RR-SGD update yields
Recall that N=τ(kN,iN). Summing over the consecutive positions in IN(p,q) telescopes the distance terms, including across epoch boundaries because xkn+1=xk+11. Thus
The last step discards a nonpositive terminal-distance term. If needed, the successor xkNiN+1 is defined by one additional update for the analysis.
Since eq. (23) holds for every realized trajectory and every comparison point, we may substitute the random point x=xpq before taking expectations. No independence between this point and the subsequent sampled gradients is needed. With this choice, the initial-distance term is zero. The definitions of Δki and βki, together with eq. (9), give
We collect the coefficients of Qki and βki respectively.
The coefficient of Qki. Exchange the order of summation, since for (p,q) whenever τ(p,q)<N and (k,i)∈IN(p,q), it is equivalent to τ(p,q)≤min{τ(k,i),N−1}. Therefore
At the same time, we also show two inequalities eqs. (25) and (26) for vN,ki and wN,ki, which will be used in the proof of Proposition proposition 1.
Lemma 12. For every (k,i),(p,q)∈IN, the weights vN,ki and wN,ki defined in Lemma 4 satisfy
For the change in summation order below, we also need the block sum including the terminal position. For a fixed (p,q)∈IN. If eN,pq<N, all relevant positions precede N, so eq. (26) applies. If τ(p,q)=N, the sum is empty. If eN,pq=N and τ(p,q)<N, only the terminal position contributes, and
When n=1, we have σ∗2=0, and RR-SGD degenerates to gradient descent. Since ηL≤1/2, its objective does not increase in a single update, which proves the claim for i=1,2. We therefore assume n≥2.
Fix an epoch k and condition on its starting point y=xk1. The fresh permutation πk is independent of y; write Ek[⋅]=E[⋅∣xk1] and Gy=f(y)−f(x∗). Define
aj:=∇fj(x∗),bj(y):=∇fj(y)−∇fj(x∗).
Since ∇f(x∗)=0, we have ∑j=1naj=0 and n−1∑j=1n∥aj∥2=σ∗. Co-coercivity, averaged over the components, also gives
For 0≤s≤n, the variance formula for sampling without replacement yields
Ekr=1∑saπkr2=n−1s(n−s)σ∗2≤nσ∗2.
Indeed, for distinct positions r,u, the expected inner product is Ek⟨aπkr,aπku⟩=−σ∗2/(n−1). By Cauchy–Schwarz and the uniform marginal distribution at each position,
The case i=1 is immediate. Taking total expectations proves the claim for every 1≤i≤n+1.
B.9 Proof of Theorem 1
Fix a pair (k,i) chosen before the run, with 1≤i≤n and 2≤N=τ(k,i)≤nK+1, and let Λ=1+log(nK). We retain explicit constants throughout the proof. The assumed stepsize satisfies
ηLHN≤ηLHnK+1≤2ηLΛ≤5121.
Thus Lemma 6 gives, at every such fixed position,
Δki≤ηND2+256Λησ∗2.(31)
We combine this bound with the small-step endpoint result using
η0:=4nL2(1+logK)1.
Small stepsizes: η≤η0. Here
ηnL≤1/(42)<1/2,
so Lemma 8 applies. We first handle positions in the first two epochs. For k=1, smoothness at the minimizer gives Δ11≤LD2/2, and hence
The random-permutation case in the proof of Theorem C.1 of Liu and Zhou (2024) gives an explicit version of Lemma 7. With no regularizer and L=maxrLr, its bound after m completed epochs is
Larger stepsizes: ηnL≥1. Now the minimum equals ησ∗. By eq. (31) and Λ≤Λ3/2,
Δki≤ηND2+256Λησ∗2≤ηND2+256Λ3/2ησ∗2.(34)
Combining eqs. (32) to (34), and using 18≥1 and 2048≥max{56,256}, proves the explicit bound
Δki≤ητ(k,i)18D2+2048Λ3/2min{ησ∗2,η2nLσ∗2}
for every pair fixed before the run in the stated range, including (k,i)=(K+1,1). This establishes Theorem 1.
B.10 Proof of Corollary 1
Let T=nK, Λ=1+logT, and M=1/(1024LΛ). Applying Theorem 1 at (K+1,1) and using τ(K+1,1)=T+1≥T gives
E[f(xK+11)−f(x∗)]≲ηTD2+Λ3/2σ∗2min{η,nLη2}.
If σ∗ = 0, choosing η=M gives the claim immediately. For σ∗ > 0, the two candidates in Corollary 1 are obtained by balancing the initial-distance term in Theorem 1 against each of its two noise expressions:
Taking u=max{ηlin,ηquad} selects the smaller of the two balanced initial-distance terms. Since u equals one of these candidates, the corresponding equality above implies
Λ3/2σ∗2min{u,nLu2}≤TuD2.
The prescribed choice η=min{M,u} enforces the stepsize restriction in Theorem 1. The noise term is nondecreasing in the stepsize, and 1/η≤1/M+1/u. Hence