SLaM: Student-Label Mixing for Semi-Supervised Knowledge Distillation

Vasilis Kontonis, Fotis Iliopoulos, Khoa Trinh, Cenk Baykal, Gaurav Menghani, Erik Vee

Abstract

Knowledge distillation with unlabeled examples is a powerful training paradigm for generating compact and lightweight student models in applications where the amount of labeled data is limited but one has access to a large pool of unlabeled data. In this setting, a large teacher model generates "soft" pseudo-labels for the unlabeled dataset which are then used for training the student model. Despite its success in a wide variety of applications, a shortcoming of this approach is that the teacher's pseudo-labels are often noisy, leading to impaired student performance. In this paper, we present a principled method for knowledge distillation with unlabeled examples that we call Student-Label Mixing (SLaM) and we show that it consistently improves over prior approaches by evaluating it on several standard benchmarks. Finally, we show that SLaM comes with theoretical guarantees; along the way we give an algorithm improving the best-known sample complexity for learning halfspaces with margin under random classification noise, and provide the first convergence analysis for so-called "forward loss-adjustment" methods.

Introduction

Knowledge Distillation (KD) is a critical technique for deploying large-scale models, such as BERT or ResNet-101, onto resource-constrained devices by training a smaller "student" model to mimic a "teacher." In semi-supervised settings, teachers generate pseudo-labels for unlabeled data. However, these pseudo-labels are inherently noisy. Standard KD often fails because it forces the student to replicate the teacher's errors. SLaM (Student-Label Mixing) addresses this by explicitly modeling the structured noise in teacher predictions and adjusting the student's loss function to account for these inaccuracies.

Methodology

SLaM shifts the focus from filtering noisy labels to adjusting the learning process. It operates on two primary components: noise modeling and forward loss adjustment.

Noise Modeling and Isotonic Regression

Instead of assuming uniform noise, SLaM assumes the teacher is correct with a certain probability $\alpha(x)$. When the teacher is incorrect, the true label is assumed to reside within the teacher's top-$k$ predictions. To estimate $\alpha(x)$, SLaM utilizes a small "golden" validation set. The model maps the teacher's "margin" (the difference between the top two prediction scores) to its empirical accuracy. This mapping is performed using isotonic regression, which ensures a monotonic relationship: higher teacher confidence correlates with higher estimated accuracy.

Estimating teacher accuracy using isotonic regression on validation data.

The Mixing Loss

During training, SLaM employs a "forward" adjustment strategy. Rather than attempting to "clean" the teacher's label (backward adjustment), SLaM modifies the student's prediction to match the expected noisy distribution of the teacher. The loss function compares the teacher's pseudo-label to a "mixed" version of the student's output, effectively injecting the modeled noise into the student's learning signal.

Experimental Evaluation

The authors evaluated SLaM across several domains including Computer Vision (CIFAR-10, CIFAR-100, ImageNet), Facial Analysis (CelebA), and Natural Language Processing (IMDb sentiment analysis using ALBERT models).

Results and Discussion

SLaM consistently outperforms vanilla distillation and robust baselines like Taylor-CE, UPS, and VID across all tested benchmarks.

Test accuracy comparison across CIFAR-10, CIFAR-100, and CelebA datasets showing SLaM's consistent improvement.

Key findings include:

  • Performance Gains: On ImageNet with 5% labeled data, SLaM achieved 48.1% accuracy, significantly higher than the 41.67% vanilla baseline. Similar trends were observed in CIFAR-100 and NLP tasks.
  • Structured Noise: The success of SLaM validates the hypothesis that teacher errors are structured and correlated with confidence metrics. By modeling this correlation, the damage of noisy pseudo-labels can be mathematically mitigated.
  • Theoretical Contributions: The paper provides the first convergence analysis for forward loss-adjustment methods and improves the sample complexity for learning halfspaces with margin under noise from $O(1/\gamma^4\epsilon^2)$ to $O(1/\gamma^2\epsilon^2)$.

Conclusion

SLaM provides a robust, theoretically grounded framework for semi-supervised knowledge distillation. While its benefits are most pronounced when the teacher model is imperfect, its ability to model structured noise makes it a versatile tool for model compression. Future work may focus on closing the remaining gap to information-theoretic lower bounds and automating hyperparameter selection for the noise model.

Summary updated

BibTeX
@inproceedings{kontonis2023slam,
  author = {Vasilis Kontonis and Fotis Iliopoulos and Khoa Trinh and Cenk Baykal and Gaurav Menghani and Erik Vee},
  title = {{SLaM: Student-Label Mixing for Semi-Supervised Knowledge Distillation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=N7tw0QXx3z},
}
Figure