Uni-GraphLLM: Unified Graph Large Language Model for Multi-Domain Multi-Task Graph Alignment Instruction Tuning

Haibo Chen, Xin Wang, Jiaheng Chao, Ling Feng, Wenwu ZhuNeurIPS 2026

TL;DR

Large Language Models (LLMs) are brilliant with text, and Graph Neural Networks (GNNs) excel at relational structures, yet combining them usually results in brittle, single-purpose models that cannot tell a molecule from a citation network. Uni-GraphLLM solves this by introducing a unified GNN-to-LLM alignment pipeline that translates diverse graphs—across completely different domains and task granularities—into universal "graph tokens" an LLM can naturally reason over. By pairing domain-aware contrastive pretraining with a dynamic, gradient-based curriculum, one single model can generalize across citation networks, knowledge graphs, and molecular structures simultaneously.

What Problem Does This Paper Address?

Look at Vision-Language Models: an image encoder turns pixels into visual tokens, projects them into an LLM’s embedding space, and suddenly the LLM can "see." Researchers apply this exact two-stage recipe to build Graph Language Models (GLMs), using GNNs as the encoder.

However, unlike images—which always share a uniform 2D grid of RGB pixels—graphs are wildly heterogeneous. A social network, a web hyperlink graph, and a chemical molecule have completely different topologies, feature distributions, and task scales (classifying a single node, an edge between two nodes, or an entire graph). Existing GNN-based GLMs are typically trained on one domain or task at a time. Trying to build a unified, multi-domain, multi-task GLM hits two major roadblocks:

  1. Unaligned, fragmented representations: Standard GNNs struggle to map wildly different graph domains and granularities into a single vector space that also carries natural-language meaning.
  2. Uneven alignment difficulty: Translating a text-heavy citation network into an LLM’s token space is much easier than translating a chemical structure. A static instruction-tuning schedule inevitably overfits the "easy" domains while underfitting the harder ones.

Methods

Uni-GraphLLM tackles these two hurdles sequentially through a clean, two-stage framework:

Figure 1: Overall framework of Uni-GraphLLM. Stage 1: Graph-Text Pair Pretraining. We construct large-scale graph-text pairs across multiple domains and tasks, encode each graph using a multi-scale GNN encoder to produce its task-required node-, edge-, or graph-level representation in a shared space, and train the encoder with a domain-aware reweighted contrastive objective that explicitly accounts for both inter-domain and intra-domain semantic differences. Stage 2: Curriculum Alignment Tuning. During instruction tuning, we estimate domain-level alignment difficulty online from per-domain gradient statistics and adaptively reweight the training objective to focus more on harder domains, leading to more balanced and effective alignment between GNN representations and the LLM.
  • Stage 1: Multi-Scale Graph-Text Pair Pretraining. First, the authors use an off-the-shelf LLM (Qwen3-8B) to summarize raw graph features and topology into natural language descriptions—creating a large, label-free dataset of (graph, text) pairs. Next, they build a multi-scale GNN (built on a standard GraphSAGE backbone) that concatenates local node/edge embeddings with global pooled graph context via MLPs, ensuring node-, edge-, and graph-level tasks all output vectors of the exact same shape and semantic space. Finally, while aligning graphs and text (via Sentence-BERT) using a CLIP-style contrastive loss is standard, the authors introduce Domain-Aware Reweighting ($\mathcal{L}_{\text{DR-CLIP}}$). By measuring distances between dataset centroids, the loss pushes cross-domain negative pairs apart aggressively while going easy on intra-domain negatives, preserving subtle local semantics without collapsing distinct domains together.
  • Stage 2: Curriculum Alignment Tuning. Once pretrained, both the GNN and the LLM backbone are frozen; only a lightweight projector layer is trained via next-token prediction to map graph vectors into LLM tokens. Instead of weighting all datasets equally, an online Difficulty Estimator measures the $L_2$ norm of the projector's gradients for each domain in a mini-batch (stabilized via a running-mean warmup followed by an Exponential Moving Average). Domains demanding larger gradient updates are deemed "harder" to align and dynamically receive higher loss weights via a temperature-scaled softmax scheduler.

Datasets

Rather than introducing a new benchmark, the authors assemble an eight-dataset evaluation suite spanning three task granularities and multiple domains—crucially constructing an unannotated (graph, text) pretraining corpus across all of them using LLM-generated summaries:

  • Node-level: Citation networks (Cora, PubMed, Arxiv) and a web hyperlink network (Wiki-CS).
  • Edge-level: Knowledge graphs (WN18RR and FB15K237, evaluated using 10-way candidate sampling so relation lists fit cleanly into prompts).
  • Graph-level: Molecular property datasets (ChemHIV and ChemPCBA).

