The Wasserstein Transform

Facundo Mémoli, Zane T. Smith, Zhengchao Wan

Real-world datasets are rarely pristine; they are often plagued by noise, outliers, and the "chaining effect"—a phenomenon where a thin trail of noise points artificially connects two distinct clusters, causing standard clustering algorithms to fail. While traditional methods like the Mean Shift algorithm exist to "push" points toward high-density regions, they are generally tied to Euclidean spaces and often lack rigorous mathematical proofs of stability.

To address these limitations, researchers have introduced the Wasserstein Transform (WT). By redefining distances through the lens of Optimal Transport, the WT provides a theoretically stable, metric-agnostic generalization of Mean Shift capable of denoising and enhancing features across diverse data topologies.

The Core Method: Localizing and Transforming

The fundamental innovation of the Wasserstein Transform is that it evaluates points not in isolation, but by examining a "localized" version of the data surrounding them. The process unfolds in three main steps:

  1. Localization: For every point in the dataset, a local probability measure is defined, typically by "truncating" the dataset to a small neighborhood (a ball of radius $\epsilon$) around that point.
  2. The Transform: The new distance between any two points $x$ and $y$ is redefined as the $W_1$ Wasserstein distance (often called the Earth Mover's Distance) between their respective local probability measures.
  3. Iteration: This transformation can be applied iteratively. With each pass, points move within a "pseudo-space" where dense clusters become tighter and noise is systematically pushed away.
Block diagram of the Wasserstein Transform

A key mathematical contribution of this work is proving that the WT is effectively a strengthening of Mean Shift. While Mean Shift calculates the distance between the means of local neighborhoods, the WT calculates the distance between the entire distributions. This allows the WT to retain significantly more information about the local geometry of the data.

Theoretical Insights

The paper establishes several critical theoretical guarantees for the Wasserstein Transform:

  • Mean Shift as a Special Case: The authors demonstrate that Mean Shift is essentially a "first-order" approximation of the WT. Because the Wasserstein distance is always greater than or equal to the distance between means, the WT is more sensitive to local density variations.
  • Guaranteed Stability: A major theoretical win is the proof that the WT (and by extension, Mean Shift) is stable. If the input data is slightly perturbed, the transformed distances change only slightly. This provides a formal reliability guarantee previously missing for these algorithms.
  • Geometric Awareness: By utilizing local truncations, the WT naturally distinguishes between different local dimensions. A point inside a dense 2D blob "sees" a different local distribution than a point on a sparse 1D line, even if they are physically close. This geometric awareness is precisely why the WT excels at breaking the chaining effect.

Empirical Results

The authors evaluated the Wasserstein Transform across several synthetic and real-world benchmarks, demonstrating its superiority in both denoising and clustering tasks.

Denoising the "Noisy Circle"

In a synthetic experiment featuring 800 points on a circle corrupted by 1,200 random outliers, the WT significantly outperformed Mean Shift. As iterations progressed, the WT was much more effective at pulling points toward the high-density circular structure and clearing out the interior noise.

Comparison of Mean Shift and Wasserstein Transform on the Noisy Circle dataset

Clustering and Classification

  • Breaking the Chain: On a synthetic "Dumbbell" dataset (two blobs connected by a thin line of points), the WT successfully separated the two blobs after a few iterations, whereas standard single-linkage clustering failed due to the connecting noise.
  • Real-World Data: On the classic MNIST handwritten digit dataset, the WT performed comparably to or better than Mean Shift and outperformed specialized image metrics like Tangent Distance.
  • Manifold Data: To test its metric-agnostic claims, the WT was applied to a Grassmannian Manifold dataset (matrices representing points on a complex geometric space). It achieved the best overall error rate (0.9753), significantly outperforming the baseline manifold distance.

Limitations and Future Directions

While powerful, the Wasserstein Transform comes with computational trade-offs. Calculating Wasserstein distances for every pair of points is expensive. Although the authors utilized the Sinkhorn algorithm (an entropic regularization technique) to accelerate the process, it remains more computationally demanding than simple Euclidean algorithms.

Additionally, the method is sensitive to the scale parameter $\epsilon$ (the size of the local neighborhood). If $\epsilon$ is set too large, the transform loses its local sensitivity and fails to enhance features properly.

Looking forward, the authors suggest exploring the connections between the iterated WT and Ricci curvature or gradient flows, which could unlock a deeper understanding of how data structures "evolve" under this optimal transport framework.

Summary updated

BibTeX
@inproceedings{memoli2019wasserstein,
  author = {Facundo Mémoli and Zane T. Smith and Zhengchao Wan},
  title = {{The Wasserstein Transform}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
  url = {https://openreview.net/forum?id=HkZhXj-uWS},
}
Figure