Align-RAG: Alignment Is All You Need for TSFM In-Context Learning
Summary
Align-RAG introduces a training-free, closed-form alignment method for retrieval-augmented forecasting with frozen Time Series Foundation Models, outperforming learned fusion adapters on standard benchmarks without any learned parameters.
View Cached Full Text
Cached at: 08/07/26, 07:51 AM
# Align-RAG: Alignment Is All You Need for TSFM In-Context Learning
Source: [https://arxiv.org/html/2608.05571](https://arxiv.org/html/2608.05571)
Mohammad Asadi1Soheil Hor2Bardiya Akhbari2 Jack W\. O’Sullivan1Tahoura Nedaee1Layne C\. Price2 Raviteja Anantha2Euan Ashley1Ehsan Adeli1 1Stanford University2Amazon masadi@stanford\.edu
###### Abstract
Retrieval\-augmented forecasting promises to adapt frozen Time Series Foundation Models \(TSFMs\) to new domains without fine\-tuning, but recent methods typically rely on learned fusion modules, i\.e\., trained adapters that merge retrieved examples into the backbone’s forecast, based on the assumption that frozen backbones cannot dynamically incorporate retrieved context on their own\. We show this assumption is unnecessary\. We introduceAlign\-RAG, a training\-free method that applies a closed\-form per\-pair amplitude rescaling and integer\-lag phase shift to retrieved past–future windows before they enter a frozen backbone’s context\. With no learned parameters, Align\-RAG outperforms the state\-of\-the\-art trained retrieval adapter on a frozen Chronos\-Bolt on all seven datasets of the standard benchmark \(avg−3\.75%\-3\.75\\%MSE\), showing that the gains previously attributed to learned fusion are recoverable without any training\. Align\-RAG further improves zero\-shot MSE on four additional frozen TSFMs with various architectures by2\.5%2\.5\\%to13\.7%13\.7\\%per backbone with no per\-backbone tuning\. To probe why alignment helps, we compare the frozen backbone’s prediction shift under aligned demonstrations to the closed\-form ridge prediction shift on the same pairs\. We find that aligned demonstrations induce prediction shifts that track a closed\-form ridge predictor on the same pairs, with a future\-shuffle control ruling out a futures\-averaging account\. Together, these results indicate that frozen TSFMs already support dynamic in\-context use of retrievals, and that closed\-form alignment should be the default baseline for retrieval\-augmented forecasting before any fusion module is trained\. Code available at:[https://github\.com/masadi\-99/align\-rag](https://github.com/masadi-99/align-rag)
## 1Introduction
Figure 1:Align\-RAG overview\. \(1\) For each query past𝐪\\mathbf\{q\}, retrieve top\-KKpast–future windows from a reference corpus\. \(2\) Apply two closed\-form, training\-free transforms per pair so that each retrieved past matches the query while the past–future correspondence is preserved\. \(3\) Pack the aligned pairs as in\-context demonstrations using MMR diversification and a tiered token\-budget layout\. \(4\) A single forward pass through a frozen Time Series Foundation Model\. No learned fusion module is introduced\. \(5\) The final forecast combines the model’s in\-context output with a distance\-weighted prior built from the retrieved aligned futures\.Time series forecasting underpins decision\-making in domains as varied as energy management, finance, healthcare, and climate science\. Time Series Foundation Models \(TSFMs\) such as Chronos\(Ansariet al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib2)\), Chronos\-2\(Ansariet al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib3)\), TimesFM\(Daset al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib4)\), Moirai\(Wooet al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib5)\), and Toto\(Cohenet al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib8)\)have established a zero\-shot forecasting paradigm by learning shared temporal representations across heterogeneous corpora\. Once pretrained, a frozen TSFM can be applied to unseen series without further training, but its accuracy on a target distribution depends on whatever the pretraining corpus exposed\.
Retrieval\-augmented generation\(Lewiset al\.,[2020](https://arxiv.org/html/2608.05571#bib.bib14)\)addresses an analogous gap for large language models by providing relevant context at inference time\. The corresponding move for time series is to retrieve past–future windows from a reference set whose dynamics resemble the query and supply them to the model as additional context\. For example, a hospital deploying a frozen TSFM might retrieve patterns from related ICU traces and an energy operator might retrieve consumption windows from similar load regimes\. Done well, this offers dynamic adaptation without labelled data or per\-domain fine\-tuning\.
Recent retrieval\-augmented forecasting on frozen TSFMs has converged on a single design pattern: pair the backbone with a learned fusion module that mediates between retrievals and the model’s representation\. TS\-RAG \(Neurips 2025\)\(Ninget al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib1)\), the state\-of\-the\-art in retrieval\-augmented forecasting for time series foundation models to the best of our knowledge, states the position cleanly, claiming that pretrained TSFMs “lack inherent mechanisms for domain adaptation, as they cannot incorporate external contextual knowledge dynamically”, and trains an Adaptive Retrieval Mixer to fuse encoded retrievals with the backbone\. TimeRAF\(Zhanget al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib42)\)trains an end\-to\-end retriever and a Channel Prompting module; RATD\(Liuet al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib44)\)trains a reference\-modulated attention block inside a diffusion denoiser; RAFT\(Hanet al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib41)\)trains projection and prediction heads on top of the retrieved patterns; TimesFM\-ICF\(Fawet al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib27)\)re\-pretrains the foundation model itself to consume in\-context retrieval examples\. The underlying assumption is uniform: a learned ad\-hoc element is required to make a frozen TSFM benefit from retrieved context\. We challenge this assumption\.
We introduce Align\-RAG, a training\-free retrieval\-augmented forecasting method that extends a frozen TSFM by aligning retrieved past–future windows to the query in amplitude and phase before they enter the backbone’s context\. Given a query window, Align\-RAG retrieves nearest neighbours from a reference set of \(past, future\) pairs and applies a closed\-form per\-pair amplitude rescaling and phase shift so that each retrieved past matches the query\. The aligned pairs are then provided as in\-context demonstrations to the backbone, whose parameters remain unchanged\.
Align\-RAG outperforms TS\-RAG on a frozen Chronos\-Bolt backbone on7/77/7datasets in MSE and6/76/7in MAE across the TS\-RAG benchmark protocol \(ETTh1, ETTh2, ETTm1, ETTm2, Weather, Exchange, Electricity; input length512512, horizon6464\), with an average MSE reduction of3\.75%3\.75\\%and gains significant under a paired moving\-block bootstrap on55of66small\-dataset comparisons\. The same procedure transfers across four additional frozen TSFMs \(Chronos\-2, TimesFM\-2\.0, Moirai, Toto\), improving zero\-shot MSE by between2\.5%2\.5\\%and13\.7%13\.7\\%per backbone, with the largest gains on Moirai \(avg−13\.7%\-13\.7\\%, single cells reaching−30%\-30\\%on ETTm1 and−20%\-20\\%on Weather\), and without any per\-backbone tuning\. The comparison is non\-trivial: TS\-RAG’s Adaptive Retrieval Mixer is trained on2626million context–horizon pairs sampled from Chronos’s pretraining corpus\(Ninget al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib1)\), while Align\-RAG introduces no learned parameters at all\.
A2×22\{\\times\}2ablation isolates where the gain comes from\. Holding the backbone and benchmark fixed, we cross retriever \(trained TS\-RAG retriever vs\. random retrieval\) with alignment \(on vs\. off\)\. Switching from the trained retriever to a random retriever, with alignment on, costs0\.840\.84percentage points of MSE on average and still beats the trained TS\-RAG mixer on44of77datasets\. Turning alignment off, with either retriever, costs more than2020percentage points of MSE\. The ranking of retrieved windows accounts for under one point of the headline; the alignment of the windows that are retrieved accounts for the rest\.
We also probe the mechanism behind this gain\. For each test window we compute the cosine similarityρGD\\rho\_\{\\rm GD\}between the frozen backbone’s prediction shift, induced by replacing zero\-shot context with aligned demonstrations, and the closed\-form ridge prediction shift on the same demonstration pairs\. On Chronos\-Bolt,ρGD\\rho\_\{\\rm GD\}rises from0\.300\.30without alignment to0\.450\.45with alignment, and a paired moving\-block bootstrap excludes zero on7/77/7datasets\. As a causal control, we shuffle the futures of the retrieved pairs while leaving the pasts and the alignment intact\. On ETTm1, the4\.2%4\.2\\%MSE reduction from alignment flips to a12\.2%12\.2\\%MSE increase under the future shuffle, in the direction the closed\-form ridge predicts on the same shuffled pairs, ruling out an explanation in which the backbone is averaging over retrieved futures and ignoring the past–future relationship\.
#### Contributions\.
- •Align\-RAG, a training\-free retrieval\-augmented forecasting method that aligns retrieved past–future windows to the query in amplitude and phase before they enter a frozen TSFM’s context, without modifying the backbone or training any new component\.
- •Evaluation against the trained TS\-RAG mixer on the standard seven\-dataset benchmark with a frozen Chronos\-Bolt \(Section[4\.2](https://arxiv.org/html/2608.05571#S4.SS2)\) and across four further frozen TSFMs \(Section[4\.4](https://arxiv.org/html/2608.05571#S4.SS4)\)\.
- •A behavioural mechanism analysis \(Section[5](https://arxiv.org/html/2608.05571#S5)\): under our closed\-form alignment, the frozen backbone’s prediction shift tracks the closed\-form ridge prediction shift on the same demonstrations, and a future\-shuffle causal control confirms the model is regressing on the \(past, future\) pairs rather than averaging over their futures\.
## 2Related work
#### Retrieval\-augmented forecasting for TSFMs\.
A growing body of work attaches trained components to a frozen TSFM to consume retrievals\. TS\-RAG\(Ninget al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib1)\)trains an Adaptive Retrieval Mixer on top of frozen Chronos\-Bolt\(Ansariet al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib2)\); TimeRAF\(Zhanget al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib42)\)trains an end\-to\-end retriever and a Channel Prompting module; RAFT\(Hanet al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib41)\)trains projection and prediction heads; RATD\(Liuet al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib44)\)trains a diffusion denoiser with a learned reference\-modulated attention block; TimeRAG\(Yanget al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib45)\)inserts a learned reprogramming layer; Advanced RAF\(Tireet al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib43)\)fine\-tunes the backbone end\-to\-end \(while Naive RAF, although a training\-free variant, is outperformed substantially by TS\-RAG\(Ninget al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib1)\)\)\. Each of these methods relies on a learned ad\-hoc element interposed between the retrieval and the backbone\. We compare numerically against TS\-RAG, which is the most directly comparable and the strongest trained\-fusion baseline at the time of writing; we adopt its protocol throughout for fair comparison\. The corresponding move on the LLM side has typically been simpler\. Methods such as REPLUG\(Shiet al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib18)\),kkNN\-LM\(Khandelwalet al\.,[2020](https://arxiv.org/html/2608.05571#bib.bib15)\), and In\-Context RALM\(Ramet al\.,[2023](https://arxiv.org/html/2608.05571#bib.bib19)\)concatenate or interpolate retrieved context with a frozen LM directly\.
#### In\-context learning as implicit regression\.
A line of theoretical work frames in\-context learning as implicit regression\.Garget al\.\([2022](https://arxiv.org/html/2608.05571#bib.bib26)\)show that transformers trained on linear functions match the least\-squares estimator;Akyüreket al\.\([2023](https://arxiv.org/html/2608.05571#bib.bib25)\)andvon Oswaldet al\.\([2023](https://arxiv.org/html/2608.05571#bib.bib24)\)demonstrate that the algorithm such transformers implement is consistent with gradient descent or closed\-form ridge regression on the in\-context demonstrations\.Fawet al\.\([2025](https://arxiv.org/html/2608.05571#bib.bib27)\)extends a related lens to TSFMs by re\-pretraining the foundation model to consume in\-context retrieval examples\. We use this body of work as a behavioural reference: in Section[5](https://arxiv.org/html/2608.05571#S5)we compare the frozen TSFM’s prediction shift under our alignment to the closed\-form ridge predictor’s shift on the same demonstrations\.
#### Phase, amplitude, and structural similarity in time series\.
Dynamic time warping\(Cuturi and Blondel,[2017](https://arxiv.org/html/2608.05571#bib.bib31)\)and its shape variants\(Zhao and Itti,[2018](https://arxiv.org/html/2608.05571#bib.bib32)\)compare misaligned series;kk\-Shape\(Paparrizos and Gravano,[2015](https://arxiv.org/html/2608.05571#bib.bib30)\)clusters by phase\-invariant Pearson similarity; the matrix profile\(Yehet al\.,[2016](https://arxiv.org/html/2608.05571#bib.bib33)\)indexes motifs underzz\-normalised distance\. These methods treat amplitude and phase as nuisance directions and remove them before downstream learning\.
## 3Method: Align\-RAG
Align\-RAG operates on each retrieved past–future window, before tokenization, with two closed\-form transforms\. The first rescales the retrieved past so its first and second moments agree with the query’s, through a regularised affine fit\. The second shifts the retrieved past in time so its principal lag with respect to the query is zero, as an integer\-sample shift chosen by cross\-correlation\. Both transforms have the same future\-side counterparts: the same affine map and the same lag, applied to the retrieved future so the\(𝐩i,𝐟i\)\(\\mathbf\{p\}\_\{i\},\\mathbf\{f\}\_\{i\}\)pair stays consistent\. Neighbour diversification, packing into the backbone’s context budget, future blending, and a no\-demonstration second forward pass are further training\-free components that complement the alignment and improve zero\-shot accuracy\.
Let𝐪∈ℝS\\mathbf\{q\}\\in\\mathbb\{R\}^\{S\}denote the query past of lengthSS\(S=512S\{=\}512for Chronos\-Bolt\) and𝐲∈ℝH\\mathbf\{y\}\\in\\mathbb\{R\}^\{H\}its target future of horizonHH\. A retrieval index returns a pool𝒫=\{\(𝐩i,𝐟i,di\)\}i=120\\mathcal\{P\}=\\\{\(\\mathbf\{p\}\_\{i\},\\mathbf\{f\}\_\{i\},d\_\{i\}\)\\\}\_\{i=1\}^\{20\}of \(past, future, distance\) triples per query channel\. We writefθ\(C\)f\_\{\\theta\}\(C\)for the frozen TSFM’s forecast given a contextCC\.
### 3\.1Amplitude alignment
For each retrieved neighbour, indexed byii, we fit a single affine map on the past and apply it to both past and future\. Letμq,σq\\mu\_\{q\},\\sigma\_\{q\}denote the mean and standard deviation of the query past𝐪\\mathbf\{q\}, andμpi,σpi\\mu\_\{p\_\{i\}\},\\sigma\_\{p\_\{i\}\}those of the retrieved past𝐩i\\mathbf\{p\}\_\{i\}\. The Wiener\-style shrunk slopeaia\_\{i\}and interceptbib\_\{i\}are
ai=σqσpiσpi2\+\(σq/M\)2,bi=μq−aiμpia\_\{i\}\\;=\\;\\frac\{\\sigma\_\{q\}\\,\\sigma\_\{p\_\{i\}\}\}\{\\sigma\_\{p\_\{i\}\}^\{2\}\+\(\\sigma\_\{q\}/M\)^\{2\}\},\\qquad b\_\{i\}\\;=\\;\\mu\_\{q\}\-a\_\{i\}\\,\\mu\_\{p\_\{i\}\}\(1\)whereaia\_\{i\}is the regularised counterpart of the plug\-in scale ratioσq/σpi\\sigma\_\{q\}/\\sigma\_\{p\_\{i\}\}, in the spirit of Wiener filtering for noisy estimation\(Wiener,[1949](https://arxiv.org/html/2608.05571#bib.bib36)\)\. The shrinkage parameterMMcontrols the strength of regularisation: asσpi→0\\sigma\_\{p\_\{i\}\}\\\!\\to\\\!0,aia\_\{i\}shrinks smoothly to zero, and a flat low\-variance neighbour collapses to its own mean rather than amplifying noise\. We setM=5M\{=\}5\. The aligned past and future are𝐩~i=ai𝐩i\+bi\\tilde\{\\mathbf\{p\}\}\_\{i\}=a\_\{i\}\\mathbf\{p\}\_\{i\}\+b\_\{i\}and𝐟~i=ai𝐟i\+bi\\tilde\{\\mathbf\{f\}\}\_\{i\}=a\_\{i\}\\mathbf\{f\}\_\{i\}\+b\_\{i\}, respectively\.
### 3\.2Phase alignment
We shift the rescaled neighbour by the integer lag that maximises its sample cross\-correlation with the query past:
τi∗=argmax\|τ\|≤S/41S−\|τ\|∑t\(𝐪t\+τ−𝐪¯\)\(𝐩~i,t−𝐩~¯i\),\\tau\_\{i\}^\{\*\}=\\arg\\max\_\{\|\\tau\|\\leq S/4\}\\;\\frac\{1\}\{S\-\|\\tau\|\}\\sum\_\{t\}\\\!\\bigl\(\\mathbf\{q\}\_\{t\+\\tau\}\-\\bar\{\\mathbf\{q\}\}\\bigr\)\\bigl\(\\tilde\{\\mathbf\{p\}\}\_\{i,t\}\-\\bar\{\\tilde\{\\mathbf\{p\}\}\}\_\{i\}\\bigr\),\(2\)where𝐪¯\\bar\{\\mathbf\{q\}\}and𝐩~¯i\\bar\{\\tilde\{\\mathbf\{p\}\}\}\_\{i\}are the sample means\. This is the maximum\-likelihood lag estimator under stationary noise\(Knapp and Carter,[1976](https://arxiv.org/html/2608.05571#bib.bib35)\)\. Restricting\|τ\|≤S/4\|\\tau\|\\leq S/4keeps the shift from consuming more than a quarter of the context\. The sameτi∗\\tau\_\{i\}^\{\*\}is applied to𝐟~i\\tilde\{\\mathbf\{f\}\}\_\{i\}to keep the past–future correspondence intact\.
### 3\.3Auxiliary mechanics
Diversification\.Top\-KKnearest neighbours in time\-series corpora are typically near\-duplicates \(e\.g\., same day\-of\-week, same hour\-of\-day\)\. We apply Maximal Marginal Relevance\(Carbonell and Goldstein,[1998](https://arxiv.org/html/2608.05571#bib.bib29)\)withλ=0\.3\\lambda\{=\}0\.3to selectK=10K\{=\}10neighbours from a retrieval pool of2020, maximising diversity among the chosen demonstrations while preserving relevance to the query\.
Token\-budget layout\.Chronos\-Bolt has a20482048\-token budget; ten unmodified demonstrations ofS\+H=576S\{\+\}H\{=\}576tokens overflow it\. We pack a heterogeneous layoutMd\(Sd\+H\)\+Ms\(Ss\+H\)\+Sq≤2048M\_\{d\}\(S\_\{d\}\{\+\}H\)\+M\_\{s\}\(S\_\{s\}\{\+\}H\)\+S\_\{q\}\\leq 2048withMd=2M\_\{d\}\{=\}2,Sd=256S\_\{d\}\{=\}256,Ms=8M\_\{s\}\{=\}8,Ss=32S\_\{s\}\{=\}32\. Two detailed demonstrations carry medium\-range context; eight dense ones carry the most recent3232steps and the full6464\-step future\. Futures are never truncated\.
Future blend\.The in\-context prediction is the convex combination
𝐲^u=\(1−β\)fθ\(C\)\+β∑i=1Kwi𝐟~i,β=0\.15,\\widehat\{\\mathbf\{y\}\}\_\{u\}\\;=\\;\(1\-\\beta\)\\,f\_\{\\theta\}\(C\)\+\\beta\\,\\sum\_\{i=1\}^\{K\}w\_\{i\}\\,\\tilde\{\\mathbf\{f\}\}\_\{i\},\\qquad\\beta\{=\}0\.15,\(3\)wherewi∝exp\(−di/τ\)w\_\{i\}\\propto\\exp\(\-d\_\{i\}/\\tau\)withτ=median\(\{di\}\)/5\\tau=\\mathrm\{median\}\(\\\{d\_\{i\}\\\}\)/5weights aligned futures by retrieval distance,CCis the tiered context of the previous step, andβ\\betacontrols the contribution of the retrieval\-based prior to the backbone forecast\.
No\-demonstration second pass\.A second forward pass on the query alone, blended in the same way, gives𝐲^c\\widehat\{\\mathbf\{y\}\}\_\{c\}\. The final prediction averages the two,𝐲^=α𝐲^u\+\(1−α\)𝐲^c\\widehat\{\\mathbf\{y\}\}=\\alpha\\widehat\{\\mathbf\{y\}\}\_\{u\}\+\(1\-\\alpha\)\\widehat\{\\mathbf\{y\}\}\_\{c\}, withα=0\.60\\alpha\{=\}0\.60\. Please note that we use this full configuration for the main headline numbers, but the central claim does not depend on these two post\-processing terms: settingβ=0\\beta=0and removing the consensus pass leaves a pure aligned\-ICL variant whose only model\-facing intervention is the aligned demonstration context\. Table[7](https://arxiv.org/html/2608.05571#A5.T7)shows that the pure aligned\-ICL setting still outperforms TS\-RAG in 6/7 datasets\.
The full pseudocode is Algorithm[1](https://arxiv.org/html/2608.05571#alg1)\. Hyperparameter values are listed in Appendix[A](https://arxiv.org/html/2608.05571#A1); the same configuration is used throughout the paper\.
Algorithm 1Align\-RAG\.1:query past
𝐪\\mathbf\{q\}, retrieval pool
𝒫=\{\(𝐩i,𝐟i,di\)\}i=120\\mathcal\{P\}=\\\{\(\\mathbf\{p\}\_\{i\},\\mathbf\{f\}\_\{i\},d\_\{i\}\)\\\}\_\{i=1\}^\{20\}, frozen TSFM
fθf\_\{\\theta\}
2:
𝒮←MMR\(𝐪,𝒫,λ=0\.3,K=10\)\\mathcal\{S\}\\leftarrow\\textsc\{MMR\}\(\\mathbf\{q\},\\mathcal\{P\},\\lambda\{=\}0\.3,K\{=\}10\)
3:for
\(𝐩i,𝐟i,di\)∈𝒮\(\\mathbf\{p\}\_\{i\},\\mathbf\{f\}\_\{i\},d\_\{i\}\)\\in\\mathcal\{S\}do
4:
\(ai,bi\)←\(a\_\{i\},b\_\{i\}\)\\leftarrowWiener affine fit of
𝐩i\\mathbf\{p\}\_\{i\}to
𝐪\\mathbf\{q\}\(Eq\.[1](https://arxiv.org/html/2608.05571#S3.E1),
M=5M\{=\}5\)
5:
𝐩~i,𝐟~i←ai𝐩i\+bi,ai𝐟i\+bi\\tilde\{\\mathbf\{p\}\}\_\{i\},\\tilde\{\\mathbf\{f\}\}\_\{i\}\\leftarrow a\_\{i\}\\mathbf\{p\}\_\{i\}\+b\_\{i\},\\;a\_\{i\}\\mathbf\{f\}\_\{i\}\+b\_\{i\}
6:Phase\-align by integer\-lag cross\-correlation \(Eq\.[2](https://arxiv.org/html/2608.05571#S3.E2)\)
7:endfor
8:
C←TieredLayout\(𝐪,\{𝐩~i,𝐟~i\}i=1K\)C\\leftarrow\\textsc\{TieredLayout\}\(\\mathbf\{q\},\\\{\\tilde\{\\mathbf\{p\}\}\_\{i\},\\tilde\{\\mathbf\{f\}\}\_\{i\}\\\}\_\{i=1\}^\{K\}\)
9:
wi∝exp\(−di/τ\)w\_\{i\}\\propto\\exp\(\-d\_\{i\}/\\tau\),
τ=median\(\{di\}\)/5\\tau=\\mathrm\{median\}\(\\\{d\_\{i\}\\\}\)/5
10:
𝐲^u←\(1−β\)fθ\(C\)\+β∑iwi𝐟~i\\widehat\{\\mathbf\{y\}\}\_\{u\}\\leftarrow\(1\-\\beta\)\\,f\_\{\\theta\}\(C\)\+\\beta\\sum\_\{i\}w\_\{i\}\\,\\tilde\{\\mathbf\{f\}\}\_\{i\}
11:
𝐲^c←\(1−β\)fθ\(𝐪\)\+β∑iwi𝐟~i\\widehat\{\\mathbf\{y\}\}\_\{c\}\\leftarrow\(1\-\\beta\)\\,f\_\{\\theta\}\(\\mathbf\{q\}\)\+\\beta\\sum\_\{i\}w\_\{i\}\\,\\tilde\{\\mathbf\{f\}\}\_\{i\}
12:return
𝐲^←0\.60𝐲^u\+0\.40𝐲^c\\widehat\{\\mathbf\{y\}\}\\leftarrow 0\.60\\,\\widehat\{\\mathbf\{y\}\}\_\{u\}\+0\.40\\,\\widehat\{\\mathbf\{y\}\}\_\{c\}
## 4Experiments
### 4\.1Setup
We evaluate on the seven datasets used byTS\-RAG\(Ninget al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib1)\): ETTh1, ETTh2, ETTm1, ETTm2, Weather, Exchange, and Electricity\. Context lengthS=512S\{=\}512and horizonH=64H\{=\}64follow theTS\-RAGprotocol; longer\-horizon results atH∈\{96,192\}H\\in\\\{96,192\\\}are reported in Appendix[G](https://arxiv.org/html/2608.05571#A7)and preserve the gain on every \(dataset, horizon\) cell\. Metrics are MSE and MAE\. The frozen backbone for the main comparison is Chronos\-Bolt\-Base\(Ansariet al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib2)\); cross\-backbone results also use Chronos\-2\(Ansariet al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib3)\), TimesFM\-2\.0\(Daset al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib4)\), Moirai\(Wooet al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib5)\), and Toto\(Cohenet al\.,[2024](https://arxiv.org/html/2608.05571#bib.bib8)\)\. For the head\-to\-head comparison against TS\-RAG \(Table[1](https://arxiv.org/html/2608.05571#S4.T1)\) we useTS\-RAG’s own released top\-2020retrieval index per \(query, channel\) so that any improvement isolates the effect of alignment from differences in retrieval quality\. TheTS\-RAGnumbers are produced by its released code and checkpoint and match the paper’s reported values to≤0\.3%\\leq 0\.3\\%\.
### 4\.2Main result on Chronos\-Bolt
Table[1](https://arxiv.org/html/2608.05571#S4.T1)reports MSE and MAE on the full test sets, together with paired moving\-block bootstrap CIs on per\-window squared\-error differences \(block2424,N=2000N\{=\}2000resamples,Künsch,[1989](https://arxiv.org/html/2608.05571#bib.bib39); Liu and Singh,[1992](https://arxiv.org/html/2608.05571#bib.bib40)\)\.
Table 1:Align\-RAG vs\.TS\-RAG\(Ninget al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib1)\)on a frozen Chronos\-Bolt\. Bold marks the lower of MSE/MAE per row\. The right column is the paired moving\-block bootstrap95%95\\%CI on per\-window MSE differences \(TS\-RAG−\-Align\-RAG\); positive means Align\-RAG wins\. Five of six small\-dataset MSE wins are significant atα=0\.05\\alpha\{=\}0\.05\.Datasetntestn\_\{\\text\{test\}\}Align\-RAGTS\-RAGΔ\\DeltaMSE / MAEpaired95%95\\%CIETTh119,7190\.3434 / 0\.36120\.3556 / 0\.3623−3\.44%/−0\.30%\-3\.44\\%/\-0\.30\\%\[\+0\.0078,\+0\.0171\]\[\+0\.0078,\+0\.0171\]ETTh219,7190\.2379 / 0\.29640\.2451 / 0\.2981−2\.93%/−0\.57%\-2\.93\\%/\-0\.57\\%\[\+0\.0029,\+0\.0117\]\[\+0\.0029,\+0\.0117\]ETTm180,1990\.2671 / 0\.30470\.2904 / 0\.3113−8\.01%/−2\.12%\-8\.01\\%/\-2\.12\\%\[\+0\.0182,\+0\.0287\]\[\+0\.0182,\+0\.0287\]ETTm280,1990\.1384 / 0\.21880\.1465 / 0\.2230−5\.51%/−1\.90%\-5\.51\\%/\-1\.90\\%\[\+0\.0061,\+0\.0102\]\[\+0\.0061,\+0\.0102\]Weather219,9960\.1372 / 0\.17290\.1453 / 0\.1770−5\.60%/−2\.34%\-5\.60\\%/\-2\.34\\%\[\+0\.0069,\+0\.0097\]\[\+0\.0069,\+0\.0097\]Exchange11,6320\.0620 / 0\.17150\.0624 / 0\.1716−0\.69%/−0\.05%\-0\.69\\%/\-0\.05\\%\[−0\.0015,\+0\.0025\]\[\-0\.0015,\+0\.0025\]Electricity1,668,2370\.1119/ 0\.20180\.1120 / 0\.2003−0\.07%/\+0\.73%\-0\.07\\%/\+0\.73\\%—Wins / avg7/77/7MSE \(avg−3\.75%\-3\.75\\%\);6/7\\;6/7MAE \(avg−0\.93%\-0\.93\\%\)Align\-RAG attains the lower MSE on every benchmark and the lower MAE on six of seven\. Five MSE wins exceed2%2\\%relative reduction; five of six small\-dataset bootstrap CIs lie strictly above zero\. Chronos\-Bolt inference is deterministic, so the only source of randomness in a paired comparison is the choice of test windows\.
### 4\.3Alignment, not retrieval ranking, drives the improvement
We isolate the contribution of alignment from that of retrieval ranking with a2×22\{\\times\}2ablation on Chronos\-Bolt \(Table[2](https://arxiv.org/html/2608.05571#S4.T2)\)\. The retriever is either TS\-RAG’s released top\-2020index \(*ranked*\) or uniform random sampling from the leakage\-safe train split \(*random*\)\. Alignment is either applied \(*aligned*, the amplitude and phase steps of Section[3](https://arxiv.org/html/2608.05571#S3)\) or skipped \(*no align*; retrieved windows enter the context unscaled and unshifted\)\.
Table 2:Retriever×\\timesalignment ablation on Chronos\-Bolt \(MSE\)\. “Aligned” applies steps \(ii\)\+\(iii\) \(amplitude and phase\); “no align” skips both, leaving retrieved windows unscaled and unshifted\.Δ\\Deltais relative to zero\-shot\.With alignment fixed, retriever choice costs at most0\.840\.84pp average MSE: switching from the ranked retriever to uniform random windows still beats the trained TS\-RAG mixer on4/74/7datasets in absolute MSE, and on four datasets \(ETTh1, ETTh2, Weather, Electricity\) the random retriever is within0\.50\.5pp of the ranked one\. Retriever quality matters more on Exchange and Electricity, the two non\-periodic datasets where shape\-matched retrieval carries channel\-specific information\. Even there, random retrieval is competitive\.
With the retriever fixed, removing alignment under either choice regresses MSE by2020–2222pp versus zero\-shot\. We further investigate the mechanism through which alignment changes the model’s behaviour in Section[5](https://arxiv.org/html/2608.05571#S5)\.
### 4\.4Cross\-backbone generalisation
We apply the same method, with the same configuration, to five frozen TSFMs on the same seven datasets, atS=512S\{=\}512,H=64H\{=\}64\. The retriever is rebuilt from scratch as a per\-dataset, per\-channel, train\-split\-onlyzz\-normalised Euclidean nearest\-neighbour index, with a strict leakage audit\.
Table 3:Cross\-backbone results: zero\-shot MSE \(ZS\) and Align\-RAG’s relative MSE change vs\. that backbone’s zero\-shot \(Δ%\\Delta\\%\); negativeΔ%\\Delta\\%means Align\-RAG wins\. Weather and Electricity were excluded from zero\-shot evaluation for TimesFM inNinget al\.\([2025](https://arxiv.org/html/2608.05571#bib.bib1)\)’s protocol on the grounds of pretraining\-corpus overlap, so we omit those two cells for TimesFM\-2\.0 to remain consistent with their leakage treatment\. All five backbones use the same in\-house z\-normalised Euclidean nearest\-neighbour retriever; absolute MSE values therefore differ from Table[1](https://arxiv.org/html/2608.05571#S4.T1)’s Align\-RAG cells, which use TS\-RAG’s released top\-2020index\.All five backbones reduce MSE on average, ranging from−2\.45%\-2\.45\\%\(Toto\) to−13\.73%\-13\.73\\%\(Moirai\)\. Moirai, the backbone furthest from the Chronos lineage on which TS\-RAG was trained, gains−13\.73%\-13\.73\\%on average and wins on every dataset, with the largest single cell a−29\.95%\-29\.95\\%MSE reduction on ETTm1 and−20\.18%\-20\.18\\%on Weather\. TimesFM\-2\.0 wins on the four ETT datasets at up to−12\.43%\-12\.43\\%but regresses on Exchange \(\+2\.03%\+2\.03\\%\)\. Bolt and Chronos\-2 win every benchmarked dataset where they are evaluated, with Bolt’s Electricity result \(\+0\.04%\+0\.04\\%\) effectively a tie\. Toto is the most uneven case: it gains on ETTh1, ETTm1, and Weather but regresses by\+0\.04%\+0\.04\\%to\+2\.20%\+2\.20\\%on the other four datasets, and its−2\.45%\-2\.45\\%average is the smallest of the five backbones\.
### 4\.5Component ablation
Table[4](https://arxiv.org/html/2608.05571#S4.T4)reports a cumulative\-add ablation on the five small datasets, with Exchange and Electricity reported separately under the table\. Each row adds one component on top of the previous\.
Table 4:Cumulative ablation on Chronos\-Bolt, MSE change vs\.TS\-RAG\. The last column is the average across the five smaller datasets; Electricity \(ntest=1\.67n\_\{\\text\{test\}\}\{=\}1\.67M\) and Exchange \(ntest=11\.6n\_\{\\text\{test\}\}\{=\}11\.6k\) span two orders of magnitude in test\-set size and are reported separately under the table\.On Electricity, steps \(i\)–\(v\) regress to\+2\.7%\+2\.7\\%MSE and the second pass \(vi\) recovers a tie at−0\.07%\-0\.07\\%; on Exchange the full method lands at−0\.69%\-0\.69\\%\. The amplitude and phase steps alone close most of the gap to TS\-RAG on the small datasets; the layout and diversification each contribute about a point of average MSE; the second\-pass average contributes a further point and resolves the Electricity calibration regression that the in\-context steps alone introduce on a321321\-channel corpus \(Appendix[C](https://arxiv.org/html/2608.05571#A3)\)\. A leave\-one\-out variant on ETTh1 and ETTm1 confirms that removing any single component costs0to2\.82\.8pp MSE \(Appendix[B](https://arxiv.org/html/2608.05571#A2)\)\.
## 5Aligned demonstrations elicit ridge\-like behaviour
In this section, we examine the in\-context behaviour of the frozen TSFM under our alignment, and ask whether the model’s demonstration\-induced prediction shift is consistent with the closed\-form ridge prediction shift on the same\(𝐩i,𝐟i\)\(\\mathbf\{p\}\_\{i\},\\mathbf\{f\}\_\{i\}\)pairs\. The investigation combines a cosine signature relating the two prediction shifts and a future\-shuffle causal control that distinguishes regression on the pairs from averaging over their futures\.
#### Probe\.
Let𝐲^model\\widehat\{\\mathbf\{y\}\}\_\{\\rm model\}and𝐲^zs\\widehat\{\\mathbf\{y\}\}\_\{\\rm zs\}denote the model’s forecast with and without the aligned demonstrations, respectively\. The closed\-form ridge predictor is
𝐲^ridge=𝐪⊤\(𝐏⊤𝐏\+λ𝐈\)−1𝐏⊤𝐅,λ=1,\\widehat\{\\mathbf\{y\}\}\_\{\\rm ridge\}\\;=\\;\\mathbf\{q\}^\{\\top\}\(\\mathbf\{P\}^\{\\top\}\\mathbf\{P\}\+\\lambda\\mathbf\{I\}\)^\{\-1\}\\mathbf\{P\}^\{\\top\}\\mathbf\{F\},\\qquad\\lambda=1,where𝐏∈ℝK×S\\mathbf\{P\}\\in\\mathbb\{R\}^\{K\\times S\}stacks theK=10K\{=\}10aligned demonstration pasts and𝐅∈ℝK×H\\mathbf\{F\}\\in\\mathbb\{R\}^\{K\\times H\}stacks their aligned futures\. The implicit\-GD signature is the per\-window cosine
ρGD\(w\)=cos\(𝐲^model\(w\)−𝐲^zs\(w\),𝐲^ridge\(w\)−𝐲^zs\(w\)\)\.\\rho\_\{\\rm GD\}\(w\)\\;=\\;\\cos\\\!\\big\(\\widehat\{\\mathbf\{y\}\}\_\{\\rm model\}\(w\)\-\\widehat\{\\mathbf\{y\}\}\_\{\\rm zs\}\(w\),\\;\\widehat\{\\mathbf\{y\}\}\_\{\\rm ridge\}\(w\)\-\\widehat\{\\mathbf\{y\}\}\_\{\\rm zs\}\(w\)\\big\)\.A pretrained TSFM also handles seasonality, trend, and recent\-value extrapolation, soρGD=1\\rho\_\{\\rm GD\}\{=\}1is not reachable; the question is whether a regression\-on\-pairs component shows up above those other behaviours\. We evaluateρGD\\rho\_\{\\rm GD\}under five conditions per window:unaligned\(raw retrievals\),amp\_only,cc\_only,aligned, andaligned\_fut\_shuf\(aligned demonstrations with futures permuted within the set, breaking the pair correspondence\)\. Confidence intervals are computed by paired moving\-block bootstrap with block length2020andN=2000N=2000resamples over200200paired test windows per dataset\.
Figure 2:Mechanism evidence on Chronos\-Bolt across five demonstration conditions \(N=200N\{=\}200windows per cell, averaged over the seven datasets\)\. \(a\) Implicit\-GD signatureρGD\\rho\_\{\\rm GD\}: amplitude alignment liftsρGD\\rho\_\{\\rm GD\}from0\.300\.30\(unaligned,cc\_only\) to∼0\.45\\sim\\\!0\.45\(amp\_only,aligned\); the future\-shuffle condition matches that level\. \(b\) Decoder cross\-attention to the demonstration region rises in the same conditions\. \(c\) MSE change versus zero\-shot:amp\_onlyandalignedreduce MSE, whereasaligned\_fut\_shufreverses the gain even thoughρGD\\rho\_\{\\rm GD\}stays high in panel \(a\) – the model continues to track an implicit ridge solution, but on corrupted demonstration pairs\.
#### Result\.
ρGD\\rho\_\{\\rm GD\}rises from\[0\.17,0\.48\]\[0\.17,0\.48\]unaligned \(mean0\.300\.30\) to\[0\.37,0\.59\]\[0\.37,0\.59\]aligned \(mean0\.450\.45\)\. The paired bootstrap ofρGDaligned−ρGDunaligned\\rho\_\{\\rm GD\}^\{\\rm aligned\}\-\\rho\_\{\\rm GD\}^\{\\rm unaligned\}excludes zero on7/77/7Chronos\-Bolt datasets \(smallest gap\+0\.07\+0\.07on Electricity, largest\+0\.25\+0\.25on Exchange\)\. Cross\-attention to the demonstration region rises on6/76/7datasets \(Fig\.[2](https://arxiv.org/html/2608.05571#S5.F2)b\)\. Of the two alignment components, amplitude carries the effect:amp\_onlymatchesalignedon7/77/7datasets andcc\_onlyreaches significance only on ETTh2\.
#### Future\-shuffle causal control\.
The shuffle permutes\{𝐟i\}\\\{\\mathbf\{f\}\_\{i\}\\\}within each demonstration set, leaving the pasts and the alignment intact\. Under a futures\-averaging account the shuffle is innocuous: the set of futures is unchanged\. Under regression on the pairs it biases the closed\-form ridge solution in a known direction, and a model that tracks that solution should inherit the bias\. The latter is what we observe\. The shuffle worsens MSE on4/74/7datasets \(mean\+2\.6\+2\.6pp, median\+0\.9\+0\.9pp\); the largest reversal is on ETTm1, where the−4\.2%\-4\.2\\%gain from alignment flips to\+12\.2%\+12\.2\\%\. The remaining three datasets, whose alignment\-vs\-unaligned gap is already small, move by less than33pp in either MSE orρGD\\rho\_\{\\rm GD\}\. Across all seven,ρGD\\rho\_\{\\rm GD\}remains high under the shuffle \(mean0\.460\.46, range\[0\.34,0\.61\]\[0\.34,0\.61\]\): the model continues to implement an implicit ridge regression, now on the corrupted pairs\(𝐩i,𝐟i′\)\(\\mathbf\{p\}\_\{i\},\\mathbf\{f\}\_\{i\}^\{\\prime\}\), and inherits whichever direction of bias that corruption induces\. A futures\-averaging account predicts neither the directional MSE shift nor the preservation ofρGD\\rho\_\{\\rm GD\}\.
The probe replicates on Chronos\-2’s group\-attention pathway withρGDaligned\>ρGDunaligned\\rho\_\{\\rm GD\}^\{\\rm aligned\}\>\\rho\_\{\\rm GD\}^\{\\rm unaligned\}on6/76/7datasets \(13/1413/14cells across the two backbones, Appendix[D](https://arxiv.org/html/2608.05571#A4)\)\. Figure[3](https://arxiv.org/html/2608.05571#S5.F3)shows one ETTm1 window: raw retrievals miss the query in both amplitude and phase; alignment collapses the demonstration cloud onto the query’s regime, the model’s prediction shift becomes visibly proportional to the closed\-form ridge shift on the same pairs, and MSE drops from2\.062\.06\(zero\-shot\) to0\.700\.70\(aligned\)\.
Figure 3:One ETTm1 query window\. \(a\) Raw retrieved demonstrations have the wrong amplitude and phase relative to the query, and the resulting unaligned ICL prediction \(MSE1\.941\.94,ρGD=\+0\.26\\rho\_\{\\rm GD\}\{=\}\{\+\}0\.26\) misses the true future\. \(b\) Aligned demonstrations cluster around the query\. \(c\) Aligned ICL recovers the trajectory \(a2\.9×2\.9\\timesreduction in MSE\)\. \(d\) Under aligned, the model’s prediction shift visibly tracks the closed\-form ridge prediction shift on the same demos \(ρGD=\+0\.94\\rho\_\{\\rm GD\}\{=\}\{\+\}0\.94\); under unaligned, the two are nearly orthogonal \(ρGD=\+0\.26\\rho\_\{\\rm GD\}\{=\}\{\+\}0\.26\)\.
## 6Conclusion
In this paper we revisited the assumption underlying recent retrieval\-augmented forecasting on frozen Time Series Foundation Models: that learned fusion is required for a frozen backbone to benefit from retrieved context\. We introduced Align\-RAG, a training\-free method that aligns retrieved past–future windows to the query in amplitude and phase before they enter the backbone’s context\. Under the standard seven\-dataset TS\-RAG benchmark protocol with a frozen Chronos\-Bolt, Align\-RAG matches or exceeds the trained TS\-RAG mixer on every dataset in MSE, and the same configuration improves zero\-shot performance on four additional frozen TSFMs without per\-backbone tuning\. A retriever×\\timesalignment ablation locates the gain in demonstration alignment rather than retrieval ranking, and a behavioural probe shows that under our alignment the model’s prediction shift tracks the closed\-form ridge prediction shift on the same demonstrations, with a future\-shuffle causal control consistent with regression on the past–future pairs\.
These findings carry empirical and mechanistic implications\. Empirically, aligned demonstrations carry the bulk of the improvement in retrieval\-augmented forecasting on a frozen TSFM, and learned fusion appears largely to compensate for the absence of such alignment\. Mechanistically, frozen pretrained TSFMs admit a behavioural regression structure on aligned past–future pairs, consistent with predictions from the in\-context learning literature on synthetic\-regression\-trained transformers\. Natural future directions are richer retrieval geometries, including multivariate and covariate\-informed settings, and replication of the retriever×\\timesalignment ablation across additional backbones to test the generality of the attribution\.
#### Limitations\.
The mechanism evidence is correlational:ρGD=0\.45\\rho\_\{\\rm GD\}=0\.45aligned versus0\.300\.30unaligned is directional evidence, not the equivalence \(ρGD=1\\rho\_\{\\rm GD\}\{=\}1\) given by construction theorems\. Our evaluation uses the standard univariate TS\-RAG benchmark for direct comparison to the state\-of\-the\-art; multivariate covariates and distribution shifts remain open\. Finally, the retriever×\\timesalignment ablation is Chronos\-Bolt\-only; per\-backbone replication is left to future work\.
## Acknowledgements
Mohammad Asadi was supported by the Amazon AI PhD Fellowship during this work\. We thank the Amazon fellowship program for its support\.
## References
- What learning algorithm is in\-context learning? investigations with linear models\.InInternational Conference on Learning Representations,Cited by:[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px2.p1.1)\.
- A\. F\. Ansari, O\. Shchur, J\. Küken, A\. Auer, B\. Han, P\. Mercado, S\. S\. Rangapuram, H\. Shen, L\. Stella, X\. Zhang, M\. Goswami, S\. Kapoor, D\. C\. Maddix, P\. Guerron, T\. Hu, J\. Yin, N\. Erickson, P\. M\. Desai, H\. Wang, H\. Rangwala, G\. Karypis, Y\. Wang, and M\. Bohlke\-Schneider \(2025\)Chronos\-2: from univariate to universal forecasting\.arXiv preprint arXiv:2510\.15821\.Cited by:[§1](https://arxiv.org/html/2608.05571#S1.p1.1),[§4\.1](https://arxiv.org/html/2608.05571#S4.SS1.p1.5)\.
- A\. F\. Ansari, L\. Stella, C\. Turkmen, X\. Zhang, P\. Mercado, H\. Shen, O\. Shchur, S\. S\. Rangapuram, S\. Pineda Arango, S\. Kapoor, J\. Zschiegner, D\. C\. Maddix, H\. Wang, M\. W\. Mahoney, K\. Torkkola, A\. G\. Wilson, M\. Bohlke\-Schneider, and Y\. Wang \(2024\)Chronos: learning the language of time series\.Transactions on Machine Learning Research\.Note:arXiv:2403\.07815Cited by:[§1](https://arxiv.org/html/2608.05571#S1.p1.1),[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px1.p1.1),[§4\.1](https://arxiv.org/html/2608.05571#S4.SS1.p1.5)\.
- J\. Carbonell and J\. Goldstein \(1998\)The use of MMR, diversity\-based reranking for reordering documents and producing summaries\.InProceedings of the 21st Annual International ACM SIGIR Conference on Research and Development in Information Retrieval,pp\. 335–336\.Cited by:[§3\.3](https://arxiv.org/html/2608.05571#S3.SS3.p1.4)\.
- B\. Cohen, E\. Khwaja, K\. Wang, C\. Masson, E\. Ramé, Y\. Doubli, and O\. Abou\-Amal \(2024\)Toto: time series optimized transformer for observability\.arXiv preprint arXiv:2407\.07874\.Cited by:[§1](https://arxiv.org/html/2608.05571#S1.p1.1),[§4\.1](https://arxiv.org/html/2608.05571#S4.SS1.p1.5)\.
- M\. Cuturi and M\. Blondel \(2017\)Soft\-DTW: a differentiable loss function for time\-series\.InInternational Conference on Machine Learning,Cited by:[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px3.p1.2)\.
- A\. Das, W\. Kong, R\. Sen, and Y\. Zhou \(2024\)A decoder\-only foundation model for time\-series forecasting\.InInternational Conference on Machine Learning,Note:arXiv:2310\.10688Cited by:[§1](https://arxiv.org/html/2608.05571#S1.p1.1),[§4\.1](https://arxiv.org/html/2608.05571#S4.SS1.p1.5)\.
- M\. Faw, R\. Sen, Y\. Zhou, and A\. Das \(2025\)In\-context fine\-tuning for time\-series foundation models\.InProceedings of the 42nd International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.267,pp\. 16355–16374\.Note:arXiv:2410\.24087Cited by:[§1](https://arxiv.org/html/2608.05571#S1.p3.1),[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px2.p1.1)\.
- S\. Garg, D\. Tsipras, P\. Liang, and G\. Valiant \(2022\)What can transformers learn in\-context? a case study of simple function classes\.InAdvances in Neural Information Processing Systems,Cited by:[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px2.p1.1)\.
- S\. Han, S\. Lee, M\. Cha, S\. O\. Arik, and J\. Yoon \(2025\)Retrieval augmented time series forecasting\.InProceedings of the 42nd International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.267,pp\. 21774–21797\.Cited by:[Table 11](https://arxiv.org/html/2608.05571#A8.T11),[Appendix H](https://arxiv.org/html/2608.05571#A8.p1.1),[§1](https://arxiv.org/html/2608.05571#S1.p3.1),[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px1.p1.1)\.
- U\. Khandelwal, O\. Levy, D\. Jurafsky, L\. Zettlemoyer, and M\. Lewis \(2020\)Generalization through memorization: nearest neighbor language models\.InInternational Conference on Learning Representations,Cited by:[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px1.p1.1)\.
- C\. H\. Knapp and G\. C\. Carter \(1976\)The generalized correlation method for estimation of time delay\.IEEE Transactions on Acoustics, Speech, and Signal Processing24\(4\),pp\. 320–327\.External Links:[Document](https://dx.doi.org/10.1109/TASSP.1976.1162830)Cited by:[§3\.2](https://arxiv.org/html/2608.05571#S3.SS2.p1.5)\.
- H\. R\. Künsch \(1989\)The jackknife and the bootstrap for general stationary observations\.Annals of Statistics17\(3\),pp\. 1217–1241\.Cited by:[§4\.2](https://arxiv.org/html/2608.05571#S4.SS2.p1.2)\.
- 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\.InAdvances in Neural Information Processing Systems,Cited by:[§1](https://arxiv.org/html/2608.05571#S1.p2.1)\.
- J\. Liu, L\. Yang, H\. Li, and S\. Hong \(2024\)Retrieval\-augmented diffusion models for time series forecasting\.InAdvances in Neural Information Processing Systems,Note:arXiv:2410\.18712Cited by:[§1](https://arxiv.org/html/2608.05571#S1.p3.1),[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px1.p1.1)\.
- R\. Y\. Liu and K\. Singh \(1992\)Moving blocks jackknife and bootstrap capture weak dependence\.InExploring the Limits of Bootstrap,R\. LePage and L\. Billard \(Eds\.\),pp\. 225–248\.Cited by:[§4\.2](https://arxiv.org/html/2608.05571#S4.SS2.p1.2)\.
- K\. Ning, Z\. Pan, Y\. Liu, Y\. Jiang, J\. 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\.InAdvances in Neural Information Processing Systems,Note:arXiv:2503\.07649Cited by:[Appendix A](https://arxiv.org/html/2608.05571#A1.SS0.SSS0.Px1.p1.2),[Appendix G](https://arxiv.org/html/2608.05571#A7.p1.4),[§1](https://arxiv.org/html/2608.05571#S1.p3.1),[§1](https://arxiv.org/html/2608.05571#S1.p5.13),[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px1.p1.1),[§4\.1](https://arxiv.org/html/2608.05571#S4.SS1.p1.5),[Table 1](https://arxiv.org/html/2608.05571#S4.T1),[Table 3](https://arxiv.org/html/2608.05571#S4.T3)\.
- J\. Paparrizos and L\. Gravano \(2015\)kk\-Shape: efficient and accurate clustering of time series\.InProceedings of the 2015 ACM SIGMOD International Conference on Management of Data,pp\. 1855–1870\.Cited by:[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px3.p1.2)\.
- O\. Ram, Y\. Levine, I\. Dalmedigos, D\. Muhlgay, A\. Shashua, K\. Leyton\-Brown, and Y\. Shoham \(2023\)In\-context retrieval\-augmented language models\.Transactions of the Association for Computational Linguistics\.Note:arXiv:2302\.00083Cited by:[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px1.p1.1)\.
- W\. Shi, S\. Min, M\. Yasunaga, M\. Seo, R\. James, M\. Lewis, L\. Zettlemoyer, and W\. Yih \(2024\)REPLUG: retrieval\-augmented black\-box language models\.InNAACL,Note:arXiv:2301\.12652Cited by:[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px1.p1.1)\.
- K\. Tire, E\. O\. Taga, M\. E\. Ildiz, and S\. Oymak \(2024\)Retrieval augmented time series forecasting\.External Links:2411\.08249Cited by:[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px1.p1.1)\.
- J\. von Oswald, E\. Niklasson, E\. Randazzo, J\. Sacramento, A\. Mordvintsev, A\. Zhmoginov, and M\. Vladymyrov \(2023\)Transformers learn in\-context by gradient descent\.InProceedings of the 40th International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.202,pp\. 35151–35174\.Cited by:[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px2.p1.1)\.
- N\. Wiener \(1949\)Extrapolation, interpolation, and smoothing of stationary time series: with engineering applications\.MIT Press\.Cited by:[§3\.1](https://arxiv.org/html/2608.05571#S3.SS1.p1.15)\.
- G\. Woo, C\. Liu, A\. Kumar, C\. Xiong, S\. Savarese, and D\. Sahoo \(2024\)Unified training of universal time series forecasting transformers\.InInternational Conference on Machine Learning,Note:arXiv:2402\.02592Cited by:[§1](https://arxiv.org/html/2608.05571#S1.p1.1),[§4\.1](https://arxiv.org/html/2608.05571#S4.SS1.p1.5)\.
- S\. Yang, D\. Wang, H\. Zheng, and R\. Jin \(2025\)TimeRAG: boosting LLM time series forecasting via retrieval\-augmented generation\.InIEEE International Conference on Acoustics, Speech and Signal Processing,pp\. 1–5\.Note:arXiv:2412\.16643External Links:[Document](https://dx.doi.org/10.1109/ICASSP49660.2025.10889933)Cited by:[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px1.p1.1)\.
- C\. M\. Yeh, Y\. Zhu, L\. Ulanova, N\. Begum, Y\. Ding, H\. A\. Dau, D\. F\. Silva, A\. Mueen, and E\. Keogh \(2016\)Matrix profile I: all pairs similarity joins for time series: a unifying view that includes motifs, discords and shapelets\.InICDM,Cited by:[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px3.p1.2)\.
- H\. Zhang, C\. Xu, Y\. Zhang, Z\. Zhang, L\. Wang, and J\. Bian \(2025\)TimeRAF: retrieval\-augmented foundation model for zero\-shot time series forecasting\.IEEE Transactions on Knowledge and Data Engineering37\(9\),pp\. 5654–5665\.External Links:[Document](https://dx.doi.org/10.1109/TKDE.2025.3579137)Cited by:[§1](https://arxiv.org/html/2608.05571#S1.p3.1),[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px1.p1.1)\.
- J\. Zhao and L\. Itti \(2018\)shapeDTW: shape dynamic time warping\.Pattern Recognition\.Cited by:[§2](https://arxiv.org/html/2608.05571#S2.SS0.SSS0.Px3.p1.2)\.
## Appendix AImplementation details
#### Retrieval index\.
Section[4\.2](https://arxiv.org/html/2608.05571#S4.SS2)uses the released top\-20 per \(query, channel\) index fromTS\-RAG\[Ninget al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib1)\]\. Section[4\.4](https://arxiv.org/html/2608.05571#S4.SS4)uses an in\-house per\-dataset, per\-channel, train\-split\-onlyzz\-normalised Euclidean nearest\-neighbor index, with a strict leakage audit that rejects any returned neighbor whoseS\+HS\{\+\}H\-step span enters the validation or test split\. Distances are Euclidean in the normalised\-past space\.
#### Hyperparameters\.
K=10K\{=\}10,λMMR=0\.3\\lambda\_\{\\mathrm\{MMR\}\}\{=\}0\.3,β=0\.15\\beta\{=\}0\.15,α=0\.60\\alpha\{=\}0\.60,M=5M\{=\}5,\(Md,Sd,Ms,Ss\)=\(2,256,8,32\)\(M\_\{d\},S\_\{d\},M\_\{s\},S\_\{s\}\)\{=\}\(2,256,8,32\), CC search range\|τ\|≤S/4=128\|\\tau\|\\leq S/4=128, affine fit on𝐩i\\mathbf\{p\}\_\{i\}only\. We use the same values for every dataset and backbone reported\. Sensitivity sweeps overα\\alpha\(Table[6](https://arxiv.org/html/2608.05571#A3.T6)\) and component leave\-one\-out \(Table[5](https://arxiv.org/html/2608.05571#A2.T5)\) are in the appendix\.
#### Compute\.
A single H100 evaluates Align\-RAG with Chronos\-Bolt across the seven datasets in under six wall\-clock hours\.
#### Code and reproducibility\.
The Align\-RAG implementation is approximately720720lines of Python across six files \(alignment, retrieval interface, run\-Bolt, run\-Chronos\-2, aggregation, metrics\) and contains no learned parameters\. Code, the cross\-backbone retrieval\-index build script, and the exact bootstrap\-resample seeds are released alongside the paper\. Section[4\.2](https://arxiv.org/html/2608.05571#S4.SS2)reuses TS\-RAG’s public top\-20 retrieval index without modification\. The cross\-backbone retrieval index of Section[4\.4](https://arxiv.org/html/2608.05571#S4.SS4)uses a stride\-11window scan withzz\-normalisation per channel, Euclidean distance on the normalised past, and a leakage filter that removes any candidate whoseS\+HS\{\+\}H\-step span overlaps the validation or test split\.
## Appendix BLeave\-one\-out component ablation
Table[5](https://arxiv.org/html/2608.05571#A2.T5)removes each component in turn from the unified implementation on two representative datasets\. Every component is non\-trivial on at least one of the two datasets\.
Table 5:Leave\-one\-out component ablation on Chronos\-Bolt\. MSE change vs\. full Align\-RAG on two datasets\.
## Appendix CSecond\-pass averaging: decomposition andα\\alphasweep
#### MSE/MAE asymmetry\.
The two predictions𝐲^u\\widehat\{\\mathbf\{y\}\}\_\{u\}and𝐲^c\\widehat\{\\mathbf\{y\}\}\_\{c\}have per\-window error correlationr∈\[0\.94,0\.99\]r\\in\[0\.94,0\.99\]across the seven datasets, with8787–94%94\\%same\-sign agreement\. Averaging same\-sign errors of comparable magnitude reduces tails more than it reduces medians: on Electricity, the per\-stepq=0\.99q\{=\}0\.99error quantile drops from\|eu\|=1\.291\|e\_\{u\}\|\{=\}1\.291and\|ec\|=1\.270\|e\_\{c\}\|\{=\}1\.270to1\.2651\.265at the average, while theq=0\.50q\{=\}0\.50quantile moves by less than10−310^\{\-3\}\. This is why the second pass helps MSE more than MAE\.
#### Murphy–Theil decomposition of the Electricity penalty\.
Under steps \(i\)–\(v\) alone, Electricity is the single dataset on which Align\-RAG loses\+3\.1%\+3\.1\\%MSE relative toTS\-RAG\. Decomposing the per\-window MSE of𝐲^u\\widehat\{\\mathbf\{y\}\}\_\{u\}and𝐲^c\\widehat\{\\mathbf\{y\}\}\_\{c\}asMSE=bias2\+scale2\+shape\\mathrm\{MSE\}=\\mathrm\{bias\}^\{2\}\+\\mathrm\{scale\}^\{2\}\+\\mathrm\{shape\}withbias2=\(y^¯−y¯\)2\\mathrm\{bias\}^\{2\}=\(\\bar\{\\widehat\{y\}\}\-\\bar\{y\}\)^\{2\},scale2=\(σy^−σy\)2\\mathrm\{scale\}^\{2\}=\(\\sigma\_\{\\widehat\{y\}\}\-\\sigma\_\{y\}\)^\{2\}, andshape=2σy^σy\(1−ρ\)\\mathrm\{shape\}=2\\sigma\_\{\\widehat\{y\}\}\\sigma\_\{y\}\(1\-\\rho\)gives:
81%81\\%of the in\-context penalty lives in level and scale, not shape\. The shape correlationρ=0\.64\\rho\{=\}0\.64is unchanged to10−310^\{\-3\}between the two predictions\. Averaging atα=0\.60\\alpha\{=\}0\.60closes the gap to−0\.07%\-0\.07\\%MSE\.
#### α\\alphasweep\.
Table[6](https://arxiv.org/html/2608.05571#A3.T6)reports a fine sweep over𝐲^final=α𝐲^u\+\(1−α\)𝐲^c\\widehat\{\\mathbf\{y\}\}\_\{\\text\{final\}\}=\\alpha\\widehat\{\\mathbf\{y\}\}\_\{u\}\+\(1\-\\alpha\)\\widehat\{\\mathbf\{y\}\}\_\{c\}\. The MSE\-win count is7/77/7for everyα∈\[0\.50,0\.62\]\\alpha\\in\[0\.50,0\.62\], so the configuration is robust over a wide range of mixing weights\. Within that rangeα∈\{0\.60,0\.62\}\\alpha\\in\\\{0\.60,0\.62\\\}also achieves6/76/7MAE wins; we pickα=0\.60\\alpha\{=\}0\.60once as the released setting and hold it fixed\.
Table 6:Fineα\\alphasweep\. Win counts out of seven and averages relative toTS\-RAG\.
## Appendix DMechanism: extended evidence
This appendix collects the per\-dataset within\-condition evidence behind the implicit\-ridge mechanism summarised in Section[5](https://arxiv.org/html/2608.05571#S5): the within\-dataset signature/MSE correlation, the cross\-architecture replication on Chronos\-2, and a concrete worked window\.
#### Within\-dataset GD\-MSE correlation\.
Holding dataset fixed and correlating, across the five conditions,ρGD\\rho\_\{\\rm GD\}with the MSE improvement vs\. zero\-shot \(Fig\.[4](https://arxiv.org/html/2608.05571#A4.F4)\): on5/75/7datasets the within\-dataset Pearson correlation is large and positive \(ETTh1r=\+0\.99r\{=\}\+0\.99, ETTm2\+0\.99\+0\.99, Weather\+0\.94\+0\.94, Electricity\+0\.98\+0\.98, ETTh2\+0\.48\+0\.48\)\. The two negative cases are diagnostic\. ETTm1 \(r=−0\.61r\{=\}\-0\.61\): the highest\-ρGD\\rho\_\{\\rm GD\}cell isaligned\_fut\_shufbut its ridge target is biased by the shuffle, so the model faithfully implements that biased ridge and the MSE worsens\. Exchange Rate \(r=−1\.00r\{=\}\-1\.00\): zero\-shot is already near the dataset’s noise floor \(MSE0\.0620\.062\), so any implicit\-ridge update moves the prediction off that floor\. Both exceptions strengthen rather than weaken the mechanism: the signature measures*whether*the model is doing implicit ridge regression on the demos; the MSE outcome additionally requires the demos to carry useful information beyond zero\-shot\.
Figure 4:Within\-dataset correlation between implicit\-GD signatureρGD\\rho\_\{\\rm GD\}and MSE improvement vs\. zero\-shot \(%\)\. One panel per dataset, five markers per panel \(one per condition\); Pearsonrrshown\. Five datasets \(ETTh1, ETTh2, ETTm2, Weather, Electricity\) show large positiverr, as the mechanism predicts\. ETTm1 \(r=−0\.61r\{=\}\-0\.61\) is a diagnostic case \(thealigned\_fut\_shufcell has highρGD\\rho\_\{\\rm GD\}but a biased ridge target, so the model’s faithful tracking yields worse MSE; see future\-shuffle control\)\. Exchange \(r=−1\.00r\{=\}\-1\.00\) is at zero\-shot’s noise floor \(MSE0\.0620\.062\), where any in\-context shift moves prediction off the floor; we discuss both anomalies in Sec\.[5](https://arxiv.org/html/2608.05571#S5)\.
#### Cross\-architecture replication\.
Figure[5](https://arxiv.org/html/2608.05571#A4.F5)replicates the implicit\-GD signature on Chronos\-2, which has a fundamentally different ICL pathway \(group attention over series rather than concatenation\)\. On the same seven datasets \(N=100N\{=\}100windows each\), aligned demos again yield a higher signature than unaligned on6/76/7datasets \(Weather is the single inversion\)\. Combining both backbones,ρGDaligned\>ρGDunaligned\\rho\_\{\\rm GD\}^\{\\rm aligned\}\{\>\}\\rho\_\{\\rm GD\}^\{\\rm unaligned\}on13/1413/14\(dataset, backbone\) cells\.
Figure 5:Cross\-architecture replication of the implicit\-GD signature\. \(a\) Chronos\-Bolt \(T5 encoder–decoder, CC phase alignment;N=200N\{=\}200\): aligned\>\>unaligned on7/77/7, all bootstrap\-significant\. \(b\) Chronos\-2 \(group attention, FFT phase alignment;N=100N\{=\}100\): aligned\>\>unaligned on6/76/7\. Theamp\_onlycondition is competitive withalignedon Chronos\-2, matching the cross\-backbone Wiener\-vs\-clip ablation in Sec\.[4\.4](https://arxiv.org/html/2608.05571#S4.SS4): FFT phase transfer is most useful on the ETT family\.
#### Concrete window\.
The ETTm1 window in Fig\.[3](https://arxiv.org/html/2608.05571#S5.F3)\(main paper, test index5099850998\) illustrates the mechanism on a single query\. The ten raw retrievals are misaligned in both amplitude and phase, and the resulting unaligned ICL prediction \(ρGDun=\+0\.26\\rho\_\{\\rm GD\}^\{\\rm un\}\{=\}\{\+\}0\.26, MSE1\.941\.94\) is barely distinguishable from zero\-shot \(MSE2\.062\.06\)\. After alignment, the demonstration cloud collapses onto the query’s regime, the model’s prediction shift tracks the closed\-form ridge shift on the same demos almost step\-for\-step \(ρGDaln=\+0\.94\\rho\_\{\\rm GD\}^\{\\rm aln\}\{=\}\{\+\}0\.94\), and MSE falls to0\.700\.70– a2\.9×2\.9\\timesreduction over zero\-shot on this window\.
## Appendix EIsolating the in\-context contribution from blend and second pass
Align\-RAG combines four in\-context steps \(diversification, amplitude alignment, phase alignment, layout\) with two post\-processing additions: the future blend atβ=0\.15\\beta\{=\}0\.15and the second\-pass average atα=0\.60\\alpha\{=\}0\.60\. Settingβ=0\\beta\{=\}0and/orα=0\\alpha\{=\}0isolates the contribution of the in\-context steps alone\. Table[7](https://arxiv.org/html/2608.05571#A5.T7)reports the four corners of this2×22\{\\times\}2on Chronos\-Bolt against TS\-RAG\.
Table 7:Isolating the four in\-context steps from the post\-processingβ\\betablend andα\\alphaconsensus, on Chronos\-Bolt\. Each cell is per\-dataset MSE change vs\.TS\-RAG; bold indicates a gain\. Wins/77counts datasets with strictly negativeΔ\\DeltaMSE; avgΔ%\\Delta\\%averages the seven per\-dataset deltas\.Aligned demos fed through nothing but the in\-context layout beat trained TS\-RAG on6/76/7datasets at average−1\.64%\-1\.64\\%MSE; the only exception is Electricity\. Theβ\\betablend recovers Electricity \(\+4\.1%→\+1\.0%\+4\.1\\%\\\!\\to\\\!\+1\.0\\%\); theα\\alphasecond pass closes the gap to−0\.1%\-0\.1\\%\.
## Appendix FWiener vs\. clipped affine on cross\-backbone Weather and Exchange
The plug\-in scale ratioσq/σpi\\sigma\_\{q\}/\\sigma\_\{p\_\{i\}\}producesQ99Q\_\{99\}values of1\.511\.51on ETTh1 but3\.03\.0on Weather and6\.76\.7on Exchange, with maxima exceeding10610^\{6\}on the rare flat retrievals that any nearest\-neighbor index occasionally returns\. Two regularisers stabilise this tail: hard\-clippingai∈\[1/M,M\]a\_\{i\}\\in\[1/M,M\]atM=5M\{=\}5, or Wiener shrinkage\. On Weather, where the tail is heaviest, Wiener strictly dominates clipping on every backbone \(Table[8](https://arxiv.org/html/2608.05571#A6.T8)\); on Exchange the two regularisers are competitive, with Wiener slightly better on three of five backbones and clipping slightly better on the other two\. On the five datasets where the tail is bounded, the two regularisers agree to four decimal places\. We deploy Wiener shrinkage globally because it never explodes and matches or beats clipping on the two tail\-heavy datasets\.
Table 8:Step\-\(ii\) regularisers on the two datasets where the plug\-in scale ratio is unbounded\. MSE change vs\. each backbone’s zero\-shot\. Underline marks the better regulariser\. The Wiener row reproduces the deployed values from Table[3](https://arxiv.org/html/2608.05571#S4.T3); the plug\-in and clipped rows are from the same retrieval setup with only step \(ii\) substituted\.
## Appendix GMulti\-horizon results
The TS\-RAG protocol ofNinget al\.\[[2025](https://arxiv.org/html/2608.05571#bib.bib1)\]fixes the forecast horizon atH=64H\{=\}64\. To check that Align\-RAG’s gains are not specific to that one horizon, we evaluate atH∈\{64,96,192\}H\\in\\\{64,96,192\\\}on the five small datasets, with the same frozen Chronos\-Bolt backbone and the same alignment hyperparameters as the main result \(Section[4\.2](https://arxiv.org/html/2608.05571#S4.SS2)\)\. The retrieval index here is the in\-house z\-normalised Euclidean nearest\-neighbour index used in the cross\-backbone evaluation \(Section[4\.4](https://arxiv.org/html/2608.05571#S4.SS4)\) rather than the TS\-RAG released top\-2020index used in Table[1](https://arxiv.org/html/2608.05571#S4.T1); the two retrievers produce different absolute MSE values on the same backbone, so theH=64H\{=\}64column of Table[9](https://arxiv.org/html/2608.05571#A7.T9)is not numerically identical to the corresponding cells of Table[1](https://arxiv.org/html/2608.05571#S4.T1), even though the pipeline is otherwise the same\.
Table 9:Multi\-horizon MSE on a frozen Chronos\-Bolt\.Δ%\\Delta\\%is the relative MSE change vs\. zero\-shot at the same horizon; negative means Align\-RAG wins\.Table 10:Multi\-horizon MAE on a frozen Chronos\-Bolt\. Each cell reports zero\-shot / Align\-RAG /Δ%\\Delta\\%at the indicated horizon\.The MSE gains hold at every \(dataset, horizon\) cell, ranging from−1\.20%\-1\.20\\%to−6\.59%\-6\.59\\%\. ETTm1 has the largest gains \(≈−6\.5%\\approx\{\-\}6\.5\\%across horizons\); ETTh2 and Exchange have the smallest\. The MAE picture is similar but with smaller magnitudes \(MAE is dominated by trend and shape rather than scale, which is where in\-context demonstrations help most\), with two cells where MAE is essentially flat \(\+0\.04%\+0\.04\\%on ETTm2 atH=64H\{=\}64and\+0\.47%\+0\.47\\%on ETTh2 atH=64H\{=\}64\)\. The horizon ranking of the relative gains is monotone or nearly so on every dataset, so theH=64H\{=\}64result reported in the main paper is not a peculiarity of that specific horizon\.
## Appendix HComparison against RAFT
RAFT\[Hanet al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib41)\]is a trained\-adapter retrieval\-augmented forecaster: a projection module and prediction head are trained on top of the retrieved patterns, on a frozen backbone\. We compare Align\-RAG against RAFT on the four ETT datasets at the two horizons \(H=96,192H\{=\}96,192\) reported by RAFT, with both methods using a frozen Chronos\-Bolt backbone\.
Table 11:Align\-RAG vs\. RAFT\[Hanet al\.,[2025](https://arxiv.org/html/2608.05571#bib.bib41)\]on a frozen Chronos\-Bolt atH∈\{96,192\}H\\in\\\{96,192\\\}\. Align\-RAG attains the lower MSE on every cell\. “ARvs\. RAFT” is the relative MSE change of Align\-RAG against RAFT; “ARvs\. ZS” is the relative change against zero\-shot Chronos\-Bolt at the same horizon\.Align\-RAG attains the lower MSE on8/88/8cells with an average reduction of−4\.5%\-4\.5\\%relative to RAFT\. The largest single gain is−11\.37%\-11\.37\\%on ETTh2 atH=192H\{=\}192; the smallest is−1\.11%\-1\.11\\%on ETTm1 atH=192H\{=\}192\. Align\-RAG also continues to improve on zero\-shot Chronos\-Bolt at every cell \(−2\.35%\-2\.35\\%to−6\.59%\-6\.59\\%\), so the comparison cannot be reduced to “RAFT is a weak baseline” – RAFT is a non\-trivial gain over zero\-shot on six of eight cells, and Align\-RAG still beats it on every one without training any parameters\.
## Appendix ICross\-dataset retrieval
A natural concern with retrieval\-augmented forecasting is whether the retrieval pool needs to come from the same dataset as the query\. We test the cross\-dataset \(xds\) regime by replacing each target’s same\-corpus retrieval index with one drawn from a held\-out ETT dataset \(a different ETT subset than the target\), keeping every other component of Align\-RAG fixed\.
Table 12:Cross\-dataset retrieval on a frozen Chronos\-Bolt atH=64H\{=\}64\. “Same\-corpus” draws retrievals from the target’s own training split; “cross\-dataset” draws them from a held\-out ETT subset\. “xds vs\. ZS” is the relative MSE change of cross\-dataset Align\-RAG vs\. zero\-shot; “xds vs\. same\-corpus” is the relative change vs\. same\-corpus Align\-RAG \(positive means same\-corpus wins\)\.Cross\-dataset Align\-RAG still beats zero\-shot on all four ETT targets \(−1\.17%\-1\.17\\%to−5\.44%\-5\.44\\%MSE\), so the gain does not vanish when retrieval shifts to an out\-of\-distribution corpus\. On ETTh1 the cross\-dataset variant is essentially indistinguishable from the same\-corpus variant \(−0\.46%\-0\.46\\%\); on ETTh2 and ETTm2 the same\-corpus variant is meaningfully better \(\+3\+3to\+5\+5percentage points\); on ETTm1 the gap is largest \(\+13\.65%\+13\.65\\%\)\. The takeaway is two\-sided: alignment of retrieved demonstrations is sufficient to extract a non\-trivial gain even from cross\-dataset retrieval, but the same\-corpus regime is the operating point we recommend when in\-domain retrieval is feasible\.Similar Articles
Safe Inference-Time Alignment via Lagrangian Reward Augmentation
Proposes LARA, a framework for safe inference-time alignment that uses Lagrangian dualization to derive an augmented reward from separate reward and cost models, improving the helpfulness-harmlessness tradeoff without retraining.
LeapAlign: Post-Training Flow Matching Models at Any Generation Step by Building Two-Step Trajectories
LeapAlign is a post-training method that improves flow matching model alignment with human preferences by reducing computational costs through two-step trajectory shortcuts while enabling stable gradient propagation to early generation steps. The method outperforms state-of-the-art approaches when fine-tuning Flux models across various image quality and text-alignment metrics.
Stationarity-Aware Retrieval-Augmented Time Series Forecasting
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.
Decoupled Alignment for Robust Plug-and-Play Adaptation
Introduces a training-free method for enhancing safety alignment of LLMs by using knowledge distillation and model fusion to prevent shadow alignment, improving defense success rate by 14.42% on harmful question datasets without compromising performance.
Feedback Manipulation Regularization: Enabling Offline Agent Alignment for Imitation Learning
This paper introduces Feedback Manipulation Regularization (FMR), an algorithm-agnostic method that uses evaluative feedback to improve alignment in imitation learning, achieving up to 98% reduction in misalignment in Safety Gymnasium environments.