GP2F: Cross-Domain Graph Prompting with Adaptive Fusion of Pre-trained Graph Neural Networks
Abstract
Graph Prompt Learning (GPL) has recently emerged as a promising paradigm for downstream adaptation of pre-trained graph models, mitigating the misalignment between pre-training objectives and downstream tasks. Recently, the focus of GPL has shifted from in-domain to cross-domain scenarios, which is closer to the real world applications, where the pre-training source and downstream target often differ substantially in data distribution. However, why GPLs remain effective under such domain shifts is still unexplored. Empirically, we observe that representative GPL methods are competitive with two simple baselines in cross-domain settings: full fine-tuning (FT) and linear probing (LP), motivating us to explore a deeper understanding of the prompting mechanism. We provide a theoretical analysis demonstrating that jointly leveraging these two complementary branches yields a smaller estimation error than using either branch alone, formally proving that cross-domain GPL benefits from the integration between pre-trained knowledge and task-specific adaptation. Based on this insight, we propose GP2F, a dual-branch GPL method that explicitly instantiates the two extremes: (1) a frozen branch that retains pre-trained knowledge, and (2) an adapted branch with lightweight adapters for task-specific adaptation. We then perform adaptive fusion under topology constraints via a contrastive loss and a topology-consistent loss. Extensive experiments on cross-domain few-shot node and graph classification demonstrate that our method outperforms existing methods.
Lay Summary
Graph Neural Networks are increasingly used to learn from data such as social networks, molecules, citation networks, and biological systems. A common strategy is to first train a model on one graph dataset and then adapt it to a new task, but in real applications the new graph may look very different from the data used during pre-training. This raises an important question: why can graph prompt learning still work well when the source and target graphs come from different domains? In this work, we study this question both empirically and theoretically. We find that successful graph prompt learning can be understood as a balance between two abilities: preserving useful knowledge learned during pre-training and adapting to the specific target task. Our theory shows that combining these two sources of information can reduce prediction error compared with relying on either one alone. Based on this insight, we design GP2F, a method with two branches: one keeps the pre-trained model fixed, while the other makes lightweight task-specific changes. GP2F then learns how to fuse these branches while respecting the graph structure. Experiments on few-shot node and graph classification show that this design improves performance across different domains.