arXiv Analytics

Sign in

arXiv:2402.12683 [cs.LG]AbstractReferencesReviewsResources

TorchCP: A Python Library for Conformal Prediction

Jianguo Huang, Jianqing Song, Xuanning Zhou, Bingyi Jing, Hongxin Wei

Published 2024-02-20, updated 2024-12-12Version 2

Conformal Prediction (CP) has attracted great attention from the research community due to its strict theoretical guarantees. However, researchers and developers still face challenges of applicability and efficiency when applying CP algorithms to deep learning models. In this paper, we introduce \torchcp, a comprehensive PyTorch-based toolkit to strengthen the usability of CP for deep learning models. \torchcp implements a wide range of post-hoc and training methods of conformal prediction for various machine learning tasks, including classification, regression, GNN, and LLM. Moreover, we provide user-friendly interfaces and extensive evaluations to easily integrate CP algorithms into specific tasks. Our \torchcp toolkit, built entirely with PyTorch, enables high-performance GPU acceleration for deep learning models and mini-batch computation on large-scale datasets. With the LGPL license, the code is open-sourced at \url{https://github.com/ml-stat-Sustech/TorchCP} and will be continuously updated.

Related articles: Most relevant | Search more
arXiv:2310.06430 [cs.LG] (Published 2023-10-10)
Conformal Prediction for Deep Classifier via Label Ranking
arXiv:2501.11689 [cs.LG] (Published 2025-01-20)
Randomness, exchangeability, and conformal prediction
arXiv:0706.3188 [cs.LG] (Published 2007-06-21)
A tutorial on conformal prediction