Abstract
Learning visual representations with self-supervised learning has become popular in computer vision. The idea is to design auxiliary tasks where labels are free to obtain. Most of these tasks end up providing data to learn specific kinds of invariance useful for recognition. In this paper, we propose to exploit different self-supervised approaches to learn representations invariant to (i) inter-instance variations (two objects in the same class should have similar features) and (ii) intra-instance variations (viewpoint, pose, deformations, illumination, etc.). Instead of combining two approaches with multi-task learning, we argue to organize and reason the data with multiple variations. Specifically, we propose to generate a graph with millions of objects mined from hundreds of thousands of videos. The objects are connected by two types of edges which correspond to two types of invariance: “different instances but a similar viewpoint and category” and “different viewpoints of the same instance”. By applying simple transitivity on the graph with these edges, we can obtain pairs of images exhibiting richer visual invariance. We use this data to train a Triplet-Siamese network with VGG16 as the base architecture and apply the learned representations to different recognition tasks. For object detection, we achieve 63.2% mAP on PASCAL VOC 2007 using Fast R-CNN (compare to 67.3% with ImageNet pre-training). For the challenging COCO dataset, our method is surprisingly close (23.5%) to the ImageNet-supervised counterpart (24.4%) using the Faster R-CNN framework. We also show that our network can perform significantly better than the ImageNet network in the surface normal estimation task.
Introduction
A central goal in computer vision is to learn powerful visual features without relying on millions of expensive human-annotated labels. Self-supervised learning (SSL) addresses this by designing "pretext tasks" where labels are automatically generated from the data itself. Common tasks include predicting the relative position of image patches or tracking objects in video sequences.
However, most existing SSL methods focus on a single type of invariance. Intra-instance invariance teaches a model that an object remains the same despite changes in viewpoint or lighting, typically achieved through video tracking. Conversely, inter-instance invariance teaches the model that different objects within the same category share common features, often achieved through clustering visually similar patches. This paper argues that simply combining these tasks via multi-task learning is insufficient. Instead, we propose a method to explicitly reason about the relationships between these variations to learn a more holistic representation.
Methods: Graph-Based Transitive Reasoning
The core of our approach is the construction of a massive affinity graph containing millions of object patches mined from 100,000 unlabeled YouTube videos.
Graph Construction
The graph consists of nodes representing image patches of moving objects. These nodes are connected by two types of edges:
- Intra-instance Edges: These link different viewpoints of the same physical object, generated by tracking an object across video frames using a Kernelized Correlation Filter (KCF) tracker.
- Inter-instance Edges: These link patches that are visually similar but belong to different instances. These are created by performing hierarchical clustering on features extracted from a previously trained SSL network (e.g., context prediction).
Transitive Invariance
The key innovation is the application of transitive reasoning on this graph. If Object A is linked to Object B (inter-instance) and Object A is also linked to a different view A' (intra-instance), the graph implies a transitive relationship between A' and B. This allows the model to learn from variations that are not directly captured by tracking or clustering alone.
Network Architecture
We train a Triplet-Siamese network with a VGG16 backbone. The network is fed triplets consisting of a positive pair (related patches from the graph) and a negative sample (an unrelated distractor). The training objective is to minimize the distance between the positive pair in the feature space while maximizing the distance to the negative sample.
Experiments and Results
We pre-trained our model on approximately 10 million image patches from 100,000 YouTube videos and evaluated it on several downstream tasks.
Object Detection
On the PASCAL VOC 2007 benchmark, our method achieved 63.2% mAP using the Fast R-CNN framework. This significantly narrows the gap with the supervised ImageNet baseline (67.3%). On the more challenging MS COCO dataset, our method achieved 23.5% AP, remarkably close to the 24.4% AP of the ImageNet-supervised counterpart.
Geometry and Surface Normal Estimation
Interestingly, our self-supervised model outperformed the ImageNet-supervised model on surface normal estimation using the NYU v2 dataset, achieving a mean error of 26.0 compared to 27.8. This suggests that supervised classification pre-training may discard useful geometric information (like pose and orientation) that our SSL approach preserves.
Ablation Studies
Ablation experiments confirmed that both tracking (intra-instance) and clustering (inter-instance) components are vital. Removing either led to a significant performance drop, demonstrating that the explicit relational structure of the graph is the primary driver of performance.
Conclusion
This work demonstrates that transitive reasoning over a large-scale affinity graph can effectively bridge the gap between different types of visual invariance. By organizing unlabeled data into a structured graph, we can learn representations that rival supervised pre-training on detection tasks and exceed it on geometric tasks. Future work will explore scaling these transitive relations with more modern architectures and refining the purity of the inter-instance clusters.
Summary updated