Pith. sign in

REVIEW 5 major objections 4 minor 36 references

TS-RAG: Retrieval Augmented Generation for Time Series Forecasting

T0 review · 5 major / 4 minor · reviewed 2026-08-07 · deepseek-v4-flash

Pith's one-line read Retrieval-augmented generation improves time series forecasting when retrieved patterns are fused through learned reference tokens and cross-attention; the channel-aware variant reports the lowest average error on six benchmarks.

desk verdict The retrieval-specific win is asserted rather than demonstrated: no RAFT baseline, no error bars, and the SOTA claim rests on a 0.002 MSE margin with ties on two datasets. read the letter →

arxiv 2608.06223 v1 pith:WFUZB4MB submitted 2026-08-06 cs.AI cs.LG

classification cs.AIcs.LG
keywords timeseriesforecastingretrievalaugmentedgenerationreferencetokenscross-attentiontemporalconvolutionalnetworkvectorsearchmultivariatebenchmarkevaluation
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

This paper tries to establish that retrieval-augmented generation helps time series forecasting, provided the retrieved sequences are fused through learned reference tokens rather than simply concatenated into the input. On six benchmarks (ETTh1, ETTh2, ETTm1, ETTm2, Electricity, Weather) and four forecast horizons, the best variant, TS-RAG-CM, reports the lowest average error among compared models, with MSE 0.310 and MAE 0.348. The paper also claims that one retrieved reference is better than two or four, and that temporal-convolutional vector search is both accurate and far faster than Dynamic Time Warping. If these results hold, retrieval becomes a practical, inexpensive way to inject relevant historical context into forecasting models.

What carries the argument

The mechanism is the reference token: a learned vector associated with each retrieved sequence, prepended to the patchified input before embedding, so the attention stack can use it as a compressed handle for external historical context. Patch-based embedding with shared input and reference projections and positional encoding, self-attention over the input, and cross-attention with retrieved sequence embeddings perform the fusion. A TCN-based retriever with vector search replaces Dynamic Time Warping, and the argument is that this fuse-via-tokens design, unlike naive concatenation, lets smaller time series models actually use retrieved information.

What would settle it

A decisive control would run TS-RAG with random or scrambled reference sequences of the same length and count, keeping the fusion machinery and parameter count fixed. If MSE does not clearly worsen relative to top-1 retrieval, the reported gains come from the fusion architecture or added parameters rather than from retrieved content; if it does worsen, repeating the control per dataset would identify where similar-pattern retrieval actually matters.

Watch

Extended reading notes

Core claim

The central claim is that a time series forecaster can be improved by retrieving historical segments similar to the current input and assimilating them through dedicated reference tokens rather than relying on internal weights alone. Each retrieved segment is patched and embedded, a learnable reference token is prepended to the input patches as a compressed summary of that segment, and cross-attention aligns the input with retrieved embeddings while self-attention preserves input-internal dependencies. The retriever is a temporal convolutional network whose embeddings support fast vector search, replacing Dynamic Time Warping. In the paper's comparisons, the channel-aware variant TS-RAG-CM achieves the best average MSE (0.310) and MAE (0.348) across six datasets and four horizons, which the authors interpret as evidence that retrieval-augmented generation improves multivariate forecasting.

Load-bearing premise

The load-bearing premise is that TCN-based vector search retrieves historical segments whose latent patterns are genuinely informative for the current input's future, and that cross-attention can transfer those patterns into the forecast; the paper supports this only with its own ablations, not with a comparison to the closest prior retrieval method or an analysis of when retrieval helps versus hurts.

Editorial extensions

