Unsupervised Prompting for Graph Neural Networks
Peyman Baghershahi, Sourav Medya
TL;DR
This work addresses GNN generalization under covariate shift without any labeled data by introducing Ugpp, a problem setting where a pre-trained GNN remains frozen and a prompting function is learned solely from unlabeled target data. It introduces UGPrompt, which combines consistency-based prompting with pseudo-labeling and two regularizers (diversity and domain adaptation) to align prompted graphs with source knowledge and mitigate distribution shift. Across graph and node classification benchmarks, UGPrompt often outperforms state-of-the-art prompting methods that rely on labeled data, demonstrating strong unsupervised generalization and robustness. The approach enables leveraging large unlabeled datasets and offers a scalable, task-agnostic framework for prompting frozen GNNs in diverse graph domains.
Abstract
Prompt tuning methods for Graph Neural Networks (GNNs) have become popular to address the semantic gap between pre-training and fine-tuning steps. However, existing GNN prompting methods rely on labeled data and involve lightweight fine-tuning for downstream tasks. Meanwhile, in-context learning methods for Large Language Models (LLMs) have shown promising performance with no parameter updating and no or minimal labeled data. Inspired by these approaches, in this work, we first introduce a challenging problem setup to evaluate GNN prompting methods. This setup encourages a prompting function to enhance a pre-trained GNN's generalization to a target dataset under covariate shift without updating the GNN's parameters and with no labeled data. Next, we propose a fully unsupervised prompting method based on consistency regularization through pseudo-labeling. We use two regularization techniques to align the prompted graphs' distribution with the original data and reduce biased predictions. Through extensive experiments under our problem setting, we demonstrate that our unsupervised approach outperforms the state-of-the-art prompting methods that have access to labels.
