Deep Graph Matching via Blackbox Differentiation of Combinatorial Solvers

Michal Rolínek, Paul Swoboda, Dominik Zietlow, Anselm Paulus, Vít Musil, Georg Martius

Introduction

Matching discrete structures is a fundamental task in computer vision, essential for applications such as object tracking, 3D medical scan alignment, and finding correspondences between images. Traditionally, this problem has been approached using two distinct toolkits: Deep Learning (DL) for extracting high-dimensional features from raw pixels, and Combinatorial Optimization (CO) for solving the discrete matching problem under strict geometric constraints.

Examples of keypoint matching across different object categories (lamb, chair) using the BB-GM framework.

The primary obstacle in combining these approaches is that CO solvers are typically non-differentiable "black boxes." Because their outputs are discrete, they do not provide the gradients necessary for standard backpropagation, preventing end-to-end training. This paper introduces BB-GM (Blackbox Differentiation of Graph Matching), a framework that allows unmodified, high-performance combinatorial solvers to be integrated directly into deep learning pipelines.

The Challenge of Combinatorial Generalization

While deep neural networks excel at pattern recognition, they often struggle with "combinatorial generalization." For instance, a network might recognize the components of a bicycle but fail to understand the rigid constraints—such as the fact that two wheels cannot occupy the same spatial location.

To circumvent the non-differentiability of CO solvers, researchers have historically used "differentiable relaxations." However, these "softened" versions of the problem often result in weaker matching performance compared to specialized discrete solvers. BB-GM addresses this by maintaining the power of discrete solvers while enabling the network to learn from their outputs.

Methodology: BB-GM Architecture

The BB-GM architecture follows a three-stage pipeline:

  1. Feature Extraction: A VGG16 backbone extracts local visual features for keypoints alongside a global feature vector representing the entire image context.
  2. Geometric Refinement: A graph neural network (SplineCNN) refines these features by analyzing the relative spatial relationships between keypoints.
  3. The Blackbox Solver: Affinity scores derived from the refined features are fed into a dual block coordinate ascent solver to produce the final discrete matching.

To enable training, the authors utilize a mathematical technique called "implicit interpolation." Since the solver's gradient is zero almost everywhere, they estimate a surrogate gradient by evaluating the solver twice: once with the original costs and once with costs perturbed by the loss. This creates a continuous interpolation of the piecewise-constant loss landscape, allowing the network to optimize its feature extraction based on the solver's performance.

Visualization of the loss landscape and its continuous interpolation for different values of λ. This technique allows for backpropagation through discrete combinatorial solvers.

Experimental Evaluation

The authors evaluated BB-GM on several keypoint matching benchmarks, including Pascal VOC, Willow ObjectClass, and the larger SPair-71k dataset.

  • Pascal VOC: BB-GM achieved a significant jump in accuracy to 80.1%, compared to the previous state-of-the-art of 73.2%.
  • SPair-71k: On this challenging dataset, the model reached 78.9% accuracy, outperforming the baseline of 72.2%.
  • Robustness: The model was tested in "unfiltered" setups where some keypoints have no valid matches. BB-GM maintained a high F1-score (61.4%), demonstrating superior handling of outliers compared to models forced to find a match for every point.

Discussion and Future Work

Key insights from the study suggest that global attention is vital for matching, as it helps the model understand viewpoint and scale. Furthermore, because the solver handles the logical constraints, the model is remarkably robust to changes in training settings, such as varying numbers of keypoints at test time.

While powerful, the system's performance remains tied to the quality of the visual backbone. Future research directions include upgrading the neural architecture for better cost production, exploring hypergraph matching solvers for more complex geometric relationships, and applying this blackbox differentiation approach to other combinatorial problems like Multicut or Max-Cut.

Summary updated

BibTeX
@inproceedings{rolinek2020deep,
  author = {Michal Rolínek and Paul Swoboda and Dominik Zietlow and Anselm Paulus and Vít Musil and Georg Martius},
  title = {{Deep Graph Matching via Blackbox Differentiation of Combinatorial Solvers}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58604-1\_25},
}
Figure