alphaFeedback

WorksMathematics

Practical Advantages of Online Conformal Prediction for Data Streams

AI contributions
Not recorded for this paper
View details

Abstract

Full conformal prediction offers finite-sample marginal coverage guarantees under exchangeability, but exact computation can be costly, while its classical guarantees do not directly extend to non-stationary data streams. We compare four sequential conformal regression procedures with a weighted full-conformal benchmark in terms of empirical coverage, prediction interval width, and computational cost. The procedures combine ordinary or forgetting-factor least squares with uniform or exponentially weighted empirical residual quantiles, or with online gradient-based quantile tracking. Experiments cover an independent and identically distributed control, two synthetic distribution-shift scenarios, and four real-world data streams. Adapting the regression model as well as the conformal threshold substantially improves the coverage–width tradeoff under drift. The quantile-tracking procedure requires O(p2)O(p^2) time and memory per observation, independently of stream length, although its coverage can deteriorate after abrupt changes. These results illustrate the practical tradeoffs between predictor adaptation, uncertainty quantification, and computational resources.

Introduction

The deployment of machine learning models in safety-critical and resource-constrained environments, energy markets, finance, sensor networks, has made uncertainty quantification a first-class requirement. A point prediction, however accurate on average, is of limited use without a well-calibrated measure of confidence. Conformal Prediction (CP) [15] instead gives finite-sample, distribution-free marginal coverage under the sole assumption of exchangeability, wrapping any pre-trained score function into a prediction set Cα(X)C_{\alpha}(X) satisfying P(Y∈Cα(X))≥1−α\mathbb{P}(Y \in C_{\alpha}(X)) \ge1-\alpha for any user-chosen α\alpha. Full Conformal Prediction (FCP) achieves the tightest such set, but at a prohibitive cost: for every test point and every candidate label y∈Yy \in\mathcal{Y}, the model must be re-scored or re-trained on the augmented sample. Split CP [11] avoids this by fixing the model and calibrating on a held-out set, trading statistical efficiency (only part of the data drives the quantile) for a single forward pass. Neither FCP nor Split CP is designed for non-stationary streams, where the joint distribution of (X,Y)(X,Y) drifts over time, a setting that is the rule rather than the exception in the applications above.

Several lines of work address non-stationarity within CP: Adaptive Conformal Inference (ACI) [8] updates the coverage level online via a proportional controller on the pinball loss, recovering long-run coverage under drift; an aggregated variant improves robustness further. Weighted CP [4, 13] down-weights distant observations via importance ratios, giving a principled oracle for non-exchangeable streams. Online quantile-tracking methods with regret guarantees [3] bound a scalar tracker directly.

None of these jointly resolves two distinct requirements: (i) valid coverage and tight width under drift, and (ii) per-step cost independent of the stream length tt. ACI-style methods satisfy (ii) trivially (a scalar update) but not (i): they leave the predictor untouched, so once the base model goes stale the quantile update alone must absorb an error it did not cause. Weighted CP satisfies (i) but not (ii): its exact set is recomputed from the full re-weighted history at every step, which is exactly the bottleneck that made FCP impractical to begin with. Regret-bounded quantile trackers satisfy (ii) but treat the underlying model as given, and, to our knowledge, no prior work benchmarks the resulting pipeline against the exact full/weighted-CP set it implicitly approximates, in either regression or classification.

In the present work, we empirically investigate whether, under distribution shift, an online variant of conformal prediction can match full conformal prediction (full CP) at a fraction of its cost. The studied method, QT+WLS, pairs a forgetting-factor model update (Recursive Least Squares, RLS) with an online-gradient quantile tracker, so that its memory and per-step cost are O(p2)O(p^2), where pp is the dimension of the feature space, and independent of tt, the iteration of the online setting, unlike weighted or exponentially weighted variants that still carry a growing residual array. We compare four online conformal regression methods against a full CP oracle using the entire observed history (an exact weighted homotopy solver, not a windowed approximation) on three synthetic regimes and the real world ELEC2 dataset.

Background

In this section, we introduce the conformal settings considered in the paper: (i) full conformal prediction, (ii) weighted conformal prediction, and (iii) online conformal prediction, before providing further details on the exact algorithms studied in § 3.

