Training deep neural networks (DNNs) is often a balancing act between learning complex features and avoiding the trap of overfitting. While techniques like Label Smoothing (LS) and Knowledge Distillation (KD) are popular remedies, they come with significant trade-offs: LS is often too simplistic, and KD is computationally expensive. In their AAAI-21 paper, researchers from Tsinghua University introduce Knowledge Refinery (KR)—a "plug-and-play" regularization method that allows models to learn class relationships on-the-fly without requiring a pre-trained teacher model.
The Challenge of Static Labels
Standard training usually employs "one-hot" labels, where the target class is assigned a probability of 1 and all others 0. This "hard" approach often leads to over-confidence and overfitting. Label Smoothing attempts to fix this by redistributing probability uniformly across incorrect classes. However, it treats a "dog" as being equally similar to a "cat" as it is to a "car," which is intuitively incorrect.
Knowledge Distillation solves this by using a pre-trained "teacher" model to provide "soft labels" that capture these nuances. However, KD is cumbersome, requiring the training of a large teacher model first, which effectively doubles the workload and storage requirements.
Methodology: Decoupling the Label
The core innovation of Knowledge Refinery is the Decoupled Label. The authors split the ideal soft label into two distinct components:
- Hard Label: The standard one-hot vector representing the ground truth class.
- Residual Label: A vector representing the relationships between the target class and all other classes (the "non-diagonal" parts of a confusion matrix).
The Knowledge Refinery Regularizer
KR introduces a Residual Correlation Matrix ($S$), an embedding layer that stores the learned relationships between classes. During training, the backbone network produces "residual logits" (the model's guess at class similarities). Simultaneously, the matrix $S$ provides the "residual labels."
Through a Mutual Learning strategy, the backbone network is regularized to match the residual labels in $S$, while $S$ is updated to better reflect the backbone's evolving understanding of class similarities. Because $S$ is just a $K \times K$ matrix (where $K$ is the number of classes), the extra memory footprint is negligible—often just a few kilobytes.
Key Insights: Softness Consistency
A pivotal discovery in this research is "Softness Consistency." The authors observed that while standard soft labels become "harder" (more confident) as training progresses, the residual relationships—the relative similarity between non-target classes—remain remarkably stable. This stability allows KR to refine class-level knowledge dynamically without a fixed teacher.
Experimental Results
The authors validated KR across Computer Vision (CV) and Natural Language Processing (NLP) tasks using architectures like ResNet, WideResNet, and Transformers. KR consistently outperformed both hard labels and standard Label Smoothing:
- CIFAR-100: Using a ResNet-18, KR achieved a 2.04% error reduction over the baseline.
- ImageNet: On a ResNet-152 model, KR improved Top-1 accuracy by 1.06%.
- Efficiency: In head-to-head comparisons with KD and Deep Mutual Learning (DML), KR achieved better or comparable accuracy while using significantly fewer parameters (e.g., ~1x parameters vs. ~3x for KD).
- NLP Gains: On the AGNews dataset, KR reduced error rates for the Transformer model from 10.49% to 9.71%.
Conclusion
Knowledge Refinery offers a self-contained, efficient alternative to Knowledge Distillation. By decoupling labels and utilizing a lightweight mutual learning strategy, it captures rich inter-class relationships on-the-fly. As a plug-and-play regularizer, KR requires no changes to network architecture and adds zero cost during inference, making it a highly practical tool for improving model generalization.
Summary updated