Sharper Rates and Flexible Framework for Nonconvex SGD with Client and Data Sampling

Alexander Tyurin, Lukang Sun, Konstantin Burlachenko, Peter Richtárik

TL;DR

This paper generalizes the state-of-the-art PAGE algorithm for nonconvex optimization to support virtually any unbiased sampling mechanism, making it highly applicable to federated learning. By introducing a tighter "weighted Hessian variance" metric, the authors deliver a sharper theoretical analysis and demonstrate that advanced sampling strategies, like importance sampling, can significantly outperform standard uniform mini-batching.

What Problem Does This Paper Address?

Stochastic Gradient Descent (SGD) variants like PAGE and SPIDER achieve optimal theoretical complexity for finding stationary points in smooth, nonconvex finite-sum optimization problems. However, their standard analyses hide massive data-dependent constants inside the big-$\mathcal{O}$ notation and rely on basic uniform sampling with replacement.

This lack of flexibility is a major hurdle for modern paradigms like Federated Learning (FL), where clients and data are sampled hierarchically based on network constraints and data distribution. This paper bridges the gap by providing a flexible framework that handles arbitrary sampling strategies while tightening the convergence bounds to reveal the true impact of data heterogeneity.

Methods

The authors introduce the Weighted AB Inequality (Assumption 4), a generalized variance control tool that accommodates almost any unbiased sampling scheme (e.g., Nice, Independent, Importance, Stratified sampling). They define two new sampling-dependent smoothness constants: weighted mean-squared smoothness ($L_{+,w}$) and weighted Hessian variance ($L_{\pm,w}$).

Crucially, they extend this to a Composition of Samplings framework (Algorithm 2). This allows a two-tier sampling process: first sampling nodes/clients, and then sampling local data within those nodes. This architecture directly mirrors the operational constraints of Federated Learning.

Datasets

  • Synthetic Quadratic Tasks: Nonconvex quadratic functions generated with precise control over local Lipschitz constants ($L_i$) and Hessian variances ($L_{\pm}$) to validate theoretical dependencies.
  • LIBSVM Datasets: Real-world benchmarks including w8a (49,749 samples, 300 dimensions) and australian (690 samples, 14 dimensions) used for nonconvex logistic regression tasks.

Key Insights and Ideas

  • Hiding in Plain Sight: Traditional bounds use the worst-case global smoothness constant $L_+$. By replacing it with the weighted Hessian variance ($L_{\pm}$)—which measures how much individual gradients deviate from the average gradient—the analysis becomes inherently sharper because $L_{\pm} \le L_+$.
  • The Power of Non-Uniformity: Uniform sampling treats all data points equally, but data points with larger local Lipschitz constants ($L_i$) cause higher variance. Importance sampling proportional to $L_i$ stabilizes the variance and accelerates convergence.
  • Federated Learning Guidance: The composition framework reveals a clear trade-off between intra-node variance (within a client) and inter-node variance (between clients). If intra-node variance is small compared to inter-node variance, the theory explicitly dictates using smaller local batch sizes to optimize computation.

Key Results

  • Sharper Bounds: Even for standard uniform sampling, the new complexity bound $\mathcal{O}\left(n + \frac{\max\{\sqrt{n}L_{\pm}, L_-\}}{\varepsilon}\right)$ is strictly better than the original PAGE bound $\mathcal{O}\left(n + \frac{\sqrt{n}L_+}{\varepsilon}\right)$.
  • Importance Sampling Speedup: Importance sampling achieves a rate dependent on the average of local smoothness constants rather than the maximum, yielding up to a $\sqrt{n}$ speedup in highly heterogeneous data regimes.
  • Empirical Validation: Experiments on synthetic tasks and LIBSVM datasets consistently show Importance Sampling outperforming Vanilla PAGE and Uniform sampling, especially when the variation in local smoothness ($L_i$) is large.
Figure 1: Comparison of samplings and methods on quadratic optimization tasks with various L±.

Limitations and Future Work

While the framework is highly flexible, implementing optimal importance sampling requires knowing or estimating the local Lipschitz constants ($L_i$) for all functions, which can be computationally expensive in massive-scale applications. Future work could explore adaptive or online estimation of these constants during training. Additionally, extending this sharp analysis to asynchronous or communication-compressed federated learning settings remains an open direction.

Summary updated

Abstract

We revisit the classical problem of finding an approximately stationary point of the average of $n$ smooth and possibly nonconvex functions. The optimal complexity of stochastic first-order methods in terms of the number of gradient evaluations of individual functions is $\mathcal{O}\left(n + n^{1/2}\varepsilon^{-1}\right)$, attained by the optimal SGD methods $\small\sf\color{green}{SPIDER}$(arXiv:1807.01695) and $\small\sf\color{green}{PAGE}$(arXiv:2008.10898), for example, where $\varepsilon$ is the error tolerance. However, i) the big-$\mathcal{O}$ notation hides crucial dependencies on the smoothness constants associated with the functions, and ii) the rates and theory in these methods assume simplistic sampling mechanisms that do not offer any flexibility. In this work we remedy the situation. First, we generalize the $\small\sf\color{green}{PAGE}$ algorithm so that it can provably work with virtually any (unbiased) sampling mechanism. This is particularly useful in federated learning, as it allows us to construct and better understand the impact of various combinations of client and data sampling strategies. Second, our analysis is sharper as we make explicit use of certain novel inequalities that capture the intricate interplay between the smoothness constants and the sampling procedure. Indeed, our analysis is better even for the simple sampling procedure analyzed in the $\small\sf\color{green}{PAGE}$ paper. However, this already improved bound can be further sharpened by a different sampling scheme which we propose. In summary, we provide the most general and most accurate analysis of optimal SGD in the smooth nonconvex regime. Finally, our theoretical findings are supposed with carefully designed experiments.
BibTeX
@article{tyurin2023sharper,
  author = {Alexander Tyurin and Lukang Sun and Konstantin Burlachenko and Peter Richtárik},
  title = {{Sharper Rates and Flexible Framework for Nonconvex SGD with Client and Data Sampling}},
  journal = {Accepted by TMLR},
  year = {2023},
  url = {https://openreview.net/forum?id=zKgJ6TWAFE},
}
Figure