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

Dynamic-graph TTA remains underexplored even though evolving structure and node semantics make reliable DGNN adaptation difficult. DGOTTA combines temporal-aware augmentation, memory-aware prediction, and consistency-guided online adaptation, and experiments across three datasets and four backbones show improved generalization under diverse shifts.

  • Problem

    Test-time adaptation for dynamic graphs with DGNNs remains a research gap because both structural connectivity and node semantics evolve continuously over time.

  • Method

    DGOTTA adapts well-trained DGNNs online using temporal-aware augmentation, memory-aware model prediction, and consistency-guided adaptation.

  • Results

    DGOTTA consistently outperforms existing baselines across three dynamic graph benchmarks and four DGNN architectures, achieving state-of-the-art results.

  • Takeaways & Limitations

    DGOTTA provides a framework for reliable, robust online adaptation to temporal and structural shifts in unlabeled dynamic graph streams.

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 graphs undergo temporal and structural distribution shifts as topology and node semantics evolve, challenging fixed DGNN inference and motivating online adaptation. DGOTTA addresses this gap with temporal-aware augmentation, memory-aware prediction, and consistency-guided adaptation, and experiments report improved generalization across datasets and backbones.

  • Motivation: Dynamic graphs evolve in topology and node attributes, creating temporal and structural shifts rather than independent feature perturbations.These shifts include changes in graph density, node-feature statistics, edge dynamics, interaction frequency, and connectivity.
  • Motivation: Fixed-parameter DGNN inference can generalize poorly when incoming test graphs have shifting node semantics, new edges, and changing structural patterns.The motivation is illustrated on Wikipedia, MOOC, and Reddit dynamic graph streams.
  • Research gap: Existing graph test-time adaptation mainly targets static graphs, leaving online adaptation for dynamic graphs with DGNNs comparatively unexplored.Dynamic settings introduce complex temporal and spatial shifts and require online learning, where catastrophic forgetting can degrade inference.
  • Proposed framework: DGOTTA combines temporal-aware augmentation, memory-aware model prediction, and consistency-guided online adaptation for evolving test-time dynamic graphs.The modules target shift robustness, catastrophic-forgetting mitigation, temporal alignment, and smooth adaptation without labeled data.
  • Results: Experiments on real-world datasets and dynamic GNN backbones report consistent improvements and state-of-the-art performance under dynamic distribution shifts.The contribution summary describes gains across multiple datasets and architectures.

II. RELATED WORKS

Online test-time adaptation adapts pretrained models to unlabeled target data without re-accessing the source domain, while graph adaptation work has largely emphasized static settings. The paper formulates online adaptation for dynamic graph streams, where each unseen snapshot is predicted while DGNN parameters are updated incrementally.

  • Online Test-Time Adaptation: Online test-time adaptation updates a pretrained model on an unlabeled target domain without re-accessing the source domain.It supports source-free, online adaptation during test data processing.
  • Graph Test-Time Adaptation: Existing graph test-time adaptation methods mainly focus on static graphs, whereas this work considers dynamic graphs with DGNNs.The problem is framed around evolving graph streams rather than a single static graph.
  • Problem Definition: Given an evolving stream of graph snapshots, the objective is to make reliable predictions on each unseen snapshot by adjusting a well-trained DGNN.Each snapshot contains nodes, timestamped edges, and node features.
  • Problem Definition: At each test step, the DGNN receives an unlabeled snapshot and updates its parameters through an online adaptation strategy.The adaptation objective may use consistency or temporal-smoothness losses and is minimized incrementally over time.

IV. METHODOLOGY

DGOTTA adapts DGNNs online through temporal-aware augmentation, memory-aware prediction, and consistency-guided objectives. Its augmentation simulates temporally and structurally grounded shifts while preserving causal graph dynamics.

  • DGOTTA combines temporal-aware augmentation, memory-aware model prediction, and consistency-guided online adaptation for test-time adaptation on dynamic graphs.The framework targets continuously evolving test graph distributions without ground-truth labels.
  • Temporal-Aware Augmentation: Temporal-aware augmentation applies time-aware feature perturbation and time-window-based edge perturbation to simulate semantic drift and structural evolution.The design incorporates temporal priors into both node-level and edge-level perturbations.
  • Temporal-Aware Augmentation: Older node features are discounted and perturbed with mild noise to improve robustness as their temporal relevance declines.The augmented feature combines time-decayed raw features with Gaussian noise.
  • Temporal-Aware Augmentation: The augmentation is designed to enhance robustness without violating the graph’s causal and temporal structure.It differs from static random perturbation by making edge and feature changes explicitly time-aware.
  • Temporal-Aware Augmentation: Recent edges are selected within a sliding time window and then independently sampled for removal to model uncertainty in evolving interactions.This avoids treating all historical interactions as equally informative and prevents overemphasis on outdated topology.

B. Memory-Aware Model Prediction

Memory-aware prediction stabilizes unsupervised online adaptation by combining fixed-model guidance with temporally weighted predictions from the adaptive model. Drift controls how strongly the adaptive model retains or updates pretrained knowledge.

  • A fixed well-trained DGNN supplies stable pseudo-label guidance while an adaptive model updates online through consistency-based objectives.This dual-model scheme reduces reliance on any single noisy current prediction.
  • The memory bank aggregates recent predictions to reduce variance, confirmation bias, and error accumulation during online adaptation.It produces a temporally smoothed target that is less sensitive to abrupt noise at one snapshot.
  • Larger graph drift produces a smaller adaptive-model coefficient, encouraging more aggressive updates when structural patterns change substantially.When the graph is stable, the coefficient remains closer to the base momentum and preserves more pretrained knowledge.
  • The memory-enhanced pseudo-label is formed by exponentially averaging past predictions and convexly interpolating that memory estimate with the adaptive model’s recent output.The mixing coefficient controls the balance between long-term historical trends and current predictions.

