Torch-Uncertainty: A Deep Learning Framework for Uncertainty Quantification
Adrien Lafage, Olivier Laurent, Firas Gabetni, Gianni Franchi
TL;DR
Torch-Uncertainty introduces a unified, domain-general framework for uncertainty quantification in deep learning, built on PyTorch and Lightning. It emphasizes modular UQ method integration, extensive evaluation metrics, and a broad, plug-and-play dataset suite to enable reproducible cross-domain benchmarking. The paper showcases classification and segmentation benchmarks, demonstrates state-of-the-art performance for ensembles and calibration techniques, and highlights the framework’s potential to accelerate robust, uncertainty-aware AI deployment. By providing pretrained models, tutorials, and open-source tooling, it aims to democratize access to principled UQ research and practice across academia and industry.
Abstract
Deep Neural Networks (DNNs) have demonstrated remarkable performance across various domains, including computer vision and natural language processing. However, they often struggle to accurately quantify the uncertainty of their predictions, limiting their broader adoption in critical real-world applications. Uncertainty Quantification (UQ) for Deep Learning seeks to address this challenge by providing methods to improve the reliability of uncertainty estimates. Although numerous techniques have been proposed, a unified tool offering a seamless workflow to evaluate and integrate these methods remains lacking. To bridge this gap, we introduce Torch-Uncertainty, a PyTorch and Lightning-based framework designed to streamline DNN training and evaluation with UQ techniques and metrics. In this paper, we outline the foundational principles of our library and present comprehensive experimental results that benchmark a diverse set of UQ methods across classification, segmentation, and regression tasks. Our library is available at https://github.com/ENSTA-U2IS-AI/Torch-Uncertainty
