Abstract
The performance of unsupervised methods such as clustering depends on the choice of distance metric between features, or ground metric. Commonly, ground metrics are decided with heuristics or learned via supervised algorithms. However, since many interesting datasets are unlabelled, unsupervised ground metric learning approaches have been introduced. One promising option employs Wasserstein singular vectors (WSVs), which emerge when computing optimal transport distances between features and samples simultaneously. WSVs are effective, but can be prohibitively computationally expensive in some applications: $\mathcal{O}(n^2m^2(n \log(n) + m \log(m))$ for $n$ samples and $m$ features. In this work, we propose to augment the WSV method by embedding samples and features on trees, on which we compute the tree-Wasserstein distance (TWD). We demonstrate theoretically and empirically that the algorithm converges to a better approximation of the standard WSV approach than the best known alternatives, and does so with $\mathcal{O}(n^3+m^3+mn)$ complexity. In addition, we prove that the initial tree structure can be chosen flexibly, since tree geometry does not constrain the richness of the approximation up to the number of edge weights. Finally, we employ the tree-WSV algorithm to several single-cell RNA sequencing genomics datasets, demonstrating its scalability and utility for unsupervised cell-type clustering problems.
Introduction
In unsupervised learning, particularly for high-dimensional biological data, the mathematical definition of "distance" between features—the ground metric—is a critical hyperparameter. While Euclidean distance is a common default, it often fails to capture the complex underlying geometry of datasets like single-cell RNA sequencing (scRNA-seq). Wasserstein Singular Vectors (WSVs) offer a way to learn these metrics directly from unlabelled data by solving a joint optimal transport problem. However, the computational cost of standard WSV is $O(n^2m^2)$, which is prohibitive for modern large-scale datasets.
Methodology: The Tree-WSV Approach
To overcome these scaling limitations, we introduce Tree-WSV. This method leverages the Tree-Wasserstein Distance (TWD), which provides a closed-form analytical solution for optimal transport when data is embedded in a hierarchical tree structure.
The algorithm proceeds by representing samples and features as leaves on separate trees. Instead of learning a full $m \times m$ distance matrix, Tree-WSV learns a vector of weights for the tree edges. A key contribution of our work is a Recursive Basis Algorithm that identifies a non-singular basis set of leaf-to-leaf paths, ensuring efficient and stable updates to the edge weights. To mitigate the bias of the initial tree construction (often based on Euclidean heuristics), we implement "meta-iterations" where the tree structure is periodically refined using the learned metric.
Empirical Evaluation and Scalability
We compared Tree-WSV against standard Wasserstein SV and entropic-regularized (Sinkhorn) versions across synthetic and real-world genomics datasets, including the Human Lung Cell Atlas (HLCA) and mouse primary visual cortex neurons.
As shown in Figure 1, Tree-WSV provides a massive reduction in time complexity. In practical terms, this allows for the analysis of datasets like the HLCA (7,000 cells, ~4,000 genes) in approximately 71 minutes, whereas standard Sinkhorn methods fail to converge within 12 hours.
Crucially, this speed does not come at the cost of accuracy. Figure 2 demonstrates that Tree-WSV provides a superior approximation of the full WSV compared to entropic regularization. On the "Neurons V1" dataset, Tree-WSV achieved an Average Silhouette Width (ASW) of 0.602, far outperforming the Sinkhorn approach (0.256) and the Euclidean baseline (0.200).
Discussion and Conclusion
Our theoretical results prove that the specific geometry of the tree does not strictly limit the richness of the metric approximation, provided the tree is sufficiently branched. This flexibility, combined with the quadratic speedup to $O(n^3 + m^3 + mn)$, positions Tree-WSV as a powerful tool for unsupervised ground metric learning. Beyond genomics, the scalability of Tree-WSV opens new avenues for analyzing high-dimensional data in fields such as document analysis and neuronal population activity. Future work will focus on further reducing the dependency on initial tree construction and exploring applications in broader data science domains.
Summary updated