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.
1. Introduction
Deep learning, particularly with Convolutional Neural Networks (ConvNets), has revolutionized computer vision. However, these models are notoriously "data-hungry," often requiring millions of hand-labeled images to perform well. While unsupervised learning offers a solution by leveraging unlabeled data, previous approaches have faced two major hurdles. First, the "reconstruction trap" in methods like Autoencoders forces networks to focus on low-level pixel details rather than semantic features. Second, many techniques require complex, non-standard architectures that are difficult to integrate with state-of-the-art supervised models.
This paper introduces Spatial Contrasting (SC), an unsupervised learning objective that focuses on semantic meaning rather than pixel-level reconstruction. SC allows standard neural networks to learn high-level visual features from unlabeled data, significantly boosting performance on downstream classification tasks without requiring specialized architectures.
2. Methodology
The core principle of Spatial Contrasting is that different regions within the same image (e.g., the head and tail of a dog) are likely to be semantically related, whereas regions from different images are likely unrelated.
2.1 The SC Algorithm
The SC training process involves four main steps:
- Sampling: For every image in a training batch, two random patches are extracted.
- Feature Extraction: Both patches are passed through the ConvNet to produce high-level feature embeddings.
- Contrastive Loss: The model is trained using a Softmax-based objective to maximize the similarity between features from the same image (anchor and positive) while minimizing similarity between features from different images in the batch (negatives).
- Integration: As the loss is fully differentiable, it can be trained using standard backpropagation and SGD. This serves as a pre-training phase to initialize weights before fine-tuning with a small labeled dataset.
3. Experimental Results
The authors evaluated Spatial Contrasting on two primary benchmarks: STL-10 (100,000 unlabeled, 5,000 labeled) and CIFAR-10 (using only 4,000 labels for fine-tuning).
3.1 STL-10 Performance
On the STL-10 dataset, the SC-initialized model achieved a test accuracy of 81.34%. This represents a significant improvement over the previous state-of-the-art (Stacked What-Where Autoencoders at 74.33%) and outperforms a supervised model trained from scratch (72.6%).
3.2 CIFAR-10 Performance
When restricted to only 400 labels per class (4,000 total), the SC model reached 79.2% accuracy. This performance is competitive with more complex models like Ladder Networks (79.6%) while maintaining a much simpler implementation.
4. Conclusion
Spatial Contrasting leverages the semantic consistency of natural images to learn robust features without labels. By comparing high-level embeddings rather than raw pixels, the model learns to ignore low-level noise that often plagues reconstruction-based models. A key advantage of SC is its "plug-and-play" nature; it works on any standard ConvNet and can be applied to multiple layers simultaneously. Future research may explore extending this to temporal domains for video data or integrating it into a robust semi-supervised framework.
Summary updated