RAGraph: A General Retrieval-Augmented Graph Learning Framework
Xinke Jiang, Rihong Qiu, Yongxin Xu, Wentao Zhang, Yichen Zhu, Ruizhe Zhang, Yuchen Fang, Xu Chu, Junfeng Zhao, Yasha Wang
TL;DR
RAGraph addresses the generalization gap of Graph Neural Networks by introducing a Retrieval-Augmented Graph Learning framework that imports external toy-graph knowledge via a dynamic key-value library. It builds a toy-graph vector base from a resource graph, retrieves top-k toy graphs by a multi-faceted similarity function, and propagates their hidden embeddings and task-specific outputs into a pre-trained GNN through intra- and inter-propagation prompts. The approach yields tuning-free improvements across node, edge, and graph tasks on static and dynamic datasets, outperforming state-of-the-art baselines and showing robustness to unseen data, especially with noise-based prompt tuning. This work broadens the applicability of RAG to structured graph data, offering a plug-and-play paradigm for enhancing generalization in Large Graph Models with potential impact on cross-domain graph learning and knowledge integration.
Abstract
Graph Neural Networks (GNNs) have become essential in interpreting relational data across various domains, yet, they often struggle to generalize to unseen graph data that differs markedly from training instances. In this paper, we introduce a novel framework called General Retrieval-Augmented Graph Learning (RAGraph), which brings external graph data into the general graph foundation model to improve model generalization on unseen scenarios. On the top of our framework is a toy graph vector library that we established, which captures key attributes, such as features and task-specific label information. During inference, the RAGraph adeptly retrieves similar toy graphs based on key similarities in downstream tasks, integrating the retrieved data to enrich the learning context via the message-passing prompting mechanism. Our extensive experimental evaluations demonstrate that RAGraph significantly outperforms state-of-the-art graph learning methods in multiple tasks such as node classification, link prediction, and graph classification across both dynamic and static datasets. Furthermore, extensive testing confirms that RAGraph consistently maintains high performance without the need for task-specific fine-tuning, highlighting its adaptability, robustness, and broad applicability.