Let X⊆Rp\mathcal{X} \subseteq\mathbb{R}^{p} be the input space and Y\mathcal{Y} the output space (Y⊆R\mathcal{Y} \subseteq\mathbb{R} for regression, a finite label set for classification). We observe a stream (X1,Y1),(X2,Y2),…(X_1,Y_1),(X_2,Y_2),\ldots indexed by t=1,2,…t=1,2,\ldots. For a training horizon TtrT_{\mathrm{tr}} and calibration horizon TcalT_{\mathrm{cal}}, let T0=Ttr+TcalT_0=T_{\mathrm{tr}}+T_{\mathrm{cal}} denote the start of the online phase.

Definition 1 (Exchangeability). A sequence Z1,…,ZnZ_1,\ldots,Z_n is exchangeable if its joint distribution is invariant under any permutation of the indices. Every i.i.d. sequence is exchangeable; the converse does not hold in general.

Definition 2 (Nonconformity score). A nonconformity measure is s:X×Y→Rs:\mathcal{X}\times\mathcal{Y}\to\mathbb{R}, large when (x,y)(x,y) is atypical relative to the training data. For regression we use the absolute residual st=∣Yt−Y^t∣s_t=|Y_t-\hat{Y}_t|, where Y^t\hat{Y}_t is formed before observing YtY_t.

Full Conformal Prediction

We briefly remind the full conformal setting, its associated complexity and its coverage guarantees.

Definition 3 (Full CP set). Given Sn={(Xi,Yi)}i=1nS_n=\{(X_i,Y_i)\}_{i=1}^{n}, a test point xn+1x_{n+1}, a candidate label y∈Yy\in\mathcal{Y}, and score ss, let Sny=Sn∪{(xn+1,y)}S_n^y=S_n\cup\{(x_{n+1},y)\}, hyh^y the model trained on SnyS_n^y, and siy=s(hy(Xi),Yi)s_i^y=s(h^y(X_i),Y_i) for i≤ni\leq n, sn+1y=s(hy(xn+1),y)s_{n+1}^y=s(h^y(x_{n+1}),y). Define

q^y=quantile⁡1−α(s1y,…,sny,⌈(n+1)(1−α)n⌉),(1)\hat{q}^{y}=\operatorname{quantile}_{1-\alpha}\left(s_1^y,\ldots,s_n^y,\left\lceil\frac{(n+1)(1-\alpha)}{n}\right\rceil\right), \tag*{(1)}

and Cαfull(xn+1)={y∈Y:sn+1y≤q^αy}C^{\mathrm{full}}_{\alpha}(x_{n+1}) = \{y \in\mathcal{Y} : s^{y}_{n+1} \le\hat{q}^{y}_{\alpha}\}.

