Packed Ensembles for efficient uncertainty estimation

Olivier Laurent, Adrien Lafage, Enzo Tartaglione, Geoffrey Daniel, Jean-marc Martinez, Andrei Bursuc, Gianni Franchi

Deep Ensembles are the "gold standard" for uncertainty estimation in deep learning, but they are notoriously expensive. The ICLR 2023 paper Packed-Ensembles for efficient uncertainty estimation introduces Packed-Ensembles (PE), a clever architecture that uses grouped convolutions to "pack" multiple independent subnetworks into a single backbone, delivering ensemble-grade reliability with significantly lower computational overhead.

TL;DR

Packed-Ensembles leverage grouped convolutions to parallelize an ensemble into a single shared backbone, allowing for a single forward pass instead of $M$ sequential passes. PE matches the accuracy and uncertainty calibration of traditional Deep Ensembles while using up to 84% fewer parameters and offering a massive boost in inference throughput.

Accuracy vs. Throughput for Packed-Ensembles compared to Deep Ensembles. Bubble size indicates parameter count.

What Problem Does This Paper Address?

In safety-critical applications like autonomous driving or medical diagnosis, knowing when a model is unsure is just as important as its raw accuracy. Deep Ensembles (DE)—training multiple identical models with different initializations—are excellent at this because they provide a diversity of opinions, leading to robust uncertainty estimation and out-of-distribution (OOD) detection.

However, DE has a fatal flaw: its computational cost (memory, training time, and inference latency) scales linearly with the number of models. If you want an ensemble of four ResNet-50s, you need 4x the memory and 4x the compute. This makes them impractical for real-time edge devices. Previous "efficient" alternatives often sacrifice accuracy or the functional diversity that makes ensembles useful in the first place.

Methods: Structured Sparsity

The core idea of Packed-Ensembles is to treat an ensemble not as a collection of separate models, but as a single model with structured sparsity.

Comparison of a) single model, b) Deep Ensemble, and c) Packed-Ensemble architecture.
  1. Grouped Convolutions: The authors use grouped convolutions to delineate independent "lanes" or subnetworks within the same layers. Because the weights are not shared across these groups, each "lane" acts as an independent model.
  2. The Hyperparameters ($\alpha, M, \gamma$):
    • $M$ (Number of Subnetworks): How many "models" are packed inside the backbone.
  3. $\alpha$ (Expansion Factor): A multiplier for the network width. Since subnetworks are smaller than the original model, $\alpha$ helps recover representation power.
  4. $\gamma$ (Subgroups): Adds an extra layer of sparsity within each subnetwork to further reduce parameters.
  5. Parallelized Training: Instead of training $M$ models sequentially, PE uses a "rearrange" operation to stack inputs and process them in a single parallel forward pass. This exploits GPU hardware much more efficiently than sequential loops.

Key Insights and Results

The authors performed an extensive evaluation across standard benchmarks (CIFAR-10/100, ImageNet-1k) and "stress-test" datasets for OOD and robustness (SVHN, ImageNet-O, CIFAR-100-C).

  • Parameter Efficiency: On CIFAR-100 with a ResNet-50 backbone, PE-($2, 4, 1$) achieved higher accuracy (81.2%) than a standard Deep Ensemble (80.9%) while using only 16% of the parameters (15.5M vs 94.8M).
  • Inference Speed: PE is roughly 2.3x faster to train than a standard 4-model Deep Ensemble and offers significantly higher image throughput (images/sec) during inference.
  • Uncertainty & OOD: PE consistently matched or outperformed Deep Ensembles on Expected Calibration Error (ECE) and OOD detection metrics (AUPR/AUC). This proves that "packing" doesn't hurt the model's ability to say "I don't know."
  • Robustness: Under distributional shifts (like image corruptions in CIFAR-100-C), PE showed superior stability compared to single models and other efficient ensemble methods like MIMO or BatchEnsemble.
  • The Power of $\alpha$: The authors found that you don't need a full-sized model for each ensemble member. A "packed" version with a width expansion factor ($\alpha$) of 2 often outperforms a standard Deep Ensemble while remaining much smaller.

Limitations and Future Work

While grouped convolutions are mathematically efficient, current deep learning frameworks (PyTorch/TensorFlow) are often bandwidth-bound, meaning the theoretical speedups aren't always fully realized on current hardware. Future improvements in how hardware handles these operations could make PE even faster.

Additionally, while tested extensively on ResNet and WideResNet architectures, exploring how this "packing" logic applies to Vision Transformers (ViTs) or Large Language Models (LLMs) remains an open and highly promising area for research.

Summary updated

BibTeX
@inproceedings{laurent2023packed,
  author = {Olivier Laurent and Adrien Lafage and Enzo Tartaglione and Geoffrey Daniel and Jean-marc Martinez and Andrei Bursuc and Gianni Franchi},
  title = {{Packed Ensembles for efficient uncertainty estimation}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=XXTyv1zD9zD},
}
Figure