PromptDyG: Test-Time Prompt Adaptation on Dynamic Graphs
Abstract
Activities in numerous evolving systems can be represented as dynamic graphs in snapshot form at different time intervals, i.e., discrete-time dynamic graphs (DTDGs). Existing methods show impressive advances in capturing historical temporal evolution patterns in DTDGs, but they focus on addressing an offline learning setting, where models are trained using historical snapshots once and then evaluated to all subsequent graph snapshots without further updating. This fails to capture 1) the nature of evolving complexities across graph snapshots and 2) the distribution shift in the testing graph snapshots. To address these problems, we propose PromptDyG, a novel framework that leverages unsupervised test-time Prompt adaptation for Dynamic Graph learning under a live-update online setting. The key insight is that an expressive dynamic graph prompt can be learned on a frozen backbone via minimization of feature-wise, label-free entropy to efficiently and continuously model the evolving patterns. We show theoretically that this unsupervised prompt adaptation can guarantee a larger similarity margin between positive and negative pairs, facilitating more accurate dynamic predictions. It is further confirmed by our extensive empirical results on six benchmark datasets that show consistent and significant improvements of PromptDyG over state-of-the-art baselines. Code is available at https://github.com/mala-lab/PromptDyG.
Lay Summary
Many real-world systems, such as social networks, traffic systems, and financial transactions, change over time and can be represented as a series of graph snapshots at different time intervals. Existing models usually learn from historical snapshots once and then make predictions on all future snapshots without further updating, failing to capture the evolving complexities across graph snapshots and the distribution shift in test snapshots. To address these problems, we propose PromptDyG, a new approach that continuously learns from new snapshots in a live-update manner. By adding a test-time adaptable prompt to a fixed backbone, PromptDyG efficiently handles structural shifts in dynamic graphs and continuously models evolving patterns. Both theoretical analysis and extensive experiments demonstrate that PromptDyG consistently improves prediction performance, making dynamic graph learning more practical for evolving real-world systems.