GLIP: Graph and LLM Joint Pretraining for Graph-Level Tasks

Haoxin Sun, Yiqing Lin, Yajun Huang, Chenhui Dong, Mingjun Li, Zhongzhi ZhangarXiv 2026

TL;DR

GLIP (Graph–LLM JoInt Pretraining) is a novel self-supervised framework that jointly pretrains graph neural networks and large language models (LLMs) specifically for graph-level tasks. By combining an intelligent patch-selection strategy with a diffusion-based projector, GLIP enables LLMs to reason over both local substructures and global graph context, significantly outperforming state-of-the-art methods in data-scarce and few-shot scenarios.

What Problem Does This Paper Address?

While combining Graph Neural Networks (GNNs) and Large Language Models (LLMs) has recently gained traction, most existing approaches focus heavily on node- or edge-level tasks (e.g., predicting node categories or missing links). Graph-level tasks—such as classifying entire molecules for toxicity or detecting fraudulent groups in financial networks—remain severely underexplored.

Graph-level analysis is inherently challenging because it requires a model to understand both the "forest" (global topology) and the "trees" (critical local subgraphs). Furthermore, existing graph-LLM frameworks typically rely on abundant labeled data for supervised fine-tuning, which is expensive and impractical in real-world domains. While self-supervised graph pretraining exists, classical methods leave the LLM completely out of the pretraining loop, leading to a severe misalignment between graph representations and the LLM's text embedding space.

Methods

GLIP introduces a two-stage pipeline: a label-free, self-supervised joint pretraining stage followed by task-specific fine-tuning with limited labeled data.

Figure 1: The overall framework of Glip.

The architecture consists of three core components:

  1. Graph Augmentation and Patch Selection: To feed a graph into an LLM under a strict token budget, GLIP represents each graph using a single global token and multiple local tokens. To find the most informative local subgraphs (patches), the authors formulate an NP-hard optimization problem that balances structural coverage and feature diversity. They solve this efficiently using a greedy algorithm with provable submodular approximation guarantees.
  2. Global and Local Diffusion Projection: Global graph features are processed via a standard GNN and pooled into a global token. For local patches, GLIP introduces a diffusion operator $(I + \alpha L)^{-1}X$ (where $L$ is the graph Laplacian). This acts as a low-pass filter, injecting long-range structural context into local patches before they are encoded by the GNN, ensuring the LLM understands how local pieces fit into the larger picture.
  3. LLM-Based Semantic Discrimination: Instead of keeping the LLM passive, GLIP involves a frozen LLM (like Mistral-7B or Qwen2.5-7B) directly in the pretraining loop. The LLM is given a prompt ("Are these two graphs from the same original graph?") along with the projected graph tokens. The model is optimized using a joint loss: an LLM cross-entropy prediction loss ($L_{LLM}$) combined with a traditional contrastive alignment loss ($L_{contrast}$).

Datasets

The authors evaluated GLIP across seven diverse datasets spanning two distinct graph types:

  • Feature-based graphs: MUTAG (molecular), PROTEINS (bioinformatics), REDDIT-BINARY, and IMDB-BINARY (social networks).
  • Text-attributed graphs (TAGs): BBBP (Blood-Brain Barrier Penetration), BACE (biomedical), and E-Commerce (an industrial dataset tracking risky seller groups on TikTok Shop).

Key Insights and Ideas

  • LLMs as Zero-Shot Semantic Supervisors: Rather than just aligning graph embeddings to text embeddings post-hoc, GLIP uses the LLM's native text-generation capability to judge graph similarity during pretraining. This forces the graph encoder to organize tokens in a way that directly elicits the LLM's reasoning behaviors.
  • The Power of Submodularity in Graph Tokenization: Randomly selecting graph patches or relying purely on structural heuristics (like node degree) yields suboptimal results. Treating patch selection as a submodular optimization problem ensures that the selected tokens cover the maximum amount of unique structural and feature space.
  • Diffusion Bridges the Local-Global Gap: Independent local patches lack global awareness. By passing patch features through an analytical diffusion process prior to GNN encoding, local tokens carry implicit global context, preventing the LLM from losing structural coherence.

Key Results

