Stochastic Approximation versus Sample Average Approximation for population Wasserstein barycenter calculation

Darina Dvinskikh

Abstract

In the machine learning and optimization communities, two main approaches dominate convex risk minimization: Stochastic Approximation (SA) and Sample Average Approximation (SAA). While it is widely accepted that both approaches are roughly equivalent in terms of oracle complexity (the number of stochastic gradient evaluations required), their total computational complexity can differ significantly depending on the specific problem. Historically, SA has been favored for large-scale problems. However, this paper demonstrates that SAA can outperform SA in the context of calculating population $\mu$-entropy regularized Wasserstein barycenters, even in non-parallel settings. Furthermore, SAA offers inherent advantages in memory management and parallelization.

Introduction

A fundamental task in modern data science is minimizing expected risk over a population. The "common wisdom" suggests that Stochastic Approximation (SA)—exemplified by Stochastic Gradient Descent (SGD)—is superior to Sample Average Approximation (SAA), where one solves an empirical problem based on a fixed batch of data. This preference is often rooted in the memory efficiency and "online" nature of SA.

However, for computationally intensive tasks like calculating Wasserstein barycenters, this narrative requires re-examination. By analyzing the total arithmetic complexity rather than just oracle calls, we show that the "offline" SAA approach, combined with proper regularization, provides a faster and more robust framework for finding the geometric average of probability distributions.

The Wasserstein Barycenter Problem

The Wasserstein distance, or Earth Mover’s Distance, provides a powerful metric for comparing probability distributions by accounting for the underlying geometry of the space. A Wasserstein barycenter is the distribution that minimizes the weighted sum of transport costs to a set of population distributions.

In practical terms, if one were to average images of the handwritten digit "3," a standard pixel-wise average would result in a blurry, non-representative image. A Wasserstein barycenter, conversely, preserves the structural features of the digit. The primary hurdle is the computational cost; calculating these barycenters involves solving massive optimal transport (OT) problems, making the choice between SA and SAA critical for feasibility.

Methodology

This research compares the performance of SA and SAA through several algorithmic lenses:

  1. Entropy-Regularized Optimal Transport: Both methods utilize the Sinkhorn algorithm to smooth the Wasserstein distance, transforming it into a differentiable problem.
  2. Stochastic Gradient Descent (SA): An online approach where the estimate is updated iteratively as new samples arrive. Each step requires a Sinkhorn call to estimate the gradient.
  3. Iterative Bregman Projections (SAA): An offline approach used to solve the sample average problem.
  4. Bregman Divergence Regularization: A key contribution of this work is the introduction of a novel regularization technique for SAA. By using Bregman divergence instead of standard squared-norm regularization, the author improves convergence bounds for non-strongly convex cases.

Theoretical Insights: The Complexity Flip

The core finding of this paper is that while SA and SAA may require a similar number of samples (oracle complexity), the total number of arithmetic operations (total complexity) favors SAA in the regime of regularized Wasserstein barycenters.

Specifically, the analysis reveals that SAA can be approximately $O(\epsilon / \sqrt{\mu})$ times faster than SA, where $\epsilon$ is the desired accuracy and $\mu$ is the regularization parameter. While SA can utilize a "dual" formulation to reduce the cost of individual gradient calculations, the overall convergence rate of SAA remains superior. Additionally, SAA is naturally suited for distributed environments, allowing data to be stored and processed across multiple nodes, whereas SA is inherently sequential.

Empirical Results

The theoretical claims were validated using the MNIST dataset, specifically focusing on a subset of 7,141 images of the digit "3" (each $28 \times 28$ pixels). The experiment compared how quickly SA (via SGD) and SAA (via Iterative Bregman Projections) converged to the population barycenter.

Key Findings: * Convergence Speed: SAA reached a stable, high-quality barycenter with significantly fewer total iterations and arithmetic operations than SA. * Complexity Bounds: The proposed Bregman-based SAA approach achieved a complexity of $\tilde{O}(n^{2.5} / \epsilon^3)$, marking a significant improvement over previous state-of-the-art theoretical bounds for regularized empirical risk minimization. * Metric Performance: SAA outperformed SA across both $L_2$ norm stability and the Wasserstein distance metric itself.

Discussion and Limitations

While SAA shows clear advantages, several areas for future research remain. The current theoretical bounds involve a polynomial dependence on the probability of failure ($\alpha$), which might be improvable to a logarithmic dependence. Furthermore, the performance of these algorithms is sensitive to the regularization parameter $\mu$; balancing the speed of the regularized solution with the accuracy of the true Wasserstein distance remains a practical challenge. Finally, while MNIST provides a solid benchmark, further testing on higher-dimensional data, such as 3D medical imaging, is necessary to confirm these advantages at even larger scales.

Conclusion

This paper challenges the traditional dominance of Stochastic Approximation in risk minimization. In the specific case of population Wasserstein barycenters, Sample Average Approximation—enhanced by Bregman regularization—offers a more efficient, parallelizable, and computationally cheaper alternative. This shift in perspective encourages a more nuanced choice of optimization strategies based on the specific total complexity of the problem at hand.

Summary updated

Abstract

In machine learning and optimization community there are two main approaches for convex risk minimization problem. The first approach is Stochastic Approximation (SA) and the second one is Sample Average Approximation (SAA) with proper regularization in non-strongly convex case. At the moment, it is known that both approaches are on average equivalent (up to a logarithmic factor) in terms of oracle complexity (required number of stochastic gradient evaluations). What is the situation with total complexity? The answer depends on specific problem. However, starting from work \cite{nemirovski2009robust} it was generally accepted that SA is better than SAA. Nevertheless, in case of large-scale problems SA may run out of memory since storing all data on one machine and organizing online access to it can be impossible without communications with other machines. SAA in contradistinction to SA allows parallel/distributed calculations. In this paper, we show that SAA may outperform SA in the problem of calculating an estimation for population ($\mu$-entropy regularized) Wasserstein barycenter even for non-parallel (non-decentralized) setup.
BibTeX
@misc{dvinskikh2020stochastic,
  author = {Darina Dvinskikh},
  title = {{Stochastic Approximation versus Sample Average Approximation for population Wasserstein barycenter calculation}},
  year = {2020},
  eprint = {2001.07697},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.07697},
}
Figure