TL;DR
This paper introduces Minimum Mean Factorization Distance (MMFD), a novel and highly efficient metric for measuring the dissimilarity between graphs by treating their adjacency matrices as kernel matrices of hidden distributions. By leveraging a surprising closed-form solution and low-rank approximations, MMFD and its generalized version (MFD) achieve state-of-the-art clustering accuracy while drastically reducing computational time compared to traditional methods like Graph Edit Distance or Gromov-Wasserstein.
What Problem Does This Paper Address?
Measuring the similarity or distance between two graphs is a foundational task in network analysis, computational biology, and social network mining. However, because graphs are non-Euclidean, comparing them is notoriously difficult.
Traditional methods face severe scalability issues:
- Graph Edit Distance (GED) is NP-hard.
- Graph Kernels and Gromov-Wasserstein Distance (GWD) typically scale at $O(n^3)$ or worse, making them unusable for large graphs.
- Unsupervised Graph Representation Learning (UGRL) via Graph Neural Networks (GNNs) scales better but requires painful hyperparameter tuning and remains computationally heavy for massive datasets.
The authors tackle the need for a graph distance metric that is mathematically principled, highly accurate for downstream tasks like clustering, and fast enough to scale to datasets with thousands of large graphs.
Methods
The authors propose a paradigm shift: treat the adjacency matrix of a graph as a kernel matrix generated by some unknown function acting on a discrete distribution of node features. Comparing two graphs then becomes a proxy task of comparing two distributions.
- MMFD (Minimum Mean Factorization Distance): To compare two graphs, the authors factorize their adjacency matrices (using Singular Value Decomposition to handle indefinite matrices) to create Positive Semi-Definite (PSD) proxies. They then seek the optimal rotation matrix to align these two feature spaces and compare their mean vectors.
- The Magic Trick: The authors mathematically prove that this complex alignment problem has a closed-form solution. You don't actually have to compute the rotation matrix; the distance boils down to a simple arithmetic difference between the sums of the elements of their PSD proxy matrices.
- Low-Rank MMFD ($MMFD_{LR}$): To speed up the SVD step for large graphs, they use randomized SVD to create a low-rank approximation, dropping the time complexity to $O(n^2 \log d + d^2 n)$.
- MFD (Minimum Factorization Distance): A generalization of MMFD. Instead of just comparing the means of the distributions, MFD compares the full distributions using a non-linear kernel (like a Gaussian kernel). This requires an iterative optimization algorithm rather than a closed-form solution.
- Large-Scale Clustering (MMFD-KM & MFD-KD): Standard spectral clustering requires computing an $N \times N$ distance matrix for $N$ graphs ($O(N^2)$ complexity). The authors adapt their metrics into K-means-style algorithms that scale linearly ($O(N)$), allowing them to cluster massive graph datasets efficiently.
Datasets
The authors evaluated their methods on synthetic toy graphs (for intuition) and several real-world benchmarks:
- TUDatasets: AIDS (molecules), PROTEINS, ENZYMES (biology), REDDIT-MULTI-5K, DBLP-v1, REDDIT-MULTI-12K (social networks).
- QM9: Used specifically for a chemical molecular property prediction (regression) task.
Key Insights and Ideas
- The Closed-Form Miracle: The biggest "aha" moment is Theorem 2.4. A complex optimization problem over orthonormal matrices (an orthogonal Procrustes problem) collapses into a trivial arithmetic operation. This is what gives MMFD its blazing speed.
- Distributions as Proxies: Viewing graphs not just as nodes and edges, but as discrete distributions in a latent space, provides a mathematically rigorous yet flexible way to bypass the rigidness of traditional graph isomorphism tests.
- Low-Rank Denoising: The low-rank approximation ($MMFD_{LR}$) doesn't just speed things up; it actually acts as a denoiser. By dropping smaller singular values, it filters out structural noise, making the algorithm better at distinguishing highly similar graphs than the full-rank version.
Key Results
- Blazing Speed: $MMFD_{LR}$ is exceptionally fast. On the AIDS dataset, computing the distance matrix took 0.26 seconds, compared to 0.81s for the WL-kernel and a massive 25,544 seconds for Entropic GWD.
- Superior Accuracy: MMFD and MFD consistently outperformed strong baselines—including recent deep learning methods like GLCC and DCGLC—across clustering metrics (Accuracy, NMI, ARI). For instance, on the AIDS dataset, MFD achieved 99.45% accuracy compared to DCGLC's 96.77%.
- Massive Scalability: The linear-time clustering variants (MMFD-KM and MFD-KD) successfully clustered massive datasets (like REDDIT-MULTI-12K) where traditional $O(N^2)$ kernel methods either ran out of memory or took over 12 hours.
Limitations and Future Work
- Computational Cost of MFD: While MMFD is lightning-fast due to its closed-form solution, the generalized MFD requires iterative optimization, making it significantly slower (though still more accurate).
- Unexplored EMD Variant: The authors propose an Earth Mover's Distance (EMD) variant of MFD in the appendix but note that its optimization is currently too computationally expensive to yield practical numerical results.
- Node Attribute Integration: Currently, node attributes are incorporated by building a k-NN graph of the attributes and appending it to the original adjacency matrix. The authors acknowledge this is somewhat rudimentary and suggest that using Graph Neural Networks (GNNs) to exploit node attributes more effectively is a promising direction for future work.
Summary updated