If this is right

  • Retrieval-augmented forecasting beats the compared transformer and linear baselines on ETT, Electricity, and Weather, with TS-RAG-CM averaging MSE 0.310 and MAE 0.348 across all horizons.
  • Directly concatenating retrieved sequences, as in LLM prompting, is the wrong way to inject references: TS-RAG reduces MSE by 12.1 percent to 16.2 percent and TS-RAG-CM by 14.2 percent to 18.2 percent over concatenation, depending on horizon.
  • Using one retrieved reference is better than using two or four, indicating that additional retrieved sequences can introduce noise rather than useful signal.
  • Temporal-convolutional retrieval is practical for real-time use (about 0.004 seconds per query) and yields better forecasts than Dynamic Time Warping, which takes about 14.27 seconds.
  • Even without explicit cross-channel dependency modeling, TS-RAG roughly matches a strong channel-mixing baseline, suggesting retrieval can substitute for some cross-channel information.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • If reference-token fusion is the active ingredient, the same prepend-and-cross-attend recipe could be dropped into other patch-based forecasters, turning retrieval into a general add-on rather than a bespoke architecture.
  • The one-reference-is-best result suggests retrieval precision matters more than recall; a retriever trained to rank by shared future dynamics rather than by past-patch similarity is a natural next test.
  • Because the paper does not compare against the closest prior retrieval-based forecaster it cites, the size of the improvement attributable to the reference-token design, rather than to retrieval in general, remains open.
  • A practical corollary not explored in the paper: the same TCN-vector-search retriever could be combined with a pretrained forecaster at inference time, since the reference tokens are the only newly trained parameters.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

5 major / 4 minor

Summary. The manuscript proposes TS-RAG, a retrieval-augmented architecture for multivariate long-horizon time series forecasting. A TCN-based retriever selects the most similar training-set sequences to the input; the retrieved sequences are patched and embedded, while per-channel learnable 'reference tokens' are prepended to the input patches; self-attention and cross-attention then fuse input and retrieved information. The authors evaluate on ETT, Electricity, and Weather with look-back 96 and horizons 96/192/336/720, reporting that TS-RAG-CM achieves average MSE 0.310 and MAE 0.348, and they claim consistent state-of-the-art performance. The paper also includes ablations on direct concatenation, number of references, and retrieval method.

Significance. The idea of adapting RAG to time series through efficient vector retrieval plus learned reference tokens is timely and plausibly useful; the comparison against direct sequence concatenation (Section 4.2.1) and the TCN-vs-DTW efficiency numbers (Table 2) are informative. I concur with the stress-test note that the evaluation is not circular: the model is trained on standard splits, the retrieval database is the training set, and reference tokens are learned parameters rather than quantities fit to test data. However, the central empirical claim is not yet established: the closest retrieval baseline is absent, the SOTA margin is within run-to-run noise, and the ablations do not isolate the contribution of retrieved content. If the missing evidence is supplied, the contribution could be solid, but in its current form the paper overstates its conclusions.

major comments (5)
  1. [Table 1 / Section 4.1] The claim that TS-RAG-CM achieves 'consistent state-of-the-art performance' is not supported by the reported numbers. Although the implementation details state that results are averaged over five runs, no standard deviations, confidence intervals, or per-horizon breakdowns are given; the aggregate advantage over TimeXer is 0.310 vs 0.312 MSE, and on ETTh1 and Weather the two models tie in MSE while TimeXer has lower MAE. Please report error bars and a significance test, and temper the abstract/conclusion claim until the margin is shown to be distinguishable from run-to-run variation.
  2. [Section 2.2 and Table 1] Section 2.2 identifies RAFT [23] as the closest retrieval-augmented forecasting method, but Table 1 does not include RAFT among the baselines. Without this comparison, the experimental section cannot attribute the reported gains to retrieval augmentation rather than to the transformer backbone; please add RAFT under the same training/evaluation protocol.
  3. [Section 4.2.2] The ablation varies the number of retrieved sequences among 1, 2, and 4, but never includes N=0 in the same fusion architecture. Consequently, the improvement over PatchTST reported in Table 1 could be produced by the cross-attention or reference-token modules alone, independently of whether the retrieved sequences carry useful information; please add a no-retrieval ablation and, ideally, a control with randomly retrieved sequences.
  4. [Table 2] The TS-RAG and TS-RAG-CM rows (0.275/0.322 and 0.266/0.318) coincide with the ETTm2 row of Table 1, yet the caption does not state which dataset is used, and the 'Retrieval Time' column has no units. Please specify the dataset and units, and clarify whether the conclusion that TCN retrieval is best extends beyond this single dataset.
  5. [Section 3.2.1, Eq. (5)] The reference tokens v_ref^{(n)}(c) are indexed only by rank n and channel c, not by the content of the retrieved sequence r^{(i,n)}, so the statement that these tokens 'act as compressed representations of historical patterns' is not justified by the equation as written. If the tokens are shared across all inputs for a given rank, please explain how content-specific information is transferred (e.g., via the cross-attention keys/values); if the tokens are instead database-specific, the notation and training procedure need to be revised.
