Title: STRAP: Spatio-Temporal Pattern Retrieval for Out-of-Distribution Generalization
Venue: NeurIPS 2025
Accepted: yes
Keywords: Spatio-Temporal Graph Neural Networks; Out-of-Distribution;
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.


Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper introduces STRAP, a novel retrieval-augmented framework designed to address generalization challenges for spatio-temporal graph neural networks (STGNNs) in spatio-temporal out-of-distribution (STOOD) scenarios. The authors propose a comprehensive approach centered on constructing a multi-dimensional pattern vector library containing spatial, temporal, and spatio-temporal information. During inference, STRAP retrieves similar patterns from the library based on current inputs and injects them into the model through a plug-and-play mechanism to enhance representation capabilities and mitigate catastrophic forgetting. Experimental results on multiple real-world dynamic graph datasets demonstrate that STRAP significantly outperforms current state-of-the-art baseline models on STOOD tasks.\n\nSTRENGTHS AND WEAKNESSES:\n**Strengths:**\n\nS1. The retrieval-augmented learning framework proposed represents a meaningful innovation specifically targeting STGNN generalization under STOOD scenarios - a problem of genuine practical importance. The integration of retrieval mechanisms with continual learning brings fresh insights to this domain.\nS2. The architectural design exhibits strong logical coherence, particularly in the decomposition strategy that separates complex spatio-temporal data into specialized spatial, temporal, and hybrid spatio-temporal subgraphs with corresponding pattern libraries. This decomposition appears both systematic and theoretically motivated.\nS3. Nice and easy-understanding method figure.\n\n** Weaknesses:**\n\nW1. The pattern key generation mechanism relies heavily on manually crafted feature combinations including degree distributions, curvature measures, and spectral descriptors. This hand-engineered approach, while empirically effective, raises concerns about generalizability to diverse spatio-temporal data types and sensitivity to feature selection decisions. The methodology would benefit from either learnable key generation approaches or principled guidelines for feature selection.\n\nW2. Although computational overhead is acknowledged as a limitation in the conclusions, the main text provides insufficient analysis of this critical issue. The continuous growth of pattern libraries as historical data accumulates presents a potential scalability bottleneck. While importance-based sampling strategies are mentioned for library management, their effectiveness and performance implications remain experimentally unvalidated.\n\nQUESTIONS:\nIn Section 4.2.1, the notation $\\mathbf{D}(\\mathcal{G_S}) = [\\mu_d, \\sigma_d, \\max(d), \\min(d)]$ introduces $\\mu_d$ and $\\sigma_d$ without proper definition.\n\nLIMITATIONS:\nYes. The authors have discussed the limitations and  potential negative societal impact of their work.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-06-25"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper introduces a novel framework STRAP to improve the generalization of STGNNs under STOOD scenarios, where both spatial structures and temporal dynamics deviate from training distributions. At the heart of STRAP lies a multi-dimensional key-value pattern library that stores representative spatial, temporal, and spatio-temporal patterns, thereby capturing rich historical, structural, and semantic information. During training, STRAP decomposes spatio-temporal graphs into specialized subgraphs using domain-specific chunking strategies, enabling the extraction of discriminative keys and informative values. At inference time, relevant patterns are retrieved through similarity matching, and an adaptive fusion mechanism integrates them with current observations to effectively balance historical knowledge and new inputs. Extensive experiments on multiple real-world datasets demonstrate that STRAP consistently outperforms over ten state-of-the-art baselines across various STGNN backbones.\n\nSTRENGTHS AND WEAKNESSES:\n**Strengths:**\n- STRAP tackles the important and longstanding challenge of STOOD generalization in STGNNs by introducing a novel retrieval-augmented learning paradigm that explicitly incorporates historical patterns to enhance adaptability.\n- The design of a three-dimensional key-value pattern library allows STRAP to systematically capture diverse and representative patterns.\n- The use of domain-specific graph decomposition enhances pattern discriminability by breaking down complex spatio-temporal structures into specialized subgraphs.\n- Comprehensive experiments on three real-world datasets using four different STGNN backbones show consistent and substantial gains over 10+ competitive baselines.\n\n**Weaknesses:**\n- The motivation for defining the spatio-temporal library as the product of separate spatial and temporal libraries rather than directly using them independently is unclear. A deeper justification or ablation analysis would be helpful.\n- While the framework is claimed to be effective in streaming scenarios, the paper lacks a time complexity or efficiency analysis, which is essential for evaluating real-time applicability.\n- The method's sensitivity to hyperparameters is not discussed, which limits understanding of its robustness and practical deployment considerations.\n\nQUESTIONS:\nPlease address the questions in the Weaknesses.\n\nLIMITATIONS:\nYes.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 4, "ORIGINALITY": 3, "DATE": "2025-06-30"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper presents STRAP, a novel retrieval-augmented framework for spatio-temporal graph learning designed to address out-of-distribution (OOD) challenges. The authors propose a three-component approach that: (1) decomposes complex spatio-temporal data into specialized subgraphs, (2) constructs multi-dimensional pattern libraries (spatial, temporal, and spatio-temporal), and (3) implements a knowledge fusion mechanism that adaptively integrates retrieved historical patterns with current observations. Extensive experiments across three real-world streaming datasets demonstrate consistent performance improvements over state-of-the-art methods.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n1.  The authors address an important problem in spatio-temporal graph learning with a novel retrieval-augmented approach.\n2. The pattern library construction is well-designed, with clear methodological distinctions between spatial, temporal, and spatio-temporal pattern extraction.\n3. The experimental evaluation is comprehensive.\n\nWeaknesses:\n1. The paper proposes three separate pattern libraries (spatial, temporal, and spatio-temporal) without adequately demonstrating why this complexity is necessary. While intuitive that different pattern types might capture complementary information, there is no empirical evidence showing that a single unified spatio-temporal library would be insufficient. This raises questions about the potential redundancy and computational overhead introduced by maintaining three separate libraries.\n2. Despite positioning itself within the retrieval-augmented learning paradigm, the paper does not compare STRAP against other retrieval-based graph learning methods (i.e. RAGraph as you mentioned in your introduction).\n\nQUESTIONS:\n1.For completeness, could you show the specific hyperparameter values (learning rates, batch sizes, etc.) used for each dataset and backbone? \\\n2.Your approach constructs three separate pattern libraries (spatial, temporal, and spatio-temporal). Have you conducted experiments to evaluate whether a single comprehensive spatio-temporal pattern library could achieve comparable performance? Could you provide empirical evidence justifying the necessity of maintaining these separate libraries?\\\n3.Pattern key generation combines multiple feature extractors. Have you conducted experiments to determine the relative importance of these different components? Understanding which topological features contribute most to effective retrieval could lead to more efficient key designs and potentially reveal fundamental aspects of spatio-temporal similarity.\\\n4.Your work falls within the retrieval-augmented learning paradigm, which has seen growing interest in graph learning. How does STRAP compare to other retrieval-based graph learning methods such as RAGraph or similar approaches? \\\n5.How does STRAP perform in few-shot adaptation scenarios where only a small amount of data from a new distribution is available?\n\nLIMITATIONS:\nSee weaknesses.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 5, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 4, "DATE": "2025-07-01"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper addresses the challenge of spatio-temporal out-of-distribution (STOOD) generalization, where the distribution of test data diverges significantly from that of the training set. Rather than relying solely on model parameter adaptation or overwriting with patterns learned from past data, this paper proposes an explicit memory mechanism by constructing a three-dimensional pattern library. This library stores essential patterns extracted from historical data, including spatial subgraphs, temporal dynamics, and spatio-temporal motifs.\nWhen processing new data, this paper introduces a similarity-based retrieval strategy that identifies and retrieves the most relevant historical patterns from the library according to their similarity to current graph features. These retrieved patterns are then explicitly fused with the current observations through a similarity-weighted aggregation. By integrating both retrieved historical knowledge and current observations, this approach enhances model robustness to distribution shifts and significantly improves performance in spatio-temporal OOD scenarios.\n\nSTRENGTHS AND WEAKNESSES:\nSignificance Strengths：The paper provides a clear comparison with existing methods, including architecture-based, replay-based, and regularization-based approaches. The proposed retrieval-based method demonstrates notable originality and represents a meaningful advance beyond prior work. By positioning the new approach alongside established baselines, the paper effectively highlights its unique contribution and potential impact on the field.\n\nOriginality Strength: The use of a pattern library to store historical patterns and mitigate the forgetting problem by retrieving relevant historical patterns is a novel idea. This approach offers a fresh perspective for handling real-world streaming spatio-temporal data in both OOD and continual learning scenarios. The explicit memory mechanism distinguishes this work from prior methods that rely solely on parameter adaptation or data replay.\n\nWeakness1: While the Preliminaries section (around line 145) and the subsequent discussion of distribution shifts clearly describe an OOD setting, where the test distribution differs from the training distribution.There is a mismatch between this description and the actual setting of the paper. Specifically, Definition 3, the learning objective, and the experimental setup all focus on distribution shifts across different time periods, which is characteristic of continual learning rather than classical OOD settings. \n\nWeakness2:  If the paper is operating under an OOD setting, it should emphasize that the training and testing data come from different time periods, for example, training on X_t and testing on X_{t+1}.  According to Definition 3, it may be more appropriate for the paper to highlight the distribution shift between the current graph signal signal X_T nd the target output over a prediction horizon, [X_T,\\ldots X_{T+p}]. The paper should clearly differentiate between spatio-temporal OOD generalization and continual spatio-temporal learning, and explicitly clarify which problem is being addressed in the experiments and method design.\n\nWeakness3: \tThe paper does not discuss efficiency, as it lacks any analysis of the time complexity involved in Spatio-Temporal Pattern Library construction and pattern retrieval, as well as the storage requirements associated with maintaining the pattern library. Given that the performance improvement is not particularly significant, providing such analyses would be valuable for helping readers assess the practical feasibility, scalability, and the overall significance of the contribution.\n\nWeakness4:   Figure 3 demonstrates that the distributions of test set values vary considerably across the four periods. However, the paper claims to focus on Spatio-Temporal Out-of-Distribution (OOD) Learning, where the test distributions should differ significantly from those seen during training.  In this part, the paper should provide evidence of the model’s robustness to distribution shifts between the training and testing data across all periods, rather than only illustrating the dataset’s distribution shift. Clear experimental results reflecting performance under these OOD conditions are needed to support the main claim.\n\n\nWeakness5: There is no evaluation metric reported for mitigating forgetting, even though the abstract (line 15) states that the proposed STRAP approach is able to “mitigate catastrophic forgetting.” The paper should provide appropriate metrics and results to support this claim.\n\n\nWeakness 6: The discussion of related work on replay-based methods should be updated. The paper currently only references one method which is published in 2017, but most recent approaches primarily rely on data replay strategies. The comparison with other retrieval-based methods also needs to be strengthened.\n\nWeakness7: The paper lacks a clear description of the main task being addressed. And the learning objective is not clearly defined, which may make it difficult for readers to fully understand the focus and contributions of the work. Additionally, there are some minor typographical and writing errors throughout the manuscript.\n\nQUESTIONS:\n1.\tThe paper should clearly differentiate between spatio-temporal OOD generalization and continual spatio-temporal learning, and explicitly clarify which problem is being addressed in the experiments and method design.\n\n2.\tProvide efficiency analysis (in Spatio-Temporal Pattern Library construction and pattern retrieval). \n\n3.\tAdditional baselines using replay-based methods should be included for a more comprehensive comparison.\n\n4.\tFigure 3 should be revised to provide evidence of the model’s robustness to distribution shifts between the training and testing data across all periods, rather than only illustrating the dataset’s distribution shift.\n\n5.\tOn lines 335–336, “Figure 4” should be corrected to “Figure 3.”\n\n6.\tIt would be helpful to clarify in the paper that the values 3, 6, and 12 in Table 1 represent the prediction horizon, as this may be confusing for readers who are not familiar with this area.\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 3, "REVIEWER_CONFIDENCE": 4, "CLARITY": 2, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-07-02"}