Adjusted Shuffling SARAH: Advancing Complexity Analysis via Dynamic Gradient Weighting

Duc Toan Nguyen, Trang H. Tran, Lam M. Nguyen

TL;DR

The paper introduces Adjusted Shuffling SARAH, a novel optimization algorithm that combines data shuffling (sampling without replacement) with recursive variance reduction. By incorporating a unique dynamic weighting mechanism, the algorithm offers an "Inexact Mode" that completely decouples total computational complexity from the dataset size, making it exceptionally scalable for massive, large-scale machine learning problems.

What Problem Does This Paper Address?

In modern machine learning, we frequently solve finite-sum minimization problems to train models like logistic regression or deep neural networks. While Gradient Descent (GD) is highly accurate, computing the full gradient across massive datasets ($n$ samples) is computationally prohibitive. Stochastic Gradient Descent (SGD) solves this by sampling a single data point per iteration, but its high variance slows down convergence.

To bridge this gap, researchers developed Variance Reduction (VR) methods (like SVRG and SARAH) that achieve fast convergence using constant step sizes. However, standard VR methods suffer from a scalability bottleneck: they require a full gradient computation ($O(n)$ cost) at the start of every outer loop.

Furthermore, while practitioners prefer "shuffling" data (sampling without replacement, like Random Reshuffling) because it performs better empirically than uniform sampling with replacement, analyzing shuffling mathematically is notoriously difficult due to the lack of statistical independence. Existing shuffling-based VR methods still scale linearly with the dataset size $n$, making them inefficient for truly massive datasets.

Methods

The authors propose Adjusted Shuffling SARAH (Adj S-SARAH), which integrates shuffling strategies into the recursive SARAH framework. The core innovation is a dynamic weighting mechanism applied to the inner-loop updates:

$$v_t = \left(\frac{m + 1}{m + 1 - t}\right)(\nabla f_{\pi_t^s}(w_t) - \nabla f_{\pi_t^s}(w_{t-1})) + v_{t-1}$$

As the inner loop progresses ($t \to m$), the iterates $w_t$ and $w_{t-1}$ converge, causing the gradient difference to approach zero. The growing coefficient $\frac{m + 1}{m + 1 - t}$ counteracts this diminishing term, encouraging the algorithm to explore better solutions.

The algorithm operates in two distinct modes based on the inner loop size $m$:

  1. Exact Mode ($m = n$): Uses full gradients at the start of each epoch, matching the best-known theoretical guarantees for shuffling VR methods.
  2. Inexact Mode ($m < n$): Replaces the full gradient with a mini-batch estimator ($v_0$). This mode is designed specifically to handle massive datasets where computing a full gradient pass is impossible.

Datasets

The authors empirically validated their algorithm on three standard binary classification datasets from the LIBSVM library using $l_2$-regularized logistic regression:

  • w8a (49,749 samples)
  • fashion-mnist (60,000 samples)
  • ijcnn1 (91,701 samples)

Key Insights and Ideas

  • Equalizing Data Contribution: In ordinary shuffling versions of SARAH, data points processed earlier in a permutation inadvertently carry significantly higher weights than those processed later. The dynamic coefficient mathematically balances these weights, ensuring every data point contributes equally to the total epoch update regardless of its position in the shuffle.
  • Decoupling from Dataset Size ($n$): The most significant "aha moment" comes from the Inexact Mode. By utilizing mini-batch estimators and bounding the variance, the authors proved that the linear dependence on $n$ can be entirely replaced by a dependence on the target accuracy $\epsilon$. This makes the total complexity independent of dataset size when $n$ is exceptionally large.
Comparison of total complexities across shuffling variance-reduced algorithms

Key Results

  • Theoretical Bounds: As shown in the complexity comparison table above, the Exact Mode matches the state-of-the-art gradient complexity of $O(n\kappa \log(1/\epsilon))$ for strongly convex functions and $O(n/\epsilon^2)$ for non-convex functions.
  • Massive Scale Superiority: The Inexact Mode achieves a total complexity of $O\left(\frac{\sigma^2}{\mu\epsilon}\kappa \log(\frac{1}{\epsilon})\right)$ for strongly convex settings and $O\left(\frac{\sigma^2 L}{\epsilon^4}\right)$ for non-convex settings. This is the first shuffling variance-reduced algorithm to achieve a total complexity independent of $n$.
  • Empirical Performance: In practical tests on the w8a, fashion-mnist, and ijcnn1 datasets, Adjusted Shuffling SARAH demonstrated competitive performance against other popular shuffling methods (RR-SVRG and RR-SARAH). While it initially decreased the gradient norm slower, it achieved the smallest long-term gradient norm after 20 epochs on w8a and fashion-mnist.

Limitations and Future Work

Despite matching the best-known rates for shuffling-based algorithms, a theoretical gap still remains when comparing these results to optimal uniform-sampling VR methods. The authors note that it remains unclear whether shuffling methods can completely close this gap to reach the absolute optimal rates achieved by standard SVRG and SARAH under standard assumptions. Investigating how to close this theoretical gap is highlighted as a primary direction for future research.

Summary updated

BibTeX
@article{nguyen2026adjusted,
  author = {Duc Toan Nguyen and Trang H. Tran and Lam M. Nguyen},
  title = {{Adjusted Shuffling SARAH: Advancing Complexity Analysis via Dynamic Gradient Weighting}},
  journal = {J. Optim. Theory Appl.},
  year = {2026},
  doi = {10.1007/s10957-026-03033-y},
}
Figure