Learning from a Teacher using Unlabeled Data

Gaurav Menghani, Sujith Ravi · OpenReview

TL;DR

This paper explores "Blind Distillation," a method where a student model learns from a pre-trained teacher model using only unlabeled data that is out-of-distribution from the teacher's original training set. They demonstrate that this approach can effectively transfer knowledge, enabling the student to achieve significant accuracy, even outperforming the teacher in some fine-tuned scenarios.

What Problem Does This Paper Address?

The core problem this paper tackles is how to leverage vast amounts of readily available unlabeled data to improve the performance of machine learning models, especially when this unlabeled data comes from a different distribution than the original labeled training data. Traditional supervised learning requires labeled data, which is expensive and time-consuming to acquire. Knowledge distillation, a technique for model compression, typically relies on the student model learning from a teacher model trained on the same labeled dataset. This paper questions whether a teacher model, trained on a specific dataset, captures broader class relationships that can be transferred to a student model even when the student only sees unlabeled data from a different domain.

Methods

The paper introduces a method called Blind Distillation. Here's how it works:

  1. Teacher Training: A teacher model ($T$) is trained on a labeled dataset ($L$).
  2. Blind Distillation: A student model ($S$) is trained using only an unlabeled dataset ($U$). The student learns by mimicking the teacher's output logits ($Y_T = T(X_U)$) for the unlabeled data ($X_U$). The loss function used is the cross-entropy between the student's predictions ($Y_S = S(X_U)$) and the teacher's predictions ($Y_T$). Crucially, the student model never sees any labeled data from $L$ during this phase.
  3. Fine-tuning (Optional): After blind distillation, the student model can be further fine-tuned using a small subset of the original labeled dataset ($L'$). This step helps to align the student's learned representations with the target distribution.

The key novelty is the use of out-of-distribution unlabeled data ($U$) for the primary distillation step, hence "Blind Distillation."

Datasets

The authors experimented with a variety of datasets, highlighting the out-of-distribution nature of their approach:

  • Labeled Datasets (L): MNIST, CIFAR-10, Caltech-256, ImageNet.
  • Unlabeled Datasets (U): Fashion-MNIST (used with MNIST), CIFAR-100 (used with CIFAR-10), OpenImages (used with Caltech-256 and ImageNet).

The paper emphasizes that Fashion-MNIST and MNIST have different classes, and CIFAR-10 and CIFAR-100 have no overlapping classes, showcasing the out-of-distribution aspect. OpenImages is noted for its vast number of classes and complex scenes.

Key Insights and Ideas

  • Teacher's Generalization: A teacher model trained on a specific dataset captures class relationships that extend beyond that dataset's original distribution. This is evidenced by the student's ability to learn from out-of-distribution unlabeled data.
  • Unlabeled Data as a Bridge: Out-of-distribution unlabeled data can act as a bridge, allowing a student model to learn from a teacher's generalized knowledge without direct supervision on the target task.
  • Fine-tuning Boost: While blind distillation alone yields good results, fine-tuning with even a small amount of labeled data from the original distribution significantly boosts student performance, often surpassing the original teacher.
  • Model Capacity Matters: The student model's capacity is important; a student with higher capacity can learn more effectively from the teacher's signals, leading to better accuracy.
  • Teacher Architecture Influence: The architecture of the teacher model significantly impacts the student's performance in blind distillation. CNN teachers tend to perform better than MLP teachers when the student is also a CNN, suggesting that the feature extraction capabilities are crucial for transferring knowledge effectively.

Key Results

  • MNIST & Fashion-MNIST: A CNN student model achieved 96.2% accuracy using only Fashion-MNIST (out-of-distribution unlabeled) and a CNN teacher trained on MNIST. Fine-tuning with MNIST data pushed this to 99.6%, exceeding the teacher's 99.5%.
  • CIFAR-10 & CIFAR-100: A CNN student achieved 79.5% accuracy using CIFAR-100 (out-of-distribution unlabeled) and a CNN teacher trained on CIFAR-10. Fine-tuning improved this to 86.37%, surpassing the teacher's 84.73%.
  • Caltech-256 & OpenImages: Fine-tuning with just 10-20 samples per class on Caltech-256 improved the student's accuracy from 64.0% (blind distillation) to 71.6% and 74.46%, significantly outperforming the teacher's 68.20%. Using the full labeled dataset for fine-tuning reached 76.49%.
  • Model Security Implication: The paper highlights that given access to a model's logits, its performance can be replicated without access to the original training data, posing a potential security concern.

Limitations and Future Work

  • Teacher Model Dependence: The performance of the student model is heavily reliant on the quality and architecture of the teacher model.
  • Distribution Shift: While the method works well with significant distribution shifts, extreme differences might still pose challenges.
  • Future Work: The authors suggest that their method is complementary to transfer learning, implying that initializing models with transfer-learned checkpoints could further enhance performance. They also point to the model security implications as an area for further investigation.

Summary updated

BibTeX
@misc{menghani2019learning,
  author = {Gaurav Menghani and Sujith Ravi},
  title = {{Learning from a Teacher using Unlabeled Data}},
  year = {2019},
  eprint = {1911.05275},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.05275},
}
Figure