Semi-supervised Learning with Contrastive Predicative Coding

Jiaxing Wang, Yin Zheng, Xiaoshuang Chen, Junzhou Huang, Jian ChengarXiv 2019

TL;DR

This paper introduces two novel semi-supervised learning (SSL) methods, cpc-SSL and ccpc-SSL, that leverage contrastive predictive coding (CPC) to extract meaningful representations from unlabeled data. These methods effectively learn from large datasets like ImageNet, offering improved performance over supervised-only baselines and demonstrating scalability for real-world applications.

What Problem Does This Paper Address?

The core challenge addressed is the high cost and scarcity of labeled data in modern machine learning. Semi-supervised learning (SSL) aims to mitigate this by utilizing abundant unlabeled data alongside limited labeled data. While existing SSL methods have shown promise, many suffer from inflexibility, inefficiency, or poor scalability, especially on massive datasets like ImageNet. The paper seeks to develop SSL techniques that are both effective and practical for large-scale, real-world scenarios.

Methods

The paper proposes two main methods built upon Contrastive Predictive Coding (CPC). CPC is an unsupervised representation learning technique that learns to predict future or missing information from contextual data. Its strength lies in extracting shared, high-level latent factors from data, discarding irrelevant low-level details and noise.

  • cpc-SSL: This model combines a CPC-based representation learning component with a multi-class classifier. It infers salient latent factors from the data and uses these to improve label prediction. The model learns by optimizing a combination of a contrastive loss (for unlabeled data) and a classification loss (for labeled data).
  • ccpc-SSL (Class Conditional Variant): This is an extension of cpc-SSL that more strongly couples the classifier and the CPC model. In this variant, the latent factor inference is conditioned on the class label, treating the label as a latent variable for unlabeled data. This approach aims to disentangle label information and improve the learning process.

Both models employ efficient learning and inference algorithms, including the reparameterization trick for handling expectations over latent variables.

Datasets

The proposed methods were evaluated on:

  • ImageNet: A large-scale image recognition dataset. The authors used the ILSVRC ImageNet competition dataset, reshaping and cropping images to 256x256. They extracted data sequences from grids of image crops.
  • Large Movie Review Dataset: A dataset for sentiment classification, containing 25,000 training and 25,000 testing reviews.

Key Insights and Ideas

  • CPC for SSL: The paper demonstrates that the principles of contrastive predictive coding, which excel at unsupervised representation learning by capturing long-range dependencies, can be effectively adapted for semi-supervised learning.
  • Scalability: A key advantage highlighted is the scalability of CPC-based SSL methods to very large datasets like ImageNet, addressing a major limitation of many prior SSL techniques.
  • Disentangling Information: The ccpc-SSL variant introduces a class-conditional approach to better disentangle label information from latent representations, potentially leading to more robust learning.
  • Practicality: The authors emphasize that their methods are not significantly more computationally expensive than standard deep neural network classifiers during inference, making them appealing for real-world deployment.

Key Results

  • ImageNet Performance: On ImageNet, both cpc-SSL and ccpc-SSL significantly outperformed supervised-only baselines across various percentages of labeled data (1% to 20%). They achieved competitive results compared to state-of-the-art methods like Mean Teacher, with top-1 accuracies reaching up to 66.15% with 20% labeled data for ccpc-SSL.
  • Sentiment Classification: On the Large Movie Review dataset, the proposed semi-supervised approaches also significantly outperformed their supervised-only counterparts, validating their effectiveness on natural language tasks.
  • Inference Time: The inference time was comparable to standard deep neural network classifiers, with a slight overhead due to sequence construction.

Limitations and Future Work

  • Computational Complexity: While scalable, the training complexity of cpc-SSL is slightly higher than a standard classifier due to the contrastive predictive coding component. The paper suggests that better sequence construction schemes could alleviate this.
  • Hyperparameter Sensitivity: The authors note that while their models are not highly sensitive to hyperparameters, further tuning could potentially boost performance.
  • Future Directions:
    • Combining CPC-based SSL with max-margin principles (e.g., Bayesian SVMs) for improved discrimination.
  • Exploring combinations of CPC-based methods with perturbation-based SSL approaches.
  • Investigating the impact of more careful training data construction and hyperparameter tuning.

Summary updated

BibTeX
@misc{wang2019semi,
  author = {Jiaxing Wang and Yin Zheng and Xiaoshuang Chen and Junzhou Huang and Jian Cheng},
  title = {{Semi-supervised Learning with Contrastive Predicative Coding}},
  year = {2019},
  eprint = {1905.10514},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.10514},
}
Figure