Source-linked AI summary

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

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

arXiv:2608.27948v1cs.LG

TL;DR

Online test-time adaptation remains little studied for dynamic graphs, where DGNNs make predictions as graph structure and node semantics evolve. DGOTTA combines temporal-aware augmentation, memory-aware prediction, and consistency-guided online adaptation; it achieves the best AUC across three benchmarks and four DGNN backbones.

  • Problem

    Online test-time adaptation has been little studied for dynamic graphs, where DGNNs must make reliable predictions on unseen snapshots amid temporal and structural shifts.

    Source: §I · p. 2, §III · p. 3
  • Method

    DGOTTA combines temporal-aware augmentation, memory-aware model prediction, and consistency-guided online adaptation to address temporal and structural shifts in dynamic graphs.

    Source: §I · p. 2
  • Results

    DGOTTA achieved the best AUC across all three benchmarks and four DGNN backbones, with a +8.1% improvement on Wikipedia using GraphMixer over the best-performing baseline.

    Source: B. Main Results · p. 7
  • Takeaways & Limitations

    DGOTTA is presented as enabling reliable online adaptation to dynamic graphs without access to labeled data.

    Source: §I · p. 2

Abstract

from arXiv · show

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-graph test streams shift over time in both structure and node semantics, challenging DGNN generalization and exposing a gap in graph test-time adaptation. DGOTTA addresses this gap with temporal-aware augmentation, memory-aware prediction, and consistency-guided online adaptation.

INTRODUCTION

  • DGNNs trained on earlier graph streams can generalize poorly to incoming unlabeled test graphs as node semantics, edges, and structural patterns evolve.The paper identifies online adaptation during deployment as a way to better align model parameters with evolving test distributions.Source: §I · p. 1, Figure 1 · p. 2
  • Dynamic-graph TTA faces complex temporal and spatial shifts that hinder representation transfer, while online learning risks catastrophic forgetting and degraded inference.Existing graph TTA methods mainly focus on static graphs, leaving dynamic graphs with DGNNs underexplored.Source: §I · p. 1
  • Training-to-test distribution shift in dynamic graphs involves changing density, node-feature statistics, and edge dynamics; Wikipedia, MOOC, and Reddit show temporal discrepancies across these statistics.The paper characterizes these shifts as temporal and structural rather than as i.i.d. feature perturbations.Source: §I · p. 1, Figure 1 · p. 2
  • DGOTTA combines temporal-aware augmentation, memory-aware model prediction, and consistency-guided online adaptation to address shifts and catastrophic forgetting during unlabeled test-time adaptation.The modules extend test-graph diversity, use exponential moving averages to stabilize prediction, and enforce prediction alignment across time for smooth adaptation.Source: §I · p. 2
  • Experiments on real-world datasets and dynamic GNN backbones show DGOTTA consistently outperforms existing baselines and achieves state-of-the-art performance under dynamic distribution shifts.The paper reports experiments on three real-world datasets and four DGNN backbones.Source: §I · p. 2

II. RELATED WORKS · III. PROBLEM DEFINITION

Related work surveys source-free online adaptation and graph-specific methods, while the problem definition frames adaptation as reliable prediction on unlabeled dynamic-graph snapshots by updating a pretrained DGNN online.

II. RELATED WORKS

  • Graph test-time adaptation addresses attribute and structural shifts: Gtrans [31] refines target graphs, SOGA promotes mutual information and consistency, and GraphPatcher generates virtual nodes for low-degree prediction.SOGA is applicable only to homophilic graphs; GAPGC [35] and GT3 use self-supervised fine-tuning for graph classification.Source: §II · pp. 2–3
  • Online test-time adaptation transfers a pretrained model to an unlabeled target domain without re-accessing source data and supports source-free online adaptation – [17].Image methods use entropy minimization [17]–[20], pseudo-labeling, [20]–, or Laplacian Adjusted Maximum likelihood Estimation; continual OTTA studies changing target domains [19], –[27].Source: §II · p. 2
  • DGNNs encode evolving graph interactions with recurrent memory, temporal attention, time encoding, or message passing; TGAT [41], TGN [42], GraphMixer [43], and DyGFormer learn temporal representations and predict future events or labels.Most assume training and test streams have similar temporal patterns, so shifts in interaction frequency, density, or feature statistics can make fixed-model predictions unreliable,.Source: §II · p. 3
  • Online TTA differs from continual learning because it adapts without test-time labels, whereas continual learning fine-tunes model parameters using ground-truth labels.The proposed setting adapts a pretrained DGNN during deployment using unlabeled graph streams while preserving temporal consistency.Source: §II · p. 3

