RAST: A Retrieval Augmented Spatio-Temporal Framework for Traffic Prediction
Weilin Ruan, Xilin Dang, Ziyu Zhou, Sisuo Lyu, Yuxuan Liang
TL;DR
RAST tackles accurate traffic forecasting under limited contextual capacity and heterogeneous spatio-temporal patterns by introducing a retrieval-augmented spatio-temporal framework. It decouples spatial and temporal encodings, maintains dual memory banks, and retrieves context-relevant historical patterns via an information-theoretic ST-Retriever, then fuses retrieved signals with a universal backbone predictor through cross-attention. Extensive experiments on six real-world datasets show state-of-the-art performance and favorable efficiency, with ablations validating each component (notably the query generator) and hyperparameters that balance retrieval quality with computation. The framework offers a lightweight, plug-in enhancement for existing pre-trained STGNNs and holds promise for broader spatio-temporal domains beyond traffic forecasting.
Abstract
Traffic prediction is a cornerstone of modern intelligent transportation systems and a critical task in spatio-temporal forecasting. Although advanced Spatio-temporal Graph Neural Networks (STGNNs) and pre-trained models have achieved significant progress in traffic prediction, two key challenges remain: (i) limited contextual capacity when modeling complex spatio-temporal dependencies, and (ii) low predictability at fine-grained spatio-temporal points due to heterogeneous patterns. Inspired by Retrieval-Augmented Generation (RAG), we propose RAST, a universal framework that integrates retrieval-augmented mechanisms with spatio-temporal modeling to address these challenges. Our framework consists of three key designs: 1) Decoupled Encoder and Query Generator to capture decoupled spatial and temporal features and construct a fusion query via residual fusion; 2) Spatio-temporal Retrieval Store and Retrievers to maintain and retrieve vectorized fine-grained patterns; and 3) Universal Backbone Predictor that flexibly accommodates pre-trained STGNNs or simple MLP predictors. Extensive experiments on six real-world traffic networks, including large-scale datasets, demonstrate that RAST achieves superior performance while maintaining computational efficiency.
