AI-KD: Adversarial learning and Implicit regularization for self-Knowledge Distillation

Hyungmin Kim, Sungho Suh, Sunghyun Baek, Daehwan Kim, Daun Jeong, Hansang Cho, Junmo KimKnowledge-Based Systems 2022

Introduction

Knowledge Distillation (KD) is a widely adopted technique where a smaller "student" model is trained to mimic the behavior of a larger, pre-trained "teacher" model. While effective, the success of KD is often contingent on the availability of a high-quality teacher and the architectural compatibility between the two models. Self-Knowledge Distillation (Self-KD) addresses these challenges by allowing a model to learn from its own internal representations or previous training states, serving as a powerful regularizer that improves generalization without requiring an external teacher.

Despite its potential, current Self-KD methods primarily focus on "direct alignment"—forcing the student's output logits to match a target distribution exactly. This approach can be problematic, as it may cause the model to overfit the teacher's specific biases or errors. AI-KD (Adversarial learning and Implicit regularization for self-Knowledge Distillation) proposes a paradigm shift: instead of point-to-point matching, it treats the network as a generator of probability distributions and uses adversarial learning to align these distributions with those of a superior version of itself.

Methodology: Distributional Alignment and Implicit Regularization

The core philosophy of AI-KD is to move beyond rigid logit matching. As illustrated in Figure 1, conventional KD attempts to map specific points in the teacher's feature space to the student's. In contrast, AI-KD aligns the underlying distributions, providing a more flexible and robust learning signal.

Comparison between Conventional KD (a) and the proposed Adversarial Implicit KD (b). AI-KD focuses on aligning the overall probability distributions rather than individual data points.

The Two-Step Training Framework

AI-KD operates through a structured training pipeline consisting of three distinct phases:

  1. Pre-training the Superior Student: A baseline model is trained from scratch to establish a high-quality reference state, referred to as the "Superior Student."
  2. AI-KD Training: The actual student model is trained using a combination of signals from the Superior Student and its own state from the previous epoch. A discriminator network is introduced to facilitate adversarial alignment.
  3. Inference: The discriminator and the auxiliary models are discarded, leaving a highly optimized student model for deployment.
The AI-KD training pipeline. The framework utilizes a pre-trained superior student and the model's own history (Epoch t-1) to guide the current student's learning through a discriminator-based adversarial process.

Adversarial Alignment and Loss Functions

The adversarial component employs a Discriminator network. While the student model performs its primary classification task, the discriminator attempts to distinguish whether a set of output probabilities originated from the "Superior Student" or the current "Student." The student is trained to "fool" the discriminator, effectively forcing its output distribution to match the high-quality distribution of the pre-trained model. To ensure training stability, the authors utilize the Earth-Mover (EM) distance from Wasserstein GANs (WGAN-GP).

The total training objective is governed by a multi-faceted loss function:

  • Guide Loss ($L_G$): Facilitates direct distillation from the pre-trained superior model.
  • Progressive Loss ($L_P$): Distills knowledge from the model’s own state in the previous epoch, ensuring smooth convergence and preventing catastrophic forgetting.
  • Adversarial Loss ($L_A$): The GAN-based loss that drives the alignment of output distributions.

Experimental Evaluation

The researchers evaluated AI-KD across a variety of datasets, ranging from coarse-grained (CIFAR-100, Tiny-ImageNet) to challenging fine-grained datasets (CUB200-2011, Stanford Dogs, MIT67, and FGVC Aircraft). Fine-grained classification is particularly difficult because the inter-class differences are subtle, requiring the model to capture nuanced distributional details.

Key Performance Metrics

AI-KD consistently outperformed state-of-the-art Self-KD methods such as CS-KD, TF-KD, and PS-KD:

  • Fine-grained Accuracy: On the CUB200-2011 dataset, AI-KD reduced the Top-1 error of a ResNet-18 from a baseline of 36.65% to 29.59%. This represents a significant leap over competing methods, which typically achieved errors around 34%.
  • Architecture Agnosticism: The framework demonstrated consistent improvements across diverse architectures, including ResNet-18, ResNet-50, and DenseNet-121.
  • Model Calibration: Beyond accuracy, AI-KD improved model calibration. When combined with temperature scaling, the model's confidence levels more accurately reflected its actual probability of being correct, a critical factor for reliable real-world deployment.

Conclusion

AI-KD represents a significant advancement in Self-Knowledge Distillation by shifting the focus from point-wise logit matching to distributional alignment via adversarial learning. By incorporating implicit regularization from previous training states, the framework provides a stable and effective means of improving model generalization, particularly in complex fine-grained domains. While the current two-step training process adds computational overhead, the resulting performance gains and improved calibration make it a compelling approach for developing robust neural networks.

Summary updated

BibTeX
@article{kim2022ai,
  author = {Hyungmin Kim and Sungho Suh and Sunghyun Baek and Daehwan Kim and Daun Jeong and Hansang Cho and Junmo Kim},
  title = {{AI-KD: Adversarial learning and Implicit regularization for self-Knowledge Distillation}},
  journal = {Knowledge-Based Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=dgJTs5xPOB},
}
Figure