Graph Neural Networks (GNNs) are powerful in learning semantics of graph data. Recently, a new paradigm "pre-train, prompt" has shown promising results in adapting GNNs to various tasks with less supervised data. The success of such paradigm can be attributed to the more consistent objectives of pre-training and task-oriented prompt tuning, where the pre-trained knowledge can be effectively transferred to downstream tasks. However, an overlooked issue of existing studies is that the structure information of graph is usually exploited during pre-training for learning node representations, while neglected in the prompt tuning stage for learning task-specific parameters. To bridge this gap, we propose a novel structure-based prompting method for GNNs, namely SAP, which consistently exploits structure information in both pre-training and prompt tuning stages. In particular, SAP 1) employs a dual-view contrastive learning to align the latent semantic spaces of node attributes and graph structure, and 2) incorporates structure information in prompted graph to elicit more pre-trained knowledge in prompt tuning. We conduct extensive experiments on node classification and graph classification tasks to show the effectiveness of SAP. Moreover, we show that SAP can lead to better performance in more challenging few-shot scenarios on both homophilous and heterophilous graphs.
翻译:图神经网络(GNN)在挖掘图数据语义方面具有强大能力。近年来,"预训练-提示"这一新范式在利用较少标注数据将GNN适配到各类任务中展现出显著成效。该范式的成功可归因于更一致的预训练目标与任务导向的提示调优——预训练知识可有效迁移至下游任务。然而,现有研究普遍忽视了一个问题:图的结构信息通常在预训练阶段被用于学习节点表征,却在提示调优阶段学习任务特定参数时被忽略。为弥补这一不足,我们提出了一种新颖的基于结构的图神经网络提示方法SAP,该方法在预训练与提示调优阶段一致性地利用结构信息。具体而言,SAP通过以下两点实现:1)采用双视角对比学习对齐节点属性与图结构的潜在语义空间;2)在提示图中融入结构信息以在提示调优阶段激发更多预训练知识。我们在节点分类和图分类任务上进行了大量实验,验证了SAP的有效性。此外,我们证明在同质图与异质图的更具挑战性的小样本场景中,SAP能够取得更优性能。