cs.LGNov 26, 2026

pyconformal: Exact and Fast Conformal Prediction for Tabular Data and Time Series

Authors: Valery Manokhin

Organizations: Independent Researcher

Abstract

Conformal prediction is used for its guarantee: if calibration and test data are exchangeable, a 90% split-conformal interval covers at least 90% of the time, for any model and any calibration size. That guarantee belongs to an exact procedure, and software loses it through small choices. We audited thirteen Python and R packages on data where the guarantee must hold, reading five conformal libraries module by module, and found about thirty faults. Two forecasting libraries cover 63% at a 90% target with their default of two calibration windows. One library's prediction sets cover 45% when rows are predicted one at a time. Two implementations of adaptive conformal inference clip the working level and lose the guarantee that defines the method. The basic split-conformal routines of the main libraries met their level in every test. We present pyconformal, an MIT-licensed package that implements about thirty conformal methods for regression, classification, probability calibration, predictive distributions, time series and panel data behind one interface. Every method is tested against its definition, against reference code where it exists, and against its guarantee. The package also contains algorithmic improvements: an exact Venn-Abers kernel in integer arithmetic, rank trees for online methods, closed forms for conformal predictive distributions, CV+ in 3 megabytes where MAPIE needs 3 gigabytes, and a repaired rule for conformal interquantile regression. With identical output, Venn-Abers calibration on a million points takes 0.37 seconds against 75 in the reference implementation, and conformal predictive intervals for a million test points take 0.01 seconds against 79 in crepes. We describe the design, the algorithms and what each gains in time and memory, the verification method, the audit and the benchmarks.

Figures & tables

Appendix figures & tables15 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

Nov 4, 2026

Conformal Prediction for Distribution-to-Distribution Regression

Conformal Prediction (CP) provides a model-agnostic framework for constructing finite-sample prediction sets with coverage guarantees and has become a tool for reliable decision-making in high-risk settings. Recent advances have extended Split Conformal Prediction to increasingly complex learning problems, including multilabel, high-dimensional, and functional outputs. In this work, we study CP for Distribution-to-Distribution Regression, a setting of growing interest across many application domains. We show that a naive application of Split CP yields prediction sets that, while marginally valid, are non-interpretable, e.g., lacking a well-defined volume or a tractable sampling procedure, and of limited practical value. To overcome this, we propose a new conformal framework that operates in an orthogonal basis space, producing interpretable prediction sets while preserving coverage guarantees. We further develop an adaptive variant with asymptotic conditional coverage under mild assumptions. Empirical results on synthetic and real-world datasets validate the effectiveness of the proposed approach. The code is publicly available at https://github.com/tuanhacs/conformal_d2d.
Jun 30, 2026

Accelerating Conformal Prediction via Approximate Leave-One-Out

While conformal prediction provides a general framework for uncertainty quantification in predictive inference, its application is often limited by computational cost. Recent methods, including Jackknife+ and Jackknife-minmax, achieve faster computation by trading a slight loss of efficiency relative to full conformal prediction, but still requires computing leave-one-out refits for all observations. In this paper, we further accelerate conformal prediction by incorporating approximate leave-one-out (ALO) estimators, and establish asymptotic coverage and efficiency. While our proof draws on methods developed for analyzing the consistency of ALO cross-validation risk estimators in high-dimensional statistics, it requires adaptations to handle conformal prediction, where leave-ii-out residuals are needed for predictions at xn+1x_{n+1} rather than just at the training covariate xix_i. Simulation results validate our theoretical findings, showing that the ALO-based methods achieve coverage and efficiency comparable to the exact methods, while significantly reducing the runtime.
May 9, 2026

RareCP: Regime-Aware Retrieval for Efficient Conformal Prediction

Recent advances in uncertainty quantification for time series forecasting show that conformal prediction can provide reliable prediction intervals, yet standard conformal methods are often inefficient under temporal dependence, drift, and heterogeneous error behavior. Existing methods typically either update miscoverage rates over time or learn unconstrained calibration weights, without explicitly separating two central sources of nonstationarity: smoothly drifting error distributions and co-existing distinct error regimes. We introduce RareCP, a regime-aware retrieval method for adaptive conformal time series prediction. RareCP learns local calibration representations through a mixture of cosine-attention experts that each capture distinct error regimes, while a compact hypernetwork adapts the kernel parameters to track temporal drift. Given a new forecasting context, RareCP retrieves the top-k most relevant calibration examples, assigns similarity weights, and forms a weighted conformal quantile over their signed residuals, yielding asymmetric prediction intervals. The adaptive kernel is trained using a smooth interval score objective, with a parameter-space anchor to a lightweight teacher kernel to preserve stable local representations. On the GIFT-Eval benchmark, RareCP improves interval efficiency over recent conformal baselines and foundation model uncertainty estimates while maintaining empirical coverage. Ablations confirm that regime-specific experts, drift-adaptive kernels, sparse retrieval, and teacher anchoring each contribute to the final performance.