GLIP consistently outperformed both classical graph pretraining methods (e.g., GraphMAE, GraphCL) and state-of-the-art Graph-LLM frameworks (e.g., LLaGA, GraphGPT, TEA-GLM):

  • Semi-Supervised Classification: With only 5% of labeled data available for training, GLIP-Mistral achieved an average accuracy of 72.94% on feature graphs and 76.67% on text-attributed graphs, outperforming competing pipelines by up to 10 percentage points.
  • Few-Shot Robustness: In extreme 5-shot and 3-shot settings, GLIP retained its performance edge. For instance, GLIP-Qwen achieved 74.85% accuracy on BBBP and 77.04% on E-Commerce in the 5-shot regime.
  • Graph Reasoning: When tested on complex graph-level explanation and risk-analysis tasks on the E-Commerce dataset, incorporating GLIP tokens into a frozen Mistral-7B model dramatically reduced hallucinations and improved structural consistency, approaching the analytical reliability of GPT-4o.
Figure 3: Case Study: Comparative Responses of GPT-4o and Mistral-7B with and without Graph Tokens from GLIP.

Limitations and Future Work

The authors explicitly note that GLIP is strictly tailored for graph-level tasks; they did not experiment with node-level or edge-level settings, as the patch selection and diffusion modules are designed to capture holistic graph semantics rather than fine-grained local predictions.

As for future directions, the authors plan to extend GLIP's joint pretraining strategy to more complex graph structures, including heterogeneous graphs, symbolic graphs, and dynamic relational systems where graph topologies evolve over time.

Summary updated

Abstract

Graphs are widely used to model relational systems, with applications in domains such as social networks, finance, and biomedicine. Graph neural networks (GNNs) have become a mainstream approach for learning graph representations. With the rise of large language models (LLMs), recent studies have attempted to combine GNNs with LLMs. However, most existing works concentrate on node-level and edge-level tasks, while graph-level tasks, which require capturing more complex structural and feature information, remain relatively underexplored. Moreover, graph pretraining is a widely adopted strategy to alleviate the challenge of label scarcity. Most existing approaches are designed solely for GNNs such as GraphCL, leaving LLMs uninvolved in the process. To address these limitations, we propose GLIP, a Graph-LLM JoInt Pretraining framework for graph-level tasks. GLIP first performs graph augmentation to construct positive and negative pairs and introduces a multi-token selection strategy to identify patches informative in both structure and features. It further leverages a diffusion-based projector to enrich them with contextual information, enabling GLIP to capture signals from both global and local perspectives. Finally, GLIP employs a joint objective that integrates the LLM's semantic judgments with a contrastive alignment loss, ensuring consistent supervision at both the semantic and structural levels. After pretraining, GLIP is fine-tuned with limited labeled data for downstream tasks, and extensive experiments show that it outperforms state-of-the-art methods on graph-level classification and reasoning tasks. Our source code is publicly available at https://anonymous.4open.science/r/GLIP.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Feature Graphs average (MUTAG, PROTEINS, REDDIT, IMDB)GLIP-MistralAccuracy72.94%split: test
Source quote
L354: 72.94
Feature Graphs average (MUTAG, PROTEINS, REDDIT, IMDB)TEA-GLM-MistralAccuracy71.17%split: test
Source quote
L332: 71.17
Text-Attributed Graphs average (BBBP, BACE, E-Com)GLIP-MistralAccuracy76.67%split: test
Source quote
L358: 76.67
Text-Attributed Graphs average (BBBP, BACE, E-Com)TEA-GLM-MistralAccuracy73.97%split: test
Source quote
L336: 73.97
E-Com graph reasoning (GPT-4o outputs as references)GLIP-Mistral (LLM frozen)BERTScore F182.11params=7B
Source quote
L444: 82.11
E-Com graph reasoning (GPT-4o outputs as references)GLIP-Mistral (LLM frozen)ROUGE-L59.78params=7B
Source quote
L451: 59.78
BibTeX
@misc{sun2026glip,
  author = {Haoxin Sun and Yiqing Lin and Yajun Huang and Chenhui Dong and Mingjun Li and Zhongzhi Zhang},
  title = {{GLIP: Graph and LLM Joint Pretraining for Graph-Level Tasks}},
  year = {2026},
  eprint = {2606.29773},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.29773},
}
Figure