Abstract
Previous knowledge distillation (KD) methods have demonstrated impressive performance in model compression tasks. However, explaining how the transferred knowledge improves the student network remains a challenge. In this work, we propose Class Attention Transfer based Knowledge Distillation (CAT-KD), a method that combines high interpretability with competitive performance. By revisiting the structure of mainstream Convolutional Neural Networks (CNNs), we reveal that the capacity to identify class-discriminative regions is critical for classification. We demonstrate that this capacity can be enhanced by transferring Class Activation Maps (CAMs). CAT-KD achieves state-of-the-art performance on multiple benchmarks while providing a better understanding of the underlying CNN mechanisms.
Introduction
Knowledge Distillation (KD) is a widely used technique for transferring knowledge from a large, high-performance "teacher" network to a smaller, more efficient "student" network. While effective, most mainstream KD methods rely on transferring logits or intermediate features, which are often treated as "black boxes." It is difficult to explain exactly how this transferred information helps the student.
Existing attention-based KD methods have attempted to address this by transferring spatial importance maps, but they often lag behind in performance and fail to explain the specific role attention plays in the final classification decision. CAT-KD bridges this gap by focusing on Class Activation Maps (CAMs), providing a highly interpretable and efficient alternative to traditional distillation methods.
Methodology: The Mechanics of CAT-KD
1. The Converted Structure
The authors revisit the standard CNN architecture to establish a direct link between spatial features and classification. By converting the final Fully Connected (FC) layer into a $1 \times 1$ convolutional layer and moving the Global Average Pooling (GAP) layer to the very end, they show that CAMs can be generated during the forward pass. In this view, classification is mathematically equivalent to calculating the global average activation of these CAMs. This makes CAMs the "missing link" between internal features and final predictions.
2. The CAT Loss
Instead of merely mimicking the final output, the student is forced to minimize the distance between its CAMs and the teacher's CAMs. The CAT loss uses $L_2$ normalization on the maps, ensuring the student learns the spatial location of discriminative regions rather than just the raw activation values.
3. Pooling for Robustness
To account for structural differences between teachers and students (e.g., different resolutions or layer depths), the authors pool the transferred CAMs into a very small resolution, typically $2 \times 2$. This "blurring" effect reduces noise and forces the student to focus on the most critical discriminative regions, making the distillation process more robust to architectural variations.
Key Insights and Interpretability
CAT-KD offers several unique insights into how CNNs process information:
- CAMs are Sufficient for Training: In a striking experiment, the authors trained a model using only transferred CAMs without any ground-truth labels. The model still achieved high accuracy, proving that knowing "where to look" for every class is nearly as valuable as knowing the correct label.
- "Dark Knowledge" in Non-Target CAMs: The method reveals that even for an image of a specific class (e.g., a "tiger"), the attention maps for related categories (e.g., "cat" or "jaguar") contain beneficial structural information. Transferring CAMs for all categories, not just the ground truth, yields the best results.
- Location Over Value: By binarizing the CAMs (setting values to either 0 or 1), the authors found that the model's performance barely dropped. This suggests that the critical information in distillation is the spatial location of features, not their exact numerical intensity.
Experimental Results
The method was evaluated on standard benchmarks including CIFAR-100 and ImageNet, as well as transferability benchmarks like STL-10 and Tiny-ImageNet.
- Performance: On CIFAR-100, CAT-KD outperformed previous state-of-the-art attention methods (such as AT) by margins ranging from +1.07% to +12.78%, depending on the architecture. It also achieved performance comparable to or better than complex feature-based methods like ReviewKD and DKD.
- Efficiency: Unlike many feature-based methods, CAT-KD does not require auxiliary "projector" networks or complex feature transformations. This makes its training time nearly as fast as basic logit-based distillation.
- Generalization: In linear probing tasks, CAT-KD showed superior transferability, suggesting it learns more robust, "human-like" visual features that generalize well to new datasets.
Conclusion
CAT-KD represents a significant step forward in making knowledge distillation both effective and interpretable. By focusing on the spatial logic of "where to look," it provides a clear explanation for the student's performance gains while maintaining the efficiency required for real-world model compression. Future work may involve applying these class-attention principles to non-CNN architectures, such as Vision Transformers.
Summary updated