arXiv:2610.20788cs.LGOct 2026

Manuscript Offprint

arXiv:2610.20788

Sliced Wasserstein Sketches with Error Certificates

Elaheh Akbari, James Liu, Keaton Hamm, Soheil Kolouri

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Compact representations that support geometrically meaningful comparisons are valuable for learning from probability distributions. We study optimal, free-weight M-atom quantization of one-dimensional probability measures in quadratic Wasserstein distance and extend it to higher dimensions via slicing. Using L shared projections yields a sketch with O(LM)O(LM) comparison time. Our main result is an exact decomposition of squared distance error into residual and partition-mismatch terms, yielding computable certificates for arbitrary centroid sketches. For optimal sketches, a finite (2+δ)(2 + \delta) moment for some δ>0\delta > 0 guarantees O(M−1)O(M^{-1}) error in the finite-direction sliced distance, while equal-mass sketches can converge more slowly. Each slice preserves its mean, while storing residual energies enables covariance recovery from sufficiently many generic directions. Experiments on document, point-cloud, and flow-cytometry benchmarks show that optimal sketches substantially reduce storage while preserving the classification performance of uncompressed sliced distances. They also improve generalization from few labelled subjects and support end-to-end learning as compact pooling layers.

1 Introduction

A document represented by word embeddings and a shape represented by a point cloud are naturally compared as probability distributions. In retrieval, clustering, and other tasks involving many such objects, repeatedly computing transport distances on the original samples can dominate the cost. A useful summary should therefore be built once, occupy little memory, support many cheap comparisons, and quantify how far those comparisons can deviate from the true distances.

Sliced Wasserstein distances, introduced by Rabin et al. (2012), compare distributions by averaging one-dimensional transport costs over projection directions. In one dimension, quadratic Wasserstein distance is the L2L^{2} distance between quantile functions. This representation underlies sketches based on quantile grids (Kolouri et al., 2015; Naderializadeh et al., 2021; Lu et al., 2024; Carpintero Perez et al., 2024), streaming rank summaries (Nguyen, 2026), and parametric fits (Nadjahi et al., 2021; Liu et al., 2025). A fixed grid of quantile levels is particularly convenient because comparison reduces to a Euclidean distance. However, its allocation of resolution is less flexible because cells of equal probability can cover very different spatial scales, and tail cells or cells crossing gaps in the support can dominate the approximation error.

In this work, we instead summarize each projection by the measure supported on at most M atoms that minimizes its quadratic Wasserstein error. Both atom locations and weights are free to adapt to the projected distribution. For a weighted point measure, this is exactly one-dimensional weighted k-means, which admits a globally optimal dynamic program (Wu, 1991; Grønlund et al., 2017). Applying it on L shared two bags in R2R^{2}, shared directions θ1,θ2\theta_{1}, \theta_{2}

Figure

projected atoms, cells, weighted centroids

Figure

Figure

step quantiles and monotone flow

Figure

Figure 1: Sketch construction. Top: two bags in R2\mathbb{R}^2 (one weighted) and two shared directions. Middle: projected atoms, M=4M = 4 optimal contiguous cells (dotted), and weighted centroids per direction; marker area is proportional to cell mass, and cells differ between bags. Bottom: sketch step quantiles over mass uu, with original quantiles in the background and shading marking coupled pairs at each mass level. This monotone coupling has quadratic cost W22(μ^ℓ,ν^ℓ)W_2^2(\hat{\mu}_\ell, \hat{\nu}_\ell); the squared sketch distance DΘ,M2D_{\Theta,M}^2 averages these costs over directions.

directions gives a reusable sketch with O(LM)O(LM) storage and comparison time. The construction also returns the quantization error of every slice, and it is exact on any projection with at most M distinct values. Figure 1 illustrates the construction and comparison.

The central question is how these individually optimal summaries affect the distance between two distributions. With a shared partition of the quantile domain, replacing each quantile by its cell means is an orthogonal projection and contracts W2W_{2}. Adaptive quantizers generally choose different partitions, so this contraction argument no longer applies. The triangle inequality still bounds distance error by the sum of the two quantization errors, but does not describe the effect of the mismatched cells. We resolve this gap with an exact identity for arbitrary centroid sketches: summaries whose atoms are the means of their quantile cells. The identity isolates the boundary terms that can expand distances and yields sketch-computable certificates.

Our contributions are:

• Distance certificates for adaptive partitions. The partition-mismatch identity (Theorem 2) yields two-sided bounds, shared-partition contraction, and O(M−2)O(M^{-2}) squared-distance error when quantiles are Lipschitz and cell masses are O(M−1)O(M^{-1}) (Theorems 3 and 7). An explicit family shows that a larger M−3/2M^{-3/2} error is possible for general centroid sketches (Theorem 10).

• Sliced approximation rates. Combining the certificates with classical quantization bounds gives O(M−1)O(M^{-1}) error in the finite-direction sliced distance under a finite (2+δ)(2+\delta) moment for some δ>0\delta > 0 (Theorems 4 and 5). Gaussian projections and projections of uniform balls in dimensions d≥3d \geq 3 exhibit slower equal-mass rates, illustrating the benefit of adaptive weights (Theorem 11).

• Moment recovery. Classical centroid identities give exact directional means and a second-moment deficit equal to the residual energy. We use these identities to recover means and covariances from finitely many directions, and to bound higher-moment tensor errors, with a per-cell correction that improves the rate (Theorem 6).

• Compression at matched accuracy. On document, point-cloud, and flow-cytometry benchmarks the sketch reproduces the accuracy of the uncompressed sliced distance with 1.5 to more than 3000 times fewer stored numbers, and learned slices make the sketched distance competitive with full-dimensional transport (Section 5). We also report where equal-mass cells are the better centroid sketch (Section D.1).

The exact solver and underlying quantization and moment identities are established results. Our analysis concerns their use in distribution sketches and, particularly, the effect of mismatched partitions on pairwise distances. The target is the sliced distance on the chosen directions; approximation of population sliced Wasserstein and comparison with W2W_{2} are separate questions (Nadjahi et al., 2020; Bonnotte, 2013).

References (100)

Couldn't load all references. Reload the page to try again.