NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning Graph Matching

Tibério S. Caetano, Julian J. McAuley, Li Cheng, Quoc V. Le, Alexander J. Smola

TL;DR

This paper introduces a novel approach to graph matching by learning the compatibility functions that define how nodes and edges should correspond between graphs. By training on human-provided matches, their method significantly improves the accuracy of standard graph matching algorithms, even outperforming state-of-the-art quadratic assignment relaxations with simple linear assignment.

What Problem Does This Paper Address?

Graph matching is a core problem in pattern recognition, used in fields like computer vision and computational biology to find correspondences between nodes of different graphs. Traditionally, this problem is framed as a Quadratic Assignment Problem (QAP), where the goal is to find an optimal mapping that maximizes compatibility between nodes (linear term) and edges (quadratic term). The challenge has been that these compatibility functions are usually handcrafted, and the QAP itself is NP-hard, requiring approximate solutions. This paper tackles a fundamental limitation: how to make these compatibility functions adapt to specific contexts or "conditions" under which the graphs are observed, aiming to mimic human intuition rather than relying on fixed, predefined rules.

Methods

The authors frame graph matching as a supervised learning problem. They propose learning a mapping from pairs of graphs to their corresponding matches. This is achieved by defining a parameterized model for the compatibility functions (both node-to-node and edge-to-edge). The learning objective is to minimize a regularized empirical risk, essentially finding model parameters that make the predicted matches align with the ground truth (human-provided) matches.

Key methodological contributions include:

  • Learning Compatibility Functions: Instead of designing compatibility functions manually, they are parameterized and learned from data. This allows the model to adapt to specific "conditions" or contexts.
  • Inverse Optimization Framework: They frame the problem as finding a discriminant function whose maximum corresponds to the optimal graph matching solution. This connects the learning objective to the QAP formulation.
  • Column Generation for Optimization: Due to the vast number of possible matches (constraints), they employ a column generation technique to efficiently solve the optimization problem, iteratively adding the most violated constraints.
  • Feature Engineering: They utilize specific feature maps for nodes (e.g., Shape Context) and edges (binary edge presence) to represent graph attributes, allowing the learned parameters to weigh the importance of these features.

Datasets

The paper evaluates their method on three datasets:

  • CMU 'house' sequence: A sequence of 111 frames of a toy house, with 30 hand-labeled landmarks per frame. This dataset is used to test performance across varying baselines (frame separation).
  • Video sequence (SAMPL dataset): A 108-frame sequence of a human face, with landmarks identified using the SUSAN corner detector. This dataset is used to evaluate performance on a more challenging sequence with potential noise.
  • Caltech 256 'bikes' dataset: Images of bicycles, where 6 key points corresponding to the bicycle frame are identified. This dataset is used for image retrieval-like scenarios.

Key Insights and Ideas

  • Learning is Crucial for Context: The paper strongly argues that fixed compatibility functions are a bottleneck. Learning allows the system to adapt to the specific context or "conditions" under which graphs are observed, leading to more human-like matching.
  • Linear Assignment Can Be Powerful with Learning: Surprisingly, simple linear assignment, when augmented with learned compatibility functions, can outperform complex, state-of-the-art quadratic assignment relaxation algorithms that rely on handcrafted features. This suggests that the "what to match" (learned compatibilities) is more critical than the "how to solve the matching problem" (complex QAP solvers) in many cases.
  • Edge Compatibility is Important: In the 'house' sequence experiment, the learned weights indicate that edge compatibility features become highly important after learning, suggesting that structural relationships are key for accurate matching.
  • Endpoint Error vs. Hamming Loss: The choice of loss function is critical. For dense landmark matching, normalized Hamming loss is suitable. However, for sparse landmark matching (like identifying specific points on a bicycle), an "endpoint error" (measuring distance to the correct match) is more appropriate.

Key Results

  • Substantial Accuracy Improvements: Across all three datasets and for both linear and quadratic assignment, learning consistently and significantly improved performance (reduced error/loss).
  • Linear Assignment + Learning Outperforms State-of-the-Art: In the 'house' sequence, linear assignment with learned compatibilities achieved performance comparable to Graduated Assignment with bistochastic normalization (a state-of-the-art QAP relaxation) but was significantly faster.
  • Learning Improves Quadratic Assignment: Introducing learning into Graduated Assignment also led to improvements in both accuracy and speed compared to non-learning versions.
  • Speed Advantage: Learning itself does not add significant computational overhead during inference. The primary speed advantage comes from using simpler linear assignment solvers when learning is applied.

Limitations and Future Work

  • Computational Cost of Training: While inference is fast, the training process, especially solving the QAP at each iteration of column generation, can still be computationally intensive.
  • Approximation in Optimization: The paper acknowledges that finding the true "worst violator" in the column generation process is hard, and they rely on approximations. This means the optimization might not be perfectly minimized.
  • Future Work: The authors suggest that learning compatibility functions could be extended to other graph-based tasks and that the framework could be adapted for multi-camera settings where different camera pairs might require different learned compatibilities. They also highlight the potential for learning more complex feature representations.

Summary updated

BibTeX
@article{caetano2009learning,
  author = {Tibério S. Caetano and Julian J. McAuley and Li Cheng and Quoc V. Le and Alexander J. Smola},
  title = {{Learning Graph Matching}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2009},
  doi = {10.1109/tpami.2009.28},
}
Figure