Wasserstein t-SNE

Fynn Bachmann, Philipp Hennig, Dmitry Kobak

Introduction

Dimensionality reduction techniques like t-SNE and UMAP are staples of modern data analysis, yet they often struggle with hierarchical datasets. In many scientific and social domains, data points are naturally grouped into "units"—such as individual polling stations within voting districts or patients within clinical cohorts. The standard approach to visualizing such data involves collapsing each unit into its mean vector. However, this "naive" reduction discards the internal variance and distributional "shape" of the samples, potentially obscuring critical structural differences between groups that share similar averages.

The Wasserstein Framework

To address this loss of information, the authors introduce Wasserstein t-SNE. Instead of treating units as single points in Euclidean space, this method treats each unit as a probability distribution. By replacing the standard Euclidean distance with the Wasserstein metric (also known as the Earth Mover’s Distance), the algorithm accounts for the "work" required to transform one distribution into another. This allows the visualization to reflect differences in both location (means) and shape (covariance).

Conceptual overview of the Wasserstein t-SNE pipeline, mapping sample distributions to a low-dimensional embedding.

Addressing the Limitations of Mean-Based Reduction

The primary advantage of this approach is its ability to distinguish between groups that appear identical when only their means are considered. For instance, in a political context, a highly polarized district and a moderate district might have the same average vote share. A mean-based t-SNE would place them together, while Wasserstein t-SNE recognizes their distinct internal dynamics. This is particularly useful in synthetic scenarios like the Hierarchical Gaussian Mixture Model (HGMM), where classes may overlap in mean but differ significantly in orientation.

Synthetic example showing two classes with overlapping means that can only be distinguished by their distinct covariance structures.

Methodology and Tuning

The paper proposes two primary implementation paths:

  1. Gaussian Approximation: By modeling each unit as a multivariate Gaussian, the authors derive a computationally efficient closed-form solution. A key innovation here is the introduction of a hyperparameter, $\lambda$, which allows users to interpolate between mean-based distance ($\lambda=0$) and covariance-based distance ($\lambda=1$).
  2. Exact Computation: For non-Gaussian or multimodal distributions, a linear programming approach is provided. The authors include an optimization for discrete samples that significantly improves feasibility for medium-scale datasets.

Key Results: The 2017 German Election

The effectiveness of the method was demonstrated using data from the 2017 German Parliamentary Election, treating 299 voting districts as units. By setting $\lambda = 0.75$ to emphasize covariance structure, the model successfully uncovered latent sociopolitical clusters—Cities, Southern Germany, Eastern Germany, and Western Germany—that were less distinct in mean-based visualizations. Quantitatively, the Adjusted Rand Index (ARI) for clustering improved from 0.55 to 0.70 when switching to the Wasserstein-based approach.

Conclusion

Wasserstein t-SNE provides a robust framework for hierarchical data visualization by moving "beyond the mean." While the method introduces higher computational costs and requires careful parameter tuning (specifically for $\lambda$ and perplexity), it offers a significantly more nuanced view of complex datasets where the internal structure of groups is as informative as their average values.

Summary updated

BibTeX
@inproceedings{bachmann2022wasserstein,
  author = {Fynn Bachmann and Philipp Hennig and Dmitry Kobak},
  title = {{Wasserstein t-SNE}},
  booktitle = {ECML/PKDD},
  year = {2022},
  doi = {10.1007/978-3-031-26387-3\_7},
}
Figure