arXiv:2610.34866cs.AIOct 2026

Manuscript Offprint

arXiv:2610.34866

UniGFM-RAG: Unify Graph Foundation Models and Large Language Models for End-to-End Retrieval and Reasoning

Zicheng Zhao, Linhao Luo, Zongji Yu, Junnan Dong, Yanchao Tan, Shirui Pan, Chen Gong

Zicheng Zhao*, Linhao Luo, Zongji Yu, Junnan Dong, Yanchao Tan, Shirui Pan†, Senior Member, IEEE, and Chen Gong†, Senior Member, IEEE

Abstract—Large Language Models (LLMs) have shown remarkable capabilities across tasks, but they still struggle with complex reasoning that requires integrating scattered knowledge. Graph Retrieval-Augmented Generation (GraphRAG) addresses this challenge by organizing fragment knowledge as graphs, while recent Graph Foundation Models (GFMs) further improve GraphRAG with graph-native retrieval and reasoning capabilities. However, existing GraphRAG methods usually adopt decoupled retrieve-then-generate pipelines, which create objective misalignment between retrieval and reasoning, and training GFM retrievers typically depends on expensive human annotations. To address these limitations, we propose UniGFM-RAG, a unified end-to-end GraphRAG framework that tightly couples a GFM retriever with an LLM generator. Given a query, the GFM retriever first reasons over the graph to score and retrieve relevant document nodes. These node embeddings are then passed through a fully differentiable graph bridge, which projects them into soft-weighted graph prefixes according to retrieval scores and combines them with raw document texts to form graph-augmented prompts. In this way, structural information is injected directly into LLM generation, while the final answer loss can be back-propagated through the bridge to jointly optimize retrieval and reasoning. To stabilize training and reduce reliance on costly annotations, we further introduce a semantic-guided distillation module that provides auxiliary supervision using pseudo-labels derived from query-document semantic similarities. Extensive experiments on three multi-hop QA datasets and three out-of-domain GraphRAG benchmarks show that UniGFM-RAG consistently outperforms strong baseline methods and generalizes well, which demonstrates the effectiveness of end-to-end GraphRAG with tightly integrated GFM retrieval and LLM reasoning.

Index Terms—Large Language Models, Graph Retrieval-Augmented Generation, Graph Foundation Models

I. INTRODUCTION

Large Language Models (LLMs) have demonstrated remarkable performance across a wide range of natural language processing tasks [1]-[5]. However, they still struggle with

Current GraphRAG Approach (Two-stage)

Figure

Fig. 1: Comparison between the current two-stage GraphRAG and the proposed UniGFM-RAG. Existing GraphRAG methods usually employ a decoupled retrieve-then-generate pipeline, which often results in objective misalignment. In contrast, UniGFM-RAG introduces a unified end-to-end GraphRAG framework that tightly couples a Graph Foundation Model (GFM) retriever with a Large Language Model (LLM) generator.

knowledge-intensive reasoning, where the evidence is often distributed across multiple documents [6]. Graphs [7]–[10] offer a natural and flexible way of modeling structural information, which makes them particularly suitable for capturing the dependencies within knowledge for complex reasoning. Motivated by this, Graph Retrieval-Augmented Generation (GraphRAG) [11]–[14] has emerged as a promising paradigm for enhancing LLM reasoning with graph-structured knowledge. As illustrated in the upper part of Figure 1, a typical GraphRAG system first constructs a graph from the external corpus, such as a knowledge graph [15] or a document graph [16], where nodes correspond to documents or entities, and edges encode their relationships. It then employs a graph

∗^{*}This work was done while visiting Shanghai Jiao Tong University.

Z. Zhao, Z. Yu and C. Gong are with the School of Automation and Intelligent Sensing, Shanghai Jiao Tong University, Shanghai 200240, China. Email: {zicheng.zhao99@gmail.com, yuzongji@pjlab.org.cn, chen.gong@sjtu.edu.cn.}

L. Luo is with the Department of Data Science and AI, Monash University, Melbourne, Australia. E-mail: linhao.luo1@monash.edu.

J. Dong is with the Tencent Youtu Lab, Shanghai 200240, China. E-mail: hansonjdong@tencent.com.

Y. Tan is with School of Computer and Data Science, Fuzhou University, Fuzhou 350116, China. Email: yctan@fzu.edu.cn.

S. Pan is with the School of Information and Communication Technology, Griffith University, Queensland, Australia. Email: s.pan@griffith.edu.au.

†^{\dagger}Corresponding Author.

retriever to navigate the graph and identify relevant nodes, whose associated information is provided to an LLM generator to produce the final answer.

