Abstract
Traditional unsupervised representation learning often suffers from granularity bias, focusing either on global scene-level features or local pixel-level details. This paper introduces Multi-Grained Contrast (MGC), a framework that aligns image representations across multiple granularities simultaneously. By establishing correspondences from fine-grained patches to global scenes, MGC enables Vision Transformers (ViTs) to achieve superior data efficiency and versatility across diverse downstream tasks, including object detection, instance segmentation, and keypoint localization.
The Challenge: Granularity Bias
In unsupervised representation learning, contrastive methods typically teach a model that two augmented views of the same image are identical while others are distinct. However, most existing methods are limited by a specific scale of focus.
Methods focusing on global features excel at classification but struggle with small-object detection. Conversely, pixel-level methods are effective for segmentation but often lose the broader scene context. This granularity bias hinders a model's ability to transfer across the full spectrum of visual tasks, which range from coarse scene parsing to surgical keypoint detection.
Furthermore, Vision Transformers (ViTs) are notoriously data-hungry, often requiring massive datasets like ImageNet-21K to perform well. MGC addresses both the granularity gap and the data-efficiency problem.
Methods: Multi-Grained Contrast
The MGC framework bridges the gap between scales by establishing delicate correspondences between positive views at multiple levels of the image hierarchy.
1. Multi-Grained Correspondences
The system processes two augmented views of an image and applies parameter-free average pooling with varying window sizes ($c \in \{1, 2, 7, 14\}$). This creates a hierarchy of representations, from individual patches to large regions, allowing the model to learn appearance-invariant features at every level.
2. Architecture and Objective
- Dual-Encoder Setup: MGC uses a Base Encoder (updated via gradients) and a Momentum Encoder (updated via Exponential Moving Average) to provide stable targets.
- Sparse Sampling: To manage computational costs, the authors employ a sparse sampling strategy, selecting only a subset of patches for the contrastive loss.
- The Objective: The model minimizes a multi-grained contrastive loss, learning to localize where a specific "context" from one view appears in the other, regardless of the scale. This forces the ViT to capture structural and semantic consistency across the hierarchy.
Key Insights
- Hierarchical Learning: By enforcing consistency across multiple pooling scales, the model avoids the "forest vs. leaf" trade-off, naturally learning a richer, more robust feature set.
- Data Efficiency: MGC generates significantly more training signals (correspondences) per image than standard global contrastive learning. This allows ViTs to generalize effectively even when trained on smaller datasets like MS COCO.
- Localization Awareness: Formal analysis shows that MGC helps the model accurately map coordinates between views, explaining its superior performance on detail-sensitive tasks like keypoint detection.
Experimental Results
MGC consistently outperforms state-of-the-art (SOTA) methods like DINO, MoCo-v3, and iBOT across standard benchmarks:
- Object Detection (COCO): Achieved 42.0 AP, a significant improvement over iBOT's 38.5 AP.
- Keypoint Detection (COCO): Reached 71.6 AP, outperforming the previous best (PQCL) by 1.4 points.
- Scene Parsing (ADE20K): Achieved 37.7 mIoU, compared to MoCo-v3’s 33.8 mIoU.
- Semantic Segmentation (VOC): Reached 64.5 mIoU, a 7.7-point improvement over the second-best method.
These gains were achieved without the need for massive-scale pretraining, highlighting the method's efficiency.
Limitations and Future Work
While MGC shows remarkable performance, processing multiple granularities adds computational overhead. Current pooling sizes are fixed hyperparameters; future work could explore adaptive granularities that adjust based on image content. Additionally, testing MGC on "foundation model" scale datasets remains an open area for research.
Summary updated