Table of Contents
Fetching ...

Approximating 1-Wasserstein Distance between Persistence Diagrams by Graph Sparsification

Tamal K. Dey, Simon Zhang

TL;DR

The paper tackles scalable computation of the $1$-Wasserstein distance between persistence diagrams by reducing exact matching to a min-cost flow on a sparsified transshipment network constructed through $\delta$-condensation and a geometric $s$-WSPD. It proves a near-linear-time $(1+O(\varepsilon))$-approximation guarantee and demonstrates practical performance via the PDoptFlow implementation, which leverages GPU and multicore parallelism. The approach yields substantial empirical speedups over state-of-the-art methods while maintaining very low error, enabling efficient nearest-neighbor queries and large-scale TDA workflows. By combining geometric sparsification with flow-based optimization, the method extends to unbalanced optimal transport in the plane and offers a scalable, open-source tool for topological data analysis tasks.

Abstract

Persistence diagrams (PD)s play a central role in topological data analysis. This analysis requires computing distances among such diagrams such as the $1$-Wasserstein distance. Accurate computation of these PD distances for large data sets that render large diagrams may not scale appropriately with the existing methods. The main source of difficulty ensues from the size of the bipartite graph on which a matching needs to be computed for determining these PD distances. We address this problem by making several algorithmic and computational observations in order to obtain, in theory, a near-linear fully polynomial-time approximation scheme. This is theoretically optimal assuming the $(1+ε)$-approximate EMD conjecture in constant dimension, which is that the EMD problem on the plane cannot be approximated by a PTAS in time $O(\frac{1}{ε^2}n)$ up to polylog factors. In our implementation, first, taking advantage of the distribution of PD points, we \emph{condense} them thereby decreasing the number of nodes in the graph for computation. The increase in point multiplicities is addressed by reducing the matching problem to a min-cost flow problem on a transshipment network. Second, we use Well Separated Pair Decomposition to sparsify the graph to a size that is linear in the number of points. Both node and arc sparsifications contribute to the approximation factor where we leverage a lower bound given by the Relaxed Word Mover's distance. Third, we eliminate bottlenecks during the sparsification procedure by introducing parallelism. Fourth, we develop an open source software called PDoptFlow based on our algorithm, exploiting parallelism by GPU and multicore. We perform extensive experiments and show that the actual empirical error is very low. We also show that we can achieve high performance at low guaranteed relative errors, improving upon the state of the arts.

Approximating 1-Wasserstein Distance between Persistence Diagrams by Graph Sparsification

TL;DR

The paper tackles scalable computation of the -Wasserstein distance between persistence diagrams by reducing exact matching to a min-cost flow on a sparsified transshipment network constructed through -condensation and a geometric -WSPD. It proves a near-linear-time -approximation guarantee and demonstrates practical performance via the PDoptFlow implementation, which leverages GPU and multicore parallelism. The approach yields substantial empirical speedups over state-of-the-art methods while maintaining very low error, enabling efficient nearest-neighbor queries and large-scale TDA workflows. By combining geometric sparsification with flow-based optimization, the method extends to unbalanced optimal transport in the plane and offers a scalable, open-source tool for topological data analysis tasks.

Abstract

Persistence diagrams (PD)s play a central role in topological data analysis. This analysis requires computing distances among such diagrams such as the -Wasserstein distance. Accurate computation of these PD distances for large data sets that render large diagrams may not scale appropriately with the existing methods. The main source of difficulty ensues from the size of the bipartite graph on which a matching needs to be computed for determining these PD distances. We address this problem by making several algorithmic and computational observations in order to obtain, in theory, a near-linear fully polynomial-time approximation scheme. This is theoretically optimal assuming the -approximate EMD conjecture in constant dimension, which is that the EMD problem on the plane cannot be approximated by a PTAS in time up to polylog factors. In our implementation, first, taking advantage of the distribution of PD points, we \emph{condense} them thereby decreasing the number of nodes in the graph for computation. The increase in point multiplicities is addressed by reducing the matching problem to a min-cost flow problem on a transshipment network. Second, we use Well Separated Pair Decomposition to sparsify the graph to a size that is linear in the number of points. Both node and arc sparsifications contribute to the approximation factor where we leverage a lower bound given by the Relaxed Word Mover's distance. Third, we eliminate bottlenecks during the sparsification procedure by introducing parallelism. Fourth, we develop an open source software called PDoptFlow based on our algorithm, exploiting parallelism by GPU and multicore. We perform extensive experiments and show that the actual empirical error is very low. We also show that we can achieve high performance at low guaranteed relative errors, improving upon the state of the arts.

Paper Structure

This paper contains 34 sections, 10 theorems, 48 equations, 14 figures, 7 tables, 7 algorithms.

Key Result

Theorem 3.1

(Main Theorem for the Complexity of Computing the $W_1$-distance) Let $\varepsilon>0$ and $A=\tilde{A}\cup \Delta,B=\tilde{B}\cup \Delta$ two PDs of atmost $n$ points, The $W_1$-distance can be reduced to computing a min-cost flow on a sparse network. This can theoretically be computed in time $O(\f

Figures (14)

  • Figure 1: Plot of the empirical time (log scale) against the number of nodes $n$.
  • Figure 2: Pareto frontier of 7 algorithms showing the time and prediction accuracy tradeoff amongst the algorithms from Table \ref{['table: 1-NN-accuracy-time']} on the reddit dataset.
  • Figure 3: (a) $-5;(7,12)$ means a supply of $-5$ units at point $(7,12)$. (b) $\mathrm{Bi}(A,B)$ with the nodes denoted by solid circles. (c) $G(A,B)$, nodes are the solid outer boxes. Supplies in $G(A,B)$ are set by the number of circles inside each box. In (b) and (c), barred-points e.g. $\overline{(7,12)}$ are projections to the diagonal.
  • Figure 4: $\delta$-condensation for (a) matched and (b) unmatched points. Points snapped to their nearest $0.99 \delta$-grid point. Points are then perturbed in a $0.01 (\frac{\delta}{2})$ neighborhood. Green dotted pairwise distances change to new purple dotted and dashed pairwise distances.
  • Figure 5: Illustration of Algorithm \ref{['alg: wasserstein-PDoptFlow']}: (a) $\delta$-condensation for the example in Figure \ref{['fig: matchingiffflow']} with the split tree construction on $\hat{A}^{\delta} \cup \hat{B}^{\delta}$; (b) WSPD pairs (black biarcs) on the split tree from (a); and (c) the induced transshipment network from the WSPD with the green diagonal arcs included.
  • ...and 9 more figures

Theorems & Definitions (32)

  • Definition 2.1
  • Definition 2.2
  • Definition 2.3
  • Definition 2.4
  • Definition 2.5
  • Definition 2.6
  • Definition 2.7
  • Definition 2.8
  • Definition 2.9
  • Theorem 3.1
  • ...and 22 more