Not All Retrievals are Useful: Cross-Attention for Input-Aware RAG in Time Series Forecasting

Seunghan Lee, Jaehoon Lee, Jun Seo, Sungdong Yoo, Minjae Kim +5 more
3/16/2026
4 citations
cs.LG
transformer-attentionrag

Official code: seunghan96/cross-rag (9 stars, Python, last commit 2026-09-17).

Abstract

Retrieval-augmented generation (RAG) enhances zero-shot time series (TS) forecasting by leveraging external knowledge bases, yet existing approaches overlook input-level relevance when fusing retrieved samples with the query. We argue that not all retrievals are equally useful, and irrelevant ones can degrade performance.

Show full abstract

To this end, we propose Cross-RAG, a zero-shot RAG-based forecasting framework that selectively attends to query-relevant retrieved samples via query--retrieval cross-attention. By modeling input-level relevance between the query and retrieved samples, Cross-RAG jointly incorporates three sources of information: 1) the query itself, 2) the retrieved samples, and 3) their relational interactions. In particular, this input-aware design enables Cross-RAG to remain stable as the number of retrieved samples $k$ grows, whereas prior methods without cross-attention require careful $k$ tuning to avoid degradation from irrelevant retrievals. Extensive experiments demonstrate that Cross-RAG consistently improves zero-shot forecasting performance across multiple TSFM backbones and various RAG methods, with additional analyses confirming its effectiveness across various retrieval scenarios. Code is available at https://github.com/seunghan96/cross-rag/.

View on arXivView PDF

Code Implementations(1)

90Python, ShellJan 14, 20262 months ago

Similar Papers

Cite this paper

@article{lee2026retrievals,
  title  = {Not All Retrievals are Useful: Cross-Attention for Input-Aware RAG in Time Series Forecasting},
  author = {Seunghan Lee and Jaehoon Lee and Jun Seo and Sungdong Yoo and Minjae Kim and Tae Yoon Lim and Dongwan Kang and Hwanil Choi and SoonYoung Lee and Wonbin Ahn},
  year   = {2026},
  eprint = {2603.14709},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.14709v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.14709.svg)](https://codeofpaper.com/paper/2603.14709)

Discussion