Model-agnostic Retrieval-Augmented Extended Forecasting for time series

arXiv cs.LG Papers

Summary

This paper introduces RAEF, a model-agnostic retrieval-augmented method for time series forecasting that improves accuracy and reduces computational overhead compared to fine-tuning approaches.

arXiv:2608.14054v1 Announce Type: new Abstract: Time series forecasting with pretrained foundation models has demonstrated strong zero-shot capabilities. However, achieving optimal performance on time series with short or negligible historical data in domain-specific applications typically requires adaptation via either fine-tuning or RAG. While fine-tuning is effective, it incurs substantial computational costs. This work explores RAG within univariate time series (Retrieval Augmented Generation) as a more efficient alternative, in particular RAF (Retrieval Augmented Forecasting), and introduces RAEF (Retrieval-Augmented Extended Forecasting), a model-agnostic method built upon RAF. RAEF incorporates key refinements to the retrieval and aggregation mechanisms: (1) direct retrieval in input-space rather than embedding-space, reducing inference overhead, and (2) concatenation-based aggregation that preserves temporal structure instead of averaging. Empirical evaluation across multiple benchmark datasets demonstrates that RAEF outperforms RAF in both accuracy and inference overhead. Furthermore, comprehensive comparisons with zero-shot and fine-tuned foundation models show that RAEF achieves competitive or superior performance to fine-tuning while avoiding its computational burden, establishing it as a practical and scalable approach for domain adaptation in time series forecasting.
Original Article
View Cached Full Text

Cached at: 08/17/26, 10:19 AM