minor comments (4)
  1. [Baselines paragraph and References] The Baselines paragraph cites TimeXer as [25], but reference [25] is the TimeMixer paper while reference [26] is the TimeXer paper. Please correct the citation and also the sentence 'Our model follows the same experimental settings as Timer,' which refers to a model not otherwise introduced.
  2. [Table 1] Table 1 reports only averages over horizons S={96,192,336,720}; providing per-horizon results would support the claim of consistency across horizons.
  3. [Figures 3 and 4] Figures 3 and 4 have no axis labels, no legend for the curves in Figure 3, and no error bars; please add these to make the ablations interpretable.
  4. [Section 3.3] Section 3.3 uses h_x in Eqs. (9) and (10) before h_x is formally defined; please define h_x and h_r explicitly, and state whether Eqs. (6) and (8) share the projection parameters W_x and b_x by design.

Circularity Check

0 steps flagged · score 0.0 of 10

No circularity found: the model is trained on standard splits and evaluated on held-out test data; retrieval uses the training set, and no output is defined as its input.

full rationale

The paper's derivation chain is self-contained. TS-RAG defines the forecast as \(\hat{x}^{(i)}_{L+1:L+T} = f_\theta(x^{(i)}_{1:L}, r^{(i)})\) where the retrieved sequences \(r^{(i)}\) come from a historical database \(\mathcal{D}\) via a TCN-based retriever; all learnable components — input embeddings, reference tokens, attention projections, and the retriever — are trained on the training split and evaluated on held-out test data (Section 4, Implementation Details). There is no equation in which the output is defined in terms of the prediction target, no fitted constant relabeled as a prediction, and no load-bearing citation to work by the same authors. The closest prior retrieval-augmented method, RAFT, is discussed in Section 2.2 but not included in Table 1, and the ablation in Section 4.2.2 varies the number of retrieved sequences without an N=0 control; these are experimental-completeness and evidence-strength concerns, not circularity. The abstract's 'consistent state-of-the-art' claim may be under-supported by the small average margin and missing error bars, but overclaiming an empirical result is not a circular derivation. Score 0.

Assumptions & free parameters 0 free parameters · 3 assumptions · 1 invented entities

No hand-fitted constants are introduced; all model parameters are learned. The core premises are the retrieval-benefit assumption and the adequacy of the TCN embedding for similarity search. The reference token is a newly introduced model component with no independent evidence outside the paper's experiments.

assumptions (3)
  • domain assumption Retrieving similar historical sequences provides predictive signal for the current forecast.
    Core premise of the method, stated in Section 3.1 and Introduction; no theoretical justification beyond analogy to NLP RAG.
  • domain assumption TCN-based embeddings preserve time series similarity well enough for vector search.
    Section 4.2.3 compares TCN, DTW, and ED, but the quality of TCN embeddings as a similarity measure is assumed.
  • domain assumption The standard benchmark splits and metrics (MSE/MAE) are the correct evaluation protocol.
    Section 4; standard in the field, but the paper does not report variance.
invented entities (1)
  • Reference tokens (v_ref)
    purpose: Learned embeddings prepended to patchified input to encode retrieved reference sequences.
    The token is a model component whose utility is only shown by in-paper ablations; no external falsifiable prediction.

