Introduction
Most contrastive learning methods focus on making models recognize different augmented versions of the same image. While effective, this approach overlooks a crucial aspect of human visual understanding: recognizing different images from the same category. This paper introduces Invariance Propagation (InvP), a method that teaches models to identify category-level similarities without relying on human-annotated labels. By recursively searching a $k$-nearest neighbor graph and focusing on "hard" positive samples, InvP achieves state-of-the-art unsupervised performance on ImageNet.
The Core Problem: Instance vs. Category Invariance
In the realm of unsupervised representation learning, contrastive learning has emerged as the dominant paradigm. Methods like MoCo and SimCLR operate by taking an image (an "anchor"), creating two different augmented views of it, and training a neural network to recognize that they represent the same underlying object. This is known as learning instance-level invariance.
However, these methods often ignore the relationships between entirely different images. In a real-world category like "dog," two distinct images of dogs might look vastly different in pixel space but share the exact same semantic meaning. The authors argue that learning category-level invariance—recognizing that different instances belong to the same broader group—is essential for capturing the global semantic structure of data without labels.
Methodology: Invariance Propagation
To bridge the gap between instance and category invariance, the authors propose a two-pronged approach:
1. Recursive Similarity Propagation
Instead of merely looking at an image's immediate neighbors in the feature space, InvP builds a $k$-nearest neighbor ($k$NN) graph. It then recursively "propagates" similarity through this graph. If image A is a neighbor of B, and B is a neighbor of C, InvP considers C a potential "positive" sample for A. This allows the model to discover semantically consistent clusters that reside in the same high-density regions of the representation space.
2. Hard Sampling Strategy
Not all positive samples are equally useful for training. "Easy" positives—images that already look very similar to the anchor—do not provide much new information to the model. To counter this, the authors specifically target "hard" positives: samples that are semantically related but currently have low similarity scores in the model's feature space. By forcing the model to maximize agreement with these hard samples, they encourage it to learn more abstract, robust features.
Training begins with a standard instance-discrimination loss to establish a baseline feature space. The InvP loss is then gradually "ramped up" as the discovered neighbors become more reliable.
Key Insights
- The Smoothness Assumption: The core philosophy of InvP is that if two points in a high-density region are close, their semantic information should be similar. By following the "path" of high density through a graph, the model can bridge the gap between very different-looking members of the same category.
- Graph vs. Euclidean Distance: Standard $k$NN uses a global Euclidean distance, which often fails to capture the complex "manifold" (the underlying shape) of image data. InvP uses local $k$NN to build a graph, effectively using "graph distance" to stay within semantic boundaries.
- Hard Positives Drive Abstraction: Visualizations of hard positives reveal that they often contain the same object but in different poses, colors, or contexts. Learning to group these together is exactly what allows a model to move from merely "matching pixels" to genuinely "understanding categories."
Datasets and Key Results
The primary training and evaluation were conducted on ImageNet-1k. To test the transferability of the learned features, the model was also evaluated on several other benchmarks, including Places205, Pascal VOC07+12, and various small-scale datasets (CIFAR10/100, Caltech101, etc.).
- ImageNet Linear Classification: Using a ResNet-50 backbone, InvP achieved 71.3% top-1 accuracy, surpassing contemporary leaders like MoCo v2 (71.1%) and SimCLR (69.3%).
- Semi-Supervised Learning: When fine-tuned on only 1% of ImageNet labels, the model reached 78.2% top-5 accuracy, a significant improvement over previous unsupervised methods.
- Transfer Learning: InvP consistently outperformed SimCLR across various small-scale datasets, proving that representations learned via category-level invariance are highly generalizable.
Limitations and Future Work
While highly effective, InvP has a few limitations. The current implementation relies on a "memory bank" to store and update features, though integrating a momentum queue (like MoCo) or using larger batch sizes (like SimCLR) could further boost performance. Additionally, the method introduces new hyperparameters, such as the number of neighbors ($k$) and recursion steps ($l$), which may require tuning for different datasets. Finally, building and searching the $k$NN graph adds computational overhead to the training loop, although it remains feasible on standard hardware.
Summary updated