Abstract
Accurately matching local features between a pair of images is a challenging computer vision task. Previous studies typically use attention-based graph neural networks (GNNs) with fully-connected graphs over keypoints within/across images for visual and geometric information reasoning. However, in the context of feature matching, considerable keypoints are non-repeatable due to occlusion and failure of the detector, and thus irrelevant for message passing. The connectivity with non-repeatable keypoints not only introduces redundancy, resulting in limited efficiency, but also interferes with the representation aggregation process, leading to limited accuracy. Targeting towards high accuracy and efficiency, we propose MaKeGNN, a sparse attention-based GNN architecture which bypasses non-repeatable keypoints and leverages matchable ones to guide compact and meaningful message passing. More specifically, our Bilateral Context-Aware Sampling Module first dynamically samples two small sets of well-distributed keypoints with high matchability scores from the image pair. Then, our Matchable Keypoint-Assisted Context Aggregation Module regards sampled informative keypoints as message bottlenecks and thus constrains each keypoint only to retrieve favorable contextual information from intra- and inter-matchable keypoints, evading the interference of irrelevant and redundant connectivity with non-repeatable ones. Furthermore, considering the potential noise in initial keypoints and sampled matchable ones, the MKACA module adopts a matchability-guided attentional aggregation operation for purer data-dependent context propagation. By these means, we achieve the state-of-the-art performance on relative camera estimation, fundamental matrix estimation, and visual localization, while significantly reducing computational and memory complexity compared to typical attentional GNNs.
Introduction
Feature matching—the identification of corresponding points between two different images of the same scene—is a cornerstone of computer vision, enabling applications from panoramic stitching to autonomous navigation. While deep learning, particularly attention-based Graph Neural Networks (GNNs), has significantly advanced the field, current state-of-the-art models often face a trade-off between accuracy and computational efficiency.
Most modern pipelines, such as SuperGlue, treat every detected keypoint as equally important, constructing fully-connected graphs where every point communicates with every other point within and across images. However, in typical image pairs, up to 70% of detected keypoints are "non-repeatable" due to occlusions or detector failures. In a dense graph, these irrelevant points act as noise, degrading feature representations and leading to $O(N^2)$ computational complexity. MaKeGNN addresses this by focusing message passing on a sparse set of "matchable" keypoints.
Methodology: The MaKeGNN Architecture
MaKeGNN introduces a "sparse-to-fine" approach to message passing, utilizing three primary components to streamline information flow.
Initialization Context Aggregation (ICA)
Before matchability can be predicted, keypoints require initial context. The ICA module performs coarse message passing over $L_1$ layers to provide the necessary global information for subsequent modules.
Bilateral Context-Aware Sampling (BCAS)
The BCAS module identifies the most informative keypoints by looking at both images simultaneously. It predicts a "matchability score" for every keypoint and employs Non-Maximum Suppression (NMS) to select a small, well-distributed set of $k$ "matchable" keypoints. This bilateral approach ensures that the selected points are likely to have correspondences in the other image.
Matchable Keypoint-Assisted Context Aggregation (MKACA)
The MKACA module is the core of MaKeGNN’s efficiency. Instead of a fully-connected graph, the $N$ total keypoints only retrieve information from the $k$ sampled matchable points. These $k$ points serve as information bottlenecks, filtering out noise from non-repeatable points and reducing complexity to $O(Nk)$. This module uses matchability-guided attentional aggregation to ensure pure, data-dependent context propagation.
Experimental Results
MaKeGNN was evaluated on several benchmarks, including YFCC100M (outdoor), ScanNet (indoor), and Aachen Day-Night (localization).
Accuracy and Efficiency
As shown in the results, MaKeGNN consistently outperforms or matches the performance of SuperGlue while being significantly more efficient. On the YFCC100M dataset using RootSIFT features, MaKeGNN achieved a Pose Estimation AUC@5° of 64.73, surpassing SuperGlue’s 63.20. Similar gains were observed with SuperPoint features.
In terms of efficiency, MaKeGNN demonstrates substantial improvements. When processing 10,000 keypoints, it reduces runtime by 34.77% and memory consumption by 39.14% compared to SuperGlue. This makes high-performance feature matching more feasible for mobile and real-time applications.
Robustness
The model proved robust in challenging environments, such as the low-texture scenes in ScanNet and the extreme illumination changes in the Aachen Day-Night benchmark. By filtering out non-repeatable "noise," the remaining features become more discriminative, leading to higher localization accuracy.
Conclusion
MaKeGNN demonstrates that sparsity in GNNs is not merely a "speed hack" but a mechanism for improving accuracy by removing irrelevant information. By routing communication through matchable "bottleneck" points, the network achieves state-of-the-art performance with significantly lower computational overhead. Future research may explore applying this matchable bottleneck strategy to other transformer-based architectures in computer vision.
Summary updated