---
title: 1-Wasserstein Distance Overview
url: https://www.emergentmind.com/topics/1-wasserstein-distance
type: topic
---

# 1-Wasserstein Distance Overview

The 1-Wasserstein distance is a foundational metric in optimal transport theory, quantifying the minimal effort required to morph one probability distribution into another with respect to a given cost—typically, the Euclidean or $\ell_1$ distance. Recognized equivalently as the Earth Mover’s Distance (EMD), $W_1$ is central across probability, statistics, machine learning, and computational geometry due to its ability to encode fine-grained geometric properties of distributions, support weak convergence analysis, and underpin practical algorithms for comparing and interpolating measures.

## 1. Formal Definitions and Dual Representations

Given a complete separable metric space $(\mathcal{X}, d)$ and probability measures $\mu, \nu$ with finite first moments, the 1-Wasserstein distance is defined as
\[
W_1(\mu, \nu) = \inf_{\pi \in \Gamma(\mu, \nu)} \int_{\mathcal{X} \times \mathcal{X}} d(x, y) \, \pi(dx, dy)
\]
where $\Gamma(\mu, \nu)$ is the set of all couplings on $\mathcal{X} \times \mathcal{X}$ with marginals $\mu$ and $\nu$ [1806.05500]. Probabilistically, this infimum is over joint laws of $(X, Y)$ with $X \sim \mu$ and $Y \sim \nu$.

Kantorovich–Rubinstein duality states:
\[
W_1(\mu, \nu) = \sup_{\|f\|_{\mathrm{Lip}} \le 1} \left\{ \int f\,d\mu - \int f\,d\nu \right\}
\]
where the supremum runs over all 1-Lipschitz (real-valued) functions on $\mathcal{X}$ [1806.05500, 1904.07045]. This dual form underpins statistical applications and algorithmic relaxations (e.g., WGANs [2201.02824]).

In continuous settings, the dynamic or flux formulation provides:
\[
W_1(\mu, \nu) = \inf_{u} \left\{ \int_{\mathcal{X}} \|u(x)\|\,dx : \nabla \cdot u = \mu - \nu \right\}
\]
reflecting minimal transportation cost as a flow with prescribed divergence [1702.07921].

## 2. One-Dimensional and Discrete Closed-Form Expressions

When $\mathcal{X} = \mathbb{R}$, $W_1$ admits an explicit formula:
\[
W_1(\mu, \nu) = \int_{0}^{1} |F_{\mu}^{-1}(u) - F_{\nu}^{-1}(u)|\,du = \int_{\mathbb{R}} |F_\mu(t) - F_\nu(t)|\,dt
\]
where $F_\mu$ is the cumulative distribution function and $F_\mu^{-1}$ the quantile function [2111.03570, 1806.05500]. This coincides geometrically with the area between the two CDFs. The copula-theoretic derivation confirms that the optimal coupling pairs corresponding quantiles ("comonotonic coupling") achieves this minimum [2111.03570].

For the finite discrete simplex $\Omega = \Delta^{n-1}$ with ground metric $d(i, j) = |i-j|$, one obtains:
\[
W_1(\mu, \nu) = \sum_{k=1}^n \left| \sum_{i=1}^k (\mu_i - \nu_i) \right|
\]
which is the $\ell_1$ norm between their cumulative sums (empirical CDFs) [1912.04945].

## 3. Multivariate, Matrix, and Semi-Discrete Generalizations

For multivariate $X, Y \in \mathbb{R}^d$, $W_1$ generalizes to
\[
W_1(\mu, \nu) = \inf_{\pi \in \Gamma(\mu, \nu)} \int_{\mathbb{R}^d \times \mathbb{R}^d} \|x - y\| \, \pi(dx, dy)
\]
and supports dual formulations via 1-Lipschitz test functions. In the space of $n \times n$ density matrices with quantum extensions, $W_1$ is extended via noncommutative gradients and nuclear norm minimization, yielding practical convex optimization problems for matrix-valued or power-spectral data [1702.07921].

The semi-discrete regime, as encountered in WGANs, requires analysis where one measure is continuous and the other atomic. Existence and structure of optimal transport maps can then be described via power diagrams/Voronoi partitioning, with minimizers corresponding to shortest-paths or weighted cell equalization [2201.02824].

## 4. Statistical Properties and Convergence Behavior

The empirical $W_1$ between i.i.d. samples and the parent law satisfies almost sure consistency if $\mathbb{E}d(x_0, X) < \infty$. On the real line, the optimal expected convergence rate is $O(n^{-1/2})$, provided integrability conditions on $F_\mu$ are met. In higher dimensions $d$, the rate is $O(n^{-1/d})$, reflecting the curse of dimensionality [1806.05500, 2201.02824]. For random matrix spectra, $W_1$ convergence can even be accelerated due to eigenvalue repulsion ($n^{-1/2}$ for Ginibre, compared to $(\log n/n)^{1/2}$ for i.i.d. points) [2111.03595].