III. PROBLEM DEFINITION

  • Online adaptation adjusts a well-trained DGNN to make reliable predictions on each unseen test snapshot in a dynamic graph stream.The stream consists of snapshots G_t = (V_t, E_t, X_t), with timestamped edges and node features.Source: §III · p. 3
  • At each test step, the model receives an unlabeled snapshot, updates its parameters online, and seeks to minimize expected adaptation loss over time.The adaptation objective may use consistency or temporal-smoothness loss, with incremental updates.Source: §III · p. 3

IV. METHODOLOGY · A. Temporal-Aware Augmentation

DGOTTA adapts dynamic GNNs at test time through temporal-aware augmentation, memory-aware prediction, and consistency-guided online updates. Its augmentation accounts for feature staleness and edge recency while preserving temporal causality.

IV. METHODOLOGY

  • DGOTTA balances timestamp-sensitive adaptation with stability under noisy pseudo-supervision using memory-aware labels and drift-aware parameter smoothing.The paper motivates these choices by noting that optimizing directly against current predictions can amplify errors and cause confirmation bias.Source: §IV · p. 3
  • DGOTTA combines temporal-aware augmentation, memory-aware pseudo-label prediction, and consistency-guided online adaptation to adjust to evolving test-graph distributions.A memory bank stabilizes pseudo-labels, while prediction and temporal consistency losses guide adaptive-model updates.Source: §IV · p. 3, Figure 2 · p. 4

A. Temporal-Aware Augmentation

  • Static subgraph sampling treats historical interactions as equally informative, although interaction recency and order shape temporal-graph message passing and predictions.Removing a recent edge or perturbing features without timestamps can distort local temporal dynamics.Source: A. Temporal-Aware Augmentation · p. 3
  • Feature augmentation discounts a node’s raw feature by elapsed time since its last interaction and adds mild Gaussian noise: ex_i = x_i · e^(-λ(T - t_i)) + ε_i, ε_i ∼ N(0, σ^2).This models features becoming stale over time while promoting robustness.Source: A. Temporal-Aware Augmentation · p. 4
  • Edge perturbation first selects interactions within a sliding time window, then independently retains each selected edge with probability 1 − p_drop.The procedure applies stochastic structural noise only to temporally recent edges.Source: A. Temporal-Aware Augmentation · p. 4
  • Restricting perturbations to recent interactions avoids emphasizing outdated edges and encourages representations robust to plausible temporal variations rather than arbitrary graph corruption.Unlike static random edge removal, the method treats edges as time-dependent events and preserves temporal locality.Source: A. Temporal-Aware Augmentation · p. 4

B. Memory-Aware Model Prediction

DGOTTA addresses unlabeled online adaptation with a fixed pretrained DGNN as a stable pseudo-label source and memory-based, drift-aware mechanisms that help the adaptive model track changing graph snapshots.

Memory-Aware Model Prediction

  • A fixed well-trained DGNN supplies stable pseudo-labels while an adaptive model updates online, and recent-prediction aggregation reduces confirmation bias from noisy single-snapshot predictions.The adaptive model is guided by the fixed model while aligning with test-time dynamics.Source: B. Memory-Aware Model Prediction · p. 5

Drift-Aware Exponential Moving Average

  • Drift-aware EMA lowers α_t as structural drift rises, prompting more aggressive updates; it retains more pretrained knowledge on stable graphs, with drift measured by Jaccard or Frobenius distance.The momentum is α_t = α_base exp(−γ d_t).Source: B. Memory-Aware Model Prediction · p. 5

Memory-Bank Pseudo Labeling

  • A fixed-length bank aggregates the latest K+1 adaptive predictions with exponentially decaying weights, then blends that result with the current output as the consistency target.The decay down-weights older predictions, and the blend uses a fixed convex mixing coefficient.Source: B. Memory-Aware Model Prediction · p. 5

C. Consistency-Guided Online Adaptation

DGOTTA addresses continuously evolving topology and features by aligning predictions across time, supporting stable online adaptation under gradual temporal change.

C. Consistency-Guided Online Adaptation

  • DGOTTA aligns current adaptive-model predictions with memory-interpolated pseudo-labels at each time step using KL divergence.The pseudo-label is derived from memory-based interpolation.Source: C. Consistency-Guided Online Adaptation · p. 5
  • A temporal consistency loss penalizes deviations between current and previous-step outputs, encouraging smooth predictions unless significant distributional drift occurs.Source: C. Consistency-Guided Online Adaptation · pp. 5–6
  • The test-time objective combines prediction consistency and temporal smoothness losses with a balancing coefficient, preserving short-term semantic consistency and long-term temporal stability under structural drift.Source: C. Consistency-Guided Online Adaptation · p. 6

