Abstract
Knowledge Distillation (KD) typically relies on a static, pre-trained teacher model to guide a student. This paper presents Online Adversarial Knowledge Distillation (AFD), a framework that enables multiple networks to learn collaboratively from scratch by sharing internal feature maps. Unlike traditional methods that use direct pixel-wise alignment, AFD employs an adversarial approach to match feature distributions. This preserves architectural diversity while transferring rich spatial information, resulting in improved performance on standard image classification benchmarks like CIFAR-100 and ImageNet.
Introduction
Deep neural networks are increasingly deployed in resource-constrained environments, necessitating techniques like Knowledge Distillation (KD) to compress large models into smaller, efficient ones. Traditional KD often requires a powerful, pre-trained "teacher" model (offline KD) or relies solely on final class probabilities (logits) in "online" settings where models train together.
A significant limitation of logit-based online distillation is the omission of feature maps. These intermediate representations contain dense spatial information about image structure and intensity that logits lack. However, sharing feature maps online is difficult; forcing two models to match exactly (e.g., via $L_1$ loss) often constrains them too tightly, leading to "identical clones" that fail to generalize.
As shown in the figure above, direct alignment forces point-to-point matching, whereas Adversarial Feature-map Distillation matches the overall distribution, allowing networks to maintain their unique internal "personalities" while benefiting from peer knowledge.
Methods: Adversarial Feature-map Distillation
The AFD framework treats the distillation process as a distribution matching problem rather than a regression problem.
Adversarial Training
Instead of minimizing the distance between feature map values, AFD introduces discriminators for each network. As illustrated in the architecture diagram below, for a pair of networks, each network acts as a generator. A discriminator $D_1$ is trained to distinguish whether a feature map originated from its primary network ($Network \Theta_1$) or its peer ($Network \Theta_2$). Simultaneously, the networks are trained to "fool" these discriminators.
This adversarial setup allows the models to transfer high-level stylistic and structural information without being forced into identical pixel values. The total loss function combines standard cross-entropy ($\mathcal{L}_{ce}$), Kullback-Leibler divergence for logit matching ($\mathcal{L}_{kl}$), and the adversarial feature loss.
Cyclic Learning Scheme
To scale this approach to $K$ networks without the quadratic complexity of $K(K-1)$ discriminators, the authors propose a Cyclic Learning flow ($1 \to 2 \to \dots \to K \to 1$). This reduces the number of discriminators to $K$, making the simultaneous training of large ensembles computationally feasible.
Experimental Results
The authors evaluated AFD on CIFAR-100 and ImageNet datasets using various architectures, including ResNet and Wide ResNet (WRN).
- Performance Gains: On CIFAR-100, a ResNet-32 model trained with AFD achieved 74.03% accuracy, significantly outperforming the vanilla baseline (69.38%) and the popular Deep Mutual Learning (DML) method (73.40%).
- Architectural Diversity: Quantitative analysis confirmed that AFD-trained models maintain higher diversity in their feature maps compared to $L_1$-based methods. This diversity contributes to a more robust ensemble.
- Heterogeneous Training: AFD is particularly effective when training networks of different sizes together. Smaller networks receive a substantial performance boost by learning from the feature distributions of larger, more capable peers.
- Qualitative Analysis: Grad-CAM visualizations revealed that AFD-trained models focus more accurately on salient object features (e.g., the head of a bird) compared to the noisier heatmaps generated by direct alignment methods.
Conclusion
Online Adversarial Knowledge Distillation (AFD) provides a robust way to share intermediate feature information during simultaneous model training. By shifting from point-wise matching to distribution matching via GANs, the method overcomes the "moving target" problem inherent in online distillation. While it introduces additional computational overhead and requires careful hyperparameter tuning, the gains in accuracy and the ability to maintain model diversity make it a powerful tool for developing efficient neural networks. Future research may extend this adversarial feature transfer to spatially-intensive tasks like object detection and semantic segmentation.
Summary updated