TorchCP: A Python Library for Conformal Prediction
- URL: http://arxiv.org/abs/2402.12683v4
- Date: Fri, 29 Aug 2025 08:56:01 GMT
- Title: TorchCP: A Python Library for Conformal Prediction
- Authors: Jianguo Huang, Jianqing Song, Xuanning Zhou, Bingyi Jing, Hongxin Wei,
- Abstract summary: Conformal prediction (CP) is a powerful statistical framework that generates prediction intervals or sets with guaranteed coverage probability.<n>This paper introduces TorchCP, a PyTorch-native library designed to integrate state-of-the-art CP algorithms into deep learning techniques.<n>TorchCP enables CP-specific training algorithms, online prediction, and GPU-accelerated batch processing, achieving up to 90% reduction in inference time on large datasets.
- Score: 22.441191734166413
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Conformal prediction (CP) is a powerful statistical framework that generates prediction intervals or sets with guaranteed coverage probability. While CP algorithms have evolved beyond traditional classifiers and regressors to sophisticated deep learning models like deep neural networks (DNNs), graph neural networks (GNNs), and large language models (LLMs), existing CP libraries often lack the model support and scalability for large-scale DL scenarios. This paper introduces TorchCP, a PyTorch-native library designed to integrate state-of-the-art CP algorithms into deep learning techniques, including DNN-based classifier/regressor, GNN, and LLM. Released under the LGPL-3.0 license, TorchCP comprises about 16k lines of code, validated with 100% unit test coverage and detailed documentation. Notably, TorchCP enables CP-specific training algorithms, online prediction, and GPU-accelerated batch processing, achieving up to 90% reduction in inference time on large datasets. With its low-coupling design, comprehensive suite of advanced methods, and full GPU scalability, TorchCP empowers researchers and practitioners to enhance uncertainty quantification across cutting-edge applications.
Related papers
- One Sample is Enough to Make Conformal Prediction Robust [53.78604391939934]
We show that conformal prediction attains some robustness even with a forward pass on a single randomly perturbed input.<n>Our approach returns robust sets with smaller average set size compared to SOTA methods which use many (e.g. around 100) passes per input.
arXiv Detail & Related papers (2025-06-19T19:14:25Z) - TorchQC -- A framework for efficiently integrating machine and deep learning methods in quantum dynamics and control [0.0]
TorchQC is a new library written entirely in Python and based on the PyTorch deep learning library.
It exploits PyTorch and its tensor mechanism to represent quantum states and operators as tensors, while it also incorporates all the tools needed to simulate quantum system dynamics.
arXiv Detail & Related papers (2024-12-19T07:19:55Z) - ml_edm package: a Python toolkit for Machine Learning based Early Decision Making [0.43363943304569713]
textttml_edm is a Python 3 library designed for early decision making of any learning tasks involving temporal/sequential data.
textttscikit-learn makes estimators and pipelines compatible with textttml_edm.
arXiv Detail & Related papers (2024-08-23T09:08:17Z) - depyf: Open the Opaque Box of PyTorch Compiler for Machine Learning Researchers [92.13613958373628]
textttdepyf is a tool designed to demystify the inner workings of the PyTorch compiler.
textttdepyf decompiles bytecode generated by PyTorch back into equivalent source code.
arXiv Detail & Related papers (2024-03-14T16:17:14Z) - sQUlearn -- A Python Library for Quantum Machine Learning [0.0]
sQUlearn introduces a user-friendly, NISQ-ready Python library for quantum machine learning (QML)
The library's dual-layer architecture serves both QML researchers and practitioners.
arXiv Detail & Related papers (2023-11-15T14:22:53Z) - UncertaintyPlayground: A Fast and Simplified Python Library for
Uncertainty Estimation [0.0]
UncertaintyPlayground is a Python library built on PyTorch and GPyTorch for uncertainty estimation in supervised learning tasks.
The library offers fast training for Gaussian and multi-modal outcome distributions.
It can visualize the prediction intervals of one or more instances.
arXiv Detail & Related papers (2023-10-23T18:36:54Z) - PILOT: A Pre-Trained Model-Based Continual Learning Toolbox [65.57123249246358]
This paper introduces a pre-trained model-based continual learning toolbox known as PILOT.
On the one hand, PILOT implements some state-of-the-art class-incremental learning algorithms based on pre-trained models, such as L2P, DualPrompt, and CODA-Prompt.
On the other hand, PILOT fits typical class-incremental learning algorithms within the context of pre-trained models to evaluate their effectiveness.
arXiv Detail & Related papers (2023-09-13T17:55:11Z) - Probabilistically robust conformal prediction [9.401004747930974]
Conformal prediction (CP) is a framework to quantify uncertainty of machine learning classifiers including deep neural networks.
Almost all the existing work on CP assumes clean testing data and there is not much known about the robustness of CP algorithms.
This paper studies the problem of probabilistically robust conformal prediction (PRCP) which ensures robustness to most perturbations.
arXiv Detail & Related papers (2023-07-31T01:32:06Z) - RoseNNa: A performant, portable library for neural network inference
with application to computational fluid dynamics [0.0]
We present the roseNNa library, which bridges the gap between neural network inference and CFD.
RoseNNa is a non-invasive, lightweight (1000 lines) tool for neural network inference.
arXiv Detail & Related papers (2023-07-30T21:11:55Z) - Provably Efficient Representation Learning with Tractable Planning in
Low-Rank POMDP [81.00800920928621]
We study representation learning in partially observable Markov Decision Processes (POMDPs)
We first present an algorithm for decodable POMDPs that combines maximum likelihood estimation (MLE) and optimism in the face of uncertainty (OFU)
We then show how to adapt this algorithm to also work in the broader class of $gamma$-observable POMDPs.
arXiv Detail & Related papers (2023-06-21T16:04:03Z) - PyPOTS: A Python Toolbox for Data Mining on Partially-Observed Time
Series [0.0]
PyPOTS is an open-source Python library dedicated to data mining and analysis on partially-observed time series.
It provides easy access to diverse algorithms categorized into four tasks: imputation, classification, clustering, and forecasting.
arXiv Detail & Related papers (2023-05-30T07:57:05Z) - torchgfn: A PyTorch GFlowNet library [56.071033896777784]
torchgfn is a PyTorch library that aims to address this need.
It provides users with a simple API for environments and useful abstractions for samplers and losses.
arXiv Detail & Related papers (2023-05-24T00:20:59Z) - Improving Uncertainty Quantification of Deep Classifiers via
Neighborhood Conformal Prediction: Novel Algorithm and Theoretical Analysis [30.0231328500976]
Conformal prediction (CP) is a principled framework for uncertainty quantification of deep models.
This paper proposes a novel algorithm referred to as Neighborhood Conformal Prediction (NCP) to improve the efficiency of uncertainty quantification.
We show that NCP leads to significant reduction in prediction set size over prior CP methods.
arXiv Detail & Related papers (2023-03-19T15:56:50Z) - Partitioning Distributed Compute Jobs with Reinforcement Learning and
Graph Neural Networks [58.720142291102135]
Large-scale machine learning models are bringing advances to a broad range of fields.
Many of these models are too large to be trained on a single machine, and must be distributed across multiple devices.
We show that maximum parallelisation is sub-optimal in relation to user-critical metrics such as throughput and blocking rate.
arXiv Detail & Related papers (2023-01-31T17:41:07Z) - Efficient Dataset Distillation Using Random Feature Approximation [109.07737733329019]
We propose a novel algorithm that uses a random feature approximation (RFA) of the Neural Network Gaussian Process (NNGP) kernel.
Our algorithm provides at least a 100-fold speedup over KIP and can run on a single GPU.
Our new method, termed an RFA Distillation (RFAD), performs competitively with KIP and other dataset condensation algorithms in accuracy over a range of large-scale datasets.
arXiv Detail & Related papers (2022-10-21T15:56:13Z) - MAPIE: an open-source library for distribution-free uncertainty
quantification [0.0]
We introduce MAPIE, an open-source Python library that quantifies the uncertainties of Machine Learning models.
MAPIE implements conformgnostical prediction methods, allowing the user to easily compute uncertainties.
It is hosted on scikit-learn-contrib and is fully "scikit-learn-compatible"
arXiv Detail & Related papers (2022-07-25T15:44:19Z) - LPYOLO: Low Precision YOLO for Face Detection on FPGA [1.7188280334580197]
Face detection on surveillance systems is the most expected application on the security market.
TinyYolov3 architecture is redesigned and deployed for face detection.
Model is converted to an HLS based application with using FINN framework and FINN-HLS library.
arXiv Detail & Related papers (2022-07-21T13:54:52Z) - PyGOD: A Python Library for Graph Outlier Detection [56.33769221859135]
PyGOD is an open-source library for detecting outliers in graph data.
It supports a wide array of leading graph-based methods for outlier detection.
PyGOD is released under a BSD 2-Clause license at https://pygod.org and at the Python Package Index (PyPI)
arXiv Detail & Related papers (2022-04-26T06:15:21Z) - Deepchecks: A Library for Testing and Validating Machine Learning Models
and Data [8.876608553825227]
Deepchecks is a Python library for comprehensively validating machine learning models and data.
Our goal is to provide an easy-to-use library comprising of many checks related to various types of issues.
arXiv Detail & Related papers (2022-03-16T09:37:22Z) - ZippyPoint: Fast Interest Point Detection, Description, and Matching
through Mixed Precision Discretization [71.91942002659795]
We investigate and adapt network quantization techniques to accelerate inference and enable its use on compute limited platforms.
ZippyPoint, our efficient quantized network with binary descriptors, improves the network runtime speed, the descriptor matching speed, and the 3D model size.
These improvements come at a minor performance degradation as evaluated on the tasks of homography estimation, visual localization, and map-free visual relocalization.
arXiv Detail & Related papers (2022-03-07T18:59:03Z) - $\texttt{py-irt}$: A Scalable Item Response Theory Library for Python [3.9828133571463935]
$textttpy-irt$ is a Python library for fitting Bayesian Item Response Theory (IRT) models.
It estimates latent traits of subjects and items, making it appropriate for use in IRT tasks as well as ideal-point models.
arXiv Detail & Related papers (2022-03-02T18:09:46Z) - PyHHMM: A Python Library for Heterogeneous Hidden Markov Models [63.01207205641885]
PyHHMM is an object-oriented Python implementation of Heterogeneous-Hidden Markov Models (HHMMs)
PyHHMM emphasizes features not supported in similar available frameworks: a heterogeneous observation model, missing data inference, different model order selection criterias, and semi-supervised training.
PyHHMM relies on the numpy, scipy, scikit-learn, and seaborn Python packages, and is distributed under the Apache-2.0 License.
arXiv Detail & Related papers (2022-01-12T07:32:36Z) - An Adaptive Device-Edge Co-Inference Framework Based on Soft
Actor-Critic [72.35307086274912]
High-dimension parameter model and large-scale mathematical calculation restrict execution efficiency, especially for Internet of Things (IoT) devices.
We propose a new Deep Reinforcement Learning (DRL)-Soft Actor Critic for discrete (SAC-d), which generates the emphexit point, emphexit point, and emphcompressing bits by soft policy iterations.
Based on the latency and accuracy aware reward design, such an computation can well adapt to the complex environment like dynamic wireless channel and arbitrary processing, and is capable of supporting the 5G URL
arXiv Detail & Related papers (2022-01-09T09:31:50Z) - Latte: Cross-framework Python Package for Evaluation of Latent-Based
Generative Models [65.51757376525798]
Latte is a Python library for evaluation of latent-based generative models.
Latte is compatible with both PyTorch and/Keras, and provides both functional and modular APIs.
arXiv Detail & Related papers (2021-12-20T16:00:28Z) - PyTorchVideo: A Deep Learning Library for Video Understanding [71.89124881732015]
PyTorchVideo is an open-source deep-learning library for video understanding tasks.
It covers a full stack of video understanding tools including multimodal data loading, transformations, and models.
The library is based on PyTorch and can be used by any training framework.
arXiv Detail & Related papers (2021-11-18T18:59:58Z) - Scikit-dimension: a Python package for intrinsic dimension estimation [58.8599521537]
This technical note introduces textttscikit-dimension, an open-source Python package for intrinsic dimension estimation.
textttscikit-dimension package provides a uniform implementation of most of the known ID estimators based on scikit-learn application programming interface.
We briefly describe the package and demonstrate its use in a large-scale (more than 500 datasets) benchmarking of methods for ID estimation in real-life and synthetic data.
arXiv Detail & Related papers (2021-09-06T16:46:38Z) - QuaPy: A Python-Based Framework for Quantification [76.22817970624875]
QuaPy is an open-source framework for performing quantification (a.k.a. supervised prevalence estimation)
It is written in Python and can be installed via pip.
arXiv Detail & Related papers (2021-06-18T13:57:11Z) - Quantized Neural Networks via {-1, +1} Encoding Decomposition and
Acceleration [83.84684675841167]
We propose a novel encoding scheme using -1, +1 to decompose quantized neural networks (QNNs) into multi-branch binary networks.
We validate the effectiveness of our method on large-scale image classification, object detection, and semantic segmentation tasks.
arXiv Detail & Related papers (2021-06-18T03:11:15Z) - CREPO: An Open Repository to Benchmark Credal Network Algorithms [78.79752265884109]
Credal networks are imprecise probabilistic graphical models based on, so-called credal, sets of probability mass functions.
A Java library called CREMA has been recently released to model, process and query credal networks.
We present CREPO, an open repository of synthetic credal networks, provided together with the exact results of inference tasks on these models.
arXiv Detail & Related papers (2021-05-10T07:31:59Z) - OpTorch: Optimized deep learning architectures for resource limited
environments [1.5736899098702972]
We propose optimized deep learning pipelines in multiple aspects of training including time and memory.
OpTorch is a machine learning library designed to overcome weaknesses in existing implementations of neural network training.
arXiv Detail & Related papers (2021-05-03T03:58:57Z) - DoubleML -- An Object-Oriented Implementation of Double Machine Learning
in Python [1.4911092205861822]
DoubleML is an open-source Python library implementing the double machine learning framework of Chernozhukov et al.
It contains functionalities for valid statistical inference on causal parameters when the estimation of parameters is based on machine learning methods.
The package is distributed under the MIT license and relies on core libraries from the scientific Python ecosystem.
arXiv Detail & Related papers (2021-04-07T16:16:39Z) - PyHealth: A Python Library for Health Predictive Models [53.848478115284195]
PyHealth is an open-source Python toolbox for developing various predictive models on healthcare data.
The data preprocessing module enables the transformation of complex healthcare datasets into machine learning friendly formats.
The predictive modeling module provides more than 30 machine learning models, including established ensemble trees and deep neural network-based approaches.
arXiv Detail & Related papers (2021-01-11T22:02:08Z) - PyLightcurve-torch: a transit modelling package for deep learning
applications in PyTorch [0.0]
We present a new open source python package, based on PyLightcurve and PyTorch.
It is tailored for efficient computation and automatic differentiation of exoplanetary transits.
arXiv Detail & Related papers (2020-11-03T22:05:41Z) - Uncertainty Sets for Image Classifiers using Conformal Prediction [112.54626392838163]
We present an algorithm that modifies any classifier to output a predictive set containing the true label with a user-specified probability, such as 90%.
The algorithm is simple and fast like Platt scaling, but provides a formal finite-sample coverage guarantee for every model and dataset.
Our method modifies an existing conformal prediction algorithm to give more stable predictive sets by regularizing the small scores of unlikely classes after Platt scaling.
arXiv Detail & Related papers (2020-09-29T17:58:04Z) - TorchKGE: Knowledge Graph Embedding in Python and PyTorch [0.0]
TorchKGE is a Python module for knowledge graph (KG) embedding relying solely on PyTorch.
It features a KG data structure, simple model interfaces and modules for negative sampling and model evaluation.
arXiv Detail & Related papers (2020-09-07T09:21:34Z) - Learning Reasoning Strategies in End-to-End Differentiable Proving [50.9791149533921]
Conditional Theorem Provers learn optimal rule selection strategy via gradient-based optimisation.
We show that Conditional Theorem Provers are scalable and yield state-of-the-art results on the CLUTRR dataset.
arXiv Detail & Related papers (2020-07-13T16:22:14Z) - mvlearn: Multiview Machine Learning in Python [103.55817158943866]
mvlearn is a Python library which implements the leading multiview machine learning methods.
The package can be installed from Python Package Index (PyPI) and the conda package manager.
arXiv Detail & Related papers (2020-05-25T02:35:35Z) - A scalable and efficient convolutional neural network accelerator using
HLS for a System on Chip design [0.0]
The presented CNNA has a scalable architecture which uses High Level Synthesis (HLS) and SystemC for the hardware accelerator.
It is able to accelerate any Convolutional Neural Network exported from Python and supports a combination of convolutional, max-pooling, and fully connected layers.
It was able to perform inference in 2.0 seconds, while having an average power consumption of 2.63 W, which corresponds to a power efficiency of 6.0 GOPS/W.
arXiv Detail & Related papers (2020-04-27T18:12:22Z) - MOGPTK: The Multi-Output Gaussian Process Toolkit [71.08576457371433]
We present MOGPTK, a Python package for multi-channel data modelling using Gaussian processes (GP)
The aim of this toolkit is to make multi-output GP (MOGP) models accessible to researchers, data scientists, and practitioners alike.
arXiv Detail & Related papers (2020-02-09T23:34:49Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.