Key Insights and Ideas

  • Gradients beat raw loss as a difficulty compass: You might assume high training loss indicates a "hard" domain. Yet when the authors swapped gradient norms for raw loss in their curriculum scheduler, average accuracy across five representative datasets dropped from 82.37% to 80.58%. Because only the projector is unfrozen, its gradient norm directly captures how hard the mapping layer is working to bridge the modality gap right now, unaffected by inherent task entropy.
  • Not all contrastive negatives are created equal: Treating two papers from Arxiv as just as dissimilar as a paper and a ChemHIV molecule warps the embedding space. Scaling contrastive penalties by inter-domain distance gives the GNN clean macro-separation across domains without destroying micro-structure within them.
  • Zero-shot task leaps actually work: Because node, edge, and graph representations live in a shared, text-aligned space, teaching the projector to talk to the LLM using only node classification data allows it to immediately solve edge classification on unseen knowledge graphs.

Key Results

Across all evaluations, Uni-GraphLLM consistently outperforms pure LLMs and state-of-the-art GLMs (GraphGPT, LLaGA, GOFA, and TEA-GLM):

Table 1: Performance comparison of different methods on node classification, edge classification, and graph classification tasks under multi-domain and multi-task learning. The highest result is bold, and the second highest result is underlined.
  • Multi-domain, multi-task mastery: Trained jointly across all eight datasets (with a Vicuna-7B backbone), Uni-GraphLLM hits an 81.95% average score, beating the strongest baseline (TEA-GLM at 75.22%) by 6.73 percentage points and taking first place on every single dataset.
  • True zero-shot transfer: When instruction-tuned exclusively on Arxiv (node-level), Uni-GraphLLM transfers zero-shot to other node domains (PubMed: 77.31% vs. GOFA’s 51.14%) and leaps across tasks to edge-level knowledge graphs—scoring 55.27% on FB15K237, where baselines top out at 16.93%.
  • Backbone upgrades: Swapping Vicuna-7B for Qwen3-8B pushes the overall multi-task average even higher to 84.10%, proving the alignment recipe isn't overfitted to one LLM family.

Limitations and Future Work

The authors candidly note that Uni-GraphLLM currently focuses on conventional classification tasks (node, edge, and graph) across a moderate collection of eight datasets, leaving open-ended, multi-step structural graph reasoning unexplored. It also carries a heavier inference memory footprint than lighter baselines like TEA-GLM (peaking between 21.9 GB and 50.1 GB depending on graph size), a trade-off made for substantially stronger generalization. Future work aims to scale the label-free pretraining corpus to much larger, wilder graph-text collections and systematically study how that scale unlocks complex downstream reasoning.

Summary updated

Abstract

Leveraging Graph Neural Networks (GNNs) as graph encoders and aligning the resulting representations with Large Language Models (LLMs) through alignment instruction tuning has become a mainstream paradigm for constructing Graph Language Models (GLMs), combining the generalization ability of LLMs with the structural modeling capacity of GNNs. However, existing GLMs that adopt GNNs as graph encoders largely overlook the problem of aligning GNN-encoded representations across domains and tasks with the LLM token space to obtain unified graph tokens, thereby limiting their ability to generalize across diverse graph data. To bridge this gap, we aim to incorporate a multi-domain, multi-task GNN encoder into GLMs and align its representations with LLMs to enable multi-domain, multi-task graph alignment instruction tuning. This alignment problem remains underexplored and poses two key challenges: 1) learning GNN-encoded representations that are simultaneously generalizable across domains and tasks and well aligned with textual semantics is difficult, due to substantial variations in graph structures, feature distributions, and supervision signals, together with the lack of textual-semantic alignment guidance in task-specific GNN training; 2) diverse graph data and task-specific instructions can exhibit different degrees of compatibility with the LLM token space during instruction tuning, leading to varying alignment difficulty and rendering a fixed alignment strategy suboptimal. To tackle these challenges, we propose Uni-GraphLLM, a Unified Graph Large Language Model that incorporates a multi-domain, multi-task GNN encoder to learn generalizable graph representations aligned with textual semantics, and then adaptively aligns these representations with the LLM. Specifically, we first develop a graph-text pair pretraining strategy with a tailored GNN encoder, trained on large-scale graph-text data spanning multiple domains and tasks to obtain generalizable representations naturally aligned with textual semantics. We further design a curriculum alignment tuning strategy that adaptively adjusts the alignment process by accounting for varying alignment difficulty across diverse graph data. Extensive experiments demonstrate that Uni-GraphLLM consistently outperforms state-of-the-art baselines across graph datasets from different domains and tasks. Our code is available at https://github.com/haibo12/Uni-GraphLLM.
BibTeX
@inproceedings{chen2026uni,
  author = {Haibo Chen and Xin Wang and Jiaheng Chao and Ling Feng and Wenwu Zhu},
  title = {{Uni-GraphLLM: Unified Graph Large Language Model for Multi-Domain Multi-Task Graph Alignment Instruction Tuning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=uKvHBTwC3D},
}
Figure