Explicit expressions for $W_1$ in location–scale families (e.g., Gaussians, Laplace) are available. For univariate $X_1 = \alpha_1 + \beta_1 Z$, $X_2 = \alpha_2 + \beta_2 Z$,
\[
W_1(X_1, X_2) = \mathbb{E}[|Y|]
\]
with $Y = (\alpha_1 - \alpha_2) + (\beta_1 - \beta_2) Z$, and closed-forms obtained for folded normal, Laplace, and other base distributions [2304.14869].

## 5. Computational Algorithms and Approximations

### Linear Programming Methods
For discrete measures, $W_1$ is computable as a min-cost flow or transportation linear program of size $O(n^2)$, with classical solutions scaling as $O(n^3 \log n)$ [1806.05500].

### Primal-Dual and PDE-Based Solvers
For continuous densities on computational domains (e.g., images), primal-dual schemes (e.g., Chambolle–Pock) and PDE discretizations (e.g., Monge–Ampère for $W_2$) provide scalable solutions. Multilevel approaches drastically reduce computational time, achieving $O(N^1 + N^2 \log N)$ complexity for 2D grids, with real-world performance vastly outperforming traditional flow algorithms for large $N$ [1810.00118, 1612.00181].

### Approximation via Trees and Embeddings
Tree-based embeddings (Tree-Wasserstein distance) yield $O(N)$-time approximate $W_1$ computations by fitting edge weights (via nonnegative Lasso) on tree metrics to match the underlying geometry of the data space, with strong empirical fidelity to exact $W_1$ even in NLP/CV settings [2206.12116].

### Near-Linear Time for Specialized Structures
For persistence diagrams, quadtree-based $L_1$-embedding and flowtree algorithms yield $O(n \log \Delta)$ time approximations within $O(\log \Delta)$ factors of the exact value, with high empirical accuracy relative to previous exact or auction-based methods. These embeddings allow for fast nearest-neighbor searches and compact representations in TDA pipelines [2104.07710].

## 6. Applications and Impact in Statistics and Machine Learning

The $W_1$ metric is fundamental for:
- Evaluating generative models, including as losses for Wasserstein GANs, which rely critically on the dual form for stable training and meaningful gradients [2201.02824].
- Goodness-of-fit, two-sample, and independence testing, where $W_1$-based test statistics exhibit greater sensitivity to global and local distributional differences compared to classical EDF-based approaches [1806.05500].
- Image retrieval and classification, as $W_1$ captures geometric similarity and is robust under small deformations, outperforming Euclidean or tangent-space metrics for low-sample discriminative tasks [1612.00181].
- Analysis of random matrices, quantifying spectral convergence to limiting distributions under nontrivial dependencies [2111.03595].
- Differential privacy, providing closed-form and tight upper bounds for distributional shifts induced by Laplace or Gaussian noise mechanisms [2304.14869].

## 7. Extensions, Limitations, and Future Directions

Extensions of $W_1$ include unbalanced transport (allowing creation or destruction of mass), noncommutative generalizations, and metric learning in embedded spaces [1702.07921, 2206.12116]. Open directions concern high-dimensional scaling, entropic regularization for $W_1$, and further acceleration on specialized architectures (GPU, parallelism).

The primary limitations are computational: naive methods are intractable for large $n$; however, ongoing work leverages geometric, algebraic, and approximate optimization strategies to make $W_1$ viable for large-scale inference, geometry, and data analysis [1810.00118, 2206.12116].

---

**References**:  
[1806.05500] Statistical Aspects of Wasserstein Distances  
[2111.03570] Why the 1-Wasserstein distance is the area between the two marginal CDFs  
[1912.04945] 1-Wasserstein Distance on the Standard Simplex  
[1810.00118] Multilevel Optimal Transport: a Fast Approximation of Wasserstein-1 distances  
[2206.12116] Approximating 1-Wasserstein Distance with Trees  
[2104.07710] Approximation algorithms for 1-Wasserstein distance between persistence diagrams  
[1612.00181] Monge's Optimal Transport Distance for Image Classification  
[2304.14869] On the 1-Wasserstein Distance between Location-Scale Distributions and the Effect of Differential Privacy  
[2111.03595] The Wasserstein distance to the Circular Law  
[2201.02824] Optimal 1-Wasserstein Distance for WGANs  
[1702.07921] Matricial Wasserstein-1 Distance  
[1904.07045] Donsker's theorem in {Wasserstein}-1 distance

Source: https://www.emergentmind.com/topics/1-wasserstein-distance