TL;DR
PSimGNN is a novel framework that tackles the "large graph" similarity problem by partitioning graphs into local subgraphs before matching. By combining coarse-grained subgraph interactions with fine-grained node-level comparisons on only the most promising subgraph pairs, it achieves a superior trade-off between accuracy and computational efficiency compared to traditional node-matching or whole-graph embedding methods.
What Problem Does This Paper Address?
Calculating how similar two graphs are is a fundamental task in fields like drug discovery (comparing chemical compounds) and computer vision. Standard metrics like Graph Edit Distance (GED) are NP-hard to compute, becoming practically impossible for graphs with more than 16 nodes.
Recent deep learning approaches have tried to solve this, but they fall into two problematic camps:
- Embedding Models: These compress an entire graph into a single vector. While fast, they lose critical local structural details, leading to poor accuracy on large, complex graphs.
- Matching Models: These compare every node in one graph to every node in another. While accurate, their computational cost grows quadratically ($O(N^2)$) with the number of nodes, making them too slow for large-scale real-world applications.
PSimGNN aims to bridge this gap, providing a scalable way to compute similarity for large graphs without sacrificing the fine-grained details that define their structure.
Methods
The authors introduce a hierarchical approach called PSimGNN (Partition based Similarity GNN). The workflow consists of four main stages:
- Graph Partitioning: Each input graph is divided into $k$ subgraphs using the Fluid Communities (FluidC) algorithm. This step is crucial because it isolates local structural features (like functional groups in a molecule) that might be "washed out" in a global embedding.
- Subgraph Embedding: The model uses a Graph Isomorphism Network (GIN) to generate node embeddings. These are then aggregated into a single vector for each subgraph using an attention mechanism, which learns to prioritize the most representative nodes.
- Coarse-Grained Interaction: The model computes the similarity between all possible pairs of subgraphs from the two input graphs. This provides a high-level "map" of how the local parts of the graphs relate to each other.
- Fine-Grained Comparison: To save time, the model doesn't perform node-level matching everywhere. Instead, it selects the top-$m$ most similar subgraph pairs and performs detailed node-to-node comparisons within those specific regions.
Finally, a Multilayer Perceptron (MLP) integrates both the coarse and fine information to predict a final similarity score.
Datasets
The researchers evaluated PSimGNN on both standard benchmarks and new, larger datasets:
- Small Standard Datasets: AIDS (chemical compounds), LINUX (program dependency graphs), and IMDB (actor ego-networks).
- Large Synthetic Datasets: The authors generated three new datasets based on the Barabási–Albert (BA) model (BA-60, BA-100, BA-200), named after their average node counts. These simulate the "scale-free" nature of real-world social and biological networks.
- IMDB-X: A filtered version of the IMDB dataset specifically containing larger, sparser graphs suitable for partitioning.
Key Insights and Ideas
- Efficiency through Sparsity: By only performing node-level matching on the top-$m$ subgraph pairs, PSimGNN avoids the $O(N^2)$ bottleneck. The parameter $m$ acts as a "knob" that engineers can turn to balance speed and accuracy.
- Local is Vocal: The paper argues that for large graphs, local features are often more informative than the global structure. Partitioning (shown in Figure 6) allows the model to "see" these clusters explicitly.
- Attention-Driven Aggregation: Rather than simple averaging, the attention mechanism allows the model to identify "hub" nodes that are central to a subgraph's identity, leading to more robust embeddings.
Key Results
- Accuracy: PSimGNN consistently outperformed state-of-the-art models like SimGNN and GMN on large-scale datasets (BA-100, BA-200, and IMDB-X). For example, on the BA-200 dataset, PSimGNN achieved a Mean Squared Error (MSE) of 0.06, significantly lower than SimGNN's 0.84.
- Scalability: As graph size increased, PSimGNN's runtime grew much more slowly than node-matching models. On the BA-200 dataset, PSimGNN was roughly 25% faster than GMN while providing better accuracy.
- Robustness: Even on small graphs where partitioning isn't strictly necessary, PSimGNN remained competitive, proving it is a versatile framework across different scales.
Limitations and Future Work
- Dense Graphs: The authors note that PSimGNN is less effective for very dense graphs, where it is difficult to find distinct, meaningful local subgraphs.
- Ground Truth Constraints: Because exact GED is impossible to compute for large graphs, the model is trained against approximate GED values. The quality of the model is inherently capped by the quality of these approximations.
- Future Directions: The team suggests exploring "soft" clustering (where nodes can belong to multiple subgraphs) and incorporating edge labels (like chemical bond types) to further improve representation power.
Summary updated