GOT: An Optimal Transport framework for Graph comparison

Hermina Petric Maretic, Mireille El Gheche, Giovanni Chierchia, Pascal Frossard

Introduction

Comparing graphs is a foundational task in machine learning, with applications ranging from molecular biology to social network analysis. However, graph comparison faces two significant hurdles: the alignment problem (unknown node correspondences) and the difficulty of capturing structural meaning. Traditional metrics, such as the Frobenius norm of adjacency matrices, often fail to reflect global topological changes, such as the disconnection of a component, if only a few edges are modified.

The GOT Framework

The Graph Optimal Transport (GOT) framework addresses these challenges by shifting the focus from direct matrix comparison to the comparison of probability distributions. The core idea is to model the "shape" of a graph through the smooth signals it supports.

Smooth Signal Modeling

GOT assumes that natural signals on a graph—where connected nodes tend to have similar values—follow a zero-mean Gaussian distribution. The covariance of this distribution is defined by the Moore-Penrose pseudoinverse of the graph Laplacian ($L^\dagger$). By comparing these distributions using the 2-Wasserstein distance, the framework gains a structurally sensitive metric.

Handling Unaligned Graphs

To compare graphs without known node labels, GOT seeks the permutation matrix $P$ that minimizes the Wasserstein distance between the signal distributions. Because finding a discrete permutation is computationally intractable (factorial complexity), the authors employ two key strategies:

  1. Sinkhorn Relaxation: The discrete constraint is relaxed into a continuous, differentiable space using the Sinkhorn operator.
  2. Stochastic Optimization: A Bayesian-inspired stochastic gradient descent algorithm is used to explore the parameter space and avoid local minima.
Figure 2: Comparison of structural sensitivity. While the Frobenius norm (L-norm) treats the changes in G2 and G3 as identical, the Wasserstein distance correctly identifies that G2 is structurally more distant from G1 due to the loss of global connectivity.

Experimental Evaluation

The authors evaluated GOT against synthetic random graphs (Stochastic Block Models, Barabási-Albert, etc.) and image-based graph signals (MNIST).

Key Results

  • Structural Sensitivity: As illustrated in Figure 2, GOT captures global topology better than Euclidean metrics. In the example, removing a critical bridge that disconnects the graph results in a much larger Wasserstein distance than removing an edge that leaves the graph connected, even when the number of edges removed is the same.
  • Superior Alignment and Classification: In 1-Nearest Neighbor classification across five random graph models, GOT achieved 95% accuracy, significantly outperforming Gromov-Wasserstein (85%) and other traditional matching methods.
  • Semantic Signal Transfer: Experiments on MNIST showed that the transport plan is semantically meaningful. For instance, transporting a "tilted" digit zero to the domain of a digit six preserves the tilt, demonstrating that the framework captures the relationship between the signal and the underlying graph structure.
Figure 5: Illustration of the alignment process. (a) and (b) show two unaligned graphs. (c) shows the soft solution matrix P, and (d) shows the final recovered permutation matrix that aligns the nodes.

Discussion and Future Work

GOT provides a robust, theoretically grounded method for graph comparison that excels at capturing global topology and recovering node alignments. However, the current implementation has a computational complexity of $O(N^3)$ due to matrix inversions, making it challenging for very large graphs. Furthermore, the framework currently assumes both graphs have the same number of nodes. Future research will likely focus on scaling the algorithm to larger, heterogeneous graphs and exploring non-Gaussian signal dynamics.

Summary updated

BibTeX
@inproceedings{maretic2019got,
  author = {Hermina Petric Maretic and Mireille El Gheche and Giovanni Chierchia and Pascal Frossard},
  title = {{GOT: An Optimal Transport framework for Graph comparison}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure