Progressive Knowledge Distillation: Building Ensembles for Efficient Inference

Don Kurian Dennis, Abhishek Shetty, Anish Sevekari, Kazuhito Koishida, Virginia Smith · OpenReview

Abstract

We study the problem of progressive distillation: Given a large, pre-trained teacher model $g$, we seek to decompose the model into an ensemble of smaller, low-inference cost student models $f_i$. The resulting ensemble allows for flexibly tuning accuracy vs. inference cost, which is useful for a number of applications in on-device inference. The method we propose, B-DISTIL, relies on an algorithmic procedure that uses function composition over intermediate activations to construct expressive ensembles with similar performance as $g$, but with much smaller student models. We demonstrate the effectiveness of B-DISTIL by decomposing pretrained models across standard image, speech, and sensor datasets. We also provide theoretical guarantees for our method in terms of convergence and generalization.

Introduction

Deep learning models have achieved remarkable accuracy, but their deployment on resource-constrained devices like smartphones and IoT sensors remains a significant challenge. Traditional knowledge distillation attempts to compress a large "teacher" model into a single smaller "student" model. However, this approach is often rigid, providing a fixed-size model that may fail to capture the teacher's complexity if the capacity gap between teacher and student is too large. Furthermore, static models cannot adapt to fluctuating on-device resources such as battery levels or CPU availability.

To address these limitations, we present B-DISTIL, a progressive distillation framework. Instead of a single student, B-DISTIL decomposes a pretrained teacher model into an ensemble of small, low-cost student models that can be evaluated progressively. This allows for "anytime inference," where the computation can be halted early for a quick estimate or continued for higher accuracy, providing a flexible trade-off between performance and latency that is ideal for edge deployment.

Methods

The B-DISTIL algorithm treats the decomposition process as a sequence of optimization steps rooted in boosting theory. The high-level workflow is illustrated in Figure 1.

Conceptual overview of progressive distillation where a teacher model is decomposed into an ensemble of student models.

Algorithmic Framework

B-DISTIL operates as a two-player zero-sum game. One player (the "max player") identifies data distributions where the current ensemble underperforms, while the other player (the "min player") seeks a new "weak learner"—a small student model—to correct these specific errors. To ensure each new student adds unique value rather than redundant information, the optimization incorporates a log-barrier regularization term that focuses on the residual errors of the teacher.

Feature Reuse and Expressivity

A key innovation in B-DISTIL is the use of function composition. New student models are permitted to "reuse" intermediate activations from preceding models in the ensemble. This feature reuse effectively bridges the capacity gap, allowing a collection of small models to approximate complex teacher functions more accurately than independent models of the same total size. This effectively increases the expressive power of the ensemble without significantly increasing the inference cost, as the heavy lifting of feature extraction is shared.

Theoretical Foundation

Unlike many empirical distillation techniques, B-DISTIL is grounded in boosting theory. The authors provide rigorous proofs for in-sample convergence and generalization, showing that the ensemble's error decreases at a rate of $O(1/\sqrt{T})$ as the number of student models $T$ increases.

Results and Discussion

We evaluated B-DISTIL across a diverse range of domains, including synthetic datasets (Cube, Ellipsoid), computer vision (CIFAR-10, CIFAR-100, TinyImageNet, ImageNet-1k), speech recognition (Google-13), and sensor data (DSA-19).

Accuracy vs. fractional inference time for B-DISTIL compared to baselines across various datasets and architectures.

As shown in Figure 4, B-DISTIL (green) consistently outperforms standard ensemble methods like RESHED (yellow), which simply averages independent models. Notably, B-DISTIL performs nearly as well as "NORESHED" (blue) baselines—models specifically trained for a single fixed latency—despite the fact that B-DISTIL provides a continuous range of latency options at runtime.

The results demonstrate that the overhead of feature reuse is negligible compared to the total FLOPs, making the added expressivity essentially "free." Across all tasks, the progressive nature of the ensemble allows for efficient early-exit strategies, where simple inputs are classified by the first few students, and only complex cases require the full ensemble's capacity.

Conclusion

B-DISTIL offers a principled approach to model compression by turning a monolithic teacher into a flexible team of specialists. By combining boosting theory with modern deep learning techniques like feature reuse, it provides a robust solution for deploying high-performance AI on the edge. While the current framework requires manual definition of the student base class, it significantly advances the state-of-the-art in efficient, adaptable on-device inference. Future work will explore automated architecture search for student models and the impact of progressive distillation on model robustness and fairness.

Summary updated

BibTeX
@inproceedings{dennis2023progressive,
  author = {Don Kurian Dennis and Abhishek Shetty and Anish Sevekari and Kazuhito Koishida and Virginia Smith},
  title = {{Progressive Knowledge Distillation: Building Ensembles for Efficient Inference}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=wNxyDofh74},
}
Figure