Meta-Forecasting by combining Global Deep Representations with Local Adaptation

Riccardo Grazzi, Valentin Flunkert, David Salinas, Tim Januschowski, Matthias Seeger, Cedric Archambeau

TL;DR

Deep learning forecasting models excel on the data they are trained on, but often fail drastically when transferred to out-of-sample time series. Meta-GLAR bridges this gap by combining a shared recurrent neural network (RNN) representation with an exact, closed-form linear adaptation layer for each time series. By differentiating directly through this closed-form solver during training, Meta-GLAR meta-learns global representations designed for fast local adaptation, matching or beating strong transfer baselines with a fraction of the parameters.

What Problem Does This Paper Address?

Traditional time series forecasting relies on local models (such as ARIMA or exponential smoothing) that fit a small set of parameters to an individual series from scratch. In contrast, modern deep learning approaches use global models (like DeepAR) that jointly train a single neural network across thousands of series. While global models dominate in-sample benchmarks, their accuracy collapses on out-of-sample series—meaning you typically cannot take a pretrained network and run it on a new dataset without extensive retraining.

This paper tackles zero-shot transfer forecasting (or meta-forecasting): training a neural network on a large source dataset (e.g., M4) and generating accurate forecasts on entirely unseen target datasets (e.g., M3, electricity, or traffic) without fine-tuning network weights or accessing other series in the target domain.

Methods

The authors introduce Meta Global-Local Auto-Regression (Meta-GLAR), an autoregressive framework that breaks one-step-ahead forecasting into three stages:

  1. Global Representation: A 2-layer LSTM backbone processes input time-lags and scale covariates to generate hidden feature vectors $h_t$ at each timestep.
  2. Closed-Form Local Adaptation: Instead of using a fixed global projection to map $h_t$ to predictions, Meta-GLAR analytically fits a local linear model $w_{\text{opt}}$ to the observed context window of the single series via ridge regression: $$w_{\text{opt}} = (H_{1:t_0}^\top H_{1:t_0} + \gamma I)^{-1} H_{1:t_0}^\top z_{1:t_0}$$
  3. Autoregressive Prediction: Predictions in the forecast horizon are generated recursively using $\hat{z}_t = w_{\text{opt}}^\top h_t$, feeding prior predictions back as inputs.

What is new: Crucially, the local solver is fully differentiable. During meta-training on the source dataset, the model backpropagates the forecast horizon loss through the matrix inversion of the ridge regression step. The RNN backbone is explicitly optimized to produce features that yield accurate forecasts when fitted with a simple linear model.

Datasets

The authors evaluate out-of-sample transfer across several standard time series benchmarks:

  • Source Dataset: M4 (100k time series across Yearly, Quarterly, Monthly, and Hourly frequencies).
  • Target Datasets:
  • M3 Competition (Yearly, Quarterly, Monthly, and Other).
  • TOURISM (Yearly, Quarterly, Monthly).
  • ELECTR (Hourly electricity consumption of 370 customers).
  • TRAFF (Hourly traffic occupancy rates on 963 SF car lanes).

No new benchmarks are introduced; datasets are accessed via the open-source GluonTS library.

Key Insights and Ideas

  • Meta-learning beats simple fine-tuning in forecasting: Recent computer vision research suggested that meta-learning adds little value over standard pretraining followed by linear read-out fine-tuning. Meta-GLAR demonstrates the opposite for time series: freezing an RNN trained with standard global loss and fitting a ridge regressor at test time degrades sMAPE from ~12.5 to ~14.1–16.0. End-to-end differentiation through the local solver during training is essential.
  • The synergy of three components: Ablation studies show that three components are interdependent: (1) the closed-form adaptation layer, (2) an expressive sequential backbone (RNN over feed-forward or linear baselines), and (3) generating iterated forecasts during training rather than relying on teacher-forcing.
  • Extreme parameter efficiency: Meta-GLAR matches or outperforms heavy multi-step architectures like NBEATS while requiring 35× to 1000× fewer parameters (~25K vs. ~880K–25M parameters).

Key Results

  • Out-of-sample competitive accuracy: On ELECTR, an ensemble of 10 Meta-GLAR models achieves a Normalized Deviation (ND) of 0.067, outperforming NBEATS zero-shot (0.090) and DeepAR zero-shot (0.199), matching models trained directly on the target dataset.
  • Beating competition winners: On M3, Meta-GLAR-ens10 achieves 12.509 sMAPE, outperforming classical local methods like Theta (13.015), ARIMA (14.005), and DeepAR trained in-domain (12.671), sitting right behind zero-shot NBEATS (12.441).
  • Low compute overhead: The closed-form adaptation adds minimal overhead—training takes only 17% longer than a non-adaptive RNN on CPU, and test-time evaluation over the entire M4 dataset takes 3 minutes and 21 seconds (comparable to 3:19 for standard RNN and 3:15 for NBEATS).

Limitations and Future Work

  • Strict frequency matching: The method requires the source and target datasets to share the same sampling frequency (e.g., hourly to hourly, monthly to monthly). Cross-frequency transfer remains unsolved.
  • Covariate divergence: Meta-GLAR relies on scale factors and time lags; it cannot natively handle arbitrary external covariates that differ between source and target datasets.
  • Suboptimal on certain domains: NBEATS still performs notably better on datasets with strong high-frequency seasonality like TRAFF (0.150 vs. 0.188 ND) and TOURISM.
  • Single-series scope: Adaptation occurs strictly per time series. Extending closed-form solvers to share information across small clusters of target time series (few-shot learning) is an open direction.

Summary updated

BibTeX
@inproceedings{grazzi2022meta,
  author = {Riccardo Grazzi and Valentin Flunkert and David Salinas and Tim Januschowski and Matthias Seeger and Cedric Archambeau},
  title = {{Meta-Forecasting by combining Global Deep Representations with Local Adaptation}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=EIm_pvFJx5k},
}

Loading related content...

Figure