Table of Contents
Fetching ...

HGPROMPT: Bridging Homogeneous and Heterogeneous Graphs for Few-shot Prompt Learning

Xingtong Yu, Yuan Fang, Zemin Liu, Xinming Zhang

TL;DR

HGPrompt tackles the problem of few-shot prompt learning across both homogeneous and heterogeneous graphs by introducing a dual-template framework that unifies graph inputs and task formulations, and a dual-prompt mechanism that adapts to task-specific feature and heterogeneity demands. The graph template converts heterogeneous graphs into a set of homogeneous subgraphs, while the task template recasts multiple downstream tasks into a common subgraph similarity objective, enabling a shared pre-training signal via link prediction. Downstream, a feature prompt and a heterogeneity prompt tune a lightweight set of parameters to bridge feature and heterogeneity gaps without altering the frozen backbone, yielding strong performance on NC and GC with few labels. Across ACM, DBLP, and Freebase, HGPrompt and its heterogeneous pre-training variant HGPrompt+ consistently outperform baselines, demonstrating improved label efficiency and backbone-agnostic robustness with practical implications for cross-graph transfer learning.

Abstract

Graph neural networks (GNNs) and heterogeneous graph neural networks (HGNNs) are prominent techniques for homogeneous and heterogeneous graph representation learning, yet their performance in an end-to-end supervised framework greatly depends on the availability of task-specific supervision. To reduce the labeling cost, pre-training on self-supervised pretext tasks has become a popular paradigm,but there is often a gap between the pre-trained model and downstream tasks, stemming from the divergence in their objectives. To bridge the gap, prompt learning has risen as a promising direction especially in few-shot settings, without the need to fully fine-tune the pre-trained model. While there has been some early exploration of prompt-based learning on graphs, they primarily deal with homogeneous graphs, ignoring the heterogeneous graphs that are prevalent in downstream applications. In this paper, we propose HGPROMPT, a novel pre-training and prompting framework to unify not only pre-training and downstream tasks but also homogeneous and heterogeneous graphs via a dual-template design. Moreover, we propose dual-prompt in HGPROMPT to assist a downstream task in locating the most relevant prior to bridge the gaps caused by not only feature variations but also heterogeneity differences across tasks. Finally, we thoroughly evaluate and analyze HGPROMPT through extensive experiments on three public datasets.

HGPROMPT: Bridging Homogeneous and Heterogeneous Graphs for Few-shot Prompt Learning

TL;DR

HGPrompt tackles the problem of few-shot prompt learning across both homogeneous and heterogeneous graphs by introducing a dual-template framework that unifies graph inputs and task formulations, and a dual-prompt mechanism that adapts to task-specific feature and heterogeneity demands. The graph template converts heterogeneous graphs into a set of homogeneous subgraphs, while the task template recasts multiple downstream tasks into a common subgraph similarity objective, enabling a shared pre-training signal via link prediction. Downstream, a feature prompt and a heterogeneity prompt tune a lightweight set of parameters to bridge feature and heterogeneity gaps without altering the frozen backbone, yielding strong performance on NC and GC with few labels. Across ACM, DBLP, and Freebase, HGPrompt and its heterogeneous pre-training variant HGPrompt+ consistently outperform baselines, demonstrating improved label efficiency and backbone-agnostic robustness with practical implications for cross-graph transfer learning.

Abstract

Graph neural networks (GNNs) and heterogeneous graph neural networks (HGNNs) are prominent techniques for homogeneous and heterogeneous graph representation learning, yet their performance in an end-to-end supervised framework greatly depends on the availability of task-specific supervision. To reduce the labeling cost, pre-training on self-supervised pretext tasks has become a popular paradigm,but there is often a gap between the pre-trained model and downstream tasks, stemming from the divergence in their objectives. To bridge the gap, prompt learning has risen as a promising direction especially in few-shot settings, without the need to fully fine-tune the pre-trained model. While there has been some early exploration of prompt-based learning on graphs, they primarily deal with homogeneous graphs, ignoring the heterogeneous graphs that are prevalent in downstream applications. In this paper, we propose HGPROMPT, a novel pre-training and prompting framework to unify not only pre-training and downstream tasks but also homogeneous and heterogeneous graphs via a dual-template design. Moreover, we propose dual-prompt in HGPROMPT to assist a downstream task in locating the most relevant prior to bridge the gaps caused by not only feature variations but also heterogeneity differences across tasks. Finally, we thoroughly evaluate and analyze HGPROMPT through extensive experiments on three public datasets.
Paper Structure (13 sections, 8 equations, 3 figures, 4 tables)

This paper contains 13 sections, 8 equations, 3 figures, 4 tables.

Figures (3)

  • Figure 1: Illustration of HGPrompt. Black-and-white graphs are homogeneous; colored graphs are heterogeneous, where colors indicate different types of nodes.
  • Figure 2: Overall framework of HGPrompt. (a) Pre-training graphs can be either homogeneous or heterogeneous. (b) Pre-training task with link prediction on a homogeneous graph$^\ref{['footnote:pre-train']}$. (c) Downstream node classification and (d) graph classification on heterogeneous graphs. Black-and-white graphs are homogeneous; colored graphs are heterogeneous, where colors indicate different types of nodes.
  • Figure 3: Impact of shots on NC and GC tasks on ACM.