Introduction
Time series forecasting is a critical task across various domains, from finance to healthcare. While diffusion models have emerged as a dominant generative paradigm, their application to time series faces significant challenges. Unlike image generation, which benefits from clear semantic prompts, time series data often lacks explicit labels. Furthermore, the inherent scarcity and imbalance of time series datasets make it difficult for models to learn the distribution of rare, complex events, often leading to "average" predictions that fail to capture critical fluctuations.
Methodology: The RATD Framework
To address these limitations, researchers from Peking University proposed RATD (Retrieval-Augmented Time series Diffusion). The framework enhances the standard diffusion process by incorporating explicit guidance from historical "references."
Retrieval Mechanism
For a given historical sequence $x^H$, RATD employs a pre-trained encoder to map the sequence into a feature space. It then retrieves the $k$ most similar sequences from a comprehensive database $D^R$. These retrieved sequences, denoted as $x^R$, serve as a memory bank that informs the model about how similar patterns have evolved in the past.
Reference-Guided Diffusion
The core of RATD is the integration of these references into the iterative denoising process. The model uses a novel Reference Modulated Attention (RMA) module to fuse the current state $x_t$, side information $I_s$, and the retrieved reference features $x^R$. This allows the denoising function $\mu_\theta$ to be explicitly guided by historical precedents at every step of the diffusion process.
Experimental Evaluation
The authors evaluated RATD against state-of-the-art baselines on five real-world datasets: Electricity, Wind, Exchange, Weather, and MIMIC-IV-ECG.
Key Results
RATD consistently achieved superior performance in terms of Mean Squared Error (MSE) and Continuous Ranked Probability Score (CRPS). Notably:
- Rare Event Prediction: On the MIMIC-IV-ECG dataset, RATD significantly outperformed existing diffusion models like CSDI, particularly on rare disease cases where it achieved an MSE of 0.206 compared to CSDI's 0.499.
- Stability: RATD demonstrates much lower variance in error across different test samples, providing more reliable forecasts than traditional models like MG-TSD.
- Non-Periodic Data: On the Wind dataset, which lacks clear seasonality, RATD's retrieval-based guidance allowed it to outperform all baselines by a wide margin (MSE of 0.784 vs. the next best 0.881).
Conclusion
RATD represents a significant step forward in time series forecasting by bridging the gap between generative diffusion models and retrieval-based learning. By leveraging historical references as explicit guidance, the model effectively handles data scarcity and captures complex, rare events that traditional models often smooth over. Future work will focus on optimizing the computational efficiency of the transformer-based backbone and the retrieval indexing process for real-time applications.
Summary updated