Progressive Ensemble Distillation: Building Ensembles for Efficient Inference

Don Dennis, Abhishek Shetty, Anish Sevekari, Kazuhito Koishida, Virginia Smith

When deploying machine learning models on edge devices like smartphones or wearables, resources such as battery life, compute power, and available time are strictly constrained and often unpredictable. In these dynamic environments, "anytime inference" is highly desirable: the ability for a model to output a coarse prediction quickly, and progressively refine it if given more time.

Traditionally, developers use Knowledge Distillation (KD) to compress a large "teacher" model into a smaller "student" model. However, standard KD has two major pitfalls in this context:

  1. Rigidity: It produces a single model with a fixed inference cost. If the system's latency budget changes, a completely different model is required.
  2. The Capacity Gap: Distilling a massive teacher into a tiny student often results in severe performance degradation. Furthermore, distilling a teacher into a standard ensemble of shallow networks rarely performs better than distilling into a single model of equivalent size.

To address these challenges, researchers introduce B-DISTIL, a method for progressive ensemble distillation. B-DISTIL approximates a large model using a sequence of low-latency models, ensuring that evaluating each additional model strictly improves the prediction without blowing up the computational overhead.

Progressive Distillation Concept

The Mechanics of B-DISTIL

B-DISTIL frames progressive distillation as a two-player zero-sum game, heavily inspired by classical boosting algorithms like AdaBoost. The methodology relies on three key techniques:

  • Log-Barrier Regularization for Weak Learners: To ensure each tiny model actually improves the ensemble, B-DISTIL uses a custom log-barrier loss function. This forces the new student model to focus specifically on correcting the residual errors made by the current ensemble, acting as a "weak learner."
  • Intermediate Layer Connections (Activation Reuse): To overcome the capacity gap between the tiny students and the massive teacher, B-DISTIL allows new models in the sequence to reuse intermediate activations (features) computed by previously evaluated models. This drastically increases the expressiveness of the ensemble without adding significant floating-point operations (FLOPs).
  • Runtime Profiling: The algorithm uses software profilers during training to rank candidate models based on actual inference latency, ensuring the ensemble is optimized for real-world hardware constraints.

By treating distillation as a sequential game of finding weak learners, the authors prove that B-DISTIL guarantees in-sample convergence to the teacher's performance at a rate of $\mathcal{O}(1/\sqrt{T})$, along with strong out-of-sample generalization bounds.

Key Results

The authors evaluated B-DISTIL across a diverse set of modalities and architectures, including CNNs, ResNets, and RNNs, using standard datasets for vision (CIFAR-10/100, ImageNet), speech (Google-13), and sensor data (DSA-19).

  • Matches Oracle Baselines: In accuracy vs. latency trade-offs, B-DISTIL is competitive with an "oracle" baseline (NO-RESHED)—a scenario where the system magically knows the exact inference budget ahead of time and selects the perfect single model for that budget.
  • Beats Standard Ensembles: B-DISTIL significantly outperforms standard weighted averaging of independent models (RESCHED) across all datasets, proving the value of its intermediate connections and boosting objective.
B-DISTIL Performance vs. Baselines
  • State-of-the-Art Early Prediction: On sequential data, B-DISTIL is competitive with specialized early-prediction methods. For example, on Google-13, B-DISTIL achieves ~89% accuracy using only 75% of the audio sequence. Unlike specialized methods, B-DISTIL is architecture-agnostic.
  • Negligible Overhead: Profiling shows that the FLOP overhead introduced by the intermediate connections between models is tiny compared to the base inference cost of the models themselves.

Ultimately, flexibility beats rigidity. Instead of training and storing multiple different models for different latency budgets, a single B-DISTIL ensemble can dynamically adapt to any budget at runtime. If the system scheduler interrupts the inference process, the ensemble simply outputs the prediction from the models evaluated so far.

Limitations and Future Work

While powerful, B-DISTIL does require the user to manually design the base class of candidate models and decide on the types of intermediate connections allowed. Additionally, because later models depend on the activations of earlier models, B-DISTIL introduces blocking dependencies that prevent trivial, fully parallel execution of the entire ensemble.

Future work may extend this framework to cloud and data-center settings to optimize for throughput (batched inference) rather than just latency. The authors also suggest that B-DISTIL could be combined with orthogonal compression techniques like quantization and pruning, opening new avenues for efficient, robust model deployment.

Summary updated

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