Skip to main content
QUICK REVIEW

[Paper Review] Graph Matching Networks for Learning the Similarity of Graph Structured Objects

Yujia Li, Chenjie Gu|arXiv (Cornell University)|Apr 29, 2019
Advanced Graph Neural NetworksComputer Science234 citations
TL;DR

The paper introduces Graph Matching Networks (GMNs) that compute graph similarity by cross-graph attention, outperforming embedding-based GNNs and hand-engineered baselines on graph similarity tasks including binary function CFGs.

ABSTRACT

This paper addresses the challenging problem of retrieval and matching of graph structured objects, and makes two key contributions. First, we demonstrate how Graph Neural Networks (GNN), which have emerged as an effective model for various supervised prediction problems defined on structured data, can be trained to produce embedding of graphs in vector spaces that enables efficient similarity reasoning. Second, we propose a novel Graph Matching Network model that, given a pair of graphs as input, computes a similarity score between them by jointly reasoning on the pair through a new cross-graph attention-based matching mechanism. We demonstrate the effectiveness of our models on different domains including the challenging problem of control-flow-graph based function similarity search that plays an important role in the detection of vulnerabilities in software systems. The experimental analysis demonstrates that our models are not only able to exploit structure in the context of similarity learning but they can also outperform domain-specific baseline systems that have been carefully hand-engineered for these problems.

Motivation & Objective

  • Demonstrate that GNNs can learn graph embeddings for similarity reasoning.
  • Introduce Graph Matching Networks that jointly reason on graph pairs via cross-graph attention.
  • Show GMNs outperform hand-engineered baselines and structure-agnostic models across domains such as CFG-based function similarity and mesh retrieval.
  • Evaluate efficiency and trade-offs between embedding-based and matching approaches in graph similarity tasks.

Proposed method

  • Three-part graph embedding model: encoder converts node/edge features to initial vectors; propagation layers update node representations; aggregator forms a graph vector and computes similarity.
  • Graph Matching Networks (GMNs) modify the node update to include a cross-graph matching vector via an attention-based mechanism across graph pairs; cross-graph attention weights align nodes and capture differences.
  • Cross-graph attention: a_j->i = exp(s_h(h_i^(t), h_j^(t))) / sum_j' exp(s_h(h_i^(t), h_j'^(t))); mu_j->i = a_j->i (h_i^(t) - h_j^(t)); h_i^(t+1) = f_node(h_i^(t), sum_j m_j->i, sum_j' mu_j'->i).
  • Learning signals: pairwise margin loss L_pair and triplet loss L_triplet on Euclidean distance between graph embeddings; optional binary/hamming variant using tanh for fast retrieval.

Experimental results

Research questions

  • RQ1Can GNNs produce effective graph embeddings for similarity tasks?
  • RQ2Does a cross-graph attention mechanism (GMN) improve similarity judgments over independent embeddings?
  • RQ3What is the performance trade-off between embedding-based and matching-based approaches on real and synthetic graph similarity problems?
  • RQ4How do GMNs perform on CFG-based binary function similarity and mesh retrieval compared to baselines?

Key findings

  • GMNs consistently outperform graph embedding models (GNNs) across tasks.
  • GMNs outperform hand-engineered baselines and WL-kernel baselines in graph similarity settings.
  • Cross-graph attention enables alignment when graphs match and highlights differences when they do not, improving sensitivity to structural/semantic variations.
  • On graph edit distance proxy tasks, GMNs achieve higher pair AUC and triplet accuracy than GNNs and WL kernel baselines.
  • In function similarity search, GMNs outperform embedding and Siamese variants, demonstrating the value of early cross-graph communication.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.