Transformer Conformal Prediction for Time Series
Junghwan Lee, Chen Xu, Yao Xie
TL;DR
This work addresses uncertainty quantification for time series under non-exchangeability by integrating a Transformer-based conditional quantile estimator into Sequential Predictive Conformal Inference (SPCI), producing valid prediction intervals with reduced width. The proposed SPCI-T learns temporal dependencies among past residuals and features by using a decoder-only Transformer to estimate quantiles of future residuals $\hat{\epsilon}_t$, with training via a quantile loss $\mathcal{L}(\hat{\epsilon}, \hat{\epsilon}', p)$. Empirical results on simulated and real datasets show that SPCI-T achieves narrower intervals while maintaining target coverage, outperforming SPCI, EnbPI, and NexCP, and benefiting further from additional time features. The method offers a practical advancement for reliable uncertainty quantification and multi-step forecasting in real-world time-series applications like energy and weather data.
Abstract
We present a conformal prediction method for time series using the Transformer architecture to capture long-memory and long-range dependencies. Specifically, we use the Transformer decoder as a conditional quantile estimator to predict the quantiles of prediction residuals, which are used to estimate the prediction interval. We hypothesize that the Transformer decoder benefits the estimation of the prediction interval by learning temporal dependencies across past prediction residuals. Our comprehensive experiments using simulated and real data empirically demonstrate the superiority of the proposed method compared to the existing state-of-the-art conformal prediction methods.
