---
title: Sliced Wasserstein Distance Estimation
url: https://www.emergentmind.com/topics/sliced-wasserstein-distance-estimation
type: topic
---

# Sliced Wasserstein Distance Estimation

The sliced Wasserstein distance (SWD) is a computationally tractable variant of the Wasserstein (optimal transport) distance that leverages one-dimensional projections to compare high-dimensional probability measures. SWD is widely studied for its statistical properties, empirical performance, and central role in large-scale generative modeling, distributional regression, and high-dimensional data analysis. Estimating the SWD from finite samples—termed "sliced Wasserstein distance estimation"—is essential for both theoretical inference and practical implementation.

## 1. Definition and Slicing Transforms

Given probability measures \( P, Q \) on \( \mathbb{R}^p \) with finite \( p \)-th moments, for each unit vector \( \theta \in S^{p-1} \) (the unit sphere), define the associated one-dimensional marginals:
\[
P_\theta = \langle \theta, \cdot \rangle_\# P, \quad Q_\theta = \langle \theta, \cdot \rangle_\# Q,
\]
where \( \langle \theta, x \rangle \) denotes projection and \((\cdot)_\#\) the pushforward. The \( L^p \)-sliced Wasserstein distance is
\[
\mathrm{SW}_p(P, Q) = \left( \int_{S^{p-1}} W_p^p( P_\theta, Q_\theta ) \, d\theta \right)^{1/p},
\]
where \( W_p(\cdot, \cdot) \) is the standard 1D Wasserstein distance and \( d\theta \) is the uniform Haar measure [2306.10601].

More generally, slicing may be interpreted via integral transforms, such as the Radon transform,
\[
\mathcal{R}f(\theta, u) = \int_{\langle z, \theta \rangle = u} f(z) \, d\sigma_{\theta, u}(z)
\]
for \( f \) a function or density and \( d\sigma_{\theta,u} \) the surface measure [2306.10601, 2209.13570]. Injectivity and invertibility of the chosen transform are essential for establishing metric properties.

## 2. Sample-Based Estimation and Algorithms

In practical settings, one observes i.i.d. samples \( \{ X_j \}_{j=1}^n \sim P \), \( \{ Y_j \}_{j=1}^m \sim Q \) and constructs empirical measures \( \hat P_n, \hat Q_m \). For each projection direction \( \theta \), one computes the projected samples, sorts them, and evaluates the 1D \( W_p \). The empirical estimator with \( L \) directions is
\[
\widehat{\mathrm{SW}}_p^{(L, n, m)}(P, Q) = \left( \frac{1}{L} \sum_{\ell=1}^L W_p^p \big( \hat P_{n,\theta_\ell}, \hat Q_{m,\theta_\ell} \big) \right)^{1/p}.
\]
Directions \( \{ \theta_\ell \} \) are typically selected i.i.d. uniformly on \( S^{p-1} \), but deterministic quadrature (e.g., spherical designs) is also possible [2306.10601]. The sorting cost for each projection is \( O((n+m)\log(n+m)) \), so the total complexity is \( O(L n \log n) \) for moderate sample sizes.

**Algorithmic Summary:**

| Step           | Description                                        | Complexity             |
|----------------|----------------------------------------------------|------------------------|
| Project/sort   | For each \(\theta_\ell\), compute and sort         | \(O(n \log n)\)        |
| 1D OT          | Compute \( W_p^p \) via quantile/empirical CDF     | \(O(n)\)               |
| Average        | Aggregate over all directions (\(L\))              | \(O(L)\)               |

[2306.10601, 2209.13570, 2210.09160]

## 3. Theoretical Guarantees

### Consistency and Rates

Under standard regularity conditions (compact support, bounded density, finite moments), the empirical estimator satisfies
\[
\big| \widehat{\mathrm{SW}}_p^{(L,n,m)} - \mathrm{SW}_p(P,Q) \big| = O_p( n^{-1/2} + m^{-1/2} + L^{-1/2} )
\]
as \( n, m, L \to \infty \) [2306.10601]. When sample size and the number of directions are of the same order, the error decreases at the optimal parametric rate.

### Uniform Concentration

With suitable bracketing or VC-type entropy control over the class of projections, uniform concentration inequalities apply, and for bounded one-dimensional Wasserstein terms, Hoeffding-type deviation bounds yield
\[
\Pr \left( \big| \widehat{\mathrm{SW}}_p^p - \mathrm{SW}_p^p \big| > \epsilon \right ) \leq 2 \exp \left( - c \, \min\{ nL, n, m \} \, \epsilon^2 \right )
\]
for some constant \( c \) [2306.10601].

## 4. Comparison to Alternative Paradigms

**Slice-Average Regression (SAW):**  
Performs minimization of the full sliced Wasserstein (i.e., over the space of probability measures on \( \mathbb{R}^p \)), which is non-convex globally but reflects the full geometry of the underlying distributions.

**Slice-Wise Regression (SWW):**  
Performs independent 1D regression per direction (Fréchet mean), then reconstructs the multivariate distribution via inversion of the slice transform. While each 1D problem is convex and parallelizable, the aggregation step may be unstable or high-variance in large \( p \).

Each paradigm's statistical and computational tradeoffs depend on the properties of the slicing/inversion schemes and the geometry of the regression functional [2306.10601].

## 5. Practical Considerations in SWD Estimation

- **Number of Directions (\( L \)):** Empirically, \( L \in [50, 200] \) suffices in moderate dimensions (\( p \leq 5 \)). Cost grows linearly with \( L \). Adaptive approaches (e.g., cross-validation) can guide selection [2306.10601].
- **Sampling of Directions:** Random uniform sampling is unbiased and easy to implement; deterministic designs can yield lower variance/quadrature error.
- **Computational Complexity:** For common settings (\( n \sim 10^4, L \sim 100 \)), estimation is feasible on standard hardware in seconds.
- **Bias and Variance:** Finite \( n \) yields \( O(n^{-1/2}) \) bias; finite \( L \) yields \( O(L^{-1/2}) \) variance. The total RMSE is of the form \( a n^{-1/2} + b L^{-1/2} \) for appropriate constants.
- **Empirical Performance:** Simulations confirm predicted rates and demonstrate suitability for data analysis and regression tasks with distributional responses [2306.10601].

## 6. Extensions: Slicing Transforms and Stability

The definition of slicing is extendable: any transform \( \psi \) that satisfies injectivity, stability (Lipschitz), invertibility, and admits regularized inverses can, in principle, serve as the basis for a generalized SWD. The Radon transform is a canonical choice due to its known properties in tomography and harmonic analysis [2306.10601, 2209.13570]. For stable inference and regression, the existence of a continuous regularized inverse is necessary.

## 7. Applications and Limitations

SWD estimation is widely deployed in statistical modeling with distributional responses, such as Fréchet regression, and in generative modeling for high-dimensional data where full-dimensional OT is computationally prohibitive [2209.13570, 2210.09160]. Its favorable statistical properties, fast computational algorithms, and adaptability to different slicing paradigms make SWD estimation a central tool for modern data-driven studies of probability distributions.

Limitations include the non-convexity of the global regression objective when using the full SWD (SAW), instability of the inversion step when employing slice-wise regression (SWW) in high dimensions, and the linear scaling of computation with the number of projections.

---

**Summary Table: Estimator Error Sources**

| Error Source         | Rate                       | Main Control Parameter   |
|----------------------|----------------------------|-------------------------|
| Finite sample size   | \(O(n^{-1/2})\)            | \( n \), \( m \)        |
| Number of slices     | \(O(L^{-1/2})\)            | \( L \)                 |

These rates are minimax optimal under classical regularity conditions for optimal transport processes [2306.10601].

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