arXiv:2608.27948cs.LGAug 2026

Manuscript Offprint

arXiv:2608.27948

Temporal Memory-Aware Online Test-Time Adaptation on Dynamic Graphs

Bo Li, Xin Zheng, Ming Jin, Can Wang, Shirui Pan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Bo Li 1^{1}, Xin Zheng 2^{2}, Ming Jin 1^{1}, Can Wang 1^{1}, Shirui Pan 1,∗^{1,*}

1^{1} Griffith University, Gold Coast, Australia

2^{2}RMIT University, Melbourne, Australia

{bo.li, ming.jin, can.wang, s.pan}@griffith.edu.au, xin.zheng2@rmit.edu.au

Abstract—Test-time adaptation (TTA) on graphs aims to adapt a graph neural network (GNN) that is well-trained on the training graph to the test graph, which involves potential distribution shifts that may harm model generalization and test-time inference. While recent efforts have investigated TTA on static graphs, there is still a research gap on dynamic graphs learned with dynamic GNN (DGNN) models, where both structural connectivity and node semantics evolve continuously over time. This makes adapting a DGNN model for reliable test-time performance substantially challenging. To fill this gap, in this work, we propose a novel framework of temporal memory-aware Online Test-Time Adaptation on Dynamic Graphs, named DGOTTA, to effectively adapt well-trained DGNNs during test time. Specifically, the proposed DGOTTA contains three modules: (1) temporal-aware augmentation, to extend the diversity of test dynamic graphs for addressing complex temporal and spatial shifts; (2) memory-aware model prediction, to alleviate catastrophic forgetting; (3) consistency-guided online adaptation, to enforce temporal alignment and memory smoothness. Extensive experiments on three real-world datasets and four DGNN backbones demonstrate that DGOTTA significantly improves generalization under diverse distribution shifts and multiple model architectures.

I. INTRODUCTION

Dynamic graphs are prevalent in real-world applications such as social networks [1]-[4], financial transaction networks [5], [6], and traffic systems [7]-[10], where both the topology and node attributes evolve over time. Dynamic graph neural networks (DGNN), have been recognized as powerful models for capturing the complex interplay of spatio-temporal dependencies, and learning expressive dynamic node and interaction representations.

In this work, we characterize distribution shift in dynamic graphs as the discrepancy between training-time and test-time graph streams along both temporal and structural dimensions. Concretely, such shifts manifest as changes in graph density, node feature statistics, and edge dynamics as the graph evolves over time, rather than as i.i.d. feature perturbations.

As illustrated in Figure 1, real-world dynamic graph benchmarks such as Wikipedia, MOOC, and Reddit exhibit clear temporal discrepancies between training and test snapshots across these statistics. The test-time graph streams demonstrate evolving patterns in interaction frequency, feature distributions, and connectivity dynamics, indicating that the underlying data distribution is non-stationary and continuously drifting. These observations highlight that distribution shift in dynamic graphs is inherently temporal and structural, which fundamentally challenges the assumption of stationary test distributions adopted by conventional DGNN inference.

Moreover, DGNNs that are well-trained on the training dynamic graphs usually show poor performance and generalization ability to new incoming unlabeled test graphs [11], due to potential distribution shifts that might harm the performance. For instance, in recommendation systems where dynamic graphs capture user-item interactions, changes in user features (e.g., an increase in income) can significantly alter user preferences and behaviors (e.g., a shift towards higher-priced items). Consequently, a DGNN model trained on earlier feature distributions (e.g., lower income) may struggle to deliver relevant recommendations at test time, as it relies on outdated interactions (such as purchases of lower-cost items) [12], [13]. Despite the effectiveness of well-trained DGNNs on the training graphs, their generalization capability often deteriorates on distribution-shifted test graphs, especially when deployed in realistic dynamic environments.

As shown in Figure 1, a well-trained DGNN with fixed parameters θtr∗\theta_{tr}^{*} is directly applied to the test phase, where test dynamic graphs are inherently evolving—node semantics shift, new edges appear, and structural patterns change continuously. As a result, the traditional DGNN inference would lead to low performance with poor generalization.

To address this test-time degradation problem, test-time adaptation (TTA) methods on graphs, which aim to adapt a well-trained GNN to unseen test distributions, become a promising solution. However, existing TTA methods on graphs mainly focus on static graphs. There is still a research blank for exploring TTA on dynamic graphs with DGNNs. Specifically, there are two core challenges for TTA with DGNNs: Challenge-1: at the dynamic graph level, complex temporal and spatial shifts on test graphs complicate the informative representation transfer during test time, leading to poor generalization; Challenge-2: at the method level, temporal evolution enforces an online learning paradigm in DGNNs, where catastrophic forgetting severely degrades DGNNs' test-time inference performance.

To address these challenges, in this work, we propose a novel temporal memory-aware Online Test-Time Adaptation method for Dynamic Graphs, named DGOTTA, to effectively adapt well-trained DGNNs to evolving test-time dynamic graphs with potential distribution shifts. Specifically, the pro-

  • Corresponding author.

Figure

Test dynamic graphs

(a) Traditional DGNN test-time inference.

Figure

(b) Online test-time adaptation on dynamic graphs

WIKIPEDIA - Temporal Distribution

Figure

MOOC - Temporal Distribution

Figure

REDDIT - Temporal Distribution

Figure

Fig. 1: Motivation and empirical evidence of temporal distribution shift in dynamic graphs. (a) Traditional DGNN test-time inference, where a well-trained model with fixed parameters is directly deployed on evolving test graph streams, leading to degraded performance under temporal and structural shifts. (b) Online test-time adaptation on dynamic graphs, which continuously updates model parameters during deployment to better align with evolving test distributions. Empirical visualization of temporal distribution discrepancies between training and test graph snapshots on Wikipedia, MOOC, and Reddit, respectively.

posed method contains three essential modules: (1) temporal-aware augmentation, to extend the diversity of test dynamic graphs for addressing complex temporal and spatial shifts, leading to improved robustness against temporal shifts (C1); (2) memory-aware model prediction, to stabilize unsupervised adaptation with the exponential moving average strategy and alleviate catastrophic forgetting (C2); and (3) consistency-guided online adaptation, to enforce prediction alignment across time and ensure smooth adaptation. By doing so, the proposed method could enable reliable online adaptation to dynamic graphs without access to labeled data. Extensive experiments on three real-world datasets and four DGNN backbones demonstrate that DGOTTA significantly improves generalization under diverse distribution shifts and multiple model architectures. In summary, the contributions of this work are presented as:

• To the best of our knowledge, we are the first to study online test-time adaptation for dynamic graphs, enabling models to adapt temporal and structural distribution shifts during inference in a model-agnostic manner.

• We develop a novel framework named DGOTTA, containing (1) temporal-aware augmentation; (2) memory-aware model prediction; and (3) consistency-guided online adaptation for addressing key challenges in test-time adaptation on dynamic graphs with DGNNs.

• Extensive experiments on real-world datasets and dynamic GNN backbones show that DGOTTA consistently outperforms existing baselines, achieving state-of-the-art performance under dynamic distribution shifts.

References (51)