Comparing two graphs is a deceptively simple-sounding problem that is actually a nightmare in practice. If you have two social networks, how do you mathematically define how "similar" they are? Most traditional methods either look at local edges (which misses the big picture) or look at eigenvalues (which misses the specific structure). To make matters worse, nodes are rarely aligned; "User A" in Network 1 might be "User X" in Network 2, and finding that mapping is an NP-hard problem.
In their NeurIPS 2019 paper, Maretic et al. introduce GOT (Graph Optimal Transport), a framework that shifts the perspective from comparing matrices to comparing the distributions of signals those graphs support.
TL;DR
GOT compares graphs by treating them as generators of "smooth" signals and measuring the Wasserstein distance between these signal distributions. This approach yields a closed-form distance metric for aligned graphs and a robust stochastic optimization algorithm to align nodes across different graphs.
What Problem Does This Paper Address?
The core challenge is Graph Comparison. Existing methods generally fall into two camps:
- Matrix-based: Comparing adjacency or Laplacian matrices directly. This is extremely sensitive to noise and requires nodes to be perfectly ordered.
- Spectral-based: Comparing the "fingerprint" of the graph (eigenvalues). While permutation-invariant, this often ignores the actual structure encoded in the eigenvectors.
The authors identify a "structural gap": we need a metric that captures global topology (like community structures) while remaining computationally tractable and able to handle unaligned nodes.
Methods
1. Graphs as Signal Generators
The authors propose that a graph's identity is best captured by the smooth signals it allows. A smooth signal is one where connected nodes have similar values. Mathematically, they model these signals as a multivariate Gaussian distribution: $$\mathcal{N}(0, L^\dagger)$$ where $L^\dagger$ is the pseudo-inverse of the graph Laplacian. By doing this, the "distance" between two graphs becomes the distance between two probability distributions.
2. The Wasserstein Distance
To compare these distributions, they use the 2-Wasserstein distance. For Gaussian distributions, this distance has a beautiful closed-form expression. This is a huge advantage because it avoids the heavy computational lift usually associated with Optimal Transport (OT).
3. The GOT Alignment Algorithm
When nodes aren't aligned, we need to find a permutation matrix $P$ that minimizes the distance. This is a non-convex, discrete problem. The authors solve this using two clever tricks:
- Sinkhorn Relaxation: They use the Sinkhorn operator to turn the discrete permutation search into a continuous, differentiable optimization problem.
- Bayesian Exploration: To avoid getting stuck in local minima (a common issue with graph alignment), they use a stochastic gradient descent approach that explores the space of permutations more effectively.
Key Insights and Ideas
- Global over Local: Because the Wasserstein distance on $L^\dagger$ focuses on low-frequency components, it is naturally sensitive to global changes (like merging two communities) while being robust to local noise (like adding or removing a single edge).
- The Transport Map is a Bridge: Because the method is based on OT, it doesn't just give you a distance number; it gives you a transportation plan. This allows you to "translate" data from one graph's domain to another.
- Smoothness as a Prior: By assuming signals are smooth, the authors leverage a very common property of real-world data (social networks, sensor grids, etc.), making the metric more "meaningful" for actual applications.
Datasets and Key Results
The authors evaluated GOT on several benchmarks, including synthetic graphs (Stochastic Block Models, Barabasy-Albert, Watts-Strogatz) and image-based graphs (MNIST & Fashion MNIST).
- Graph Classification: On a task to classify 100 graphs into five different random model categories, GOT achieved an accuracy of 95/100, significantly outperforming the state-of-the-art Gromov-Wasserstein (85/100) and other popular methods like FGM (81/100).
- Structural Recovery: In alignment tests, GOT was much better at preserving community structures (measured by Normalized Mutual Information) even when a large percentage of edges were randomly removed.
- Signal Transfer: The authors demonstrated that they could take the "inclination" (tilt) of a handwritten "0" and successfully transport that specific signal onto the graph of a "7" or a "9", showing that the transport map captures the underlying geometry of the data.
Limitations and Future Work
- Node Count: The current formulation assumes both graphs have the same number of nodes ($N$). While common in alignment tasks, real-world graph comparison often involves graphs of different sizes.
- Computational Complexity: The "naive" implementation involves matrix square roots and inverses, leading to $O(N^3)$ complexity. While the authors suggest using Newton's method and sparsity to speed this up, it remains a hurdle for massive-scale graphs (millions of nodes).
- The Smoothness Assumption: While powerful, this model might struggle with graphs where the interesting information is in the "high frequencies" (e.g., rapidly oscillating patterns or disassortative networks).
Overall, GOT provides a mathematically elegant and practically superior way to think about graph similarity by looking at the "vibes" (signals) the graphs produce.
Summary updated