LIT: Block-wise Intermediate Representation Training for Model Compression

Animesh Koratana, Daniel Kang, Peter Bailis, Matei ZahariaarXiv 2018

Introduction

The proliferation of deep neural networks has led to state-of-the-art performance in various domains, but at the cost of significant computational overhead. Model compression techniques like Knowledge Distillation (KD) aim to transfer knowledge from a large "teacher" model to a smaller "student" model. However, standard KD often struggles with very deep networks where the signal from the final output is insufficient to guide early layers effectively. This paper introduces LIT (bLock-wise Intermediate representation Training), a novel approach that trains student models block-by-block using the teacher's internal representations.

Methodology: Block-wise Training

The core innovation of LIT is the decomposition of the training process into discrete blocks. Instead of training the student end-to-end from the start, LIT divides both models into corresponding sections. During training, a student block receives the high-quality intermediate representation (IR) from the teacher's preceding block as its input, rather than the output of the previous student block.

The LIT training architecture: Teacher IRs are used as direct inputs to student blocks during training to ensure stable representations.

This strategy addresses the "unstable representation" problem found in methods like Hint Training (FitNets). By providing "perfect" inputs to each student block, the optimization landscape is simplified. The student is designed to match the teacher's width at split points, allowing for direct comparison via an L2 IR loss. After individual blocks are trained, the entire student model undergoes a final fine-tuning phase using standard KD.

Experimental Results

The effectiveness of LIT was evaluated on image classification (CIFAR-10/100), sentiment analysis (Amazon Reviews), and generative tasks (StarGAN).

Image Classification Performance

On CIFAR datasets, LIT consistently outperformed standard KD and Hint training across various architectures including ResNet and ResNeXt. Notably, LIT achieved a 5.5x reduction in parameters (ResNeXt-110 to ResNeXt-20) on CIFAR-10 with no loss in accuracy.

Comparison of LIT against KD, Hint training, and training from scratch across different model depths and datasets.

Beyond Classification: GAN Compression

Unlike standard KD, which relies on class probabilities, LIT's use of internal feature maps allows it to compress Generative Adversarial Networks (GANs). In experiments with StarGAN on the CelebA dataset, a compressed student model with only 2 residual blocks (down from 6) actually improved upon the teacher's Inception and FID scores, suggesting a strong regularization effect.

Conclusion

LIT provides a robust framework for compressing deep neural networks by leveraging intermediate representations in a block-wise fashion. By ensuring stable inputs during the training of student sub-sections, LIT overcomes the optimization hurdles of previous distillation methods. The approach is versatile, showing success in both discriminative and generative tasks, often matching or exceeding the performance of the original teacher model despite significant parameter reduction.

Summary updated

BibTeX
@misc{koratana2018lit,
  author = {Animesh Koratana and Daniel Kang and Peter Bailis and Matei Zaharia},
  title = {{LIT: Block-wise Intermediate Representation Training for Model Compression}},
  year = {2018},
  eprint = {1810.01937},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1810.01937},
}
Figure