TL;DR
SERAF (Semantics-Enhanced Retrieval-Augmented Time Series Forecasting) improves forecasting by looking beyond raw numerical similarity. By automatically generating textual descriptions of historical data (e.g., "upward trend, high volatility"), it retrieves relevant historical patterns that numerical methods might miss, leading to state-of-the-art accuracy with significantly lower computational overhead.
What Problem Does This Paper Address?
Time series forecasting—predicting the future of everything from traffic flow to electricity demand—is notoriously difficult because data is often non-stationary. This means the statistical properties (like mean and variance) change over time.
Recently, researchers have applied Retrieval-Augmented Generation (RAG) to this field. The idea is simple: to predict the future, look at the past for similar patterns and see what happened next. However, most current methods rely on "numerical similarity" (like Pearson correlation). If a current trend is shifted in value or scale compared to a historical one, numerical methods might fail to see the connection. While some multimodal models try to use text to help, they often require massive external datasets or expensive Large Language Models (LLMs) to generate descriptions, making them slow and hard to scale.
Methods
The authors introduce SERAF, a framework that performs "dual retrieval" from both temporal and semantic perspectives.
- The Dual Database: SERAF builds two parallel databases from the training data. One stores raw time series segments (TS Database), and the other stores automatically generated natural language descriptions of those segments (TS Description Database).
- Automated Text Generation: Instead of using an LLM, SERAF uses a lightweight template to describe segments based on four attributes: Time Period, Season, Main Trend (upward, downward, stable), and Main Volatility (high, medium, low).
- Dual Retrieval & Fusion:
- Numerical Retrieval: Uses Pearson correlation to find segments with similar shapes.
- Semantic Retrieval: Uses a frozen, lightweight text embedding model (all-MiniLM-L6-v2) to find segments with similar "descriptions."
- Adaptive Gating: The model doesn't just blindly trust the retrieved data. It uses a gating mechanism to balance a "naive" prediction (from a standard linear encoder) with the retrieved historical "futures." This allows the model to decide dynamically how much weight to give to historical analogies versus the current trend.
Datasets
The model was evaluated on seven widely recognized multivariate time series benchmarks:
- Electricity Transformer Temperature (ETT): Four subsets (ETTh1, ETTh2, ETTm1, ETTm2).
- Exchange: Currency exchange rate data.
- Weather: Local climatological data.
- Electricity: Hourly electricity consumption.
Key Insights and Ideas
- Semantics as a "Coarse" Filter: The "aha moment" here is that two time series segments might look different in their raw numbers but share high-level semantic attributes (like "Winter, Upward Trend, Low Volatility"). By indexing these attributes, SERAF can find relevant historical precedents that are "semantically" close even if they aren't "numerically" the nearest neighbors.
- Efficiency is a Feature: Unlike other multimodal approaches that require heavy LLM involvement, SERAF’s template-based descriptions are "free" to generate. This results in a model that is actually smaller and faster than many of its competitors.
- Complementary Strengths: The ablation studies show that removing the text-based retrieval leads to the most significant drop in performance. This confirms that semantic retrieval provides a unique signal that numerical similarity alone cannot capture.
Key Results
SERAF consistently outperformed state-of-the-art baselines like RAFT, PatchTST, and DLinear.
- Accuracy: On the ETT datasets, SERAF achieved the best Mean Squared Error (MSE) across the board. Compared to RAFT (a leading retrieval-based model), SERAF reduced average MSE and MAE by 2.56% and 1.42%, respectively.
- Efficiency: SERAF is remarkably lean. It uses only 0.088M parameters, compared to 0.138M for DLinear and 0.097M for RAFT.
- Inference Speed: It achieved an inference speed of 0.0075 seconds per iteration, making it roughly 3x faster than RAFT and DLinear on the same hardware (NVIDIA A100).
Limitations and Future Work
While SERAF is efficient, the authors note that its current semantic descriptions are relatively "coarse." The template-based approach captures the "vibe" but might miss subtle nuances.
Future directions include: * Exploring richer, more descriptive text templates. * Refining the "Top-K" retrieval process to reduce redundancy in the retrieved segments. * Improving the interpretability of the model to show exactly why a specific historical segment was chosen to inform a prediction.
Summary updated