STRAP: Spatio-Temporal Pattern Retrieval for Out-of-Distribution Generalization
Haoyu Zhang, Wentao Zhang, Hao Miao, Xinke Jiang, Yuchen Fang, Yifan Zhang
Abstract
Spatio-Temporal Graph Neural Networks (STGNNs) have emerged as a powerful tool for modeling dynamic graph-structured data across diverse domains. However, they often fail to generalize in Spatio-Temporal Out-of-Distribution (STOOD) scenarios, where both temporal dynamics and spatial structures evolve beyond the training distribution. To address this problem, we propose an innovative Spatio-Temporal Retrieval-Augmented Pattern Learning framework, STRAP, which enhances model generalization by integrating retrieval-augmented learning into the STGNN continue learning pipeline. The core of STRAP is a compact and expressive pattern library that stores representative spatio-temporal patterns enriched with historical, structural, and semantic information, which is obtained and optimized during the training phase. During inference, STRAP retrieves relevant patterns from this library based on similarity to the current input and injects them into the model via a plug-and-play prompting mechanism. This not only strengthens spatio-temporal representations but also mitigates catastrophic forgetting. Moreover, STRAP introduces a knowledge-balancing objective to harmonize new information with retrieved knowledge. Extensive experiments across multiple real-world streaming graph datasets show that STRAP consistently outperforms state-of-the-art STGNN baselines on STOOD tasks, demonstrating its robustness, adaptability, and strong generalization capability without task-specific fine-tuning.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers3
- DisMS-TS: Eliminating Redundant Multi-scale Features for Time Series ClassificationZhipeng Liu, Peibo Duan, Binwu Wang, Xuan Tang et al.ACM MM 2025 · 5 citations
- Decoupling Universal Laws and Environmental Heterogeneity: A Physics-Inspired Framework for Robust Spatio-Temporal ForecastingAoyu Liu, Liming Wei, YAYING ZHANGICML 2026
- A General Spatio-Temporal Backbone with Scalable Contextual Pattern Bank for Urban Continual ForecastingAoyu Liu, Yaying ZhangICLR 2026
Builds on28
- Dark Experience for General Continual Learning: a Strong, Simple BaselinePietro Buzzega, Matteo Boschini, Angelo Porrello, Davide Abati et al.NeurIPS 2020 · 1,494 citations
- EvolveGCN: Evolving Graph Convolutional Networks for Dynamic GraphsAldo Pareja, Giacomo Domeniconi, Jie Chen, Tengfei Ma et al.AAAI 2020 · 1,429 citations
- Traffic Flow Prediction via Spatial Temporal Graph Neural NetworkXiaoyang Wang, Yao Ma, Yiqi Wang, Wei Jin et al.WWW 2020 · 644 citations
- Exploring the Limits of Out-of-Distribution DetectionStanislav Fort, Jie Ren, Balaji LakshminarayananNeurIPS 2021 · 443 citations
- ST-Adapter: Parameter-Efficient Image-to-Video Transfer LearningJunting Pan, Ziyi Lin, Xiatian Zhu, Jing Shao et al.NeurIPS 2022 · 290 citations
Related papers
- RAGraph: A General Retrieval-Augmented Graph Learning FrameworkXinke Jiang, Rihong Qiu, Yongxin Xu, Wentao Zhang et al.NeurIPS 2024 · 42 citations
- Task-Aware Retrieval Augmentation for Dynamic RecommendationZhen Tao, Xinke Jiang, Qingshuai Feng, Haoyu Zhang et al.AAAI 2026
- Streaming Graph Neural Networks with Generative ReplayJunshan Wang, Wenhao Zhu, Guojie Song, Liang WangKDD 2022 · 33 citations
- Environment-Aware Dynamic Graph Learning for Out-of-Distribution GeneralizationHaonan Yuan, Qingyun Sun, Xingcheng Fu, Ziwei Zhang et al.NeurIPS 2023 · 54 citations
- Deciphering Spatio-Temporal Graph Forecasting: A Causal Lens and TreatmentYutong Xia, Yuxuan Liang, Haomin Wen, Xu Liu et al.NeurIPS 2023 · 110 citations
