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.
翻译:共形预测(Conformal Prediction, CP)因其严格的理论保证而受到研究界的广泛关注。然而,研究者和开发者在将CP算法应用于深度学习模型时,仍面临适用性和效率方面的挑战。本文介绍了\torchcp,一个基于PyTorch的综合工具包,旨在增强CP在深度学习模型中的可用性。\torchcp为多种机器学习任务(包括分类、回归、图神经网络及大语言模型)实现了广泛的共形预测后处理与训练方法。此外,我们提供了用户友好的接口和广泛的评估方案,以便将CP算法轻松集成到特定任务中。我们的\torchcp工具包完全基于PyTorch构建,能够为深度学习模型提供高性能的GPU加速,并支持大规模数据集上的小批量计算。该代码采用LGPL许可证开源,发布于\url{https://github.com/ml-stat-Sustech/TorchCP},并将持续更新。