                                   Relational Conformal Prediction for Correlated Time Series



                                CoRel                      CoRel



                                                                                                STGNN

    ?                                                              Enc                                                                QDec

                                                                                                        Learnt

                                                                                                        graph

    ?



                                                                          Node embeddings,





                                                                                         Ground truth            Predicted   Prediction interval





  Figure 1: Overview of C O R EL. Past residuals are used as input to a hybrid global-local graph-based quantile network.





such representation, we can leverage GDL methods for time              following processing layers:

series to process the data. In particular, we train a STGNN

                                                                                         hi,0         i       i

                                                                                                                

on the residuals of the calibration set to predict the quantiles                           t = E NC rt−1 , v ,                               (10)

of the error distribution. Conditioning the prediction on                                               

                                                                                                            0

                                                                                                                    

                                                                                           Zt = STGNN H≤t        ,A ,                        (11)

the recent history of related time series allows for taking

                                                                                         i,α

the dependency structure of the data into account when es-                                    = QD EC α, zti , v i ,

                                                                                                                  

                                                                                       q̂t+H                                                 (12)

timating uncertainty: a key aspect in applying conformal

prediction to non-exchangeable data (Barber et al., 2023).                     i

                                                                       where rt−1                                         α,i

                                                                                   are prediction residuals (Eq. 5) and q̂t+H  is the

Compared to existing methods (Xu and Xie, 2023b; Auer                  predicted α-quantile at time step t + H for the i-th time

et al., 2023) that only capture temporal dependencies, our             series. E NC( · ) denotes any encoding layer, e.g., a linear

approach allows for modeling spatiotemporal dependencies               transformation or an MLP. For the STGNN block, several

among different time series. Sec. 3.1 presents the details of          designs are possible (e.g., see Jin et al. 2023); the one we

the proposed conformal inference procedure by assuming                 follow is the template in Sec. 2.4. QD EC( · ) is a readout

that the relational structure at each time step is defined by          mapping the representations at each node to the prediction

an adjacency matrix A ∈ RN ×N (Sec. 3.1). We then show                 of the quantile of specified level α. We refer to the family

how to learn the graph structure directly from data and make           of quantile networks defined in Eq. 10–12 as relational

the model adaptive in Sec. 3.2 and Sec. 3.4, respectively.             quantile predictors (RelQPs) and use the notation

Finally, we discuss the theoretical properties of the approach

in Sec. 3.3. Fig. 1 shows an overview of the architecture.                            b α = Qψ (α, V ; Rt−W :t , A) ,

                                                                                      Q t                                                    (13)



3.1. Relational Quantile Predictor                                     where Qψ indicates the shared (global) part of the network

                                                                       and Q b α ∈ RN denotes the predicted α-quantiles at time

Consider a standard SCP setup, where the training data are                     t



split into training and calibration sets. For the moment, we           step t w.r.t. the full time series collection. Note that the

disregard possible nonstationarities in the data considering           framework can easily accommodate further inputs at the en-

the problem setup introduced in Sec. 2.1 and encode spatial            coding block (e.g., we can condition the regression on X<t

dependencies in the adjacency matrix A ∈ RN ×N . While                 and U<t ). The model is trained by minimizing the pinball

the training set is used to fit the point predictor Fθ , we use        loss (Eq. 6) at each time step in the calibration set w.r.t. the

the prediction residuals in the calibration set (Rcal ) to learn       full-time series collection. Through the message-passing

the quantile function of the error distribution at each step.          layers, the residuals of each time series contribute to esti-

                                                                       mating the quantiles of the error distribution at neighboring

                                                                       nodes. In practice, we restrict the input of the regressor to

Relational quantile regression We implement the quan-

                                                                       the most recent observations rather than considering the full

tile regressor as a hybrid global-local STGNN, which mixes

                                                                       sequence (the window length here can also be different from

global (shared) parameters with local, target-specific com-

                                                                       the one used by the point predictor).

ponents (Smyl, 2020). Sharing most learnable parameters

across all time series reduces sample complexity, while lo-

cal parameters allow for tailoring the processing to each              Building the confidence intervals Given the trained quan-

series. Specifically, we keep all processing blocks shared             tile network Qψ , we build the PIs for each target (test) time

and associate a learnable node embedding v i ∈ Rdv with                step as

each time series (Cini et al., 2023b). More specifically, our                       h                                      i

                                                                               α                i,α/2              i,1−α/2

model is a quantile network (see Sec. 2.3) composed of the                   Cbi,t = x̂it+H + q̂t     , x̂it+H + q̂t         ,    (14)



                                                                   4

