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

Introduction

In the landscape of modern artificial intelligence, foundation models like GPT-4 have revolutionized natural language processing by demonstrating remarkable generalization across diverse tasks. However, graph representation learning has largely remained confined to domain-specific models. A model trained on citation networks typically cannot be applied to molecular graphs or product co-purchasing networks without extensive retraining. UniGraph addresses this gap by proposing a unified foundation model for text-attributed graphs (TAGs), leveraging natural language as a universal interface to bridge disparate domains.

The Challenge: Feature and Label Divergence

The primary obstacles to a unified graph model are twofold:

  1. Feature Space Divergence: Different graphs utilize varying node feature dimensions (e.g., a social network's 128-dimensional vector vs. a chemical graph's 50-dimensional vector).
  2. Label Space Divergence: Classification tasks are often tied to fixed label sets. A model designed to categorize arXiv papers into 40 classes cannot natively predict molecular toxicity without structural modification.

UniGraph overcomes these by treating all node attributes and labels as text, allowing a single architecture to process any graph regardless of its origin.

Methodology: A Cascaded Architecture

UniGraph utilizes a cascaded backbone consisting of a Language Model (LM) and a Graph Neural Network (GNN). First, a pre-trained LM (such as DeBERTa) encodes raw text descriptions of nodes into semantic embeddings. Subsequently, a Graph Attention Network (GAT) propagates these embeddings across the graph's topology, enabling nodes to incorporate the semantic context of their neighbors.

The UniGraph pipeline: from self-supervised pre-training to few-shot learning and instruction tuning.

Self-Supervised Pre-training

The core of UniGraph's power lies in its Masked Graph Modeling (MGM) objective. During pre-training, the model masks words within a node's text description and attempts to reconstruct them. Crucially, the model must rely on the textual context of neighboring nodes to succeed. This process forces the GNN to learn the intricate relationship between graph structure and language semantics. To ensure stability, the authors employ a "latent loss" with a target network updated via Exponential Moving Average (EMA).

The Self-supervised Pre-training phase using Masked Graph Modeling (MGM).

Zero-Shot Generalization via Instruction Tuning

To handle unseen labels in a zero-shot manner, UniGraph connects its graph encoder to a Large Language Model (LLM) like Llama-2. Through Graph Instruction Tuning, the model receives a graph embedding alongside a natural language prompt (e.g., "Classify this molecule's toxicity"). The LLM then generates the label directly as text, effectively bypassing the need for domain-specific classification layers.

Experimental Results

The researchers evaluated UniGraph across 11 datasets spanning five domains: citation networks, product networks, web links, knowledge graphs, and molecules.

  • Cross-Domain Superiority: UniGraph pre-trained on citation data (using the 111-million-node ogbn-Papers100M dataset) consistently outperformed existing self-supervised methods like GraphMAE when tested on entirely different domains like products or molecules.
  • Outperforming Supervised Baselines: In several benchmarks, UniGraph's linear probing performance matched or exceeded fully supervised GCNs and GATs. For instance, on the Products dataset, UniGraph achieved ~80% accuracy, surpassing the ~79% of a supervised GAT.
  • Zero-Shot Performance: UniGraph-IT (Instruction Tuned) significantly outperformed general-purpose LLMs and specialized graph-LLM baselines like GraphGPT in zero-shot transfer tasks.

Insights and Limitations

UniGraph demonstrates that text is a powerful universal feature. Even for non-textual data like molecules, describing atomic properties in text allows for cross-domain knowledge transfer. The use of Personalized PageRank (PPR) for subgraph sampling further enhances transferability by identifying local structural patterns that are consistent across different graph types.

However, the model faces a "textualization tax." Converting complex graphs into high-quality text descriptions is computationally intensive and relies heavily on the quality of the input text. Furthermore, while UniGraph excels at cross-domain transfer, a slight performance gap remains compared to models trained specifically on the target domain, suggesting room for further refinement in narrowing the domain gap.

Conclusion

UniGraph represents a significant step toward a true foundation model for graphs. By unifying feature and label spaces through natural language and employing a massive self-supervised pre-training regimen, it achieves unprecedented zero-shot and few-shot capabilities across diverse graph domains.

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