# Model-Agnostic Retrieval-Augmented Extended Forecasting for Time Series
Source: [https://arxiv.org/html/2608.14054](https://arxiv.org/html/2608.14054)
###### Abstract

Time series forecasting with pretrained foundation models has demonstrated strong zero\-shot capabilities\. However, achieving optimal performance on time series with short or negligible historical data in domain\-specific applications typically requires adaptation via either fine\-tuning or RAG\. While fine\-tuning is effective, it incurs substantial computational costs\. This work explores RAG within univariate time series \(Retrieval Augmented Generation\) as a more efficient alternative, in particular RAF\[[19](https://arxiv.org/html/2608.14054#bib.bib5)\]\(Retrieval Augmented Forecasting\), and introduces RAEF \(Retrieval\-Augmented Extended Forecasting\), a model\-agnostic method built upon RAF\. RAEF incorporates key refinements to the retrieval and aggregation mechanisms: \(1\) direct retrieval in input\-space rather than embedding\-space, reducing inference overhead, and \(2\) concatenation\-based aggregation that preserves temporal structure instead of averaging\. Empirical evaluation across multiple benchmark datasets demonstrates that RAEF outperforms RAF in both accuracy and inference overhead\. Furthermore, comprehensive comparisons with zero\-shot and fine\-tuned foundation models show that RAEF achieves competitive or superior performance to fine\-tuning while avoiding its computational burden, establishing it as a practical and scalable approach for domain adaptation in time series forecasting\.

Index Terms—RAF, RAG, Foundation Model, Time Series, Fine\-tuning\.

## 1Introduction

Fig\. 1:Architecture\.Left:Conventional fine\-tuning, where model parameters are updated during training usingxtrainx\_\{\\text\{train\}\}\.Middle:RAF, in whichxtrainx\_\{\\text\{train\}\}is used to construct a vector database\. At inference, the inputxxis embedded to retrieve the most similar samples; their averagex¯r\\bar\{x\}\_\{r\}is aligned withxx, concatenated to formxaugx\_\{\\text\{aug\}\}, and fed into a pretrained model\.Right:RAEF, where similarity is computed directly in input\-space rather than embedding\-space\. Retrieved samples are aggregated to constructxaugx\_\{\\text\{aug\}\}, effectively replacing RAF’s Alignment block with an Aggregator block, which is subsequently passed to a pretrained model to predictyy\.Time series forecasting is critical for decision\-making across diverse domains, including finance, energy systems, healthcare, and climate science\. Recently, transformer\-based foundation models have demonstrated impressive zero\-shot forecasting capabilities\[[11](https://arxiv.org/html/2608.14054#bib.bib1),[5](https://arxiv.org/html/2608.14054#bib.bib2),[9](https://arxiv.org/html/2608.14054#bib.bib3)\]\. Notable examples include Moirai\[[23](https://arxiv.org/html/2608.14054#bib.bib9)\], Chronos\[[1](https://arxiv.org/html/2608.14054#bib.bib12)\], MoiraiMoE\[[14](https://arxiv.org/html/2608.14054#bib.bib18)\], PatchTST\[[16](https://arxiv.org/html/2608.14054#bib.bib10)\], TimeGPT\-1\[[5](https://arxiv.org/html/2608.14054#bib.bib2)\], TimesFM\[[2](https://arxiv.org/html/2608.14054#bib.bib13)\], GTT\[[3](https://arxiv.org/html/2608.14054#bib.bib14)\], Time\-LLM\[[8](https://arxiv.org/html/2608.14054#bib.bib15)\], UniTime\[[13](https://arxiv.org/html/2608.14054#bib.bib16)\], UniTS\[[4](https://arxiv.org/html/2608.14054#bib.bib17)\], ChatTime\[[22](https://arxiv.org/html/2608.14054#bib.bib19)\], OFA\[[27](https://arxiv.org/html/2608.14054#bib.bib20)\], and Time\-MoE\[[18](https://arxiv.org/html/2608.14054#bib.bib21)\], which leverage attention mechanisms\[[21](https://arxiv.org/html/2608.14054#bib.bib8)\]to capture long\-range temporal dependencies\. These models, however, face challenges in scenarios with limited historical context\. When time series data provide insufficient context windows, zero\-shot approaches struggle to achieve satisfactory accuracy\. In such cases, domain adaptation becomes necessary, typically accomplished through either fine\-tuning or Retrieval\-Augmented Generation \(RAG\)\.

Fine\-tuning updates model parameters using domain\-specific data, but this incurs substantial computational costs that are proportional to the model size and the scale of the dataset\. In contrast, RAG, which originated in natural language processing \(NLP\)\[[10](https://arxiv.org/html/2608.14054#bib.bib4)\], offers an alternative by augmenting model inputs with relevant retrieved examples without updating the parameters\. During inference, relevant samples from a prebuilt domain\-specific database augment the input, thereby enabling the model to attend over extended context windows and capture domain\-relevant temporal dependencies without requiring retraining\.

While RAG has been extensively studied in the context of NLP, it remains relatively less explored for time series\. Recent methods including TimeRAF \(Retrieval Augmented for Time Series Forecasting\)\[[26](https://arxiv.org/html/2608.14054#bib.bib6)\], RATD \(Retrieval\-Augmented Diffusion Models for Time Series Forecasting\)\[[12](https://arxiv.org/html/2608.14054#bib.bib7)\], RAFT \(Retrieval Augmented Time Series Forecasting\)\[[6](https://arxiv.org/html/2608.14054#bib.bib24)\], and TS\-RAG \(Retrieval\-Augmented Generation based Time Series Foundation\)\[[17](https://arxiv.org/html/2608.14054#bib.bib26)\]require custom architectures or domain\-specific training, which limits their model\-agnostic applicability\. Only RAF \(Retrieval Augmented Forecasting\)\[[19](https://arxiv.org/html/2608.14054#bib.bib5)\]and FinSrag \(Financial time\-Series RAG\)\[[24](https://arxiv.org/html/2608.14054#bib.bib25)\]maintain model\-agnostic properties\. FinSrag relies on large language models, which results in a computational overhead that is comparable to that of fine\-tuning\. RAF retrieves similar time series samples using embeddings and averages their future components before concatenation with the query input\. Nevertheless, this averaging strategy can dilute important temporal patterns, thus limiting its effectiveness\.

We present Retrieval\-Augmented Extended Forecasting \(RAEF\), a model\-agnostic approach for time series forecasting that addresses the limitations of RAF with two key refinements\. Firstly, we operate on the input signal rather than embedding\-space, as in RAF\. This modification reduces retrieval time by a factor of four across context lengths of32,64,12832,64,128\. Secondly, we preserve the temporal structure of the data by concatenating the retrieved samples rather than averaging them\. To evaluate RAEF, we conduct a comprehensive evaluation across six benchmark datasets using three foundation models \(MoiraiMoE, Chronos\-T5, and Chronos\-Bolt\)\. We are the first to offer a comparison between RAG and model fine\-tuning in the context of time series\. We demonstrate an improvement in MASE\[[7](https://arxiv.org/html/2608.14054#bib.bib27)\]of 11–16% over the base model\. RAF achieves a more modest improvement of 1–7% over the same base model, whereas RAEF delivers results that are comparable to or better than those of fine\-tuning\. In summary: 1\) RAEF operates in input space, 2\) RAEF discards RAF’s alignment step in favor of an aggregator module, and 3\) we evaluate against fine\-tuning, and are the first RAG method for time series to surpass it\.

## 2Method

Given a univariate time series samplex∈ℝCx\\in\\mathbb\{R\}^\{C\}with a lengthCC, which we refer to as the context, we aim to predict the future sequencey∈ℝFy\\in\\mathbb\{R\}^\{F\}of lengthFF, referred to as the future\. To achieve this, we construct a vector database from training samplesxtrain∈ℝC\+Fx\_\{\\text\{train\}\}\\in\\mathbb\{R\}^\{C\+F\}and leverage these samples containing domain\-specific information during inference to augment the inputxx, yielding the augmented inputxaugx\_\{\\text\{aug\}\}\. Subsequently,xaugx\_\{\\text\{aug\}\}is fed through a pretrained foundation model to produce the predictionyy\. Our method builds upon RAF, introducing two key modifications detailed in the following subsections\.

### 2\.1RAF

RAF is illustrated in the middle panel of Figure[1](https://arxiv.org/html/2608.14054#S1.F1)\. Instead of further training the foundation model, samplesxt​r​a​i​nx\_\{train\}are split between contextddand futurespp, the context is embedded and ingested into a vector databaseDD\. At inference time, the query samplexxis embedded, and retrieval from the database \(retriever\) is performed by computing the Euclidean distance between the query embedding and stored embeddings\.

The retriever identifies the topkkmost similar sequences based on Euclidean distance in feature space and retrieves contextsr∈ℝC×kr\\in\\mathbb\{R\}^\{C\\times k\}with their respective futuresf∈ℝF×kf\\in\\mathbb\{R\}^\{F\\times k\}and scoress∈ℝ1×ks\\in\\mathbb\{R\}^\{1\\times k\}\. The context and future pairs are concatenated along the temporal dimension to formxrx\_\{r\}, and thekkretrieved samples are aggregated by averaging to obtain a single representative sequencex~r∈ℝ\(C\+F\)×1\\tilde\{x\}\_\{r\}\\in\\mathbb\{R\}^\{\(C\+F\)\\times 1\}\. Subsequently, instance normalization\[[20](https://arxiv.org/html/2608.14054#bib.bib11)\]with respect toxxis applied to bothx~r\\tilde\{x\}\_\{r\}andxxitself, setting the mean to zero and the standard deviation to one to mitigate distribution shift\. RAF then performs alignment between the normalizedx~r\\tilde\{x\}\_\{r\}andxxprior to concatenation\. Alignment removes discontinuities at the boundary betweenx~r\\tilde\{x\}\_\{r\}andxxby shifting one sequence along the vertical axis such that the last point ofx~r\\tilde\{x\}\_\{r\}matches the first point ofxx\. After normalization, alignment and concatenation,xaugx\_\{\\text\{aug\}\}is formed and subsequently fed into the pretrained foundation model to produce the outputyy\. To recover the output in the original input scale,yyis denormalized to obtain the final forecast\.

While this approach is effective, the averaging operation on retrieved samples results in information loss, thereby limiting the model’s ability to fully exploit the information from all retrieved examples\. Furthermore, the application of embeddings at each inference step introduces computational overhead that degrades overall performance\. Time series are already real\-valued sequences living in a metric space where Euclidean distance directly captures similarity, making additional projection unnecessary and potentially lossy\.

### 2\.2Retriever

Our approach employs the same retrieval mechanism as RAF, with the key distinction that the embedding step is omitted\. Time series inputs are already continuous numerical vectors where direct distance metrics are well\-defined\. Additional embedding layers introduce computational overhead without guaranteed accuracy improvements and may even degrade performance if poorly suited to the domain\. By operating directly in input space, RAEF reduces inference overhead while preserving retrieval quality\.

### 2\.3Aggregator

The same instance normalization as RAF is applied onxx, obtainingx~\\tilde\{x\}, meanμ𝐱\\mu\_\{\\mathbf\{x\}\}and standard deviationσ𝐱\\sigma\_\{\\mathbf\{x\}\}\. The normalized retrieved samplesxr~\\tilde\{x\_\{r\}\}and scoress~\\tilde\{s\}are calculated as:

xr~=xr−μ𝐱σ𝐱,s~=sσ𝐱2⋅C,\\tilde\{x\_\{r\}\}=\\frac\{x\_\{r\}\-\\mu\_\{\\mathbf\{x\}\}\}\{\\sigma\_\{\\mathbf\{x\}\}\},\\tilde\{s\}=\\frac\{s\}\{\\sigma\_\{\\mathbf\{x\}\}^\{2\}\\cdot C\},\(1\)
wheresscorresponds to a sum of squared differences over context lengthCCandxrx\_\{r\}is calculated as obtained in RAF\. We normalize the scoresssby dividing withσ𝐱2⋅C\{\\sigma\_\{\\mathbf\{x\}\}\}^\{2\}\\cdot Cto obtain a scale\-invariant distances~\\tilde\{s\}\.

Our objective is to aggregate all retrieved samples rather than averaging them, thereby preserving the complete retrieved information\. However, this approach generates long sequences at each inference stage, increasing the computational burden on the pretrained model when attending to these extended sequences\. To find a balance between information retention and computational efficiency, we define a score thresholddtd\_\{t\}that discriminates between retrieved candidatesrc​a​nr\_\{can\}\(high relevance\) and retrieved residualsrr​e​sr\_\{res\}\(low relevance\)\.

𝒞\\displaystyle\\mathcal\{C\}=\{x~r,\|s~≤dt\}\\displaystyle=\\left\\\{\\tilde\{x\}\_\{r\},\\;\\middle\|\\;\\tilde\{s\}\\leq d\_\{t\}\\right\\\}\(2\)ℛ\\displaystyle\\mathcal\{R\}=\{x~r,\|s~\>dt\}\\displaystyle=\\left\\\{\\tilde\{x\}\_\{r\},\\;\\middle\|\\;\\tilde\{s\}\>d\_\{t\}\\right\\\}
rcan\\displaystyle r\_\{\\mathrm\{can\}\}=concatx∈𝒞⁡\(x\)\\displaystyle=\\operatorname\{concat\}\_\{x\\in\\mathcal\{C\}\}\(x\)\(3\)
rres\\displaystyle\\hskip\-13\.00005ptr\_\{\\mathrm\{res\}\}=1\|ℛ\|​∑x∈ℛx\\displaystyle=\\frac\{1\}\{\|\\mathcal\{R\}\|\}\\sum\\limits\_\{x\\in\\mathcal\{R\}\}x\(4\)
Retrieved samples are divided into candidate𝒞\\mathcal\{C\}and residual setsℛ\\mathcal\{R\}as defined in equation[2](https://arxiv.org/html/2608.14054#S2.E2)\. Candidates are concatenated to formrc​a​nr\_\{can\}, while residuals are averaged to obtainrr​e​sr\_\{res\}\. The vectorrc​a​nr\_\{can\}contains in a single sequence the most similar samples to the input of interest, enriching the sample with the most relevant patterns\. By contrast,rr​e​sr\_\{res\}, despite having lower relevance, is not entirely discarded but averaged\. At the enddtd\_\{t\}helps to balance between very long augmented sample with less relevant segments and very short augmented sample with lost information due to averaging across many samples\. We did not discard the residual sets because these samples still contain useful information, as this is how RAF performs augmentation\. The final augmented inputxa​u​gx\_\{aug\}is constructed as:

xaug\\displaystyle x\_\{\\mathrm\{aug\}\}=concat⁡\(rres,rcan,x~\)\.\\displaystyle=\\operatorname\{concat\}\\left\(r\_\{\\mathrm\{res\}\},r\_\{\\mathrm\{can\}\},\\tilde\{x\}\\right\)\.\(5\)The retrieved samples are concatenated in ascending score order to preserve similarity\-based relevance\. When either the residual set or the candidate set is empty,xa​u​gx\_\{aug\}is constructed using only the available set\.

Additionally, as part of our improvements, we removed the alignment step introduced in RAF\. Originally, the alignment was purposefully added to eliminate discontinuities between the retrieved samples and the input of interest\. However, we propose that by removing this alignment, the retrieved samples will be treated by the pretrained model as past periodic representations\. Given that the retrieved samplesrcanr\_\{\\text\{can\}\}exhibit high similarity withxx, the augmented samplexaugx\_\{\\text\{aug\}\}effectively represents a longer semi\-periodic sequence, allowing the model to capture extended temporal patterns more naturally\.

## 3Experiments

Our experiments aim to demonstrate that RAEF: \(1\) improves forecasting accuracy over baseline foundation models and RAF, \(2\) achieves better performance than fine\-tuning without parameter updates, and \(3\) benefits from input\-space retrieval and structure\-preserving aggregation\.

### 3\.1Experimental Setup

We evaluate our method on six benchmark datasets spanning diverse domains[\[ET\]](https://github.com/zhouhaoyi/ETDataset),[\[Power\]](https://www.kaggle.com/datasets/dharanikra/electrical-power-demand-in-turkey),[\[Traffic\]](https://www.kaggle.com/datasets/leonardo00/istanbul-traffic-index),[\[FredMd\]](https://zenodo.org/records/4654833/files/fred_md_dataset.zip),[\[ElectricityUCI\]](https://archive.ics.uci.edu/static/public/321/electricityloaddiagrams20112014.zip),[\[Huawei Cloud\]](https://github.com/sir-lab/time-series-fm-dataset.git)using split sizes of0\.80\.8and instance normalization as preprocessing step\. MoiraiMoE\[[14](https://arxiv.org/html/2608.14054#bib.bib18)\]serves as our primary backbone \(inference time: 16ms\), with additional evaluation on Chronos\-T5\[[1](https://arxiv.org/html/2608.14054#bib.bib12)\]and Chronos\-Bolt to demonstrate model\-agnostic applicability\. Our benchmark includes main zero\-shot foundation models, we excluded common models like PatchTST\[[16](https://arxiv.org/html/2608.14054#bib.bib10)\]due to lacking zero\-shot capabilities\. Our focus is on enhancing the performance of zero\-shot foundation models through RAG\.

We use MASE \(Mean Absolute Scaled Error\) utilized in RAF as our evaluation protocol\. MASE normalizes prediction error by naive forecast error, enabling fair comparison across datasets\. We fix forecasting horizon atF=16F=16\(MoiraiMoE’s maximum non\-autoregressive length\) to avoid accumulative error\[[25](https://arxiv.org/html/2608.14054#bib.bib23)\]and evaluate context lengthsC∈\{32,64,128\}C\\in\\\{32,64,128\\\}\. Vector databases contain10,00010,000training samples, constructed using HNSW\[[15](https://arxiv.org/html/2608.14054#bib.bib22)\]within the Chroma framework111[https://www\.trychroma\.com/](https://www.trychroma.com/), and take approximately 5 minutes to build\. Empirical results demonstrate that a threshold ofdt=1\.0d\_\{t\}=1\.0is effective across our experimental settings \(see table[2](https://arxiv.org/html/2608.14054#S3.T2)\)\. All experiments use three random seeds with identical train/test splits\. Within the MASE results, the standard deviation is within0\.0010\.001to0\.010\.01\. We setk=16k=16as it provides sufficient retrieved context without exceeding the model’s effective attention window\.

We compare against: \(1\)Base: Pretrained model without adaptation, \(2\)Fine\-Tuning \(FT\): Full parameter updates with early stopping, \(3\)RAF\[[19](https://arxiv.org/html/2608.14054#bib.bib5)\]: embedding\-space retrieval with alignment and averaging, \(4\)RAEF: Our method\. Fine\-tuning uses learning rate of10−410^\{\-4\}, batch size of10241024, weight decay of10−210^\{\-2\}, with betas of0\.9,0\.980\.9,0\.98\. We implemented early stopping based on validation accuracy with a patience of33, up to maximum of500500iterations, same optimizer as MoiraiMoE and samext​r​a​i​nx\_\{train\}as training set\. RAEF and RAF require no parameter updates\. Experiments are reported in222[https://github\.com/jpvilla1990/raef/](https://github.com/jpvilla1990/raef/)

### 3\.2Results

Table[1](https://arxiv.org/html/2608.14054#S3.T1)presents our main results across all datasets, foundation models, and context lengths\. RAEF consistently achieves the best performance among MoiraiMoE variants, with average improvements of15\.80%15\.80\\%,11\.78%11\.78\\%, and11\.26%11\.26\\%for contexts3232,6464, and128128, respectively, over the baseline\. Notably, RAEF outperforms fine\-tuning in most cases while requiring no parameter updates, likely because transformer\-based models are inherently trained to attend over long sequences\.

Table 1:MASE for context sizes 32, 64, and 128 across different foundation models\. FT = Fine\-Tuning\. Bold indicates best method on MoiraiMoE, underlining indicates absolute best\. On Chronos T5 and Bolt, × indicates datasets used during model pretraining and therefore excluded from evaluation\.#### 3\.2\.1Model\-Agnostic Performance

Results across Chronos\-T5 and Chronos\-Bolt demonstrate RAEF’s model\-agnostic properties\. For Chronos\-T5, RAEF achieves13\.88%13\.88\\%,8\.21%8\.21\\%, and13\.24%13\.24\\%improvements across context lengths, with particularly strong performance on Huawei Cloud\. For Chronos\-Bolt, which exhibits strong baseline performance, RAEF still achieves3\.50%3\.50\\%improvement at context128128, confirming its general applicability\.

#### 3\.2\.2Context Length Analysis

As hypothesized, improvement decreases with longer contexts\. Shorter contexts \(C=32C=32\) benefit most from retrieval augmentation \(15\.80%15\.80\\%for MoiraiMoE\), since limited temporal information leaves more room for retrieved samples to contribute additional patterns\. Longer contexts \(C=128C=128\) already encode sufficient information, reducing marginal gains from augmentation to11\.26%11\.26\\%\. This trend holds across all foundation models, making RAEF particularly valuable in data\-scarce scenarios where historical context is limited\. Extending further, average improvement dropped to6%6\\%atC=256C=256and−0\.07%\-0\.07\\%atC=512C=512\. We do not claim an absolute threshold where augmentation stops helping, but the tendency is clear: shorter contexts benefit most from RAG on time series\.

#### 3\.2\.3Comparison with Fine\-Tuning

RAEF achieves comparable or superior performance to fine\-tuning on44out of66datasets while requiring no parameter updates, making it more practical for rapid domain adaptation\. Fine\-tuning’s advantages on Power and Traffic datasets are marginal \(00\-1%1\\%improvement over RAEF\), suggesting these datasets’ patterns are already well\-captured by pretrained models\. The combination of competitive accuracy with zero training overhead positions RAEF as an efficient alternative to fine\-tuning in resource\-constrained environments\.

#### 3\.2\.4Aggregation Mechanism

The performance gains can be attributed to RAEF’s concatenation based aggregation, which preserves individual temporal sequences rather than averaging them as in RAF\. Averaging dilutes temporal patterns across sequences, causing information loss that limits the model’s ability to extract relevant features\. In contrast, concatenation allows the attention mechanism to selectively attend to relevant patterns from each retrieved sample\. The threshold\-based candidate\-residual separation further enhances this by prioritizing high\-similarity samples \(dt≤1\.0d\_\{t\}\\leq 1\.0\) for concatenation while averaging only distant, less\-relevant samples, leveraging the pretrained model’s attention blocks to reduce computational overhead\.

#### 3\.2\.5Computational Efficiency

Input\-space retrieval scoped toC=32,64,128C=32,64,128reduces overhead from88ms to22ms per query\. We observed no retrieval\-time variation across context lengths\.

### 3\.3Ablation Studies

#### 3\.3\.1Aggregation Mechanism\.

From Table[3](https://arxiv.org/html/2608.14054#S3.T3), removing the aggregator \(Keeping the alignment from RAF\) still improves over standard RAF \(10\.14%10\.14\\%vs7\.31%7\.31\\%at context3232\) but underperforms full RAEF\. The threshold\-based candidate\-residual separation contributes an additional5\.66%5\.66\\%improvement on average, demonstrating the value of prioritizing high\-similarity samples while not discarding lower\-similarity information entirely through averaging\.

#### 3\.3\.2Hyperparameter Analysis

We evaluate empirically the hyperparameterdtd\_\{t\}as shown in table[2](https://arxiv.org/html/2608.14054#S3.T2)\. Performance reaches a peak at a normalized distancedt=1\.0d\_\{t\}=1\.0with respect to equation[1](https://arxiv.org/html/2608.14054#S2.E1), corresponding to one standard deviation from the query sample\. This aligns with statistical intuition: samples within one standard deviation share strong distributional similarity\. Beyond this threshold, retrieved samples no longer contribute meaningful individual information and can be safely averaged\.

Table 2:Impact of thresholddtd\_\{t\}on MASE improvement \(%\) over baseline using MoiraiMoE\-small with RAEF\.Table 3:MASE improvement \(%\)\. emb cos = embedding\-space with cosine distance, emb L2 = embedding\-space with L2 distance, RAEF \(w/o agg\) denotes the variant without the aggregator module, RAEF denotes our method\. MoiraiMoE foundation model, horizon 16\.Finally Table[3](https://arxiv.org/html/2608.14054#S3.T3)shows how the aggregator contributes to the improvement in accuracy\.

## 4Conclusions

We introduced RAEF, a model\-agnostic retrieval\-augmented framework that achieves significant MASE improvements \(11−16%11\-16\\%\) over baseline foundation models without parameter updates\. Results across six datasets and three foundation models demonstrate performance comparable to or exceeding fine\-tuning on 4/6 datasets, making RAEF a practical alternative for domain adaptation in resource\-constrained environments\.

## References

- \[1\]A\. F\. Ansari, L\. Stella, C\. Turkmen, X\. Zhang, P\. Mercado, H\. Shen, O\. Shchur, S\. S\. Rangapuram, S\. P\. Arango, S\. Kapoor, J\. Zschiegner, D\. C\. Maddix, M\. W\. Mahoney, K\. Torkkola, A\. G\. Wilson, M\. Bohlke\-Schneider, and Y\. Wang\(2024\)Chronos: learning the language of time series\.ArXivabs/2403\.07815\.External Links:[Link](https://api.semanticscholar.org/CorpusID:268363551)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1),[§3\.1](https://arxiv.org/html/2608.14054#S3.SS1.p1.1)\.
- \[2\]\(2024\)A decoder\-only foundation model for time\-series forecasting\.InProceedings of the 41st International Conference on Machine Learning,ICML’24\.Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.
- \[3\]C\. Feng, L\. Huang, and D\. Krompass\(2024\)Only the curve shape matters: training foundation models for zero\-shot multivariate time series forecasting through next curve shape prediction\.ArXivabs/2402\.07570\.External Links:[Link](https://api.semanticscholar.org/CorpusID:267627371)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.
- \[4\]S\. Gao, T\. Koker, O\. Queen, T\. Hartvigsen, T\. Tsiligkaridis, and M\. Zitnik\(2024\)UNITS: a unified multi\-task time series model\.InProceedings of the 38th International Conference on Neural Information Processing Systems,NIPS ’24,Red Hook, NY, USA\.External Links:ISBN 9798331314385Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.
- \[5\]A\. Garza, C\. Challu, and M\. Mergenthaler\-Canseco\(2023\)TimeGPT\-1\.External Links:[Link](https://api.semanticscholar.org/CorpusID:263672111)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.
- \[6\]S\. Han, S\. Lee, M\. Cha, S\. Ö\. Arik, and J\. Yoon\(2025\)Retrieval augmented time series forecasting\.InProceedings of the 42nd International Conference on Machine Learning,ICML’25\.Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p3.1)\.
- \[7\]R\. Hyndman and A\. Koehler\(2006\)Another look at measures of forecast accuracy\.International Journal of Forecasting22,pp\. 679–688\.External Links:[Document](https://dx.doi.org/10.1016/j.ijforecast.2006.03.001)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p4.1)\.
- \[8\]M\. Jin, S\. Wang, L\. Ma, Z\. Chu, J\. Y\. Zhang, X\. Shi, P\. Chen, Y\. Liang, Y\. Li, S\. Pan,et al\.\(2024\)Time\-LLM: Time Series Forecasting by Reprogramming Large Language Models\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.
- \[9\]G\. Lai, W\. Chang, Y\. Yang, and H\. Liu\(2017\)Modeling long\- and short\-term temporal patterns with deep neural networks\.The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval\.External Links:[Link](https://api.semanticscholar.org/CorpusID:4922476)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.
- \[10\]P\. Lewis, E\. Perez, A\. Piktus, F\. Petroni, V\. Karpukhin, N\. Goyal, H\. Küttler, M\. Lewis, W\. Yih, T\. Rocktäschel, S\. Riedel, and D\. Kiela\(2020\)Retrieval\-augmented generation for knowledge\-intensive nlp tasks\.InProceedings of the 34th International Conference on Neural Information Processing Systems,NIPS ’20,Red Hook, NY, USA\.External Links:ISBN 9781713829546Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p2.1)\.
- \[11\]Y\. Liang, H\. Wen, Y\. Nie, Y\. Jiang, M\. Jin, D\. Song, S\. Pan, and Q\. Wen\(2024\)Foundation models for time series analysis: a tutorial and survey\.InProceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining,KDD ’24,New York, NY, USA,pp\. 6555–6565\.External Links:ISBN 9798400704901,[Link](https://doi.org/10.1145/3637528.3671451),[Document](https://dx.doi.org/10.1145/3637528.3671451)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.
- \[12\]J\. Liu, L\. Yang, H\. Li, and S\. Hong\(2024\)Retrieval\-augmented diffusion models for time series forecasting\.InProceedings of the 38th International Conference on Neural Information Processing Systems,NIPS ’24,Red Hook, NY, USA\.External Links:ISBN 9798331314385Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p3.1)\.
- \[13\]X\. Liu, J\. Hu, Y\. Li, S\. Diao, Y\. Liang, B\. Hooi, and R\. Zimmermann\(2023\)UniTime: a language\-empowered unified model for cross\-domain time series forecasting\.Proceedings of the ACM Web Conference 2024\.External Links:[Link](https://api.semanticscholar.org/CorpusID:264146377)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.
- \[14\]X\. Liu, J\. Liu, G\. Woo, T\. Aksu, Y\. Liang, R\. Zimmermann, C\. Liu, J\. Li, S\. Savarese, C\. Xiong, and D\. Sahoo\(2025\)Moirai\-MoE: empowering time series foundation models with sparse mixture of experts\.InProceedings of the 42nd International Conference on Machine Learning,A\. Singh, M\. Fazel, D\. Hsu, S\. Lacoste\-Julien, F\. Berkenkamp, T\. Maharaj, K\. Wagstaff, and J\. Zhu \(Eds\.\),Proceedings of Machine Learning Research, Vol\.267,pp\. 38940–38962\.External Links:[Link](https://proceedings.mlr.press/v267/liu25an.html)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1),[§3\.1](https://arxiv.org/html/2608.14054#S3.SS1.p1.1)\.
- \[15\]Y\. A\. Malkov and D\. A\. Yashunin\(2020\)Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs\.IEEE Trans\. Pattern Anal\. Mach\. Intell\.42\(4\),pp\. 824–836\.External Links:ISSN 0162\-8828,[Link](https://doi.org/10.1109/TPAMI.2018.2889473),[Document](https://dx.doi.org/10.1109/TPAMI.2018.2889473)Cited by:[§3\.1](https://arxiv.org/html/2608.14054#S3.SS1.p2.1)\.
- \[16\]Y\. Nie, N\. H\. Nguyen, P\. Sinthong, and J\. Kalagnanam\(2022\)A time series is worth 64 words: long\-term forecasting with transformers\.ArXivabs/2211\.14730\.External Links:[Link](https://api.semanticscholar.org/CorpusID:254044221)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1),[§3\.1](https://arxiv.org/html/2608.14054#S3.SS1.p1.1)\.
- \[17\]K\. Ning, Z\. Pan, Y\. Liu, Y\. Jiang, J\. Y\. Zhang, K\. Rasul, A\. Schneider, L\. Ma, Y\. Nevmyvaka, and D\. Song\(2025\)TS\-rag: retrieval\-augmented generation based time series foundation models are stronger zero\-shot forecaster\.External Links:2503\.07649,[Link](https://arxiv.org/abs/2503.07649)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p3.1)\.
- \[18\]X\. Shi, S\. Wang, Y\. Nie, D\. Li, Z\. Ye, Q\. Wen, and M\. Jin\(2024\)Time\-moe: billion\-scale time series foundation models with mixture of experts\.External Links:2409\.16040,[Link](https://arxiv.org/abs/2409.16040)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.
- \[19\]K\. Tire, E\. O\. Taga, M\. E\. Ildiz, and S\. Oymak\(2026\)Retrieval augmented time series forecasting\.InThe 29th International Conference on Artificial Intelligence and Statistics,External Links:[Link](https://openreview.net/forum?id=UD76JhLswg)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p3.1),[§3\.1](https://arxiv.org/html/2608.14054#S3.SS1.p3.1),[Abstract](https://arxiv.org/html/2608.14054#abstract1.1)\.
- \[20\]D\. Ulyanov, A\. Vedaldi, and V\. S\. Lempitsky\(2016\)Instance normalization: the missing ingredient for fast stylization\.ArXivabs/1607\.08022\.External Links:[Link](https://api.semanticscholar.org/CorpusID:16516553)Cited by:[§2\.1](https://arxiv.org/html/2608.14054#S2.SS1.p2.1)\.
- \[21\]A\. Vaswani, N\. Shazeer, N\. Parmar, J\. Uszkoreit, L\. Jones, A\. N\. Gomez, Ł\. Kaiser, and I\. Polosukhin\(2017\)Attention is all you need\.InAdvances in Neural Information Processing Systems,I\. Guyon, U\. V\. Luxburg, S\. Bengio, H\. Wallach, R\. Fergus, S\. Vishwanathan, and R\. Garnett \(Eds\.\),Vol\.30,pp\.\.External Links:[Link](https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.
- \[22\]C\. Wang, Q\. Qi, J\. Wang, H\. Sun, Z\. Zhuang, J\. Wu, L\. Zhang, and J\. Liao\(2025\)ChatTime: a unified multimodal time series foundation model bridging numerical and textual data\.InProceedings of the Thirty\-Ninth AAAI Conference on Artificial Intelligence and Thirty\-Seventh Conference on Innovative Applications of Artificial Intelligence and Fifteenth Symposium on Educational Advances in Artificial Intelligence,AAAI’25/IAAI’25/EAAI’25\.External Links:ISBN 978\-1\-57735\-897\-8,[Link](https://doi.org/10.1609/aaai.v39i12.33384),[Document](https://dx.doi.org/10.1609/aaai.v39i12.33384)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.
- \[23\]G\. Woo, C\. Liu, A\. Kumar, C\. Xiong, S\. Savarese, and D\. Sahoo\(2024\)Unified training of universal time series forecasting transformers\.InProceedings of the 41st International Conference on Machine Learning,ICML’24\.Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.
- \[24\]M\. Xiao, Z\. Jiang, L\. Qian, Z\. Chen, Y\. He, Y\. Xu, Y\. Jiang, D\. Li, R\. Weng, M\. Peng, J\. Huang, S\. Ananiadou, and Q\. Xie\(2025\)Retrieval\-augmented large language models for financial time series forecasting\.External Links:2502\.05878,[Link](https://arxiv.org/abs/2502.05878)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p3.1)\.
- \[25\]J\. Ye, Y\. Yu, W\. Zhang, L\. Wang, J\. Li, and F\. Tsung\(2024\)Empowering time series analysis with foundation models: a comprehensive survey\.External Links:[Link](https://api.semanticscholar.org/CorpusID:269605992)Cited by:[§3\.1](https://arxiv.org/html/2608.14054#S3.SS1.p2.1)\.
- \[26\]H\. Zhang, C\. Xu, Y\. Zhang, Z\. Zhang, L\. Wang, T\. Tan, and J\. Bian\(2024\)TimeRAF: retrieval\-augmented foundation model for zero\-shot time series forecasting\.External Links:[Link](https://openreview.net/forum?id=zd5Knrtja4)Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p3.1)\.
- \[27\]T\. Zhou, P\. Niu, X\. Wang, L\. Sun, and R\. Jin\(2023\)One fits all: power general time series analysis by pretrained lm\.InProceedings of the 37th International Conference on Neural Information Processing Systems,NIPS ’23,Red Hook, NY, USA\.Cited by:[§1](https://arxiv.org/html/2608.14054#S1.p1.1)\.

Similar Articles

Semantics-Enhanced Retrieval-Augmented Time Series Forecasting

arXiv cs.AI

Proposes SERAF, a multimodal retrieval-augmented framework for time series forecasting that uses both numerical similarity and self-generated textual descriptions to retrieve historical patterns, improving forecasting under non-stationarity. Experiments on seven real-world datasets show effectiveness over state-of-the-art baselines.

Stationarity-Aware Retrieval-Augmented Time Series Forecasting

arXiv cs.LG

SARAF is a Stationarity-Aware Retrieval-Augmented Forecasting framework that adaptively balances relevance and diversity in retrieval for time series forecasting, modulating diversification strength based on dataset-level stationarity to handle non-stationary regime shifts. Accepted to KDD 2026, it demonstrates competitive performance over strong baselines on eight real-world datasets.