[Paper Review] UniGraph: Learning a Unified Cross-Domain Foundation Model for Text-Attributed Graphs
UniGraph proposes a unified cross-domain foundation model for text-attributed graphs (TAGs) by combining large language models (LLMs) and graph neural networks (GNNs) with masked graph modeling (MGM) for self-supervised pre-training and graph instruction tuning for zero-shot transfer. It achieves state-of-the-art or superior performance across 11 diverse graph datasets spanning 5 domains, including a 111M-node graph, outperforming both specialized GNNs and general-purpose LLMs in zero-shot settings.
Foundation models like ChatGPT and GPT-4 have revolutionized artificial intelligence, exhibiting remarkable abilities to generalize across a wide array of tasks and applications beyond their initial training objectives. However, graph learning has predominantly focused on single-graph models, tailored to specific tasks or datasets, lacking the ability to transfer learned knowledge to different domains. This limitation stems from the inherent complexity and diversity of graph structures, along with the different feature and label spaces specific to graph data. In this paper, we recognize text as an effective unifying medium and employ Text-Attributed Graphs (TAGs) to leverage this potential. We present our UniGraph framework, designed to learn a foundation model for TAGs, which is capable of generalizing to unseen graphs and tasks across diverse domains. Unlike single-graph models that use pre-computed node features of varying dimensions as input, our approach leverages textual features for unifying node representations, even for graphs such as molecular graphs that do not naturally have textual features. We propose a novel cascaded architecture of Language Models (LMs) and Graph Neural Networks (GNNs) as backbone networks. Additionally, we propose the first pre-training algorithm specifically designed for large-scale self-supervised learning on TAGs, based on Masked Graph Modeling. We introduce graph instruction tuning using Large Language Models (LLMs) to enable zero-shot prediction ability. Our comprehensive experiments across various graph learning tasks and domains demonstrate the model's effectiveness in self-supervised representation learning on unseen graphs, few-shot in-context transfer, and zero-shot transfer, even surpassing or matching the performance of GNNs that have undergone supervised training on target datasets.
Motivation & Objective
- To address the lack of generalization in graph learning models, which are typically trained per single graph or domain, by developing a unified foundation model.
- To unify heterogeneous graph feature and label spaces across domains using natural language as a common representation medium.
- To enable zero-shot prediction on unseen graph tasks and classes through instruction tuning of LLMs with graph embeddings.
- To scale self-supervised pre-training on large, diverse text-attributed graphs using a cascaded LM-GNN architecture.
- To demonstrate cross-domain transfer performance that surpasses or matches supervised GNNs fine-tuned on target datasets.
Proposed method
- Utilizes Text-Attributed Graphs (TAGs) as input, where node features are natural language descriptions to unify heterogeneous feature spaces across domains.
- Employs a cascaded architecture of pre-trained LMs and GNNs, with LMs processing textual node features and GNNs capturing structural dependencies.
- Introduces a novel Masked Graph Modeling (MGM) objective for self-supervised pre-training, masking nodes, edges, or subgraphs and predicting them from context.
- Applies Personalized PageRank (PPR) sampling to extract local subgraphs, reducing structural variance across domains and improving scalability.
- Performs graph instruction tuning by concatenating pre-trained graph embeddings with natural language instructions, enabling zero-shot prediction via LLMs.
- Uses a universal prompt template to unify node-level, edge-level, and graph-level prediction tasks across different domains.
Experimental results
Research questions
- RQ1Can a single foundation model generalize across diverse graph domains with heterogeneous feature and label spaces?
- RQ2How effective is masked graph modeling (MGM) for self-supervised pre-training on large-scale text-attributed graphs?
- RQ3To what extent can graph instruction tuning enable zero-shot prediction on unseen graph tasks and classes?
- RQ4How does the cascaded LM-GNN architecture compare to standard GNNs in few-shot and zero-shot transfer settings?
- RQ5What is the impact of pre-training data diversity and model component selection (e.g., LMs, GNNs) on downstream performance?
Key findings
- UniGraph outperforms all baselines, including task-specific GNNs and multi-task pre-trained models like Prodigy and OFA, on node, edge, and graph-level tasks across 11 datasets from 5 domains.
- On the ogbn-Papers100M dataset (111M nodes), UniGraph achieves state-of-the-art performance in self-supervised representation learning without any fine-tuning.
- In zero-shot transfer, UniGraph significantly outperforms open-source LLMs like Llama2 and Vicuna, demonstrating effective alignment between graph embeddings and natural language.
- Ablation studies confirm that all components—MGM, latent loss, PPR sampling, and GNN—contribute significantly to performance, with PPR sampling improving generalization across domains.
- Larger LMs (e.g., DeBERTa-V3-base) and deeper GNNs improve performance, though with a trade-off in inference speed, indicating scalability is feasible with appropriate hardware.
- Training time and memory cost are comparable to standard LLM pre-training with MLM, showing that the LM component dominates computational cost, making the framework efficient for large-scale graphs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.