Abstract
Many approaches in machine learning rely on a weighted graph to encode the similarities between samples in a dataset. Entropic affinities (EAs), which are notably used in the popular Dimensionality Reduction (DR) algorithm t-SNE, are particular instances of such graphs. To ensure robustness to heterogeneous sampling densities, EAs assign a kernel bandwidth parameter to every sample in such a way that the entropy of each row in the affinity matrix is kept constant at a specific value, whose exponential is known as perplexity. EAs are inherently asymmetric and row-wise stochastic, but they are used in DR approaches after undergoing heuristic symmetrization methods that violate both the row-wise constant entropy and stochasticity properties. In this work, we uncover a novel characterization of EA as an optimal transport problem, allowing a natural symmetrization that can be computed efficiently using dual ascent. The corresponding novel affinity matrix derives advantages from symmetric doubly stochastic normalization in terms of clustering performance, while also effectively controlling the entropy of each row thus making it particularly robust to varying noise levels. Following, we present a new DR algorithm, SNEkhorn, that leverages this new affinity matrix. We show its clear superiority to state-of-the-art approaches with several indicators on both synthetic and real-world datasets.
Introduction
Dimensionality reduction (DR) algorithms like t-SNE rely on building a graph of "affinities" to represent similarities between data points. To handle varying sampling densities, t-SNE employs Entropic Affinities (EAs), which adjust the kernel bandwidth for each point to maintain a constant "perplexity"—a hyperparameter representing the effective number of neighbors. However, EAs are fundamentally asymmetric. Standard practice involves a heuristic symmetrization—averaging the affinities—which breaks the constant perplexity property and leads to mathematical inconsistencies in the resulting graph.
Methods: Symmetric Entropic Affinities via Optimal Transport
The authors introduce SNEkhorn, a framework that derives Symmetric Entropic Affinities (SEA) through a principled optimization approach. By uncovering a hidden link between entropic affinities and Optimal Transport (OT), they prove that finding standard EAs is equivalent to solving a specific type of OT problem.
By incorporating a symmetry constraint directly into this OT optimization, they derive a new affinity matrix ($P^{se}$) that is symmetric by design and doubly stochastic (where every row and column sums to 1). This ensures that every data point contributes exactly the same amount of "influence" to the final map, preventing dense clusters from dominating the visualization. The optimization is solved efficiently using a dual ascent algorithm.
Key Results and Insights
The researchers evaluated SNEkhorn against t-SNE and UMAP using a variety of synthetic and real-world datasets, including image datasets (COIL-20, CIFAR-10) and complex genomics data (SNAREseq).
- Consistent Perplexity: Unlike t-SNE, which suffers from perplexity fluctuations after heuristic symmetrization, SNEkhorn maintains a perfectly flat perplexity profile across all samples.
- Noise Resilience: The doubly stochastic nature of the SEA matrix makes the algorithm robust to varying noise levels. In tests with high-noise Gaussian mixtures, SNEkhorn correctly identified clusters that standard methods missed.
- Superior Performance: On 16 real-world datasets, t-SNEkhorn achieved the highest Silhouette scores on 15 and the highest Trustworthiness on 12. It showed particularly significant gains in noisy genomics data.
- Visual Clarity: Qualitative results show that t-SNEkhorn produces tighter, more distinct clusters compared to the more "blurry" results of standard t-SNE. Notably, it avoids the "sphere concentration" issues seen in previous doubly stochastic methods.
Conclusion
SNEkhorn resolves a long-standing inconsistency in entropic affinity-based dimensionality reduction. By reframing the problem through the lens of Optimal Transport, it provides a mathematically sound method for creating symmetric, doubly stochastic affinity matrices. Future work includes scaling the algorithm to millions of points using fast approximation techniques and exploring its application in other domains, such as attention mechanisms in deep learning.
Summary updated