Abstract
Knowledge Distillation (KD) has emerged as a cornerstone for model compression, yet traditional methods often struggle with task-specific limitations and architectural discrepancies between teacher and student models. This paper introduces Self-Supervised Knowledge Distillation (SSKD), a framework that leverages self-supervised pretext tasks as an auxiliary source of "dark knowledge." By requiring the student to mimic the teacher’s internal representations of data transformations and inter-sample similarities, SSKD achieves state-of-the-art performance, particularly in cross-architecture distillation and low-data regimes.
Introduction
Knowledge Distillation (KD) typically involves training a compact "student" network to replicate the output behavior of a larger, pre-trained "teacher" network. While effective, conventional KD primarily focuses on matching the teacher's "soft targets"—the probability distributions over primary task classes. This approach faces two significant hurdles:
- Task Specificity: Standard KD ignores the rich structural information the teacher has learned about the data manifold, focusing only on the final classification task.
- Architecture Dependency: Many high-performance distillation methods rely on matching intermediate feature maps. This works well for similar architectures (e.g., ResNet-50 to ResNet-18) but degrades significantly when the teacher and student have fundamentally different structures (e.g., ResNet to ShuffleNet).
SSKD addresses these issues by treating self-supervised learning (SSL) as an auxiliary distillation objective. This allows the student to capture the "intrinsic composition of semantic and pose information" that the teacher possesses, regardless of the architectural gap.
The SSKD Framework
Architecture and SS Modules
The core of the SSKD framework is the addition of a lightweight SS Module (a 2-layer MLP) to both the teacher and student backbones. This module is designed to handle contrastive prediction tasks. During training, images undergo heavy transformations—including rotation, color jittering, and cropping. The networks are then tasked with identifying "positive pairs" (different versions of the same image) against "negative pairs" (different images) within a similarity matrix.
Training Objectives
The student is optimized using a multi-faceted loss function designed to balance primary task performance with structural mimicry:
- Standard Cross-Entropy: Learning from ground truth labels.
- Conventional KD Loss: Mimicking the teacher’s classification logits on original data.
- SSKD Loss ($L_{ss}$): Mimicking the teacher’s similarity matrix for transformed data, effectively transferring the teacher's understanding of data relationships.
- Transformed Data KD ($L_T$): Mimicking teacher predictions on heavily transformed images to ensure consistency across views.
To ensure the student does not learn from the teacher's potential errors on difficult transformations, the authors implement Selective Transfer. This heuristic filters out the most inaccurate teacher predictions based on an error-level ranking, focusing the distillation on high-confidence structural knowledge.
Experimental Results
Cross-Architecture Superiority
SSKD demonstrates remarkable flexibility across varying neural architectures. On the CIFAR100 benchmark, SSKD outperformed existing state-of-the-art (SOTA) methods by an average of 2.3% in accuracy across six diverse teacher-student pairs, such as ResNet50 distilling to MobileNetV2. This confirms that matching final-layer similarity structures is more robust than matching internal feature maps for heterogeneous architectures.
Robustness to Data Scarcity and Noise
The auxiliary self-supervision task serves as a powerful regularizer. In few-shot scenarios where only 25% of training data was available, SSKD provided a ~7% absolute improvement in accuracy over competing methods. Furthermore, in experiments with 50% corrupted (noisy) labels, SSKD's performance remained stable, whereas feature-mimicking methods experienced sharp declines in accuracy.
Conclusion
SSKD bridges the gap between knowledge distillation and self-supervised learning, showing that "dark knowledge" resides not just in class probabilities, but in the structural relationships between data points. By focusing on model-agnostic similarity matching, SSKD provides a robust solution for compressing models across different architectural families and in challenging data environments. Future work may explore more complex pretext tasks or automated mechanisms for filtering teacher noise during the selective transfer process.
Summary updated