TS-RAG: Retrieval-Augmented Generation based Time Series Foundation Models are Stronger Zero-Shot Forecaster

Kanghui Ning, Zijie Pan, Yu Liu, Yushan Jiang, James Y. Zhang, Kashif Rasul, Anderson Schneider, Lintao Ma, Yuriy Nevmyvaka, Dongjin Song

Abstract

Time Series Foundation Models (TSFMs) have demonstrated significant potential in general-purpose forecasting. However, they often struggle with domain adaptation to non-stationary or out-of-distribution data and lack the interpretability required for high-stakes applications. This paper introduces TS-RAG, a framework that adapts Retrieval-Augmented Generation (RAG) to the time series domain. By dynamically retrieving relevant historical patterns and fusing them with model predictions through an Adaptive Retrieval Mixer (ARM), TS-RAG achieves state-of-the-art zero-shot accuracy and provides transparent, evidence-based forecasting. Experimental results show a 3.54% average reduction in Mean Squared Error (MSE) and a 360x speed improvement over existing retrieval-based methods.

1. Introduction

The emergence of Time Series Foundation Models (TSFMs) such as Chronos, MOMENT, and TimeGPT has shifted the paradigm of forecasting toward large-scale pretraining. While these models excel at capturing broad temporal patterns, they face two critical challenges: domain adaptation and interpretability. Adapting to new, non-stationary data typically requires expensive fine-tuning, which can compromise the model's original generalizability. Furthermore, the "black-box" nature of these models makes it difficult for users in fields like finance or healthcare to trust predictions without underlying reasoning.

TS-RAG addresses these issues by providing TSFMs with external, on-the-fly context. Instead of retraining the model, TS-RAG retrieves analogous historical sequences to guide the forecast, improving zero-shot performance while offering clear "evidence" for its predictions.

2. Methodology

TS-RAG adapts the RAG framework—originally popularized in Natural Language Processing—to continuous numerical data. The architecture consists of three primary components:

2.1 The Knowledge Base and Retriever

The system utilizes a massive knowledge base of 2.8 million "context-forecast" pairs, sampled from a diverse 50-million-point multi-domain dataset. When a query is received, a frozen pre-trained encoder (such as the Chronos encoder) generates a dense vector embedding. Using FAISS (Facebook AI Similarity Search), the retriever identifies the top-$k$ most similar historical contexts based on Euclidean or Cosine distance, which proves more robust than traditional metrics like Dynamic Time Warping (DTW).

2.2 Adaptive Retrieval Mixer (ARM)

The core innovation of TS-RAG is the Adaptive Retrieval Mixer. Rather than simple concatenation, the ARM module employs Multi-Head Attention to model the interactions between the query and the retrieved future horizons. A scoring network dynamically weights the relevance of each retrieved pattern, which is then fused with the backbone TSFM’s original prediction via a skip connection.

2.3 Efficient Training

To maintain efficiency, the TSFM backbone and the retriever remain frozen. Only the lightweight ARM module is trained, allowing the system to adapt to new data distributions with minimal computational overhead.

3. Experimental Results

3.1 Zero-Shot Performance

TS-RAG was evaluated across seven standard benchmarks, including the Electricity Transformer Temperature (ETT) datasets, Weather, Electricity, and Exchange Rate. Using Chronos-Bolt as a backbone, the framework achieved state-of-the-art zero-shot performance, reducing MSE by an average of 3.54%. Notably, on the Exchange Rate dataset, TS-RAG achieved a 6.84% reduction in MSE, demonstrating its ability to handle complex, shifting trends.

3.2 Computational Efficiency

Compared to existing retrieval-based forecasting methods like RAF, TS-RAG is significantly more efficient. By leveraging dense embeddings and FAISS, it achieves an inference speed of 9.62 ms per query—over 360x faster than RAF’s 3.47 seconds per query. This efficiency makes TS-RAG suitable for real-time industrial applications.

3.3 Model Agnosticism

The framework is backbone-agnostic. Experiments swapping the Chronos-Bolt backbone for MOMENT showed consistent improvements in zero-shot accuracy, confirming that TS-RAG can enhance various TSFM architectures.

4. Discussion and Interpretability

One of the primary advantages of TS-RAG is its inherent interpretability. By surfacing the top-$k$ retrieved sequences and the attention weights assigned by the ARM module, the model provides a "paper trail" for its forecasts. Users can inspect the historical analogies the model is relying on, transforming the forecasting process from a black-box output into an evidence-based conclusion.

Analysis suggests that the framework is most effective on datasets with high autocorrelation, where historical dependencies are strong. While volatile or noisy data sees more modest gains, the retrieval mechanism consistently prevents the model from missing sudden trend shifts that purely generative models might overlook.

5. Conclusion and Future Work

TS-RAG demonstrates that Retrieval-Augmented Generation is a powerful tool for time series forecasting, offering a path toward more accurate and transparent foundation models without the need for exhaustive fine-tuning. Future research will explore multimodal extensions—incorporating text-based metadata or financial news—and advanced ranking techniques to further refine the retrieval process.

Summary updated

BibTeX
@inproceedings{ning2025ts,
  author = {Kanghui Ning and Zijie Pan and Yu Liu and Yushan Jiang and James Y. Zhang and Kashif Rasul and Anderson Schneider and Lintao Ma and Yuriy Nevmyvaka and Dongjin Song},
  title = {{TS-RAG: Retrieval-Augmented Generation based Time Series Foundation Models are Stronger Zero-Shot Forecaster}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=PymOnHw4Ty},
}
Figure