D. Overall Optimization Procedure

DGOTTA adapts a pretrained DGNN online as graph snapshots arrive, combining temporal-aware augmentation, memory-based prediction, consistency and temporal-smoothness objectives, and drift-aware parameter updates.

D. Overall Optimization Procedure

  • At each timestamp, DGOTTA augments the incoming snapshot’s features and edges before the adaptive model produces predictions.The procedure starts from a pretrained DGNN and an empty memory bank.Source: D. Overall Optimization Procedure · p. 6
  • DGOTTA blends current predictions with memory-weighted pseudo labels, then uses consistency and temporal-smoothness objectives to update model parameters.The blended prediction weights the memory estimate by ω and the current prediction by 1 − ω.Source: D. Overall Optimization Procedure · p. 6
  • After the gradient update, DGOTTA adjusts its EMA rate according to graph drift between consecutive snapshots and stores the latest prediction for future adaptation.The EMA rate is α_t = α_base · exp(−γ · d_t).Source: D. Overall Optimization Procedure · p. 6

V. EXPERIMENT · A. Experiment Setting · B. Main Results

Experiments evaluate DGOTTA on Reddit, Wikipedia, and MOOC using four DGNN backbones and report consistent performance gains across datasets and architectures. The section also describes the chronological test protocol and compares DGOTTA with TTA baselines under temporal distribution shifts.

A. Experiment Setting

  • The experiments use Reddit, Wikipedia, and MOOC with a chronological 10%/10%/80% training, validation, and test split, evaluating future unseen dynamics over a long test stream.The split is intended to simulate online deployment with potential distribution shift.Source: A. Experiment Setting · p. 6
  • Evaluation compares TTA baselines including TENT, GTrans, SOGA, and MATCHA, alongside DDGCL and IDOL, using ERM-pretrained GraphMixer, DyGFormer, TGN, and TGAT backbones and AUC.All methods adapt on the same chronological test stream without test labels or future snapshots; static-graph baselines are adapted at each timestamp.Source: A. Experiment Setting · p. 6
  • DGOTTA uses memory size K = 200, interpolation factor ω = 0.1, temporal consistency weight λtemp = 0.1, EMA base momentum αbase = 0.1, and drift-aware decay factor γ = 0.1 by default.These values are selected using validation performance.Source: A. Experiment Setting · p. 7

B. Main Results

  • DGOTTA achieves the best performance across all three dynamic graph benchmarks and four DGNN architectures.The reported results address temporal and structural distribution shifts.Source: B. Main Results · p. 7
  • On Wikipedia, DGOTTA gains +8.1% on GraphMixer, +6.1% on TGN, and +2.2% on TGAT over the best baseline; on Reddit, it scores 0.6036 on GraphMixer and 0.6011 on TGAT.DGOTTA also achieves consistent gains across all architectures on MOOC.Source: B. Main Results · p. 7
  • On Reddit, some baselines, including GTrans, fail with out-of-memory issues on certain backbones, while DGOTTA remains robust.Source: B. Main Results · p. 7
  • ERM and TENT adapt poorly to evolving graph distributions, while GTrans and SOGA show dataset instability and MATCHA weakens under severe temporal drift, especially on Reddit.Some graph-specific methods are competitive on Wikipedia but degrade on Reddit or MOOC.Source: B. Main Results · p. 7
  • DGOTTA's temporal smoothing benefits attention-based TGAT and DyGFormer, while its structural-drift and pseudo-label-stability modeling complements TGN and GraphMixer.These observations support its use as an adaptation layer across different DGNN architectures.Source: B. Main Results · p. 7

C. Ablation Study · D. Analysis of Distribution Shift Mitigation.

DGOTTA’s ablations show that its modules contribute through distinct distribution-shift mitigation mechanisms, while their combination performs best across datasets and backbones.

C. Ablation Study

  • DGOTTA-base degrades under temporal and structural shifts; adding TC brings modest consistent gains, MBPL substantial gains, TAA further gains, and DAEMA additional benefits.TC smooths predictions, MBPL aggregates historical predictions, TAA models temporal variation, and DAEMA adapts the update rate to structural changes.Source: C. Ablation Study · p. 7
  • Combining all DGOTTA components yields the best performance across datasets and backbones, confirming that the modules jointly enable robust online adaptation.The analysis attributes this result to interaction among augmentation, memory smoothing, and drift-aware updating.Source: C. Ablation Study · p. 7, Table III · p. 8