Early graph retrievers relied on the internal capabilities of LLMs to traverse graphs using heuristic search [17], global planning [18], or multi-step agentic reasoning [19], [20]. However, these approaches often suffer from inefficiency and limited structural understanding due to the unstructured nature of LLMs. Recently, Graph Foundation Models (GFMs) [21]–[24] have demonstrated strong graph reasoning and generalized abilities, which inspires a new wave of applying them to GraphRAG [25]. These methods utilize graph neural network (GNN)-based GFMs as native graph retrievers to capture intricate dependencies among nodes, which significantly enhances retrieval performance. Despite the promising results, training GFMs requires large-scale, high-quality relevance labels, which are labor-intensive and difficult to obtain at scale (Limitation 1).

Beyond the challenge of data acquisition, the architecture of existing GraphRAG frameworks poses another major bottleneck. Most GraphRAG methods adopt a decoupled, two-stage “retrieve-then-generate” pipeline [25]–[27]. In this paradigm, the retriever and generator are optimized separately for different objectives: the retriever is trained to maximize retrieval performance rather than improve final answer accuracy. This leads to significant objective misalignment, where information considered highly relevant by the retriever may be suboptimal or redundant for the reasoning process of the generator (Limitation 2). Furthermore, because document retrieval is a discrete operation, it prevents continuous gradient backpropagation from the generator to the retriever, which makes joint training even more difficult. Therefore, it is crucial to tightly integrate the GFM retriever and LLM generator into a unified framework that allows end-to-end optimization.

Beyond enabling joint optimization, a unified GFM-LLM framework can further improve the ability of LLM to leverage graph structure during reasoning [28]. Prior work has attempted to inject graph structural signals into LLMs through GNN-based graph encoders and graph-aware prompting [29]–[31]. Although effective for standalone graph tasks such as anomaly detection [32], node classification and link prediction [33], these methods assume a pre-defined graph as input and are not designed for retrieval-augmented settings. As a result, they neither address how to retrieve query-relevant information from external graph nor capture the interaction between graph retrieval and answer generation (Limitation 3), which is essential in GraphRAG.

In response to these challenges, we propose UniGFM-RAG, a unified end-to-end GraphRAG framework that tightly couples a GFM retriever with an LLM generator for joint retrieval and reasoning. As shown in the bottom of Figure 1, UniGFM-RAG fosters a reciprocal loop: the structural insights of GFM enhance LLM reasoning, while LLM reasoning refines graph retrieval. Given a query, the GFM retriever first reasons over the graph to score and retrieve top-k relevant document nodes. Instead of directly feeding the retrieved documents into the LLM, we introduce a novel graph bridge module to connect the GFM and LLM through a fully differentiable architecture. Specifically, the node embeddings of retrieved documents are extracted from the GFM and projected into “graph prefixes” that encode their structural roles and inter-document dependencies, and are then soft-weighted by the corresponding retrieval scores. These graph prefixes are concatenated with the raw document texts to form graph-augmented prompts for the LLM. In this way, the structural knowledge captured by the GFM is injected directly into the generation process, which enables the LLM to reason not only over the retrieved contents but also over their graph-structured dependencies (Addressing Limitation 3).

More importantly, the graph bridge remains fully differentiable, which allows gradients from the final answer generation loss to flow back through the graph prefixes and soft weights to refine both the LLM generator and GFM retriever. This directly aligns retrieval with downstream reasoning objectives and enables joint optimization of the two modules (Addressing Limitation 2). To further stabilize training, we introduce a semantic-guided distillation module that provides auxiliary supervision for the GFM retriever using pseudo-labels derived from query-document semantic similarities. This module helps the retriever learn robust topological navigation from semantic priors without requiring expensive fine-grained human annotations (Addressing Limitation 1).

The core contributions of this work are summarized as follows:

• We propose UniGFM-RAG, a unified end-to-end GraphRAG framework that unifies a GFM retriever with an LLM generator, which enables joint optimization of retrieval and reasoning instead of the conventional decoupled retrieve-then-generate pipeline.

• We design a differentiable graph bridge that transforms retrieved document nodes into soft-weighted graph prefixes and graph-augmented prompts, which injects graph structure into the LLM while allowing answer supervision to back-propagate to the GFM retriever.

• We introduce a semantic-guided distillation module that stabilizes GFM training with pseudo-labels derived from query-document semantic similarity, which reduces reliance on costly fine-grained human annotations.

• Extensive experiments on three multi-hop QA datasets and three out-of-domain GraphRAG benchmarks show that UniGFM-RAG consistently outperforms strong baselines and generalizes effectively across domains, which demonstrate the effectiveness of our unified framework.

References (62)