Introduction
Deep Neural Networks (DNNs) have achieved remarkable success but often require significant computational resources, hindering deployment on edge devices. Knowledge Distillation (KD) addresses this by training a compact "student" model to mimic a larger "teacher" model. However, traditional KD suffers from two primary issues: a "result-oriented bias" that ignores the teacher's intermediate reasoning process, and a "capacity gap" where the student lacks the bandwidth to directly replicate high-dimensional intermediate features.
Methodology: The KSANC Framework
To overcome these limitations, we propose Knowledge Squeezed Adversarial Network Compression (KSANC). This framework integrates task-driven attention with adversarial training to effectively transfer knowledge.
Task-Driven Knowledge Squeeze
Instead of raw feature imitation, KSANC employs an attention mechanism. It uses the teacher’s final global descriptor to filter intermediate features, identifying task-relevant information. This "squeezes" high-dimensional knowledge into a compact vector that fits the student's capacity.
Adversarial Training and Hybrid Loss
The framework utilizes a Generative Adversarial Network (GAN) approach. The student acts as a generator, while a discriminator attempts to distinguish between teacher and student outputs. This forces the student to match the teacher's output distribution. Training is guided by a hybrid loss function:
- Backbone Loss ($L_b$): L2 distance between final outputs.
- Adversarial Loss ($L_{adv}$): Encourages statistical indistinguishability.
- Intermediate Loss ($L_{is}$): Matches the "squeezed" attention-based features.
Experimental Results
The method was evaluated on CIFAR-10, CIFAR-100, and ImageNet benchmarks.
Performance Comparison
KSANC consistently outperforms state-of-the-art methods. On CIFAR-100, a ResNet-20 student achieved a 31.42% error rate, surpassing the 33.36% baseline and beating the next best distillation method (TSCAN) by over 1%. On ImageNet, a ResNet-18 student reached a 31.47% Top-1 error, outperforming ANC and TSCAN.
Surpassing the Teacher
Notably, on ImageNet, a compressed ResNet-50 student achieved a lower error rate (26.79%) than its ResNet-152 teacher (27.63%). This suggests the "knowledge squeeze" acts as a regularizer, filtering noise from the teacher's representation and allowing the student to learn the essence of the task logic.
Conclusion
KSANC demonstrates that "process-oriented" intermediate supervision, when properly compressed, significantly enhances student performance and training stability. While computationally more intensive due to the GAN framework and attention modules, the resulting compact models offer superior accuracy. Future work includes extending this approach to non-convolutional architectures and complex tasks like object detection.
Summary updated