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

GL-Fusion: Rethinking the Combination of Graph Neural Network and Large Language model

Haotong Yang, Xiyuan Wang, Qian Tao, Shuxian Hu, Zhouchen Lin, Muhan Zhang · Submission to ICLR 2026 · Rejected

TL;DR

GL-Fusion bridges Graph Neural Networks (GNNs) and Large Language Models (LLMs) into a unified, deeply coupled architecture rather than chaining them as separate pipelines. By integrating graph message passing directly into transformer attention layers, accessing uncompressed node texts via cross-attention, and deploying a dual GNN/LLM prediction head, the model achieves state-of-the-art results on challenging benchmarks like ogbn-arxiv and ogbg-code2.

What Problem Does This Paper Address?

Text-attributed graphs (TAGs)—such as citation networks, knowledge graphs, and source-code abstract syntax trees—combine rich natural language with structural relationships. Existing methods typically fall into two extremes:

  1. GNN-centered models: Use LLMs as feature extractors to compress node/edge text into static, fixed-size vectors before running GNN message passing. This compression loses fine-grained semantics and restricts models to classification/regression, preventing free-form text generation.
  2. LLM-centered models: Linearize graph structures into text tokens (e.g., edge lists). These struggle to capture complex graph topology, blow up token context limits, and suffer from inefficient, noisy autoregressive training.

GL-Fusion addresses this dilemma by designing an architecture where graph message passing and transformer self-attention coexist in the same layers, allowing seamless two-way information flow between graph topology and natural language text.

Methods

GL-Fusion builds on a pretrained backbone (Llama-3-8B) and introduces three core components:

  • Structure-Aware Transformer Layers:
  • Permutation-Invariant Causal Attention: Graph nodes are inserted as special <node> tokens within the text sequence. All nodes in a graph share the same positional encoding and attend bidirectionally to one another, preserving node permutation invariance. Normal text generation tokens maintain causal masking.
  • Interleaved Message Passing: GNN message passing (utilizing mean, max, and std aggregators from Principal Neighbourhood Aggregation) updates node token embeddings inside the transformer blocks. A tanh gating mechanism initialized to zero ensures training stability and prevents catastrophic forgetting.
  • Graph-Text Cross-Attention: Instead of reducing node text to a single static vector, node texts are encoded as uncompressed token sequences (via LLM2Vec). Transformer tokens dynamically cross-attend to their respective raw node text tokens. This decouples the context length, reducing the computational complexity from $O((nL_n + L_t)^2)$ to $O(nL_n \cdot L_t)$.
  • GNN-LLM Twin Predictor: The model equips both a task-specific GNN readout head (for fast, parallel node/graph prediction in fixed label spaces) and an autoregressive LM head (for open-ended natural language generation). Training applies supervision to both heads simultaneously.

Most LLM weights are frozen using LoRA ($r=4$ to $64$), meaning only about 10% of total model parameters are trained.

       Input Prompt: "Who won Turing award in 2018...?" + Graph Nodes [<node>, <node>, ...]
                                     │
                 ┌───────────────────┴───────────────────┐
                 ▼                                       ▼
     [Uncompressed Node Texts]              [Structure-Aware Transformer]
                 │                           (Causal text attention + 
                 │                            bidirectional graph attention +
                 │                            interleaved MPNN layers)
                 └───────────────► ◄─────────────────────┘
                         [Graph-Text Cross-Attention]
                                     │
                 ┌───────────────────┴───────────────────┐
                 ▼                                       ▼
         [GNN Readout Head]                      [LLM Autoregressive Head]
      (Fast parallel node/graph labels)       (Flexible natural language generation)

Datasets

The authors evaluate across diverse graph-language scenarios:

  • Synthetic Graph Properties: Node degree prediction, edge existence, and node text retrieval.
  • Citation & Text Graphs: ogbn-arxiv (both full supervised and few-shot setups), Cora, and the CSTAG benchmark (Children, History, Computers, Photo, Sports).
  • Inductive Knowledge Graph Completion: FB15k-237-ind across all four standard inductive splits ($v1$ through $v4$), mapped to Wikidata text descriptions from OGB-LSC wikiKG90Mv2.
  • Commonsense Reasoning: CommonsenseQA, augmenting questions with sampled subgraphs.
  • Code Graph-to-Text: ogbg-code2, predicting Python function names directly from Abstract Syntax Tree (AST) graphs.

Key Insights and Ideas

  • Uncompressed Text Matters: The ablation study shows that removing cross-attention degrades node text retrieval accuracy from 34.50% to 0.00%. Compressing paragraphs of node text into a single embedding discards critical nuances that graph tasks need later.
  • Permutation Invariance via Shared Positional Encodings: Assigning identical positional IDs to all nodes within the same graph prevents token-order bias and stops large graphs from exhausting the LLM's context window.
  • Complementary Predictors: GNN heads provide dense, low-noise parallel supervision for classification/regression, while the autoregressive head enables open-ended language generation. Training both heads jointly improves representation quality for both.
  • AST Graphs as Free-form Generation: Existing methods formulate function name prediction on ASTs as fixed-dictionary classification. GL-Fusion treats it naturally as graph-to-language generation, unlocking dramatic performance gains.

Key Results

  • ogbg-code2 (Graph-to-Text): GL-Fusion nearly doubles the previous state of the art, jumping from 22.22 F1 (SAT++) and 20.18 F1 (DAGformer) to 40.97 F1.
  • ogbn-arxiv: Achieves 78.20% accuracy, beating GNN baselines like GCN (71.47%), GNN-centered models like GLEM (76.12%), and LLM-centered models like GraphGPT (75.11%). In 10-shot settings, it achieves 56.44% (vs. 52.48% for G-Prompt).
  • FB15k-237-ind (KG Completion): Outperforms all inductive GNNs (UniLP, NBFNet, GraiL) and LM baselines (KG-BERT, BertRL) on all splits (e.g., $v1$ MRR reaches 0.8558 vs. UniLP's 0.754).
  • CommonsenseQA: Reaches 81.79% accuracy, outperforming QA-GNN (76.1%) and standard Llama-3-8B prompting (59.4%).

Limitations and Future Work

  • Edge Text Modeling: The cross-attention module is primarily applied to node text because current benchmark datasets have simple edge annotations (e.g., "cites", relation types). Rich, uncompressed edge text cross-attention remains unexplored.
  • Scalability on Massive Graphs: Although cross-attention scales linearly with context length, large subgraphs (e.g., exceeding 500 nodes on FB15k-237-ind) still require heuristic neighborhood sampling to fit within GPU memory.
  • Training Resources: While only ~10% of parameters are updated via LoRA and new modules, end-to-end training of an 8B model on A800 GPUs remains computationally heavy compared to lightweight standalone GNNs.

Summary updated

BibTeX
@misc{yang2024gl,
  author = {Haotong Yang and Xiyuan Wang and Qian Tao and Shuxian Hu and Zhouchen Lin and Muhan Zhang},
  title = {{GL-Fusion: Rethinking the Combination of Graph Neural Network and Large Language model}},
  year = {2024},
  eprint = {2412.06849},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.06849},
}
Figure