Abstract
Standard Knowledge Distillation (KD) often struggles in binary or few-class classification tasks because the teacher's output probabilities provide a sparse training signal. We present Learning Embedding Linear Projections (LELP), a modality-agnostic method that extracts "pseudo-subclasses" from frozen teacher embeddings using Principal Component Analysis (PCA). LELP provides a significantly richer training signal without requiring expensive teacher retraining, enabling student models to match or even surpass their teachers in low-class regimes.
Introduction
Knowledge Distillation is the standard technique for compressing large "teacher" models into lightweight "student" models. This process relies on the student mimicking the teacher's output probabilities, which contain "dark knowledge" about class relationships. While effective for datasets with many classes (e.g., ImageNet), KD hits a bottleneck in few-class problems (e.g., sentiment analysis or binary relevance). In these scenarios, the output signal is too sparse to guide the student effectively.
Previous attempts to solve this, such as "Subclass Distillation," required retraining the teacher model multiple times to learn internal subclasses—a process that is prohibitively expensive for modern large-scale models. LELP addresses this by extracting fine-grained information directly from the embeddings of a frozen teacher.
The LELP Framework
LELP introduces a three-step process to generate a richer distillation signal from a frozen teacher model:
- Subspace Identification: Instead of relying on final logits, LELP analyzes the teacher's final-layer embeddings. It uses PCA to identify the most informative directions in the embedding space for each class. To ensure this information is distinct from the existing classification logic, embeddings are first projected onto the null-space of the teacher's classification weights.
- Pseudo-Subclass Creation: Each original class is split into $S$ pseudo-subclasses based on these PCA projections. A random rotation is applied to these directions to balance variance, preventing the student from overfitting to a single dominant feature.
- Unified Distillation: The student is trained to predict these $S \times C$ pseudo-subclasses using a standard KL-divergence loss. During inference, the student simply aggregates the subclass probabilities back into the original target classes.
Crucially, LELP requires zero retraining of the teacher and is completely agnostic to the model architecture, allowing for the distillation of diverse pairings, such as a Transformer into an MLP.
Experimental Evaluation
The authors evaluated LELP across diverse benchmarks in both Natural Language Processing (NLP) and Computer Vision:
- NLP: Amazon Reviews (binary and 5-class), Sentiment140 (binary), and GLUE tasks.
- Vision: Binarized versions of CIFAR-10 and CIFAR-100.
- Architectures: Pairings included ALBERT-XXL to ALBERT-Base and ResNet-92 to MobileNet.
Key Results
LELP consistently outperformed standard KD and advanced baselines like FitNet and DKD in few-class settings. On the Amazon Reviews benchmark, LELP improved accuracy by 1.85% over the best baseline. On Sentiment140, it achieved a 0.88% boost.
Key Insights
- Overcoming Neural Collapse: Late in training, model embeddings for the same class often cluster tightly, a phenomenon known as "neural collapse." LELP demonstrates that even within these collapsed clusters, there is linearly separable, fine-grained structure that can be leveraged for distillation.
- Surpassing the Teacher: In certain NLP tasks, LELP-trained students actually outperformed their teachers despite having significantly fewer parameters (e.g., 20x smaller). This suggests that pseudo-subclasses act as a powerful regularizer during training.
- Extreme Data Efficiency: LELP is remarkably efficient; in vision tasks, a student trained with LELP and only 25% of the training data achieved accuracy comparable to a student trained on the full dataset using standard KD methods.
Conclusion
LELP provides a simple yet powerful solution to the sparse signal problem in few-class distillation. By extracting pseudo-subclasses from frozen embeddings, it offers the benefits of subclass distillation without the computational burden of retraining. Its modality-agnostic nature and high data efficiency make it a versatile tool for compressing models in resource-constrained environments.
Summary updated