NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

UniGraph: Learning a Unified Cross-Domain Foundation Model for Text-Attributed Graphs

Yufei He, Yuan Sui, Xiaoxin He, Bryan Hooi

TL;DR

UniGraph is a cross-domain foundation model for Text-Attributed Graphs (TAGs) that uses natural language as a universal interface to bridge diverse graph domains and tasks. By combining Language Models (LMs) with Graph Neural Networks (GNNs) through a novel self-supervised pre-training and instruction-tuning framework, it achieves state-of-the-art performance in zero-shot and few-shot transfer across domains ranging from citation networks to molecular structures.

What Problem Does This Paper Address?

In the world of AI, foundation models like GPT-4 have mastered generalization across text-based tasks. However, graph learning has remained largely stuck in a "single-graph" paradigm. Most Graph Neural Networks (GNNs) are tailored to specific datasets and fail when moved to new domains.

The authors identify two primary hurdles to a "Graph Foundation Model":

  1. Feature and Label Incompatibility: A citation network uses paper abstracts as features, while a molecular graph might use atom types. Their feature dimensions and label spaces (e.g., "subject area" vs. "toxicity") are fundamentally incompatible.
  2. Structural Diversity: Different domains exhibit vastly different structural patterns (e.g., directed acyclic citation links vs. intricate molecular cliques), making it hard for models to transfer structural knowledge.

Methods

UniGraph tackles these challenges by using text as a unifying medium. By representing node and edge attributes as natural language, the model can process any graph through a consistent interface.

Key components of the framework include:

  • Cascaded Backbone: The model uses a pre-trained LM (like DeBERTa) to encode raw text into embeddings, which are then processed by a GNN (like GAT) to capture structural relationships.
  • Graph Siamese Masked Autoencoders (GSMAE): This is a novel self-supervised pre-training algorithm. It randomly masks the text of nodes and tasks the model with reconstructing that text using the information from its neighbors. This forces the model to learn how graph structure and textual semantics are intertwined.
  • Graph Instruction Tuning: To enable zero-shot capabilities, the authors connect the pre-trained graph encoder to a Large Language Model (LLM) like Llama-2 via a linear projector. They then fine-tune the LLM using natural language instructions (e.g., "Which category should this paper be classified as?"), allowing the model to map graph embeddings to arbitrary natural language labels.
  • Scalable Sampling: They employ Personalized PageRank (PPR) to sample structurally relevant subgraphs, ensuring the model can scale to massive graphs like ogbn-Papers100M.
Figure 1: Overview of UniGraph framework. 1) In pre-training, we employ a self-supervised approach, leveraging TAGs to unify diverse graph data. This phase involves a cascaded architecture combining LMs and GNNs. We propose Graph Siamese Masked Autoencoders as the training architecture, which learns to reconstruct the masked text of each node using the text of its neighbors. 2) In few-shot transfer, the pre-trained model can make predictions with minimal data by comparing the embeddings of the query and support graphs. 3) Zero-shot transfer is achieved through graph instruction tuning with LLMs, enabling it to understand category labels in natural language and make predictions on unseen graphs without any graph-specific training.

Datasets

The authors evaluated UniGraph on 11 datasets across 5 distinct domains:

  • Citation Networks: Cora, PubMed, ogbn-Arxiv, and the massive ogbn-Papers100M (111 million nodes).
  • Product Networks: ogbn-Products (Amazon co-purchasing).
  • Web Links: Wiki-CS.
  • Knowledge Graphs: FB15K237, WN18RR.
  • Molecular Graphs: PCBA, HIV, ChEMBL (where atom/bond properties were converted into textual descriptions).

Key Insights and Ideas

  • Text is the Universal Interface: Natural language provides a consistent way to encode features across domains. Even for non-textual data like molecules, describing properties in text allows a single model to "understand" the data.
  • End-to-End is Essential: Unlike previous methods that used frozen LM features, UniGraph's cascaded architecture allows the LM and GNN to be optimized together, leading to much richer representations.
  • Instruction Tuning Bridges the Gap: By teaching an LLM to interpret graph embeddings through natural language prompts, UniGraph can perform tasks on entirely unseen label spaces without any task-specific training.
  • Structural Invariance: The model demonstrates that certain local structural patterns are indeed transferable across domains when contextualized with semantic text.

Key Results

UniGraph shows remarkable generalization capabilities:

  • Self-Supervised Learning: In cross-domain settings (pre-trained on one domain, tested on others), UniGraph consistently outperformed state-of-the-art graph SSL methods and even matched or beat supervised GNNs trained directly on the target data.
  • Zero-Shot Transfer: UniGraph-IT (Instruction Tuned) significantly outperformed general-purpose LLMs and other graph-specific zero-shot baselines. For example, on the Cora dataset, it achieved nearly 90% accuracy in a 2-way zero-shot task.
  • Scalability: The model successfully pre-trained on the 111-million-node Papers100M dataset, proving its viability for real-world, large-scale applications.
Comparison of UniGraph against various baselines across node, edge, and graph classification tasks.

Limitations and Future Work

  • The In-Domain Gap: While UniGraph excels at cross-domain transfer, models trained specifically on a single domain ("UniGraph-single") still perform slightly better, suggesting there is still room to improve how we learn universal graph invariances.
  • Computational Cost: The use of LMs in the backbone makes pre-training computationally expensive compared to pure GNNs, though the authors note that inference time remains competitive.
  • Future Directions: The authors suggest exploring even larger LMs and expanding the framework to handle more complex graph types, such as heterogeneous graphs with multiple node and edge types.

Summary updated

BibTeX
@inproceedings{he2025unigraph,
  author = {Yufei He and Yuan Sui and Xiaoxin He and Bryan Hooi},
  title = {{UniGraph: Learning a Unified Cross-Domain Foundation Model for Text-Attributed Graphs}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2025},
  doi = {10.1145/3690624.3709277},
}
Figure