how reviews work

0 comments
Cite this review

Pith. "Pith review of TS-RAG: Retrieval Augmented Generation for Time Series Forecasting." pith.science (2026). https://pith.science/paper/WFUZB4MB

@misc{pith2026260806223,
  author       = {Pith},
  title        = {Pith review of: TS-RAG: Retrieval Augmented Generation for Time Series Forecasting},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/WFUZB4MB}},
  note         = {Machine review of arXiv:2608.06223}
}
read the original abstract

While deep learning models, particularly transformer-based architectures, have shown impressive performance in time series forecasting, the application of retrieval-augmented generation (RAG) in this domain remains limited. Since RAG has proven effective in enhancing the capabilities of large language models by incorporating relevant external information, retrieving similar time series sequences as references might also improve accuracy in time series forecasting tasks. However, most time series models are constrained by limited training data, smaller parameter scales, and a lack of the extensive generative capabilities found in large language models. Simply concatenating reference sequences into the prompt, as done in language models, may not yield the expected results. To address these challenges, we propose a novel approach, TS-RAG, which leverages RAG to enhance forecasting performance. The framework introduces specially designed reference tokens to effectively fuse information from the input sequence with that from retrieved similar sequences, enabling a more robust capture of complex temporal dynamics. Experimental results demonstrate that TS-RAG achieves consistent state-of-the-art performance across several real-world forecasting benchmarks.

Figures

Figures reproduced from arXiv: 2608.06223 by the authors.

Figure 1
Figure 1. Left: schematic overview of TS-RAG. Right: model performance comparison on multiple forecasting benchmarks. [PITH_FULL_IMAGE:figures/full_fig_p001_1.png] view at source ↗
Figure 2
Figure 2. The Framework of TS-RAG. 3.2.2 Reference Sequences Embedding. Each retrieved sequence 𝑟 (𝑖,𝑛) undergoes independent patchification: r (𝑖,𝑐,𝑛) patch =  𝑟 (𝑖,𝑐,𝑛) 1:𝑝 , . . . , 𝑟 (𝑖,𝑐,𝑛) 𝐿−𝑝+1:𝐿  . (7) The corresponding embeddings are then computed as: r (𝑖,𝑛) embed = 𝑊𝑥 r (𝑖,𝑛) patch + 𝑏𝑥 + PE(𝑟 (𝑖,𝑛) patch). (8) 3.3 Reference Fusion To integrate both the input sequence and retrieved sequences, we utilize self-atte… view at source ↗
Figure 3
Figure 3. Comparison of TS-RAG-CM, TS-RAG with Direct Sequence Concatenation. [PITH_FULL_IMAGE:figures/full_fig_p006_3.png] view at source ↗
Figures from the paper (1 more)
Figure 4
Figure 4. Figure 4: Comparison of TS-RAG-CM, TS-RAG across different reference numbers. [PITH_FULL_IMAGE:figures/full_fig_p007_4.png]

Discussion (0). Continue with ORCID to comment.

Reference graph

Works this paper leans on

36 extracted references · 26 canonical work pages

  1. [23]

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

  2. [1]

    S. O. Arik and T. Pfister. 2020. ProtoNets: Prototype-based Learning for Few-Shot Classification. InInternational Conference on Learning Representations (ICLR)

  3. [2]

    Shaojie Bai, J Zico Kolter, and Vladlen Koltun. 2018. An empirical evaluation of generic convolutional and recurrent networks for sequence modeling.arXiv preprint arXiv:1803.01271(2018)

  4. [3]

    Anastasia Borovykh, Sander Bohte, and Cornelis W Oosterlee. 2017. Conditional time series forecasting with convolutional neural networks.arXiv preprint arXiv:1703.04691(2017)

  5. [4]

    Wei Chen, Fang Liu, Li Zhou, and Yu Wang. 2023. TSMixer: A lightweight time series model with MLP-mixer architecture.arXiv preprint arXiv:2305.10877 (2023)

  6. [5]

    Xiaowei Chen, Yuning Jiang, Jiuxiang Gu, Wenjing Liu, Xinyue Yang, Mingfei Tang, Xiaolong Wei, Ran Yu, Shailza Choudhary, Baoyuan Wu Mehta, et al

  7. [6]

    Subhankar Das, Tian Wang, Qian Zhou, and Liang Xu. 2023. TiDE: Time series forecasting with decomposition-enhanced MLPs.arXiv preprint arXiv:2306.13284 (2023)

  8. [7]

    Subhankar Das, Wen Zhang, and Fang Liu. 2024. TimesFM: Large-scale founda- tion model for time series forecasting.arXiv preprint arXiv:2402.07678(2024)

