Self-supervised Learning of Visual Graph Matching

Chang Liu, Shaofeng Zhang, Xiaokang Yang, Junchi Yan

Abstract

Graph Matching (GM) is a fundamental task in computer vision that involves finding correspondences between sets of points in different images. While supervised deep learning models have achieved state-of-the-art performance, they are limited by the requirement for large-scale, manually labeled datasets. We present SCGM (Self-supervised Contrastive Graph Matching), a novel framework that learns visual graph matching without any human-provided labels. SCGM utilizes a two-stage augmentation process—image-level and graph-level—to generate training pairs with mathematically guaranteed ground truth. A key contribution is the "Node Mixing" strategy, which interpolates node features and matching matrices to regularize the model. Our results demonstrate that SCGM not only significantly outperforms previous unsupervised methods but also surpasses some supervised baselines on standard benchmarks like Pascal VOC.

Introduction

Graph Matching (GM) aims to establish correspondences between nodes in two different graphs, typically representing keypoints in images. While deep learning has pushed the state-of-the-art in GM, most models are supervised, requiring massive datasets where humans have manually labeled every corresponding pair of points. This labeling process is tedious, expensive, and often impractical for complex real-world data.

Previous unsupervised attempts often still required category labels (e.g., knowing both images contain a cat). SCGM tackles the "label-free" challenge: learning to match graphs using only raw images, without knowing the object categories or which points correspond to which.

The SCGM Framework

The core idea behind SCGM is to create a pretext task where the ground truth is known by construction. The framework is designed as a "wrapper" that can take existing high-performance supervised GM solvers (such as BBGM or NGMv2) and train them in a self-supervised fashion.

Overview of the SCGM training pipeline, showing the flow from image augmentation to the GM solver.

As shown in the pipeline above, the process involves two main stages of augmentation:

  1. Image-Level Augmentation: A single image is transformed into two different "views" using standard techniques like cropping, blurring, and color jittering.
  2. Graph-Level Augmentation: Graphs are extracted from these views. Because both views originate from the same image, the "ground truth" matching matrix is initially the identity matrix, which the model can use for training without human input.

Node-Level Contrastive Learning and Node Mixing

Standard self-supervised models often focus on global image features. However, graph matching requires fine-grained spatial details. SCGM introduces a node-level contrastive objective that forces the encoder to ensure the feature vector for a specific node (e.g., a wheel) is similar to its counterpart in the augmented view but different from all other nodes in the batch.

To further improve robustness, the authors introduce a Node Mixing strategy inspired by Mixup.

The Node Mixing strategy: node features from View A are permuted and mixed with original features to create a challenging pretext task.

In this strategy, node features from one view are linearly interpolated. By interpolating node features and their corresponding labels (the matching matrix), the model is prevented from over-fitting to specific visual patterns. This acts as a powerful regularizer, forcing the backbone to capture more generalized geometric and visual relationships.

Experimental Results

The authors evaluated SCGM on three major benchmarks: Pascal VOC, Willow Object, and SPair-71k.

  • Performance vs. Supervised Models: On Pascal VOC, SCGM achieved 57.1% accuracy in a label-free setting, outperforming the supervised GMN (55.3%).
  • Gains over Unsupervised Baselines: Compared to the previous leading self-supervised method (GANN), SCGM improved accuracy by over 10% on the Pascal VOC "all keypoints" benchmark.
  • Transfer Learning: When used as a pre-training step, SCGM consistently outperformed standard ImageNet pre-training. Fine-tuning with only 20% of labeled data using SCGM weights yielded results comparable to using much more data with standard weights.

Conclusion and Future Work

SCGM demonstrates that high-quality visual graph matching can be learned without human labels by leveraging the inherent structure of single images through augmentation. While the model shows impressive generalization, it still faces challenges with entirely unseen geometries (e.g., the "duck" problem when pre-trained only on Pascal VOC). Future research will focus on adapting the framework for partial matching scenarios where many nodes may not have a counterpart in the target image.

Summary updated

BibTeX
@inproceedings{liu2022self,
  author = {Chang Liu and Shaofeng Zhang and Xiaokang Yang and Junchi Yan},
  title = {{Self-supervised Learning of Visual Graph Matching}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-20050-2\_22},
}
Figure