InsCLR: Improving Instance Retrieval with Self-Supervision

Zelu Deng, Yujie Zhong, Sheng Guo, Weilin Huang

Abstract

Instance retrieval aims to identify all occurrences of a specific object within a large-scale database. While self-supervised learning (SSL) has achieved remarkable success in image classification, its application to retrieval remains challenging. Standard SSL methods focus on instance discrimination, treating every image as a unique class, which fails to capture the intra-class invariance necessary for retrieval across different viewpoints. We introduce InsCLR (Instance-level Contrastive Learning for Retrieval), a novel SSL framework that dynamically mines "pseudo-positive" samples—different images of the same object—to significantly improve retrieval performance without human labels.

The Challenge of Intra-Class Invariance

The primary hurdle in unsupervised instance retrieval is the lack of diverse positive pairs. Traditional SSL methods like SimCLR or MoCo rely on data augmentations (e.g., cropping, color jittering) of a single image to create positive pairs. However, real-world retrieval requires recognizing an object across vastly different lighting, backgrounds, and angles.

Instance retrieval requires distinguishing specific objects from similar categories.

As shown in Figure 1, identifying a specific aircraft among others requires the model to learn features that are invariant to the specific instance's appearance while remaining discriminative against other similar objects. Standard augmentations are insufficient to bridge this "domain gap" between two different photographs of the same landmark or product.

The InsCLR Framework

InsCLR addresses this by moving beyond self-augmentation to cross-image positive mining. The method operates in four key stages:

  1. Candidate Pool Construction: A pre-trained model is used to identify the nearest neighbors for every image in the training set, forming a pool of potential positives.
  2. Mini-Batch Positive Selection: During training, the model identifies neighbors within the current mini-batch. Crucially, it uses unaugmented similarity—comparing raw images—to ensure the selected "pseudo-positives" are reliable.
  3. Mining with Query Sets: To further expand the positive set, InsCLR uses a "Query Set" consisting of the anchor image and its mini-batch positives. By aggregating features from this set, the model can more robustly mine additional positives from a global memory bank, effectively "triangulating" the object's core features.
  4. Contrastive Learning: The model is trained to pull the anchor and all mined pseudo-positives together in the embedding space while pushing away negatives.

Experimental Results

InsCLR was trained on a subset of the Google Landmarks Dataset v2 (GLDv2) and evaluated on standard benchmarks including Revisited Oxford (ROxf) and Revisited Paris (RPar).

Landmark retrieval is a core application for InsCLR, evaluated on datasets like Oxford and Paris.

The results demonstrate a significant breakthrough:

  • State-of-the-Art Performance: On the ROxf (medium) benchmark, InsCLR achieved 73.1 mAP, vastly outperforming standard SSL methods like MoCov2 (27.3 mAP) and SimCLR (22.2 mAP).
  • Closing the Supervision Gap: InsCLR's performance (73.1 mAP) is remarkably close to fully supervised models (76.2 mAP), despite using no human annotations.
  • Generalization: On the INSTRE dataset, InsCLR outperformed previous unsupervised methods by nearly 20 points, reaching 76.2% mAP.

Conclusion

InsCLR demonstrates that the key to successful self-supervised instance retrieval lies in mining cross-image positives rather than relying solely on image augmentations. By leveraging query sets and unaugmented similarity, InsCLR provides a robust mechanism for learning intra-class invariance, bringing unsupervised retrieval performance to near-supervised levels.

Summary updated

BibTeX
@inproceedings{deng2022insclr,
  author = {Zelu Deng and Yujie Zhong and Sheng Guo and Weilin Huang},
  title = {{InsCLR: Improving Instance Retrieval with Self-Supervision}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i1.19930},
}
Figure