Theorem 1 (Marginal coverage of full CP (Vovk et al. [15]). If (X1,Y1),…,(Xn,Yn),(xn+1,Yn+1)(X_{1}, Y_{1}), \ldots, (X_{n}, Y_{n}), (x_{n+1}, Y_{n+1}) are exchangeable, then for any α∈(0,1)\alpha\in(0, 1),

1−α≤P(Yn+1∈Cαfull(xn+1))≤1−α+1n+1.(2)1 - \alpha\le\mathbb{P}\left(Y_{n+1} \in C^{\mathrm{full}}_{\alpha}(x_{n+1})\right) \le1 - \alpha+ \frac{1}{n+1}. \tag*{(2)}

Online CP

Conformal prediction was originally introduced in an online setting, where examples arrive one at a time and the set for YtY_t is built from the first t−1t - 1 observations [14, 15]. Online conformal prediction (OCP) keeps this sequential protocol but drops the exchangeability assumption, so as to handle streams whose distribution drifts. At each t≥T0t \ge T_0, the learner observes XtX_t, outputs a set C^t(Xt)\hat{C}_t(X_t) before YtY_t is revealed, then observes YtY_t and updates its internal state. This state has two components: the base model, which produces the prediction Y^t\hat{Y}_t and hence the score RtR_t, and the conformal threshold q^t\hat{q}_t, which turns past scores into a prediction set.

The existing literature on OCP under distribution shift essentially focuses on the threshold. Adaptive Conformal Inference (ACI) (Gibbs and Candes [8]; Gibbs and Candès [9]) adjusts the working miscoverage level from the observed coverage errors and guarantees long-run coverage under arbitrary shifts, and several works refine the choice of its step size, through aggregation (Zaffran [16]), strongly adaptive online learning (Bhatnagar et al. [5]), or decaying step sizes with regret bounds (Angelopoulos et al. [3]). A complementary view interprets the threshold update as a feedback controller (Angelopoulos et al. [1]). In most of these works, the base model is treated as given. The rules used to update the model and the threshold, and how they compare to the full-CP oracle, are the object of the next section.

Online Conformal Methods

All methods follow the same three-phase protocol: (i) training on the first TtrT_{\mathrm{tr}} observations; (ii) calibration on the next TcalT_{\mathrm{cal}}, collecting honest out-of-sample scores (predictions made before the model updates); (iii) online prediction from T0T_0 onward, where methods differ in how the model and quantile adapt. Table 1 summarizes every method compared in this paper for regression with their associated complexity.

MethodTime per stepMemory
Full CP (oracle)O(p3+tlog⁡t)O(p^{3} + t \log t)O(tp)O(tp)
CP+LSO(p2+t)O(p^{2} + t)O(p2+t)O(p^{2} + t)
nexCP+LS, nexCP+WLSO(p2+tlog⁡t)O(p^{2} + t \log t)O(p2+t)O(p^{2} + t)
QT+WLSO(p2)O(p^{2})O(p2)O(p^{2})

Table 1. Per-step cost and memory for each of the studied methods where pp stands for the dimension of the feature space and tt the iteration.

Quantile Updates

Let Ri=∣Yi−Y^i∣R_i = |Y_i - \hat{Y}_i|, and Rt={Ri}i<tR_t = \{R_i\}_{i<t}.

Uniform weights. q^t,uni=quantile⁡1−α(Rt)\hat{q}_{t,\mathrm{uni}} = \operatorname{quantile}_{1-\alpha}(R_t): appropriate under stationarity, slow to adapt after a shift since all past residuals carry equal weight.

Exponential weights. wi,t=ρt−iw_{i,t}=\rho^{t-i}, ρ∈(0,1)\rho\in(0,1), giving the weighted empirical quantile

q^t,exp=inf⁡{r:∑i:Ri≤rwi∑jwj≥1−α}(3)\widehat{q}_{t,\mathrm{exp}}=\inf\left\{r:\frac{\sum_{i:R_i\le r}w_i}{\sum_j w_j}\ge1-\alpha\right\} \tag*{(3)}

([4]). The effective sample size Neff≃1/(1−ρ)N_{\mathrm{eff}}\simeq1/(1-\rho) for large tt represents the number of influential past examples, i.e., how quickly old observations are forgotten. This still requires storing and re-sorting a growing residual array, O(tlog⁡t)O(t\log t) per step.

OGD quantile tracking. Inspired by ACI ([8]) and the quantile-tracking view of the conformal P-controller ((Angelopoulos and Bates, 2023)), we maintain a single scalar threshold θt\theta_t via online subgradient descent on the pinball loss:

θt+1=max⁡(0,θt+η{(1−α)Rt>θt,−αRt≤θt,)(4)\theta_{t+1}=\max\left(0,\theta_t+\eta\begin{cases}(1-\alpha)&R_t>\theta_t,\\-\alpha&R_t\le\theta_t,\end{cases}\right) \tag*{(4)}

with step size η>0\eta>0: constant memory and computation per step, regardless of tt, and no residual array at all. Its validity follows from the online ACI guarantee ([8]) rather than from convergence to an FCP limit.

Model definitions and updates

Time varying linear model At each time tt, the learner observes a covariate vector xt∈Rpx_t\in\mathbb{R}^p and predicts a scalar response yt∈Ry_t\in\mathbb{R} (Table 2). The integer pp is the order of the model, i.e. its number of coefficients; when an intercept is used, it is one of the pp columns of xtx_t (a constant column). All methods share the same prediction function, which is linear in the covariates:

Table 2: Covariates, response and model order pp of each stream. “1” denotes the constant column of the intercept, which counts in pp. Temperatures are in °C, humidities in %, pressures in mm Hg (Energy) or hPa (PRSA), and wind speeds in m/s; the Bike weather covariates are normalized to [0, 1].

StreamCovariates xtx_tResponse yty_tpp
Syntheticfour independent N(0,1)\mathcal{N}(0,1) variablesxtTβt+εtx_t^\mathsf{T}\beta_t+\varepsilon_t4
ELEC2electricity price and demand in New South Wales and in Victoriaelectricity transfer4
Energyenergy use of lights, kitchen temperature and humidity, outdoor temperature, humidity, pressure and wind speed, 1energy use of appliances (Wh)8
Biketemperature, humidity, wind speed, working-day indicator, 1number of rented bikes5
PRSAdew point, temperature, pressure, cumulated wind speed, 1PM2.5 concentration5

Table 2.

y^t=xt⊤β^t,β^t∈Rp,(5)\widehat{y}_t=x_t^\top\widehat{\beta}_t,\qquad\widehat{\beta}_t\in\mathbb{R}^p, \tag*{(5)}

where β^t\widehat{\beta}_t is estimated from the observations i<ti<t only, so that y^t\widehat{y}_t is formed before yty_t is revealed. The data are modeled as

Yt=xt⊤βt+εt,(6)Y_t=x_t^\top\beta_t+\varepsilon_t, \tag*{(6)}

with a possibly time-varying coefficient vector βt\beta_t. For the synthetic streams, ((6)) holds exactly with εt∼N(0,1)\varepsilon_t\sim\mathcal{N}(0,1) and a known βt\beta_t.

Least-squares model (CP+LS, nexCP+LS). The static model uses all past observations with equal weight:

β^tLS=arg⁡min⁡β∈Rp∑i<t(yi−xi⊤β)2=At−1ct,(7)\widehat{\beta}^{\mathrm{LS}}_t=\underset{\beta\in\mathbb{R}^p}{\arg\min}\sum_{i<t}(y_i-x_i^\top\beta)^2=A_t^{-1}c_t, \tag*{(7)}
At=∑i<txixi⊤,ct=∑i<txiyi.(8)A_t=\sum_{i<t}x_ix_i^\top,\quad c_t=\sum_{i<t}x_iy_i. \tag*{(8)}

It is initialized on the first TtrT_{\mathrm{tr}} observations (which requires ATtr+1A_{T_{\mathrm{tr}}+1} to be invertible) and keeps absorbing every new observation.

Forgetting model (nexCP+WLS, QT+WLS). The adaptive model discounts old observations exponentially with the forgetting factor ρLS∈(0,1)\rho_{\mathrm{LS}}\in(0,1):

β^tWLS=arg⁡min⁡β∈Rp∑i<tρLSt−1−i(yi−xi⊤β)2=St−1bt,(9)\widehat{\beta}^{\mathrm{WLS}}_t=\underset{\beta\in\mathbb{R}^p}{\arg\min}\sum_{i<t}\rho_{\mathrm{LS}}^{t-1-i}(y_i-x_i^\top\beta)^2=S_t^{-1}b_t, \tag*{(9)}
St=∑i<tρLSt−1−ixixi⊤,bt=∑i<tρLSt−1−ixiyi.(10)S_t=\sum_{i<t}\rho_{\mathrm{LS}}^{t-1-i}x_ix_i^\top,\quad b_t=\sum_{i<t}\rho_{\mathrm{LS}}^{t-1-i}x_iy_i. \tag*{(10)}

Its effective memory is Neff=1/(1−ρLS)≈111N_{\mathrm{eff}}=1/(1-\rho_{\mathrm{LS}})\approx111 observations.

Scores and prediction sets. Whichever model is used, y^t\hat{y}_t in (5) yields the score Rt=∣yt−y^t∣R_t=\lvert y_t-\hat{y}_t\rvert and the interval

C^t(xt)=[y^t−q^t, y^t+q^t],width=2q^t,(11)\widehat{C}_t(x_t)=\left[\hat{y}_t-\hat{q}_t,\ \hat{y}_t+\hat{q}_t\right], \qquad\mathrm{width}=2\hat{q}_t, \tag*{(11)}

where q^t\hat{q}_t is the uniform, exponentially weighted or OGD quantile of § 3.1. The methods thus differ only through β^t\hat{\beta}_t and q^t\hat{q}_t.

Oracle model. For a candidate value yy of the response, the full-CP oracle refits the weighted model on the augmented sample {(xi,yi)}i≤t∪{(xt,y)}\{(x_i,y_i)\}_{i\leq t}\cup\{(x_t,y)\}, with the same weights w~i=ρLSt+1−i\tilde{w}_i=\rho_{\mathrm{LS}}^{t+1-i}:

β^ y=arg⁡min⁡β ∑i≤t+1w~i(yi−xiTβ)2,(xt+1,yt+1)=(xt,y),(12)\hat{\beta}^{\,y}=\underset{\beta}{\arg\min}\ \sum_{i\leq t+1}\tilde{w}_i\left(y_i-x_i^\mathsf{T}\beta\right)^2,\qquad(x_{t+1},y_{t+1})=(x_t,y), \tag*{(12)}

so that the oracle and nexCP+WLS fit the same weighted problem.

OLS updates via Sherman–Morrison. For the two methods using a static (unweighted) least-squares regressor, we avoid re-inverting a p×pp\times p matrix at every step via the Sherman–Morrison rank-one update, at O(p2)O(p^2) per step with no loss of exactness.

RLS updates. For the two methods that must also let the base model forget outdated observations, we use Recursive Least Squares with forgetting factor ρLS\rho_{\mathrm{LS}}, also O(p2)O(p^2) per step; observations older than roughly Neff=1/(1−ρLS)N_{\mathrm{eff}}=1/(1-\rho_{\mathrm{LS}}) steps are effectively forgotten.

The main empirical distinction (§ 4.1) is between methods that adapt only the quantile (CP+LS, nexCP+LS) and those that also adapt the model via forgetting (nexCP+WLS, QT+WLS): model adaptation turns out to be necessary, not optional, under drift.

Experiments and Results

Results and Interpretation

Table 3 reports the average coverage and width of each method, and Figure 1 shows their rolling counterparts. Additional results can be found in Appendices Section C on Figure 2.

Rolling coverage and prediction interval width for three synthetic datasets and the Elec2 dataset

Figure 1. Rolling coverage (left) and interval width (right), online methods vs. the full-CP oracle on the three synthetics and the Elec2 datasets.

Rolling coverage and prediction interval width for Bike, PRSA, and Energy datasets

Figure 2. Rolling coverage (left) and interval width (right), online methods vs. the full-CP oracle on the Bike, PRSA and Energy datasets.

StreamMethodCoverageWidth
i.i.d.Full CP (oracle).912 ± .0213.41 ± .05
i.i.d.CP+LS.897 ± .0063.28 ± .07
i.i.d.nexCP+LS.896 ± .0023.30 ± .05
i.i.d.nexCP+WLS.897 ± .0033.31 ± .05
i.i.d.QT+WLS.894 ± .0103.27 ± .10
ChangepointsFull CP (oracle).911 ± .0284.15 ± .06
ChangepointsCP+LS.844 ± .0076.26 ± .13
ChangepointsnexCP+LS.891 ± .0037.13 ± .14
ChangepointsnexCP+WLS.903 ± .0044.20 ± .08
ChangepointsQT+WLS.876 ± .0093.78 ± .11
DriftFull CP (oracle).912 ± .0243.45 ± .05
DriftCP+LS.836 ± .0083.73 ± .06
DriftnexCP+LS.886 ± .0034.30 ± .09
DriftnexCP+WLS.898 ± .0023.36 ± .05
DriftQT+WLS.892 ± .0103.30 ± .09
ELEC2Full CP (oracle).8970.521
ELEC2CP+LS.8700.594
ELEC2nexCP+LS.8910.606
ELEC2nexCP+WLS.8930.509
ELEC2QT+WLS.8990.515
EnergyFull CP (oracle).915280.5
EnergyCP+LS.920355.8
EnergynexCP+LS.906308.7
EnergynexCP+WLS.911286.4
EnergyQT+WLS.929364.1
BikeFull CP (oracle).8673192
BikeCP+LS.7403640
BikenexCP+LS.8364078
BikenexCP+WLS.8623190
BikeQT+WLS.7732512
PRSAFull CP (oracle).915148.1
PRSACP+LS.883191.4
PRSAnexCP+LS.899195.9
PRSAnexCP+WLS.900148.2
PRSAQT+WLS.894148.1

Table 3. Average coverage (target 0.90) and width over the online phase. Synthetic streams: mean ± standard deviation over 20 realizations.

Synthetic data On the i.i.d. dataset, all online methods reach the nominal coverage (0.894 to 0.897) with widths within 2% of one another, so forgetting has no visible cost when the distribution is stable. The oracle slightly over-covers (0.912) with intervals 3 to 4% wider, consistent with the conservativeness of a finite-sample quantile computed on an effective sample of about 100 points. Under drift, the methods differ according to whether the base model forgets. With a static model, CP+LS under-covers (0.844 after the changepoints, 0.836 under

gradual drift), and nexCP+LS recovers 0.891 and 0.886 only by inflating its intervals by 72% and 25% with respect to the oracle (7.13 against 4.15, 4.30 against 3.45): the quantile must absorb an error that it did not cause. nexCP+WLS, whose model forgets, matches the oracle in both settings (coverages 0.903 and 0.898, widths 4.20 and 3.36). QT+WLS is as accurate under gradual drift (0.892, 3.30) but under-covers by about 2.5 points after abrupt breaks (0.876), as a tracker moving by increments of size η\eta needs several steps to recover.

Real world datastreams The four real streams confirm this ranking under drifts of unknown nature and intensity. On ELEC2 and PRSA, nexCP+WLS is almost indistinguishable from the oracle (0.893/0.509 against 0.897/0.521, and 0.900/148.2 against 0.915/148.1), and so is QT+WLS (0.899/0.515 and 0.894/148.1), whereas the static-model methods pay for the drift: nexCP+LS needs intervals 16% and 32% wider than the oracle’s, and CP+LS under-covers (0.870 and 0.883) despite intervals 14% and 29% wider. On Energy, whose target is heavy-tailed, every method over-covers; nexCP+WLS again follows the oracle, while CP+LS, nexCP+LS and QT+WLS need intervals 27%, 10% and 30% wider. Bike is the hardest stream, with only 731 daily points and a strong trend in demand: even the oracle under-covers (0.867), nexCP+WLS matches it (0.862, width 3 190 against 3 192), CP+LS falls to 0.740, and QT+WLS to 0.773 with intervals 21% narrower, as fewer than 600 online steps leave the tracker too little time to follow the drift.

Overall, what separates the methods is whether the base model forgets, not how the quantile is computed.

About the computational cost

The complexity of each method is summarized in Table 1 and we provide, in Table 4, the average computational time of each method per step.

Methodi.i.d.Changep.DriftELEC2EnergyBikePRSA
Full CP43.1743.3042.59148.67146.964.71142.86
CP+LS0.0580.0580.0570.0620.0670.0790.053
nexCP+LS0.0450.0470.0450.0650.0740.0380.061
nexCP+WLS0.0470.0520.0520.0690.0880.0320.057
QT+WLS0.0090.0100.0110.0100.0120.0120.008

Table 4. Mean computation time per iteration (ms). Synthetic streams: mean over 20 realizations. The oracle is averaged over its stride 20 evaluations.

Storing residuals makes CP+LS and nexCP+LS 3 to 8 times slower than QT+WLS, yet with a static model this extra cost buys wider intervals, not better coverage. nexCP+WLS reaches the oracle’s accuracy on every stream at three orders of magnitude less, and QT+WLS, with constant time and memory, matches it on smooth drifts, at the price of a slower reaction to abrupt changes.

Conclusion

In this paper, we evaluated whether online conformal methods that adapt both the base model and the conformal quantile via forgetting factors can match the coverage and width of a true, unbounded history full CP oracle under distribution shift, rather than merely another online approximation. Across three synthetic regression regimes and four real-world benchmarks, which span different drift mechanisms, the methods that adapt the model (nexCP+WLS and QT+WLS) track the oracle’s coverage and interval width closely, while the methods that adapt only the quantile and leave the model static (CP+LS and nexCP+LS) fall short under drift. Furthermore, the experiments illustrate that QT+WLS has memory and per-step cost of O(p2)O(p^{2}), independent of tt, which makes it the only method suited to settings where storing the full history is not feasible.

Scope of the Model-Update Comparison

Concerning § 3.2, two gaps are worth stating explicitly rather than leaving implicit. First, QT+WLS has no exact full-CP counterpart: because it never revisits past residuals, there is no finite-history object it is a recursive approximation of: its validity follows from the ACI guarantee, not from matching a full-CP limit, so we report it for reference in § 4.1 but exclude it from the oracle-matching claim itself.

Experimental Protocol

We consider seven regression streams: three synthetic settings and four real-world datasets. In the three synthetic settings, Xt∼N(0,I4)X_t \sim\mathcal{N}(0,I_4) and Yt=XtTβt+εtY_t = X_t^{\mathsf{T}}\beta_t + \varepsilon_t with εt∼N(0,1)\varepsilon_t \sim\mathcal{N}(0,1), for t=1,…,N=2000t = 1,\ldots,N = 2000 and without intercept. The covariates and the noise are shared by the three settings, which differ only through the coefficients βt\beta_t. In the i.i.d. setting (setting 1), βt=(2,1,0,0)T\beta_t = (2,1,0,0)^{\mathsf{T}} is constant, which provides a stationary control. In the changepoint setting (setting 2), βt\beta_t successively equals (2,1,0,0)T(2,1,0,0)^{\mathsf{T}}, (0,−2,−1,0)T(0,-2,-1,0)^{\mathsf{T}} and (0,0,2,1)T(0,0,2,1)^{\mathsf{T}} on [1,500)[1,500), [500,1500)[500,1500) and [1500,2000][1500,2000]. In the gradual drift setting (setting 3), βt\beta_t moves linearly from βstart=(2,1,0,0)T\beta_{\mathrm{start}} = (2,1,0,0)^{\mathsf{T}} to βend=(0,0,2,1)T\beta_{\mathrm{end}} = (0,0,2,1)^{\mathsf{T}}, that is βt=βstart+t−1N−1(βend−βstart)\beta_t = \beta_{\mathrm{start}} + \frac{t-1}{N-1}(\beta_{\mathrm{end}}-\beta_{\mathrm{start}}), so that the last two settings connect the same two extreme models through an abrupt and a slow transition, respectively.

The three synthetic streams are complemented by four real streams, whose drift mechanism, unlike that of the synthetic ones, is unknown. ELEC2 ([10]) contains half-hourly records of the New South Wales electricity market. Following Zaffran [16], we discard the first 17 760 observations, during which the response is constant, and keep only the half-hours between 9:00 and 12:00, which leaves N=3 444N = 3\,444 points. Energy ([6]) records the consumption of household appliances every 10 minutes, together with indoor and outdoor temperature and humidity measurements and two random variables, from 11 January 2016. Bike ([7]) gives the daily number of rented bicycles of the Capital Bikeshare system in 2011–2012 (N=731N = 731), with calendar and weather covariates. PRSA ([12]) reports the hourly PM2.5 concentration in Beijing with meteorological covariates, starting in January 2010; the hours with a missing response are removed. For Energy, Bike and PRSA, the targets are, respectively, the appliances consumption, the daily count of rentals and the PM2.5 concentration. We remove the row identifiers and the covariates that are duplicated, constant or null on the training window, which would make the initial least-squares problem singular, as well as the casual and registered counts for Bike, whose sum is the response. To keep the exact oracle tractable, Energy and PRSA are truncated to their first N=3 444N = 3\,444 observations, the length of ELEC2, which leaves p=26p = 26, 10 and 11 covariates for Energy, Bike and PRSA, again p=4p = 4 for ELEC2. Finally, as the step size η\eta of QT+WLS is expressed in the unit of the response, it is set to η=0.01σ^Y\eta= 0.01\hat{\sigma}_Y on these three streams, where σ^Y\hat{\sigma}_Y is the standard deviation of the response on the training window; this is equivalent to standardizing the response and leaves the other methods unchanged.

The oracle is the exact weighted full-CP set of § 2.1, computed by the homotopy solver with the same exponential weights as nexCP+WLS, so that both solve the same weighted problem and differ only in whether the solution is recomputed from scratch or updated recursively. Because its cost grows with the history size, it is evaluated every 20 steps; its coverage, width and run time are averaged over these evaluation times, which does not bias the averages but increases their variance. We report the average empirical coverage, the average width 1T−T0∑t=T0T2q^t\frac{1}{T-T_0}\sum_{t=T_0}^{T}2\hat{q}_t, and the mean wall-clock time per iteration computing:

1T−T0∑t=T0T1{Yt∈C^t(Xt)}, and 1T−T0∑t=T0T2q^t\frac{1}{T-T_{0}}\sum_{t=T_{0}}^{T}\mathbf{1}\{Y_{t}\in\widehat{C}_{t}(X_{t})\},\ \text{and}\ \frac{1}{T-T_{0}}\sum_{t=T_{0}}^{T}2\widehat{q}_{t}

For the online methods this time covers the prediction, the quantile computation and the model update. The curves of Figure 1 are smoothed by a rolling average of 50 steps (synthetic) or 300 steps (ELEC2).

Additional Experimental Results

We present, on Figure 2 the detailed results on the three remaining real data: Bike, PRSA and Energy, presenting the evolution of both coverage and interval width along time.

References

  1. [1]A. Angelopoulos, E. Candes, and R. J. Tibshirani. Conformal pid control for time series prediction. Advances in neural information processing systems, 36:23047–23074, 2023.arxiv.org/abs/2307.16895
  2. [3]A. N. Angelopoulos, R. F. Barber, and S. Bates. Online conformal prediction with decaying step sizes. arXiv preprint arXiv:2402.01139, 2024.arxiv.org/abs/2402.01139
  3. [4]R. F. Barber, E. J. Candes, A. Ramdas, and R. J. Tibshirani. Conformal prediction beyond exchangeability. The Annals of Statistics, 51(2):816–845, 2023.arxiv.org/abs/2202.13415
  4. [5]A. Bhatnagar, H. Wang, C. Xiong, and Y. Bai. Improved online conformal prediction via strongly adaptive online learning. In International Conference on Machine Learning, pages 2337–2363. PMLR, 2023.arxiv.org/abs/2302.07869
  5. [6]L. M. Candanedo, V. Feldheim, and D. Deramaix. Data driven prediction models of energy use of appliances in a low-energy house. Energy and Buildings, 140:81–97, 2017.DOI
  6. [7]H. Fanaee-T and J. Gama. Event labeling combining ensemble detectors and background knowledge. Progress in Artificial Intelligence, 2(2):113–127, 2014.
  7. [8]I. Gibbs and E. Candes. Adaptive conformal inference under distribution shift. Advances in Neural Information Processing Systems, 34:1660–1672, 2021.arxiv.org/abs/2106.00170
  8. [9]I. Gibbs and E. J. Candès. Conformal inference for online prediction with arbitrary distribution shifts. Journal of Machine Learning Research, 25(162):1–36, 2024.
  9. [10]M. Harries, N. S. Wales, et al. Splice-2 comparative evaluation: Electricity pricing. 1999.
  10. [11]J. Lei, M. G’Sell, A. Rinaldo, R. J. Tibshirani, and L. Wasserman. Distribution-free predictive inference for regression. Journal of the American Statistical Association, 113(523):1094–1111, 2018.arxiv.org/abs/1604.04173
  11. [12]X. Liang, T. Zou, B. Guo, S. Li, H. Zhang, S. Zhang, H. Huang, and S. X. Chen. Assessing Beijing’s PM2.5 pollution: severity, weather impact, APEC and winter heating. Proceedings of the Royal Society A, 471(2182):20150257, 2015.DOI
  12. [13]R. J. Tibshirani, R. Foygel Barber, E. Candes, and A. Ramdas. Conformal prediction under covariate shift. Advances in neural information processing systems, 32, 2019.arxiv.org/abs/1904.06019
  13. [14]V. Vovk. On-line confidence machines are well-calibrated. In The 43rd Annual IEEE Symposium on Foundations of Computer Science, 2002. Proceedings., pages 187–196. IEEE, 2002.DOI
  14. [15]V. Vovk, A. Gammerman, and G. Shafer. Algorithmic learning in a random world. Springer, 2005.
  15. [16]e. a. Zaffran, Margaux. Adaptive conformal predictions for time series. In International conference on machine learning, pages 25834–25866. PMLR, 2022.arxiv.org/abs/2202.07282

Paper details

vlnc:W_c6a6s9gu
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 8

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Mathematics

Not recorded for this paper · View statement →

Looking for related papers…
Contents