Search arXivSearch

arXiv · 2202.10042

Fast Sinkhorn I: An O(N) algorithm for the Wasserstein-1 metric

Abstract

The Wasserstein metric is broadly used in optimal transport for comparing two probabilistic distributions, with successful applications in various fields such as machine learning, signal processing, seismic inversion, etc. Nevertheless, the high computational complexity is an obstacle for its practical applications. The Sinkhorn algorithm, one of the main methods in computing the Wasserstein metric, solves an entropy regularized minimizing problem, which allows arbitrary approximations to the Wasserstein metric with O(N^2) computational cost. However, higher accuracy of its numerical approximation requires more Sinkhorn iterations with repeated matrix-vector multiplications, which is still unaffordable. In this work, we propose an efficient implementation of the Sinkhorn algorithm to calculate the Wasserstein-1 metric with O(N) computational cost, which achieves the optimal theoretical complexity. By utilizing the special structure of Sinkhorn's kernel, the repeated matrix-vector multiplications can be implemented with O(N) times multiplications and additions, using the Qin Jiushao or Horner's method for efficient polynomial evaluation, leading to an efficient algorithm without losing accuracy. In addition, the log-domain stabilization technique, used to stabilize the iterative procedure, can also be applied in this algorithm. Our numerical experiments show that the newly developed algorithm is one to three orders of magnitude faster than the original Sinkhorn algorithm.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Qichen Liao, Jing Chen, Zihao Wang, Bo Bai, Shi Jin, Hao Wu. 2022-02-21. Fast Sinkhorn I: An O(N) algorithm for the Wasserstein-1 metric. https://arxiv.org/abs/2202.10042

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Genericity of Polyak-Lojasiewicz Inequalities for Entropic Mean-Field Neural ODEs

We address the behavior of idealized deep residual neural networks (ResNets), modeled via an optimal control problem set over continuity (or adjoint transport) equations. The continuity equations describe the statistical evolution of the features in the asymptotic regime where the layers of the network form a continuum. The velocity field is expressed through the network activation function, which is itself viewed as a function of the statistical distribution of the network parameters (weights and biases). From a mathematical standpoint, the control is interpreted in a relaxed sense, taking values in the space of probability measures over the set of parameters. We investigate the optimal behavior of the network when the cost functional arises from a regression problem and includes an additional entropic regularization term on the distribution of the parameters. In this framework, we focus in particular on the existence of stable optimizers --that is, optimizers at which the Hessian of the cost is non-degenerate. We show that, for an open and dense set of initial data, understood here as probability distributions over features and associated labels, there exists a unique stable global minimizer of the control problem. Moreover, we show that such minimizers satisfy a local Polyak--Lojasiewicz inequality, which can lead to exponential convergence of the corresponding gradient descent when the initialization lies sufficiently close to the optimal parameters. This result thus demonstrates the genericity (with respect to the distribution of features and labels) of the Polyak--Lojasiewicz condition in ResNets with a continuum of layers and under entropic penalization.

math.OC

A regret minimization approach to fixed-point iterations

We propose a conversion scheme that turns regret minimizing algorithms into fixed point iterations, with convergence guarantees following from regret bounds. The resulting iterations can be seen as a grand extension of the classical Krasnoselskii--Mann iterations, as the latter are recovered by converting the Online Gradient Descent algorithm. This approach yields new simple iterations for finding fixed points of non-self operators. We also focus on converting algorithms from the AdaGrad family of regret minimizers, and thus obtain fixed point iterations with adaptive guarantees of a new kind. Numerical experiments on various problems demonstrate faster convergence of AdaGrad-based fixed point iterations over Krasnoselskii--Mann iterations.

math.OC

Variational Analysis in Spectral Decomposition Systems

This work is concerned with the variational analysis of functions defined on Euclidean spaces whose values depend solely on certain invariants (``spectrum'') of their arguments, a class we term ``spectral functions.'' Building on our previous work \cite{PartI} on the convex analysis of such functions, we work in the abstract framework of spectral decomposition systems, which covers a wide range of previously studied settings, including eigenvalue decomposition of Hermitian matrices and singular value decomposition of rectangular matrices, and allows the derivation of new results in more general settings such as normal decomposition systems. The main results of this work provide constructive formulae for computing the regular, limiting, and Clarke subdifferentials of a spectral function in terms of the corresponding objects of the associated invariant function. Finally, we obtain a generalization of Lidski\uı's theorem on the spectrum of additive perturbations of Hermitian matrices to arbitrary spectral decomposition systems.

math.OC