Skip to main content
QUICK REVIEW

[Paper Review] Unsupervised Visual Representation Learning by Context Prediction

Carl Doersch, Abhinav Gupta|arXiv (Cornell University)|May 19, 2015
Advanced Image and Video Retrieval Techniques58 references280 citations
TL;DR

This paper proposes a self-supervised method for unsupervised visual representation learning by training a convolutional neural network to predict the relative spatial position of image patches. By leveraging within-image context as a supervisory signal, the model learns rich, transferable features that enable state-of-the-art performance in object detection and unsupervised object discovery on Pascal VOC, even without any human annotations.

ABSTRACT

This work explores the use of spatial context as a source of free and plentiful supervisory signal for training a rich visual representation. Given only a large, unlabeled image collection, we extract random pairs of patches from each image and train a convolutional neural net to predict the position of the second patch relative to the first. We argue that doing well on this task requires the model to learn to recognize objects and their parts. We demonstrate that the feature representation learned using this within-image context indeed captures visual similarity across images. For example, this representation allows us to perform unsupervised visual discovery of objects like cats, people, and even birds from the Pascal VOC 2011 detection dataset. Furthermore, we show that the learned ConvNet can be used in the R-CNN framework and provides a significant boost over a randomly-initialized ConvNet, resulting in state-of-the-art performance among algorithms which use only Pascal-provided training set annotations.

Motivation & Objective

  • To address the challenge of scaling visual representation learning to Internet-scale datasets by eliminating the need for costly human annotations.
  • To explore whether spatial context in unlabeled images can serve as a free and effective supervisory signal for learning rich visual features.
  • To develop a self-supervised pretext task that encourages models to learn object-level and part-level visual structures without category labels.
  • To evaluate whether the learned representation generalizes across images and improves performance on downstream tasks like object detection and unsupervised discovery.
  • To demonstrate that instance-level context prediction can yield category-level visual representations useful for real-world vision tasks.

Proposed method

  • The model is trained on a pretext task: given two random patches from the same image, predict the relative spatial position (one of eight possible configurations) of the second patch with respect to the first.
  • The method uses a convolutional neural network (ConvNet) to extract features from each patch and classify the relative position, using cross-entropy loss to optimize the prediction.
  • The training data is constructed from random crop pairs in natural images, with no category labels or bounding boxes used during pretraining.
  • After pretraining, the feature extractor is fine-tuned on downstream tasks such as object detection using the R-CNN framework.
  • For unsupervised object discovery, the model's features are used to cluster patches via nearest-neighbor search and geometric verification, followed by iterative cluster selection to maximize coverage and purity.
  • The approach is evaluated on Pascal VOC 2007 and Paris Street View datasets, using purity-coverage curves and classification accuracy on the pretext task.

Experimental results

Research questions

  • RQ1Can spatial context in unlabeled images serve as a strong supervisory signal for learning rich visual representations?
  • RQ2Does a model trained to predict relative patch positions learn to recognize objects and their parts?
  • RQ3Can such a self-supervised representation generalize across images and improve performance on category-level tasks like object detection?
  • RQ4To what extent does the learned representation support unsupervised visual discovery of objects?
  • RQ5How does the performance of the context prediction method compare to supervised or other self-supervised baselines on downstream tasks?

Key findings

  • The model achieves 38.4% accuracy on the relative position prediction task, significantly above the 12.5% chance level, indicating the task is challenging but learnable.
  • On the Pascal VOC 2007 dataset, the learned representation provides a significant boost over a randomly initialized ConvNet in the R-CNN framework, achieving state-of-the-art performance among methods using only Pascal-provided annotations.
  • The representation enables unsupervised visual discovery of objects such as cats, people, and birds from the Pascal VOC 2011 dataset without any category-level supervision.
  • On a subset of Pascal VOC 2007, the method achieves high coverage (up to 50%) with moderate purity, showing strong invariance and generalization despite a simpler cluster selection procedure than prior work.
  • The model maintains strong performance on ImageNet (40.3% validation accuracy) compared to training accuracy (39.5%), indicating minimal overfitting and robustness to distribution shifts.
  • Even when restricted to patches within object bounding boxes, the model achieves 39.2% accuracy, suggesting sensitivity to object structure, but performance remains high on non-object regions, indicating broader scene understanding.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.