C. Consistency-Guided Online Adaptation

Consistency-guided adaptation aligns current predictions with temporally smoothed pseudo-labels while regularizing changes across consecutive snapshots. The combined objective balances immediate consistency against temporal stability.

  • DGOTTA aligns current adaptive-model predictions with memory-derived pseudo-labels to handle evolving topology and features during online adaptation.This targets structural dependency drift under nonstationary graph streams.
  • A temporal consistency loss penalizes deviations between the adaptive model’s current output and its previous-step output.The loss encourages smooth predictions unless substantial distributional drift is observed.
  • The test-time objective combines consistency loss and temporal smoothness loss with a balancing coefficient.This preserves short-term semantic consistency and long-term temporal stability under structural drift.

D. Overall Optimization Procedure

At each test timestamp, DGOTTA augments the incoming snapshot, generates and memory-smooths predictions, optimizes adaptation losses, and updates model momentum according to graph drift.

  • Each incoming snapshot receives temporal feature augmentation and time-window edge perturbation before prediction.These operations correspond to the framework’s two temporal-aware input transformations.
  • The adaptive model combines its prediction with a memory-weighted average, computes consistency and temporal losses, and updates parameters by gradient descent.The resulting prediction is also added to the memory bank for later timestamps.
  • After optimization, structural drift determines the exponential-moving-average coefficient used to blend the adapted parameters with the pretrained model.The memory bank is updated at the end of each iteration.
  • The procedure starts from a pretrained DGNN and an empty memory bank, then processes the graph stream sequentially over test timestamps.The algorithm takes graph snapshots and hyperparameters including K, ω, λtemp, αbase, γ, W, and pdrop.

A. Experiment Setting

Experiments use three real-world dynamic graph datasets, chronological evaluation, and multiple DGNN backbones to compare DGOTTA with TTA baselines. DGOTTA consistently achieves the strongest performance across datasets and architectures.

  • Datasets: Experiments use Reddit, Wikipedia, and MOOC, three real-world dynamic graph datasets from temporal graph learning benchmarks.
  • Data split: Each dataset uses a 10%/10%/80% chronological training, validation, and test split to evaluate adaptation on future graph dynamics.The split simulates online deployment with a long sequence of incoming test data.
  • Baselines: DGOTTA is compared with generic and graph-specific TTA baselines using the same backbone architecture and evaluation metric.Baselines include TENT, GTrans, SOGA, and MATCHA.
  • Main results: DGOTTA consistently achieves the best performance across all datasets and DGNN backbones under temporal and structural distribution shifts.Table II reports AUC scores across three benchmarks and four architectures.
  • Baseline behavior: Traditional and graph-specific baselines show limited or unstable adaptability, especially under severe temporal drift and across different datasets or backbones.MATCHA is less effective under severe temporal drifts, while some baselines fail with out-of-memory issues on Reddit.

C. Ablation Study

Ablation results show that temporal consistency, memory-based pseudo-labeling, temporal-aware augmentation, and drift-aware EMA each contribute to DGOTTA’s robustness. Combining all modules yields the strongest performance.

  • Component contributions: Adding temporal consistency provides modest but consistent improvements by enforcing prediction smoothness and reducing noisy updates.
  • Component contributions: Memory-bank pseudo-labeling produces substantial gains by stabilizing pseudo-labels through historical prediction aggregation.
  • Full model: Combining all components yields the best performance across datasets and backbones, indicating that the modules are complementary.
  • Component contributions: Temporal-aware augmentation improves performance by modeling temporal variations in node features and interaction structures.
  • Component contributions: Drift-aware EMA adapts the update rate to structural changes, helping preserve historical knowledge while mitigating catastrophic forgetting.
  • Interpretation: The ablation improvements are attributed to mitigating multiple temporal distribution shifts rather than generic regularization effects.

E. Parameter Analysis

Parameter sensitivity on Wikipedia examines memory size, interpolation, consistency, and EMA settings across architectures. The reported trends support a moderate memory size and overall robust hyperparameter design.

  • Analyzed parameters: The sensitivity analysis evaluates memory bank size K, interpolation factor ω, temporal consistency weight λ, and EMA update ratio α.
  • Memory size: For DyGFormer and GraphMixer, performance improves as memory size increases up to a peak around K = 200, after which GraphMixer drops sharply.
  • Overall trend: Consistent trends across architectures support the robustness of the selected hyperparameter design.

F. Efficiency Analysis

The efficiency analysis compares inference time and AUC per timestamp on Wikipedia with DyGFormer. DGOTTA achieves the strongest reported accuracy–efficiency trade-off.

  • Evaluation setup: The analysis compares average inference time per timestamp and AUC on Wikipedia using DyGFormer, with each method represented by an accuracy–efficiency point.
  • Method trade-offs: Low-latency methods such as DDGCL and IDOL show limited adaptation performance, whereas GTrans and SOGA improve performance with greater computational overhead.
  • DGOTTA trade-off: DGOTTA attains the highest AUC while maintaining competitive inference time per timestamp, outperforming existing methods in accuracy and runtime.
  • Practical implication: DGOTTA is reported as an effective and scalable solution for online adaptation in dynamic graph scenarios.
Loading 2608.27948v1…