Abstract: Finding meaningful distances between high-dimensional data samples is an important scientific task. To this end, we propose a new tree-Wasserstein distance (TWD) for high-dimensional data with two key aspects. First, our TWD is specifically designed for data with a latent feature hierarchy, i.e., the features lie in a hierarchical space, in contrast to the usual focus on embedding samples in hyperbolic space. Second, while the conventional use of TWD is to speed up the computation of the Wasserstein distance, we use its inherent tree as a means to learn the latent feature hierarchy. The key idea of our method is to embed the features into a multi-scale hyperbolic space using diffusion geometry and then present a new tree decoding method by establishing analogies between the hyperbolic embedding and trees. We show that our TWD computed based on data observations provably recovers the TWD defined with the latent feature hierarchy and that its computation is efficient and scalable. We showcase the usefulness of the proposed TWD in applications to word-document and single-cell RNA-sequencing datasets, demonstrating its advantages over existing TWDs and methods based on pre-trained models.
Introduction
In high-dimensional data analysis, features are rarely independent; they often reside within a "latent hierarchy." For instance, in natural language processing, words like "apple" and "orange" share a common semantic ancestor ("fruit"), making them more related than "apple" and "microchip." Standard distance metrics, such as Euclidean distance or correlation, typically fail to capture these structural relationships. Optimal Transport (OT), specifically the Wasserstein distance, provides a robust framework for incorporating feature relationships but suffers from high computational complexity ($O(m^3 \log m)$). While Tree-Wasserstein Distance (TWD) variants offer speedups, they often rely on arbitrary tree structures. This work proposes a method to learn the true feature hierarchy from data and use it to compute an efficient TWD.
Methodology
The proposed approach decodes the latent tree from observational data through two primary stages:
- Hyperbolic Diffusion Embedding: Features are embedded into a multi-scale hyperbolic space. Hyperbolic geometry is inherently "tree-like" because its volume grows exponentially with radius, mirroring the branching of a tree. Diffusion geometry (heat kernels) at various time scales is employed to capture both local and global feature relationships.
- Tree Decoding via HD-LCA: The authors introduce the Hyperbolic Diffusion Lowest Common Ancestor (HD-LCA). In a discrete tree, the distance between leaves is determined by their lowest common ancestor. By defining a continuous analogue in hyperbolic space, the method reconstructs a binary tree representing the feature hierarchy.
Algorithmic Implementation
The decoding process is formalized in Algorithm 1 (HD Binary Tree Decoding), which uses the hyperbolic embeddings to build the tree structure. Algorithm 2 (TWD with a latent feature hierarchy) then utilizes this tree to compute the distance metric efficiently. By leveraging diffusion landmarks, the computational complexity is reduced to approximately $O(m^{1.2})$, making it scalable to large datasets.
Experimental Results
The method was evaluated on synthetic and real-world datasets:
- Text Benchmarks: On the BBCSPORT dataset, the proposed TWD achieved 96.1% accuracy, outperforming the standard Word Mover’s Distance (95.4%).
- Genomic Data: In scRNA-sequencing tasks (Zeisel dataset), the method reached 89.1% accuracy, significantly surpassing the pre-trained Gene Mover’s Distance (84.2%).
- Robustness: The method demonstrated high resilience to Gaussian noise compared to competing TWD methods.
Conclusion
By treating hyperbolic space as a continuous proxy for a tree, this work provides a differentiable and efficient framework for learning feature hierarchies and computing distances in high-dimensional spaces. The method demonstrates state-of-the-art performance in linguistic and biological applications while maintaining computational efficiency. Future work includes extending the framework to non-probability distribution data and exploring coupled hierarchies for both samples and features.
Summary updated