Abstract
Self-supervised learning (SSL) has achieved remarkable success in image-level tasks, yet a performance gap remains when transferring these models to dense prediction tasks like object detection and instance segmentation. We present InsCon (Instance Consistency), a framework that extends contrastive learning by introducing multi-instance and fine-grained cell-instance consistency heads. By aligning features across collated views and localized spatial grids, InsCon learns representations that are both semantically robust and spatially precise. Experimental results on ImageNet, COCO, and PASCAL VOC demonstrate that InsCon consistently outperforms state-of-the-art baselines like MoCo v2, bridging the gap between pretext pre-training and complex downstream visual tasks.
Introduction
Most self-supervised learning (SSL) methods, such as MoCo and SimCLR, focus on image-level contrastive learning. They treat an entire image as a single "instance" and attempt to match different augmented views of that same image. While this approach is effective for image classification—where a single primary object typically dominates the frame—it creates a "pretext-downstream gap" for tasks like object detection and instance segmentation. These complex tasks require models to recognize and locate multiple objects within a single frame and identify precise boundaries through fine-grained spatial information. Standard SSL often ignores these requirements, leading to sub-optimal performance when the pre-trained model is transferred to more complex visual tasks.
Methodology
The proposed InsCon framework builds upon the MoCo v2 architecture, augmenting it with two novel learning heads designed to work alongside the standard single-instance head.
Multi-Instance Consistency
Instead of a single image, the query encoder receives a "collage" of four different augmented views from the same batch. The model must align the features of this mixed view with the individual "key" features of the original images. This forces the network to learn how to represent multiple distinct objects simultaneously, effectively simulating a detection-like environment during the self-supervised phase.
Cell-Instance Consistency
To capture fine-grained spatial details, the cell-instance head focuses on overlapping regions between two augmented views of the same image. It divides these overlapping areas into a $3 \times 3$ grid of "cells." Using Precise ROI Pooling, the model ensures that the feature representation for a specific spatial cell is consistent across different views. This "spatial glue" is crucial for accurate boundary localization and edge detection.
Feature Processing and Unified Loss
The framework utilizes a ResNet-50 backbone followed by specific pooling and projection layers. As shown in the detailed architecture, the output of the ResNet is processed through Adaptive Average Pooling and a multi-layer perceptron (MLP) to produce the final embeddings used for contrastive loss.
The total loss function is a unified sum of the InfoNCE (contrastive) losses from all three heads: $$L_{total} = L_{single} + L_{multi} + L_{cell}$$ These losses are weighted equally, ensuring a balance between global context, object-level complexity, and local precision.
Experimental Results
InsCon was pre-trained on ImageNet-1K and evaluated across several downstream benchmarks, consistently outperforming the MoCo v2 baseline and other state-of-the-art SSL methods.
- Object Detection and Segmentation: On COCO 2017, InsCon achieved 40.9% $AP^{bb}$ and 36.9% $AP^{mk}$, representing improvements of 1.1% and 1.0% over MoCo v2, respectively. On PASCAL VOC, detection performance reached 59.1% $AP^{bb}$, surpassing the baseline by 2.1%.
- Linear Classification: Interestingly, the multi-instance approach also boosted ImageNet-1K linear classification accuracy to 70.3% (up from 67.5% for MoCo v2), proving that multi-instance training enhances general semantic understanding.
Discussion and Future Work
Ablation studies confirm that the three heads are highly complementary. The single-instance head provides global context, the multi-instance head handles object-level complexity, and the cell-instance head provides local precision.
However, some limitations remain. The current evaluation primarily focuses on the ResNet-50 backbone; future work should explore modern architectures like Vision Transformers (ViT). Additionally, the inclusion of extra heads and Precise ROI Pooling increases computational overhead. Finally, performance is sensitive to hyperparameters such as the temperature coefficient and the specific ResNet stage used for the cell-instance head, suggesting that further optimization could yield even better results across diverse datasets.
Summary updated