GFMate: Empowering Graph Foundation Models with Test-time Prompt Tuning
Abstract
Graph prompt tuning has shown great potential in graph learning by introducing trainable prompts to enhance the model performance in conventional single-domain scenarios. Recent research has extended graph prompts to improve Graph Foundation Models (GFMs) by few-shot tuning auxiliary prompts. Despite their progress, most existing methods embed source-domain information into prompts, which serve either as input to GFMs or encoded during model pre-training. Such prompt entanglement with specific source domains and GFM pre-training strategy restricts their generalisability to other domains and different GFMs. Furthermore, existing GFM prompts merely rely on few-shot tuning for adaptation, neglecting the rich information in unlabelled target domain test data. Motivated by these insights, this paper aims to empower GFMs with pre-training-agnostic test-time graph prompt tuning, named GFMate. GFMate introduces centroid and layer prompts applied after pre-training on target domains, avoiding entanglement with specific source domains and model pre-training. In addition, a test-time complementary learning objective is devised to exploit both labelled and unlabelled target domain data for effective test-time prompt tuning. Extensive experiments on 12 benchmark datasets demonstrate the superior performance and efficiency of GFMate, achieving improvements of up to 30.63%. Code is available at https://github.com/YanJiangJerry/GFMate.
Lay Summary
Many real-world data can be represented as graphs, such as social networks, citation networks, and product networks. Graph Foundation Models (GFMs) aim to transfer knowledge from previously seen graphs to unseen target domains, but existing graph prompt tuning methods often entangle prompts with specific source domains and pre-training strategies. This limits their generalisability to other domains and different GFMs. Existing methods also mainly rely on a few labelled examples, while neglecting rich information from unlabelled target-domain test data. This paper proposes GFMate, a test-time graph prompt tuning framework for GFMs. GFMate introduces centroid and layer prompts after pre-training, avoiding entanglement with source domains and specific pre-training strategies. It also uses a test-time complementary learning objective to exploit both labelled and unlabelled target-domain data. Experiments across 12 benchmark datasets show that GFMate improves both performance and efficiency, achieving gains of up to 30.63%.