Skip to main content
QUICK REVIEW

[Paper Review] Deep unsupervised learning through spatial contrasting

Elad Hoffer, Itay Hubara|arXiv (Cornell University)|Oct 2, 2016
Domain Adaptation and Few-Shot LearningComputer Science23 references14 citations
TL;DR

This paper proposes Spatial Contrasting (SC), a novel unsupervised pre-training method for convolutional neural networks that improves feature learning by contrasting spatially local features within images. By training with a differentiable contrastive loss using standard backpropagation, SC achieves state-of-the-art performance on STL-10 (81.3% accuracy) and competitive results on CIFAR-10 and MNIST, demonstrating significant gains over non-initialized models.

ABSTRACT

Convolutional networks have marked their place over the last few years as the best performing model for various visual tasks. They are, however, most suited for supervised learning from large amounts of labeled data. Previous attempts have been made to use unlabeled data to improve model performance by applying unsupervised techniques. These attempts require different architectures and training methods. In this work we present a novel approach for unsupervised training of Convolutional networks that is based on contrasting between spatial regions within images. This criterion can be employed within conventional neural networks and trained using standard techniques such as SGD and back-propagation, thus complementing supervised methods.

Motivation & Objective

  • To develop a simple, effective unsupervised pre-training criterion for convolutional networks that improves generalization without requiring architectural changes.
  • To enable standard backpropagation and SGD training by formulating an end-to-end differentiable loss function based on spatial feature contrast.
  • To demonstrate that unsupervised pre-training via spatial contrasting can significantly boost performance in supervised fine-tuning, especially when labeled data is limited.
  • To explore the potential of spatial contrasting as a foundation for future semi-supervised learning frameworks.

Proposed method

  • The method defines a contrastive loss that maximizes agreement between positive spatial patches (from the same image) and minimizes it between negative patches (from different images).
  • Spatial patches are extracted from feature maps of a convolutional network and embedded into a representation space using a projection head.
  • The contrastive loss is computed using a temperature-scaled cross-entropy between positive and negative pairs of patches, enabling gradient-based optimization.
  • The loss is differentiable and can be jointly trained with supervised objectives using standard backpropagation and SGD.
  • The pre-trained network is fine-tuned on downstream supervised tasks using only a small number of labeled examples.
  • The approach is compatible with standard CNN architectures and does not require specialized training procedures or network modifications.

Experimental results

Research questions

  • RQ1Can a contrastive loss based on spatial regions within images improve unsupervised representation learning in convolutional networks?
  • RQ2Does spatial contrasting pre-training lead to better generalization when fine-tuned on supervised classification tasks?
  • RQ3How does spatial contrasting compare to existing unsupervised methods like autoencoders, exemplar networks, and ladder networks in terms of performance and training efficiency?
  • RQ4Can spatial contrasting be extended to semi-supervised learning by combining it with supervised loss during training?

Key findings

  • On the STL-10 dataset, the proposed spatial contrasting pre-training achieved a test accuracy of 81.3%, setting a new state-of-the-art result.
  • Without any pre-training, the same model achieved only 72.6% accuracy, demonstrating the significant benefit of the SC initialization.
  • On CIFAR-10 with only 4,000 labeled samples, the method achieved 79.2% test accuracy, outperforming previous unsupervised methods and approaching the performance of semi-supervised models like ladder networks.
  • On MNIST, the method reduced test error from 0.63% to 0.34% when using SC pre-training, showing consistent improvement even on simpler datasets.
  • The improvement was consistent across all datasets, indicating that spatial contrasting effectively learns useful invariances and spatial structure from unlabeled data.
  • The method is compatible with standard training pipelines and can be combined with supervised loss, suggesting strong potential for semi-supervised learning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.