Optimal Transport (OT)—often referred to as the Wasserstein distance or Earth Mover’s Distance—provides a mathematically principled way to compare probability distributions. However, calculating the exact OT distance between two discrete sets of $n$ points typically scales at $O(n^3)$, making it impractical for large datasets. Furthermore, in high dimensions, OT suffers from the "curse of dimensionality," requiring a massive amount of data to obtain accurate estimates.
To address these hurdles, researchers often use Sliced Wasserstein (SW) distances, which project high-dimensional data onto random 1D lines where OT has a simple, fast solution. While fast, 1D projections can lose significant structural information. This paper introduces Tree-Sliced Wasserstein (TSW) distances, a generalization of Sliced Wasserstein distances that uses random tree metrics instead of 1D projections to find a middle ground that is more expressive than a line but still computationally efficient.
Methodology: From Lines to Trees
The authors leverage the property that if the "ground metric" (the cost of moving mass between two points) is defined by a tree, the Wasserstein distance has a simple closed-form solution.
Tree-Wasserstein (TW) Distance
On a tree structure, the distance between two measures is simply the weighted sum of the absolute differences in mass contained in every subtree. This is essentially a weighted $\ell_1$ norm, which is extremely fast to compute.
Tree-Slicing (TSW)
Because a single tree might not capture the true geometry of the data, the authors propose the Tree-Sliced Wasserstein (TSW) distance. They generate multiple random tree metrics, calculate the TW distance for each, and average the results. This is analogous to how Sliced Wasserstein averages over multiple 1D projections. A line is just a very simple tree (a chain); therefore, TSW is a direct generalization of SW that offers more "degrees of freedom" to capture data geometry.
Adaptive Tree Construction
To build these trees, the authors provide two methods:
- Partition-based: Similar to Quadtrees, the space is recursively divided into hypercubes. This works well for low-dimensional data.
- Clustering-based: Uses "farthest-point clustering" to group data points. This is more robust for high-dimensional data where grid-based partitioning fails.
Positive Definite Kernels
Because the TSW distance is "negative definite," it can be used to define a valid Gaussian-like kernel: $k(\mu, \nu) = \exp(-t \cdot TSW(\mu, \nu))$. This mathematical guarantee allows TSW to be used directly in kernel-based algorithms like Support Vector Machines (SVMs) without requiring workarounds.
Experimental Results
The authors evaluated their method on two distinct types of tasks: Document Classification (using word embeddings on datasets like TWITTER, RECIPE, CLASSIC, and AMAZON) and Topological Data Analysis (TDA) (comparing persistence diagrams on datasets like MPEG7, Orbit, and material science datasets).
The experiments revealed several key insights:
- Massive Speedups: By mapping data to a tree structure, the complex optimization problem of OT turns into a simple summation. On the CLASSIC dataset, TSW took less than 3 hours, while standard OT (using the Sinkhorn algorithm) took more than 8 days.
- Competitive Accuracy: In TDA tasks, TSW consistently outperformed Sliced Wasserstein and was competitive with (or better than) exact OT. It showed better performance in applications where 1D projections failed to capture the necessary topological structure.
- Efficiency vs. Quality: Using roughly 10 "slices" (trees) provided an optimal balance between computational time and classification accuracy.
Limitations and Future Work
While TSW presents a significant step forward, the "optimal" way to sample trees for a specific dataset remains an open question. Additionally, performance depends on hyperparameters like tree depth and the number of clusters, which require tuning. The authors suggest that using these tree metrics for more complex parametric statistical inference is a promising direction for future research.
Summary updated