Joint task and distribution generalization via graph substructure prompting
摘要
Driven by the remarkable task-level generalization ability of large language models, an emerging trend of graph learning is to enable fast adaptation to new tasks with limited annotations, and has found applications across a spectrum of domains. Graph meta-learning and graph prompting techniques have demonstrated potential in task generalization by transferring knowledge acquired from prior experiences to new tasks. However, these methods often overlook distribution shifts between training and testing data in real-world scenarios. To fill this gap, we delve into a novel and practical challenge, namely joint task and distribution generalization. Motivated by recent studies that explicitly identifying key substructures related to task prediction can help generalization, we introduce a refiner module to highlight key substructures robust to distribution shifts. To efficiently adapt the refiner to new tasks, we introduce a few extra parameters as prompt vectors to instruct its behavior. Specifically, we employ a global prompt to acquire universal knowledge and task-specific prompts to capture task-relevant information. We pretrain model parameters on known tasks, and efficiently adapt to a target task by merely learning a corresponding classifier and task-specific prompt. Extensive experiments in task generalization show that, the proposed Graph Substructure Prompting (GSP) significantly outperforms recent state-of-the-art (SOTA) methods on both in-distribution (ID) and out-of-distribution (OOD) data, instead of a trade-off between them. GSP also enjoys comparable or even less computational cost as compared to baselines.