TL;DR
Retrieval-augmented time series forecasting often introduces a harmful bias toward high-frequency oscillations, inadvertently degrading performance on smooth, trend-dominated data. To address this, the authors introduce RIDDE, a framework that leverages retrieved sequences as structural signals to decompose time series representations into stable invariant and flexible dynamic components. This approach significantly improves zero-shot forecasting robustness under distribution shifts while remaining highly computationally efficient.
What Problem Does This Paper Address?
Time Series Foundation Models (TSFMs) have advanced zero-shot forecasting, but they frequently stumble when facing distribution shifts—situations where test-time data deviates from the training distribution due to non-stationary environments.
To mitigate this, researchers have turned to Retrieval-Augmented Generation (RAG), fetching similar historical sequences from an external database to provide extra context. However, this paper uncovers a critical, previously underexplored limitation of RAG in time series: indiscriminate fusion.
Standard RAG methods mix retrieved information with the query sequence in an undifferentiated manner. The authors' empirical analysis reveals that this introduces an oscillatory bias, improving performance on highly fluctuating series but severely degrading accuracy on smoother, trend-dominated data (as shown in Figure 1). Standard foundation models learn entangled representations where stable underlying mechanisms and instance-specific variations are mashed together, hurting robustness.
Methods
Instead of using retrieval as direct predictive context, the proposed framework, RIDDE (Retrieval-guided Invariant-Dynamic DEcomposition), uses retrieved sequences as an implicit multi-environment supervisor to guide representation decomposition.
The architecture consists of four main phases:
- Retrieval-Guided Representation Learning: The query sequence is broken into patches and encoded. The system retrieves the top-$K$ most similar sequences from a knowledge base using cosine similarity. Crucially, it projects the future trajectories of these retrieved samples into a latent space and aggregates them via attention into a low-variance consensus representation ($h^{ret}$).
- Invariant-Dynamic Decomposition: A learnable routing gate ($\gamma$), conditioned on both the query and the retrieval consensus, splits the fused representation into two distinct branches: an invariant component ($z^{inv}$) tasked with retaining stable patterns shared across environments, and a dynamic component ($z^{dyn}$) meant to absorb query-specific fluctuations.
- Mechanism-Aware Forecasting: Rather than forcing a single predictor to handle both types of information, RIDDE routes $z^{inv}$ and $z^{dyn}$ through separate, dedicated predictors ($f_{inv}$ and $f_{dyn}$). Their independent forecasts are then merged by a final fusion decoder.
- Orthogonality Regularization: During training, the model minimizes standard prediction error (MSE) alongside a geometric disentanglement loss ($\mathcal{L}_{dis}$). This loss penalizes the dot product of $z^{inv}$ and $z^{dyn}$, driving the two branches to capture non-redundant information.
Datasets
- Pretraining: The model was pretrained on a uniformly sampled 50-million-datapoint subset of the Chronos pretraining dataset.
- Retrieval Knowledge Base: An in-domain database consisting of a 5-million-datapoint subset.
- Zero-Shot Evaluation: Evaluated across 7 prominent benchmark datasets spanning various domains: ETTh1, ETTh2, ETTm1, ETTm2 (electricity transformer temperature), Weather, Electricity, and Exchange Rate.
Key Insights and Ideas
- The RAG Double-Edged Sword: Retrieval acts as a high-frequency bias injector. While it helps capture rapid seasonal fluctuations, it systematically penalizes stable temporal structures by introducing spurious oscillations into low-frequency trend components.
- Retrieval as Variance Reduction: The authors provide theoretical proof that attention-based aggregation of multiple retrieved samples mathematically reduces the variance of sample-specific noise. This turns the aggregated retrieval representation into a reliable, low-variance anchor for invariant learning without requiring explicit environment labels.
Key Results
- Outperforming the Field: In zero-shot forecasting benchmarks, RIDDE achieved the best average MSE and MAE across all 7 evaluation datasets, outperforming 7 state-of-the-art TSFMs (including Chronos, TimesFM, and MOMENT) and 3 RAG-based baselines.
- Quantifiable Improvements: Compared to the strongest RAG baseline (Cross-RAG), RIDDE reduced the average MSE from 0.194 to 0.185 and the average MAE from 0.255 to 0.244.
- Efficiency Gains: Despite adding a decomposition step, RIDDE is computationally lighter than existing RAG methods. On the ETTh1 dataset, RIDDE achieved an average step time of 68.05 ms compared to 72.06 ms for TS-RAG and 71.87 ms for Cross-RAG, without consuming additional peak GPU memory. This efficiency stems from its lightweight gating design, which avoids complex cross-attention overhead.
Limitations and Future Work
- No Strict Identifiability: The authors acknowledge that the invariant-dynamic decomposition is a "structurally guided partition" enforced by regularization, rather than a mathematically guaranteed recovery of the true underlying physical mechanisms.
- Database Dependency: Because the framework relies heavily on the retrieval consensus to anchor the invariant branch, it remains susceptible to performance bottlenecks or inherited biases if the external knowledge base is poorly constructed or unrepresentative.
Summary updated