Abstract
This paper introduces PREGM, a novel end-to-end deep graph matching network that significantly improves semantic keypoint matching by explicitly modeling the spatial structure of graphs. It achieves this using a Positional Reconstruction Encoder-Decoder (PR-EnDec) that learns affine-invariant positional embeddings by reconstructing high-order spatial relationships like relative distances and triangle areas. This approach allows the model to capture intrinsic geometric layouts that traditional visual-feature-only methods miss.
Introduction
In computer vision, finding correspondences between images (e.g., matching the headlights of a car in two different photos) is often framed as a graph matching problem. Keypoints act as nodes, and their spatial relationships act as edges.
While recent deep learning methods have become highly proficient at matching the visual appearance of these nodes using Convolutional Neural Networks (CNNs), they surprisingly underutilize the actual physical locations (2D coordinates) of the keypoints. Existing methods usually just use coordinates to build basic graph edges (like Delaunay triangulation) but fail to capture the broader, high-order geometric layout of the object. The challenge is twofold: simple pairwise distances aren't enough to understand complex shapes, and raw 2D coordinates are too simplistic to easily fuse with rich, high-dimensional visual features.
Methodology
To solve this, the authors propose the PREGM (Positional Reconstruction Encoder-Decoder Graph Matching) network.
The core innovation driving PREGM is the PR-EnDec module, which is trained in a separate pre-training stage before the main graph matching task.
The module operates in three main steps:
- Positional Encoder: Takes the raw 2D coordinates of the keypoints and passes them through MLPs and self-attention blocks. It is trained using a contrastive loss to ensure affine transformation invariance—meaning the spatial embeddings remain consistent even if the object in the image is scaled, translated, or rotated.
- Spatial Relation Decoder: To force the encoder to truly understand the geometry, the decoder randomly samples triplets of nodes (forming triangles) and tries to reconstruct their Euclidean distances and triangle areas strictly from the encoder's embeddings.
- Integration: Once pre-trained, the decoder is discarded. The frozen Positional Encoder generates spatial embeddings that are concatenated with standard visual features (extracted via VGG16). These fused features are then fed into a message-passing Graph Neural Network (SplineCNN) and a differentiable combinatorial solver (LPMP) to predict the final keypoint matches.
Datasets
The authors evaluated PREGM on four public keypoint matching benchmarks:
- PascalVOC: 20 object classes with diverse scales, poses, and illuminations. A standard, challenging benchmark.
- Willow ObjectClass: 5 categories (faces, ducks, cars, etc.). A relatively simpler dataset.
- SPair-71k: A newer, high-quality dataset with rich annotations, varied viewpoints, and occlusion differences.
- IMC-PT-SparseGM: A large-scale real-world dataset featuring 16 tourist attractions, testing the model's viability for real-world applications like Structure from Motion (SfM).
Key Insights
- Geometry is just as important as appearance: Relying solely on visual features leaves performance on the table. Explicitly forcing the network to understand the 2D layout provides a massive boost to matching accuracy.
- Reconstruction forces structural understanding: By making the network predict triangle areas and distances (a high-order spatial relationship), the latent positional embeddings become highly expressive of the overall graph topology, rather than just local neighborhoods.
- Positional features alone are surprisingly powerful: In an ablation study, the authors completely removed the VGG16 visual features and relied only on the positional encoder. The model still achieved 76.8% accuracy on PascalVOC. This proves that the sheer geometric layout of keypoints is highly discriminative on its own.
Key Results
PREGM consistently outperformed state-of-the-art (SOTA) baselines across all tested datasets:
- PascalVOC: Achieved 84.1% average accuracy, beating the previous SOTA (COMMON at 82.7%).
- Willow ObjectClass: Reached up to 99.3% accuracy, effectively maxing out the benchmark.
- SPair-71k: Achieved 82.4% accuracy, outperforming strong baselines like BBGM (78.9%).
- IMC-PT-SparseGM: Scored 90.7% average accuracy, significantly beating BBGM (88.4%) and proving its worth on complex, real-world scenes.
- Ablation: Removing the spatial relation decoder dropped accuracy from 84.1% to 81.7%, highlighting that reconstructing high-order geometry is the main driver of the performance boost.
Limitations and Future Work
The authors note that the model is somewhat sensitive to the hyperparameter $\lambda$, which balances the contrastive loss and the reconstruction loss during pre-training. For future work, they suggest optimizing the positional encoder's loss function to extract even "purer" spatial structural information. Additionally, they plan to explore more sophisticated feature fusion methods—moving beyond simple linear concatenation—to better marry the visual and positional representations.
Summary updated