TL;DR
When giving historical examples to a frozen Time Series Foundation Model (TSFM) to improve its forecasts, current state-of-the-art methods assume you need to train neural "fusion adapters" on millions of data points so the model can make sense of the retrieved context. Align-RAG shows that you don't need any training at all: simply stretching and shifting the retrieved examples in amplitude and time to match your query unlocks built-in in-context learning, beating trained adapters out of the box.
What Problem Does This Paper Address?
Just like Large Language Models (LLMs) predict the next word, Time Series Foundation Models (TSFMs)—like Chronos, TimesFM, and Moirai—predict future values of signals like energy demand, weather, or hospital vitals without per-domain fine-tuning.
To help these frozen models adapt to unfamiliar domains at test time, researchers borrow Retrieval-Augmented Generation (RAG): find historical (past, future) windows that look like the current query and feed them in as context. Unlike LLMs—where you can simply paste retrieved text into the prompt—the consensus in time series forecasting has been that frozen TSFMs cannot dynamically digest raw retrieved signals on their own. Consequently, recent methods bolt on learned "fusion modules" (like TS-RAG's Adaptive Retrieval Mixer, trained on 26 million examples) to bridge the gap. The authors ask a simple question: Do TSFMs actually lack in-context learning abilities, or are we just feeding them misaligned data?
Methods
The authors introduce Align-RAG, a completely training-free pipeline that prepares retrieved (past, future) pairs before handing them directly to a frozen TSFM's context window.
The core innovation lies in two closed-form signal processing steps applied to every retrieved window:
- Amplitude Alignment: A regularized affine transformation (inspired by Wiener filtering) rescales and shifts the retrieved past so its mean and variance match the query's, preventing flat, low-variance signals from blowing up into noise.
- Phase Alignment: Using sample cross-correlation, the rescaled past is shifted left or right by an integer time-lag so its peaks and troughs line up with the query.
Crucially, the exact same amplitude scale and time shift are applied to the retrieved future so the historical cause-and-effect relationship remains intact.
Surrounding this core alignment are a few training-free engineering touches: Maximal Marginal Relevance (MMR) filters out near-duplicate retrievals; a tiered token layout packs two long-context examples and eight short-context examples into tight token budgets without ever truncating the futures; and the final output blends the in-context forecast with a distance-weighted average of retrieved futures and a standard zero-shot pass (though pure aligned in-context learning without post-processing still beats the trained baseline).
Datasets
Because Align-RAG requires zero training, datasets are used strictly for inference-time retrieval (from leakage-free training splits) and evaluation. Following the standard TS-RAG benchmark protocol, the authors evaluate across seven univariate forecasting datasets: ETTh1, ETTh2, ETTm1, ETTm2 (electricity transformer temperatures), Weather, Exchange (currency rates), and Electricity (321-channel consumption). No new benchmarks are introduced, ensuring an apples-to-apples comparison with prior trained adapters.
Key Insights and Ideas
- Alignment matters vastly more than retrieval quality: In a striking $2\times2$ ablation comparing a smart, trained retriever against uniform random sampling from the dataset, turning off alignment tanks forecasting error (MSE) by over 20%. Conversely, keeping alignment on while swapping the smart retriever for random windows costs less than 1% MSE—and still beats the trained TS-RAG adapter on 4 of 7 datasets! Learned fusion modules were largely just compensating for unaligned inputs.
- Frozen TSFMs secretly do ridge regression: Theoretical ML work shows that transformers can learn to execute implicit linear regression on in-context examples. By comparing how aligned examples shift the TSFM's forecast against a closed-form mathematical ridge regression on those same pairs, the authors find a strong directional match (cosine similarity $\rho_{\text{GD}}$ jumps from $0.30$ unaligned to $0.45$ aligned).
- Models read the
(past, future)relationship, not just the futures: To prove the model isn't lazily averaging the retrieved futures, the authors run a causal control where they shuffle the futures among the retrieved pairs while keeping the aligned pasts intact. Forecasting error spikes (flipping a 4.2% gain on ETTm1 into a 12.2% loss), yet the model's predictions still track what ridge regression predicts on those corrupted pairs.
Key Results
- Beating trained state-of-the-art for free: On a frozen Chronos-Bolt backbone, Align-RAG outperforms the trained TS-RAG adapter on 7/7 datasets in MSE (averaging a 3.75% reduction, and up to 8.01% on ETTm1) and 6/7 datasets in MAE, with zero learned parameters.
- Plug-and-play across architectures: Without changing a single hyperparameter, Align-RAG transfers across five distinct frozen TSFMs (Chronos-Bolt, Chronos-2, TimesFM-2.0, Moirai, and Toto), improving average zero-shot MSE across every backbone—from -2.45% on Toto up to -13.73% on Moirai (including a massive -29.95% MSE drop on ETTm1).
Limitations and Future Work
The authors note that their mechanistic probe is correlational and directional ($\rho_{\text{GD}} = 0.45$) rather than a strict mathematical equivalence ($\rho_{\text{GD}} = 1$), since pretrained TSFMs simultaneously juggle trend extrapolation and seasonality alongside in-context regression. Furthermore, all evaluations focus on standard univariate time series; extending closed-form geometric alignment to multivariate signals, external covariates, and severe distribution shifts remains an open frontier for future work.
Summary updated