Mini-Batch Semi-Stochastic Gradient Descent in the Proximal Setting

Jakub Konečný, Jie Liu, Peter Richtárik, Martin Takáč

Abstract

We propose mS2GD: a method incorporating a mini-batching scheme for improving the theoretical complexity and practical performance of semi-stochastic gradient descent (S2GD). We consider the problem of minimizing a strongly convex function represented as the sum of an average of a large number of smooth convex functions, and a simple nonsmooth convex regularizer. Our method first performs a deterministic step (computation of the gradient of the objective function at the starting point), followed by a large number of stochastic steps. The process is repeated a few times with the last iterate becoming the new starting point. The novelty of our method is in introduction of mini-batching into the computation of stochastic steps. In each step, instead of choosing a single function, we sample $b$ functions, compute their gradients, and compute the direction based on this. We analyze the complexity of the method and show that it benefits from two speedup effects. First, we prove that as long as $b$ is below a certain threshold, we can reach any predefined accuracy with less overall work than without mini-batching. Second, our mini-batching scheme admits a simple parallel implementation, and hence is suitable for further acceleration by parallelization.

Introduction

In large-scale machine learning, optimization problems often involve "composite" objective functions. These functions are typically the sum of an average of many smooth loss functions (representing data fit) and a non-smooth regularizer (such as $L_1$ for sparsity). While standard Stochastic Gradient Descent (SGD) is computationally efficient per iteration, its high variance necessitates a decaying learning rate, which significantly slows convergence.

Modern variance-reduction techniques like SVRG and S2GD have addressed this by achieving linear convergence rates. However, these methods were primarily optimized for single-sample updates. This paper introduces mS2GD, a mini-batch version of Semi-Stochastic Gradient Descent designed for the proximal setting, bridging the gap between stochastic efficiency and parallel hardware utilization.

The mS2GD Algorithm

The mS2GD algorithm utilizes a nested loop structure to minimize variance and handle non-smooth components:

  • Outer Loop (Epochs): At the start of each epoch, the algorithm computes a full deterministic gradient at a reference point. This "anchor" serves to reduce the variance of subsequent stochastic steps.
  • Inner Loop (Stochastic Steps): The algorithm performs a series of stochastic updates. Unlike standard S2GD, mS2GD samples a mini-batch of size $b$. It uses the reference gradient from the outer loop to construct an unbiased, low-variance estimate of the current gradient.
  • Proximal Step: A proximal operator is applied after each gradient update to account for the non-smooth regularizer $R(x)$.

A key technical innovation is the "Lazy Update" scheme. For sparse datasets, updating every coordinate in every iteration is inefficient. mS2GD allows the algorithm to skip updates for features not present in a mini-batch, "catching up" on regularization only when necessary, which significantly reduces computational overhead.

Theoretical Insights: The Efficiency Threshold

A core contribution of this work is the proof of an efficiency threshold. The authors demonstrate that as long as the mini-batch size $b$ remains below a specific theoretical limit, the algorithm can reach a target accuracy with less total work (fewer total gradient evaluations) than the single-sample ($b=1$) approach.

Convergence of mS2GD across various mini-batch sizes $b$.

As shown in Figure 3, increasing the batch size $b$ does not significantly increase the number of effective passes required for convergence, and in some cases, small mini-batches even improve the convergence rate per pass. This mathematical efficiency, combined with the natural suitability of mini-batches for parallelization, makes mS2GD highly effective for modern multi-core and GPU environments.

Experimental Results

The algorithm was evaluated on several large-scale datasets, including rcv1, news20, covtype, and astro-ph. The experiments confirmed that mS2GD maintains the "gold standard" linear convergence rate $O((n + \kappa) \log(1/\epsilon))$, where $\kappa$ is the condition number.

Performance comparison of mS2GD against standard stochastic and deterministic baselines.

In comparative tests (Figure 6), mS2GD consistently outperformed established baselines such as FISTA (a deterministic proximal method) and SGD+ (SGD with tuned step sizes). On datasets like rcv1, mS2GD reached high accuracy orders of magnitude faster in terms of data passes than these traditional methods.

Conclusion

mS2GD provides a robust framework for mini-batch stochastic optimization in the proximal setting. By combining variance reduction with an efficient mini-batching scheme, it offers both theoretical work-reduction and practical speedups through parallelization. Future work may explore asynchronous updates and extending the framework to non-smooth loss functions like Hinge loss.

Summary updated

BibTeX
@article{konecny2015mini,
  author = {Jakub Konečný and Jie Liu and Peter Richtárik and Martin Takáč},
  title = {{Mini-Batch Semi-Stochastic Gradient Descent in the Proximal Setting}},
  journal = {IEEE Journal of Selected Topics in Signal Processing},
  year = {2015},
  doi = {10.1109/jstsp.2015.2505682},
}
Figure