Image Keypoint Matching Using Graph Neural Networks

Nancy Xu, Giannis Nikolentzos, Michalis Vazirgiannis, Henrik Boström

This paper presents a refined approach to image keypoint matching by framing it as a graph matching problem and optimizing the architecture of Graph Neural Networks (GNNs) to achieve better performance with significantly lower computational overhead.

TL;DR

The authors propose a GNN-based framework that establishes correspondences between image keypoints by replacing the standard iterative weight-sharing consensus mechanism with a series of unique, non-weight-sharing GNN layers. This architectural shift, combined with a weighted ensemble of all intermediate correspondence matrices, allows the model to outperform or match state-of-the-art methods while achieving up to a 2-3x speedup in inference time.

What Problem Does This Paper Address?

Image matching—finding which point in Image A corresponds to which point in Image B—is a cornerstone of computer vision, essential for SLAM (Simultaneous Localization and Mapping) and 3D reconstruction. While deep learning has moved the field away from handcrafted descriptors (like SIFT), matching remains difficult because local features often look similar (e.g., two different tires on a car).

Recent "consensus" methods use GNNs to look at the neighborhood of a keypoint to disambiguate matches. However, the current state-of-the-art, Deep Graph Matching Consensus (DGMC), relies on a large number of iterations using a single shared GNN. This iterative process is computationally expensive and can lead to vanishing gradients during training.

Methods

The authors build upon the DGMC framework but introduce three critical modifications:

  1. Series of GNNs vs. Iterative Weight Sharing: Instead of passing the correspondence matrix through the same GNN layer 20 times (weight sharing), the authors use a smaller number ($K$) of unique GNN layers ($GNN^{(1)} \dots GNN^{(K)}$). Each layer has its own trainable parameters, allowing the model to learn different levels of structural refinement in fewer steps.
  2. Weighted Ensemble of Correspondences: In previous models, only the final output of the consensus stage was used. This paper computes the final correspondence matrix as a weighted sum of all intermediate matrices (from the initial local match to the final refined stage). The weights are learned during training, allowing the model to balance local visual similarity with global structural consistency.
  3. Simplified Normalization: They replace the computationally heavy Sinkhorn algorithm (which ensures a doubly-stochastic matrix) with a simpler row-wise softmax during the initial matching phase to reduce latency without a significant loss in accuracy.

The model utilizes SplineCNN for its message-passing layers, which allows it to incorporate edge features like relative distance (isotropic) or 2D Cartesian coordinates (anisotropic) between keypoints.

Datasets

The model was evaluated on three standard benchmarks for semantic and geometric keypoint matching:

  • PASCAL-VOC: Images of 20 object categories with Berkeley keypoint annotations.
  • WILLOW-ObjectClass: A dataset featuring 5 categories (e.g., faces, motorbikes) used to test robustness across different object instances.
  • PASCAL-PF (Proposal Flow): Used specifically for geometric feature matching, where visual descriptors are unavailable, and the model must rely solely on the spatial coordinates of keypoints.

Key Insights and Ideas

  • Complexity vs. Iteration: The core "aha moment" is that increasing the complexity of the consensus stage (via unique parameters) is more efficient than increasing the number of iterations of a simpler shared layer. This reduces the "depth" required to reach a stable consensus.
  • The Value of Intermediate States: By using a weighted sum of all correspondence matrices, the model doesn't "forget" the initial local feature evidence. If the GNN refinement over-corrects, the learned weights can pull the final prediction back toward the initial (often correct) local match.
  • Anisotropy Matters: The results consistently show that "anisotropic" edge features (using X,Y coordinates) significantly outperform "isotropic" ones (using only distance). Directional context is vital for understanding the structure of an object.

Key Results

  • Speed: On the PASCAL-VOC dataset, the proposed model's anisotropic variant achieved an inference time of 94ms, compared to 158ms for DGMC—a nearly 40% reduction in latency.
  • Accuracy: On PASCAL-VOC, the model achieved a 75.0% Hits@1 score, outperforming the baseline DGMC (73.0%).
  • Geometric Matching: On PASCAL-PF, where no visual features are present, the model matched the performance of DGMC (95.7%) while being twice as fast (19ms vs 40ms).
  • Training Efficiency: Training times per epoch were also reduced by roughly 20-40% across most datasets.

Limitations and Future Work

  • Isotropic Performance Gap: On the WILLOW dataset, the "isotropic" version of the model (using only distances) performed significantly worse than the baseline. The authors note this surprise but don't provide a definitive explanation, suggesting that for certain datasets, the simpler iterative approach might be more stable when directional data is missing.
  • Scalability: While the model is faster, the memory footprint increases with the number of unique GNN layers ($K$). There is a trade-off between parameter count and the number of iterations.
  • Future Directions: The authors suggest exploring different GNN architectures beyond SplineCNN and investigating how this approach handles larger-scale graphs with thousands of keypoints, which are common in high-resolution SLAM applications.

Summary updated

BibTeX
@inproceedings{xu2021image,
  author = {Nancy Xu and Giannis Nikolentzos and Michalis Vazirgiannis and Henrik Boström},
  title = {{Image Keypoint Matching Using Graph Neural Networks}},
  booktitle = {COMPLEX NETWORKS},
  year = {2021},
  url = {https://openreview.net/forum?id=r2564v0FEF},
}
Figure