Abstract: This paper presents a unified computational framework for the estimation of distances, geodesics, and barycenters of merge trees. We introduce a new metric, the Wasserstein distance between merge trees ($W_2^T$), designed to enable efficient computations of geodesics and barycenters. This distance is strictly equivalent to the $L_2$-Wasserstein distance between extremum persistence diagrams but is restricted to the space of rooted partial isomorphisms between branch decomposition trees. This constraint enables the extension of existing optimization frameworks for persistence diagrams to the more structurally rich merge trees. We introduce a task-based algorithm that leverages shared-memory parallelism to accelerate distance, geodesic, and barycenter computations. Extensive experiments on public ensembles and SciVis benchmarks demonstrate the efficiency of our approach—computing barycenters in minutes for large datasets—and its ability to generate representative barycenter trees that visually summarize ensemble features. We demonstrate the utility of these contributions through visualization applications including feature tracking, temporal reduction, and ensemble clustering.
Introduction
In Topological Data Analysis (TDA), merge trees are a powerful tool for summarizing the hierarchical structure of features in a scalar field, such as the peaks and valleys in weather simulations or cosmological data. Unlike persistence diagrams, which only record the lifespan of features, merge trees capture how these features are connected.
However, analyzing ensembles of simulations requires the ability to "average" these structures. Standard metrics like the edit distance are often computationally prohibitive and do not support smooth interpolation (geodesics). Conversely, while persistence diagrams are easy to average, their barycenters often lose critical connectivity information. This paper bridges this gap by introducing a Wasserstein-based framework specifically for merge trees.
Methodology
The core of the proposed framework is the $W_2^T$ metric. This metric defines the distance between two merge trees by finding the optimal assignment between their features, represented as Branch Decomposition Trees (BDTs).
The $W_2^T$ Metric and BDTs
To compute the distance, merge trees are first converted into BDTs, where each node represents a persistent branch (a birth-death pair) and edges represent nesting relationships. The $W_2^T$ metric is calculated by considering only assignments that respect the tree's hierarchy—specifically, rooted partial isomorphisms. This ensures that the structural connectivity of the data is preserved during the matching process.
Optimization and Parallelism
The authors adapt a Lloyd-like relaxation algorithm for barycenter optimization. This involves an iterative process: an assignment step (matching the current average tree to the ensemble) followed by an update step (moving the average tree's features to the arithmetic mean of the matches). To handle the recursive nature of tree comparisons, the framework utilizes a task-based parallel algorithm, significantly reducing computation time on multi-core systems.
Key Results and Applications
The framework was evaluated on a variety of scientific datasets, including atmospheric simulations (Hurricane Isabel), fluid dynamics (Vortex Street), and cosmology (Dark Matter density).
Performance and Accuracy
The task-based implementation allows for the computation of barycenters for large ensembles, such as the Sea Surface Height dataset (48 members), in approximately 15 minutes. In clustering tasks, the $W_2^T$ metric achieved perfect classification scores (NMI/ARI = 1.0) on several benchmarks, outperforming both standard edit distances and persistence diagram-based methods.
Visualization Utilities
- Temporal Reduction: By using geodesics to interpolate between "key frames," the authors demonstrated that storage costs can be reduced by removing redundant trees while preserving significant topological events.
- Feature Tracking: The framework enables robust tracking of features across time or ensemble members by identifying stable correspondences in the Wasserstein matching.
- Ensemble Summarization: The barycenter merge tree serves as a visual summary, capturing the most representative features found across a collection of simulations without the "ghosting" artifacts common in simpler topological averages.
Conclusion
This work provides a robust mathematical and computational foundation for statistical analysis of merge trees. By combining the structural integrity of tree-based representations with the efficiency of Wasserstein optimization, the authors have created a versatile toolkit for ensemble visualization. Future work may extend these concepts to more complex topological structures like Reeb graphs or Morse-Smale complexes. The authors provide a lightweight C++ implementation to facilitate the reproduction of these results in the scientific community.
Summary updated