Show all 36 references
  1. [8]

    Andrew Dooley, Hyeongseok Bae, and Mengyu Qian. 2024. ForecastPFN: Pretraining-free zero-shot forecasting via neural processes.arXiv preprint arXiv:2403.08567(2024)

  2. [9]

    Raja Ekambaram, Daniel Smith, and Li Huang. 2024. Tiny Time Mixers: Light- weight zero-shot time series forecasting.arXiv preprint arXiv:2401.05678(2024)

  3. [10]

    Manuel Garza and Luis Mergenthaler-Canseco. 2023. TimeGPT-1: A universal time series foundation model.arXiv preprint arXiv:2309.01245(2023). Xiao et al

  4. [11]

    Yury Gorishniy, Ivan Rubachev, Artem Babenko, and Vasily Svirin. 2024. Retrieval-Augmented Tabular Models for Forecasting and Decision-Making. arXiv preprint arXiv:2401.09876(2024)

  5. [12]

    Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang

  6. [13]

    Hassaan Hewamalage, Christoph Bergmeir, and Kasun Bandara. 2021. Recurrent neural networks for time series forecasting: Current status and future directions. International Journal of Forecasting37, 1 (2021), 388–427

  7. [14]

    Wenhu Huang, Linyi Wang, Yichi Li, Pengcheng He, Wenhao Wu, Jianfeng Yang, Lu Wang, and Jordan Boyd-Graber. 2023. LAPDOG: Personalized Dialogue Generation via Retrieval-Augmented Memory.arXiv preprint arXiv:2305.19253 (2023)

  8. [15]

    Bingxin Jing, Zhao Zhou, Shuai Liu, Weiqing Liu, Yutao Li, Fangli Chen, Xuanjing Zhang, and Jingen Zhou. 2022. ReTime: Retrieval-based Temporal Representa- tion Learning for Time-Series Forecasting. InProceedings of the ACM SIGKDD International Conference on Knowledge Discover...

  9. [16]

    Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Angela Fan, Edouard Grave, Armand Joulin, and Luke Zettlemoyer. 2020. Dense passage retrieval for open-domain question answering. InProceedings of the Conference on Empirical Methods in Natura...

  10. [17]

    Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, and Sebastian Riedel. 2020. Retrieval-augmented generation for knowledge-intensive NLP tasks.Advances in Neural Informatio...

  11. [18]

    Shiwen Li, Jinpeng Jin, Yuan Xuan, Xiaolin Zhou, Weike Chen, Yan Wang, and Shuicheng Yan. 2019. Enhancing the locality and breaking the memory bottle- neck of transformer on time series forecasting.Advances in Neural Information Processing Systems32 (2019)

  12. [19]

    Xuan Li, Jie Sun, and Zheng Liu. 2020. Time Imaging for Time Series Forecasting. InProceedings of the 37th International Conference on Machine Learning, Vol. 119. 5986–5995. https://proceedings.mlr.press/v119/li20a.html

  13. [20]

    Yong Liu, Tengge Hu, Haoran Zhang, Haixu Wu, Shiyu Wang, Lintao Ma, and Mingsheng Long. 2024. iTransformer: Inverted Transformers Are Effective for Time Series Forecasting. doi:10.48550/arXiv.2310.06625 arXiv:2310.06625 [cs]

  14. [21]

    Nader, X

    M. Nader, X. Chen, and D. Smith. 2022. Kernel-Based Retrieval-Augmented Neural Networks for Tabular Data. InAdvances in Neural Information Processing Systems (NeurIPS)

  15. [22]

    Nguyen, Phanwadee Sinthong, and Jayant Kalagnanam

    Yuqi Nie, Nam H. Nguyen, Phanwadee Sinthong, and Jayant Kalagnanam. 2023. A Time Series is Worth 64 Words: Long-term Forecasting with Transformers. http://arxiv.org/abs/2211.14730 arXiv:2211.14730 [cs]

  16. [24]

    Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need.Advances in Neural Information Processing Systems30 (2017)

  17. [25]

    Yuxuan Wang, Haixu Liu, and Jiaxiang Zhang. 2024. TimeMixer: Gener- alized MLP-mixer architecture for time series forecasting.arXiv preprint arXiv:2401.12877(2024)

  18. [26]

    Yuxuan Wang, Haixu Wu, Jiaxiang Dong, Guo Qin, Haoran Zhang, Yong Liu, Yunzhong Qiu, Jianmin Wang, and Mingsheng Long. 2024. TimeXer: Em- powering Transformers for Time Series Forecasting with Exogenous Variables. arXiv:2402.19072 [cs.LG] https://arxiv.org/abs/2402.19072

  19. [27]

    Jin Woo, Minho Choi, and Hyejin Lee. 2024. MOIRAI: Large open-source time series foundation models.arXiv preprint arXiv:2401.09765(2024)

  20. [28]

    Haixu Wu, Jianmin Xu, Yuxuan Wang, and Mingsheng Long. 2021. Autoformer: Decomposition transformers with auto-correlation for long-term series forecast- ing.Advances in Neural Information Processing Systems34 (2021), 22419–22430

  21. [29]

    Ailing Zeng, Qingsong Yang, Hao Zhou, Zhiqiang Zhang, Hongyuan Xu, Yuyue Tong, Jianxin Xu, and Xiaolong Wang. 2023. Are transformers effective for time series forecasting?Advances in Neural Information Processing Systems36 (2023)

  22. [30]

    Yi Zhang, Rong Jin, and Zhi-Hua Zhou. 2016. kNN-based Feature Selection Approach for Text Categorization. InProceedings of the AAAI Conference on Artificial Intelligence

  23. [31]

    Haoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang, Jianhui Li, Hanting Xiong, Wensheng Zhang, Yan Zhang, Yang Bai, and Qiao Li. 2021. Informer: Be- yond efficient transformer for long sequence time-series forecasting.Proceedings of AAAI Conference on Artificial Intelligence(2021)

  24. [32]

    Tian Zhou, Ziqing Ma, Qingsong Wen, Liang Sun, Rui Jin, Zaiqiao Ding, Shirui Pan, and Yao Jin. 2022. Fedformer: Frequency enhanced decomposed transformer for long-term series forecasting.International Conference on Machine Learning (2022), 26420–26431

  25. [33]

    Zhi Zhou and Tian Xu. 2021. Multi-scale Mixing for Time Series Forecasting. Journal of Machine Learning Research22, 1 (2021), 1–25. https://www.jmlr.org/ papers/volume22/20-017/20-017.pdf

  26. [2020]

    InProceedings of the International Conference on Machine Learning (ICML)

    REALM: Retrieval-augmented language model pre-training. InProceedings of the International Conference on Machine Learning (ICML)

  27. [2023]

    ReImagen: Retrieval-Augmented Text-to-Image Generation.arXiv preprint arXiv:2303.08774(2023)

  28. [2024]

    arXiv:2411.08249 [cs.LG] https://arxiv.org/abs/2411.08249

    Retrieval Augmented Time Series Forecasting. arXiv:2411.08249 [cs.LG] https://arxiv.org/abs/2411.08249

Pith tools

Reviewed August 7, 2026 · model on record in the stance chip above.