Abstract
We study in this paper a variant of the Wasserstein barycenter problem, which we refer to as the tree-Wasserstein barycenter, by leveraging a specific class of ground metrics—tree metrics—for the Wasserstein distance. Drawing on the tree structure, we propose an efficient algorithmic approach to solve the tree-Wasserstein barycenter and its variants. The proposed approach is not only fast for computation but also efficient for memory usage. Exploiting the tree-Wasserstein barycenter and its variants, we scale up multi-level clustering and scalable Bayes, especially for large-scale applications where the number of supports in probability measures is large. Empirically, we test our proposed approach against other baselines on large-scale synthetic and real datasets.
Introduction
Optimal Transport (OT) has emerged as a powerful tool in machine learning for comparing probability distributions. However, its application to large-scale problems is often hindered by the computational complexity of calculating the Wasserstein distance and its barycenter. Finding the Wasserstein barycenter—the "average" distribution that minimizes the sum of OT distances to a set of input measures—is a fundamental task in multilevel modeling, such as document clustering or Bayesian posterior aggregation. Standard approaches, including those based on entropic regularization (Sinkhorn algorithm), suffer from high computational costs and memory requirements that scale poorly with the number of support points.
The Tree-Wasserstein Framework
The core innovation of this work is the adoption of tree metrics as the ground metric for the Wasserstein distance. By embedding data into a tree structure, the complex optimization problem of finding a barycenter is significantly simplified.
In this framework, the Tree-Wasserstein (TW) distance between two measures can be computed in closed form. Specifically, any probability measure on a tree can be mapped into a high-dimensional vector in $\mathbb{R}^m$, where $m$ is the number of edges. In this transformed space, the Wasserstein distance becomes equivalent to the $\ell_1$ distance (Manhattan distance). Consequently, finding the barycenter reduces to solving a weighted geometric median problem for each edge independently. This component-wise approach avoids iterative matrix scaling and the storage of massive cost matrices, leading to linear scalability in both time and memory.
Experimental Evaluation
The researchers evaluated the TW barycenter approach across several datasets, including MNIST point clouds, synthetic multilevel Gaussian data, and the AMAZON textual dataset. In the AMAZON dataset, documents are represented as distributions of word embeddings, and the goal is to find a representative "topic" distribution (barycenter) for groups of documents.
Key Performance Metrics:
- Computational Speed: On the AMAZON dataset, the TW barycenter calculation was completed in approximately 1.5 to 1.7 minutes on a single CPU. In contrast, the standard Sinkhorn-based method required nearly 60 minutes on a 40-CPU cluster to achieve comparable results.
- Memory Efficiency: In multilevel clustering tasks, the TW method maintained a consistent memory footprint (e.g., 23.2 GB), while traditional methods like MWM exceeded 55 GB and failed as the number of clusters increased.
- Accuracy: In Bayesian posterior approximation (Tree-WASP), the TW approach achieved a lower absolute error (0.674) than both Sinkhorn (0.751) and Sliced Wasserstein (0.678–0.846) baselines.
Conclusion
By leveraging tree metrics, this work provides a scalable and efficient alternative to traditional Wasserstein barycenter methods. The Tree-Wasserstein barycenter offers a compelling middle ground: it matches the speed of 1D projection methods like Sliced Wasserstein while better preserving the high-dimensional structural integrity of the data. Future research will focus on optimizing tree metric sampling to further enhance the alignment between the tree structure and the underlying data manifold.
Summary updated