D. Analysis of Distribution Shift Mitigation.

  • TAA perturbs node representations according to interaction recency to target semantic and temporal feature shifts, and its gains underscore the importance of modeling feature drift.It reduces mismatch between training-time and test-time feature distributions in evolving graph streams.Source: D. Analysis of Distribution Shift… · p. 8
  • Memory-based pseudo-labeling stabilizes predictions under non-stationary graph dynamics, with especially stable improvements on datasets with pronounced temporal variability.Aggregating memory predictions smooths noisy predictions under distribution shifts.Source: D. Analysis of Distribution Shift… · p. 8
  • Drift-aware EMA adjusts its update rate to structural changes between snapshots, helping preserve historical knowledge while adapting to evolving graph structures.Unlike conventional EMA schemes, it does not assume stationary update dynamics.Source: D. Analysis of Distribution Shift… · p. 8
  • TAA can introduce noisy predictions without stable pseudo-supervision; memory aggregation smooths targets, while drift-aware EMA adjusts historical retention to structural change.The analysis links these interacting mechanisms to the full model’s strongest performance.Source: D. Analysis of Distribution Shift… · pp. 8–9
  • DGOTTA’s gains stem from mitigating multiple types of distribution shifts in dynamic graphs, rather than from generic regularization effects.Each component addresses a challenge induced by temporal distribution shifts.Source: D. Analysis of Distribution Shift… · pp. 7, 9

E. Parameter Analysis

On Wikipedia, DGOTTA performs best with moderate memory and adaptation settings, with optimal values varying across the tested hyperparameters. The trends are consistent across architectures.

Memory Size K

  • At K = 200, DyGFormer reaches its performance peak and GraphMixer performs best, but GraphMixer drops sharply at larger memory sizes.The analysis suggests moderate memory stabilizes pseudo-labels, while excessive memory may introduce outdated or noisy predictions.Source: E. Parameter Analysis · p. 9

Interpolation Factor ω

  • Around ω = 0.1 yields optimal performance, and smaller ω values improve results by giving more weight to memory bank predictions.This supports aggregating historical knowledge during adaptation.Source: E. Parameter Analysis · p. 9

Temporal Consistency Weight λ

  • Setting λ = 0.1 yields the best performance, while excessive temporal regularization may hinder flexibility across evolving graph structures.The analysis attributes the gain to temporal smoothness helping the adaptive model generalize.Source: E. Parameter Analysis · p. 9

EMA Update Ratio α

  • Performance peaks around α = 0.1, balancing stability and adaptability; too-small α slows adaptation, while too-large α risks overfitting noisy test samples.Source: E. Parameter Analysis · p. 9

Overall

  • The consistent hyperparameter trends across architectures support the robustness of DGOTTA’s hyperparameter design.Source: E. Parameter Analysis · p. 9

F. Efficiency Analysis · VI. CONCLUSION

DGOTTA delivers the strongest reported efficiency–performance trade-off in the Wikipedia/DyGFormer analysis, and the conclusion presents its three-module framework as an effective approach to temporal and structural shifts in dynamic graphs.

F. Efficiency Analysis

  • DGOTTA attains the highest AUC with competitive inference time per timestamp, outperforming existing methods in accuracy and runtime.The comparison uses the Wikipedia dataset with DyGFormer as the backbone.Source: F. Efficiency Analysis · p. 9
  • The efficiency analysis compares average inference time per timestamp with AUC on Wikipedia using DyGFormer, with Figure 3b showing each method’s accuracy–efficiency trade-off.Source: F. Efficiency Analysis · p. 9
  • DDGCL and IDOL have relatively low inference latency but limited adaptation performance, while GTrans and SOGA improve performance with greater computational overhead.Source: F. Efficiency Analysis · p. 9

VI. CONCLUSION

  • DGOTTA combines time-aware augmentation, memory-aware model prediction, and consistency-guided online adaptation to address temporal and structural distribution shifts.Source: §VI · p. 9
  • Experiments on real-world datasets and dynamic GNN backbones show DGOTTA consistently outperforms existing test-time adaptation and self-supervised baselines with minimal overhead.The conclusion characterizes its performance as state of the art.Source: §VI · p. 9
  • The paper presents DGOTTA as a promising direction for adaptive learning in dynamic graphs, particularly under realistic online inference settings.Source: §VI · p. 9
Loading 2608.27948v1…