Retrieval Augmented Time Series Forecasting

Kutay Tire, Ege Onur Taga, Muhammed Emrullah Ildiz, Samet Oymak

TL;DR

This paper introduces Retrieval Augmented Forecasting (RAF), a framework that brings the power of Retrieval-Augmented Generation (RAG) to time-series foundation models (TSFMs). By retrieving similar historical patterns and their subsequent outcomes from a database, RAF significantly improves zero-shot forecasting accuracy, particularly for larger models and out-of-distribution datasets.

What Problem Does This Paper Address?

Time-series forecasting is notoriously difficult because data is often dynamic, heterogeneous, and subject to abrupt "regime shifts" (like financial crises or sudden weather changes). While new Time-Series Foundation Models (TSFMs) like Chronos and Moirai have shown promise, they often struggle when a specific domain's structure is missing from their training data.

In the world of Large Language Models (LLMs), RAG solves similar issues by providing the model with relevant external documents. The authors ask: Can we do the same for time series? Can we improve a forecast by showing the model a "motif" (a similar pattern) from the past and what happened immediately after that pattern?

Methods

The authors propose the Retrieval Augmented Forecasting (RAF) framework. The process works in three main stages:

  1. Retrieval: Given an "Original Query" (the recent history you want to forecast from), the system searches a database for the best-matching historical segments, called Retrieved Contexts.
  2. Augmentation: For the best match, the system identifies the Retrieved Future—the actual values that followed that historical segment. These are concatenated with the original query to form an augmented input: [Retrieved Context, Retrieved Future, Original Query].
  3. Forecasting: This long sequence is fed into a TSFM. Because these models are built on Transformer architectures, they use their internal attention mechanisms to "align" the retrieved example with the current query to produce a better forecast.
Overview of the RAF framework showing how retrieved segments are concatenated to the query.

To ensure this works, the authors use Instance Normalization (scaling data to zero mean and unit variance) and an Additive Offset to ensure the retrieved segment joins smoothly with the original context, preventing artificial jumps in the data.

Datasets

The researchers evaluated RAF across two major benchmarks comprising 11 diverse datasets:

  • Benchmark I (Longer contexts): Weather, Traffic, ETTh1 (electricity transformer temperature), FRED-MD (macroeconomic indicators), Covid Deaths, and NN5 (cash withdrawals).
  • Benchmark II (Shorter contexts): Tourism (Monthly/Quarterly), M1 (micro/macroeconomics), Uber TLC (pickups), and CIF-2016 (banking).

They used 80% of each dataset to build the retrieval database and the remaining 20% for testing, ensuring no "look-ahead" bias.

Key Insights and Ideas

  • Emergent Capability: Retrieval-augmented forecasting appears to be an emergent property of model scale. While Chronos-Base (the largest version) showed massive gains from retrieval, the tiny Chronos-Mini often failed to use the retrieved information effectively, sometimes even performing worse.
  • Transformers are Key: The authors benchmarked non-Transformer models (like DLinear and ARIMA) and found they gained almost nothing from RAF. This suggests that the attention mechanism is crucial for "fusing" the retrieved patterns with the current query.
  • Beyond Match-and-Copy: Simple retrieval methods like KNN or Dynamic Time Warping (DTW) just copy the "Retrieved Future." RAF is superior because the TSFM doesn't just copy; it learns how to transform, rescale, and integrate that evidence into its own internal logic.
  • Robustness to Noise: Interestingly, a small amount of noise in the data actually improved relative gains, likely by breaking ties between near-identical candidates and forcing the model to rely on structural similarity.
Figure 2: We generated synthetic time-series data by transposing two sinusoidal signals and project- ing them via orthogonal projections. We assessed extrapolation behavior using scaled mean squared error (assuming 0 prediction as baseline) and chose a context and forecast length of C = 30 and H = 30. Evaluations were conducted on Chronos- {mini, small, base}.

Key Results

RAF consistently outperformed base models across nearly all datasets.

  • Zero-Shot Gains: For Chronos-Base, RAF provided an average improvement of 15.8% in Weighted Quantile Loss (WQL) and 12.4% in Mean Absolute Scaled Error (MASE) across Benchmark I.
  • Architecture Generality: The benefits weren't limited to Chronos; other foundation models like TimesFM saw WQL improvements of up to 16.7%.
  • Synergy with Fine-Tuning: While RAF works great out-of-the-box (Naive RAF), fine-tuning the model specifically to handle retrieved inputs (Advanced RAF) yielded the best overall results, often outperforming standard fine-tuning by a wide margin.
Table 1: Average performance of RAF on Benchmark I across three prediction lengths, H ∈ {10, 15, 20}, with context lengths C ∈{50, 75, 100, 150}, evaluated using two models: Chronos Mini (m) and Chronos Base (b). We employ the WQL and MASE metrics as evaluation criteria.

Limitations and Future Work

  • Model Size Constraints: The failure of smaller models (like Chronos-Mini) suggests that RAF requires a certain baseline of model complexity to be useful.
  • Database Quality: The authors found that "same-domain" retrieval (e.g., using Uber data to help forecast Traffic data) is much more effective than "cross-domain" retrieval (e.g., using Finance data for Traffic).
  • Univariate Focus: Currently, the framework is designed for univariate time series. The authors note that expanding RAF to handle multi-channel (multivariate) predictions is a key next step for the field.

Summary updated

BibTeX
@inproceedings{tire2026retrieval,
  author = {Kutay Tire and Ege Onur Taga and Muhammed Emrullah Ildiz and Samet Oymak},
  title = {{Retrieval Augmented Time Series Forecasting}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2026},
  url = {https://openreview.net/forum?id=UD76JhLswg},
}
Figure