                                   Relational Conformal Prediction for Correlated Time Series



2.2. Conformal Prediction                                             dis et al., 2022). The simplest approach consists of using a

                                                                      multi-output network to predict a set of quantiles of interest

As anticipated in Sec. 1, standard CP methods (Vovk et al.,

                                                                      and interpolate among them to approximate the entire quan-

2005; Angelopoulos et al., 2023) are a class of distribution-

                                                                      tile function (Wen et al., 2017). More complex approaches

free uncertainty quantification techniques that build PIs from

                                                                      rely on, e.g., splines (Gasthaus et al., 2019). Conversely,

empirical quantiles of conformal scores. In the forecasting

                                                                      implicit quantile networks (IQNs) (Dabney et al., 2018; Os-

setting, we consider as conformal scores the prediction resid-

                                                                      trovski et al., 2018; Gouttes et al., 2021) approximate the

uals,

                                                                      quantile function by being trained to minimize the loss in

                        rti = xit − x̂it ,                  (5)

                                                                      Eq. 6 given the quantile level α as input and sampling a

and use Rt to denote residuals w.r.t. the entire time series          random α for each sample in a mini-batch.

collection. Under appropriate assumptions, CP methods can

build valid and informative PIs (Angelopoulos et al., 2023;           2.4. Graph Deep Learning for Time Series Forecasting

Barber et al., 2023). Split conformal prediction (SCP) (Vovk

et al., 2005) is arguably the most common approach and                Graph neural networks (GNNs) (Bacciu et al., 2020; Bron-

exploits scores computed on a calibration set that is disjoint        stein et al., 2021) process graph-structured data by incor-

from the training data (i.e., a post-hoc approach).                   porating the graph topology as an inductive bias, e.g., by

                                                                      relying on message-passing layers (Gilmer et al., 2017).

As mentioned, most standard CP methods rely on the as-                STGNNs (Jin et al., 2023; Cini et al., 2023a) leverage

sumption that calibration and test data are exchangeable,             message-passing layers within sequence modeling archi-

which allows the procedure to treat them symmetrically and            tectures to process spatiotemporal data and collections of

obtain valid (marginal) coverage guarantees (Angelopoulos             time series where dependencies are represented as a (possi-

et al., 2024). Since this assumption does not hold when               bly dynamic) graph. We consider as reference architectures

dealing with time series data, there have been several recent         time-then-space (TTS) models (Gao and Ribeiro, 2022; Cini

results extending the CP framework beyond exchangeabil-               et al., 2023a) where each time series in the collection is pro-

ity (Tibshirani et al., 2019; Stankeviciute et al., 2021; Gibbs       cessed independently from the others by a temporal encoder

and Candes, 2021; Xu and Xie, 2023a). In particular, Bar-             whose output is then fed into a stack of GNN layers. In

ber et al. (2023) showed that approximate coverage can be             particular, we adopt the following template architecture:

achieved by reweighting the residuals to account for the

                                                                                hi,0               i         i

                                                                                                                   

lack of exchangeability between calibration and test set.                        t = S EQ E NC xt−W :t , ut−W :t ,                (7)

Auer et al. (2023) learn such a reweighting scheme through

                                                                            Htl+1 = GNNl (Htl , A), , l = 0, . . . , L − 1       (8)

an attention-based architecture. Differently, Xu and Xie                                            

(2023b) introduce SPCI, a method based on fitting a quan-                      ŷti = R EADOUT hi,L

                                                                                                 t     ,                         (9)

tile random forest (Meinshausen and Ridgeway, 2006) on

the most recent prediction residuals at each time step. Sim-          where A ∈ RN ×N is the graph adjacency matrix and ŷti a

ilar to SPCI, our approach relies on quantile regression to           generic node-level prediction associated with the problem at

build PIs but differently from existing methods, it exploits          hand. S EQ E NC(·) and GNNl (·) denote, respectively, any se-

observations in arbitrary sets of time series by relying on           quence modeling architecture, e.g., an RNN, and any GNN

GDL operators.                                                        layer, e.g., based on message-passing. Representations can

                                                                      then be mapped into predictions Ybt by using any readout

2.3. Quantile Regression                                              block, e.g., a multilayer perceptron (MLP). STGNNs have

                                                                      been used as forecasting architecture (Yt = Xt+H ) with

Quantile regression (Koenker and Hallock, 2001) is an es-

                                                                      great success. In the following, we will exploit this frame-

tablished statistical framework that consists of learning a

                                                                      work as a backbone for estimating the residual quantile dis-

model of the quantile function (the inverse c.d.f.) of a

                                                                      tribution. We refer to Sec. 4 and Jin et al. (2023) for more

target distribution from observations. In particular, given

                                                                      discussion on the application of STGNNs in the context of

y ∼ p(y|x) and observations (x1 , y1 ), . . . , (xN , yN ), a

                                                                      time series analysis.

standard approach to estimate the α-quantile is to train a

model by minimizing the so-called pinball loss

                     (                                                3. Conformal Relational Prediction

                      (1 − α)(q̂ α (x) − y), q̂ α (x) ≥ y

  ℓα (q̂ α (x), y) =                                      (6)         Our objective is to build PIs by exploiting relational depen-

                      α(y − q̂ α (x)),       q̂ α (x) < y

                                                                      dencies across the residuals of the target time series. We

where q̂ α (x) is the estimate of the α-quantile w.r.t. x.            model the dependencies as edges of a graph and learn them

                                                                      under the assumption that the relational structure is sparse,

Quantile networks Quantile regression has been incorpo-               which reduces the computational costs and act as an induc-

rated in several probabilistic forecasting architectures (Beni-       tive bias on the structure learning architecture. By relying on



                                                                  3

