Back Home

RAG 與檢索系統

GLM-RAG Feeds Knowledge Graph Text into a Graph Transformer, Outperforming GNN Baselines on Cross-Domain Multi-Hop Retrieval

GLM-RAG allows nodes, relations, and questions to interact jointly from the first attention layer instead of relying solely on message passing based on graph distance. It performs better on multi-hop evaluations in unseen domains, but standard vector RAG still leads on single-hop tasks, and the code and model have not yet been released.

Jan Beckendorf · CC BY-SA 2.0 · Image source
zh-Hant

Researchers at Heidelberg University and Aleph Alpha Research have introduced GLM-RAG, aiming to address the respective shortcomings of two types of knowledge graph retrievers: vector search understands textual similarity but can easily miss reasoning chains spanning multiple documents, while GNNs can propagate information along a graph, but when nodes are initialized only with zero vectors, rankings are often driven mainly by their distance from seed nodes rather than by a genuine understanding of node names and relation semantics.

GLM-RAG retains GFM-RAG’s knowledge graph construction, document ranking, and answer generation pipeline, replacing only the core retriever. The system first extracts seed entities from the question, retrieves a local subgraph, and converts node and edge labels into text tokens. The underlying T5 model augments attention with graph-distance-based relative positions and structural masks, allowing each triple to be processed like a sentence while preserving graph connections through nodes shared across triples. The question vector and entity representations are fused from the first layer. Finally, a scoring head ranks relevant nodes, which are then mapped back to the original documents.

The researchers fine-tuned the retriever on 282,000 question–document pairs from HotPotQA, 2WikiMultihopQA, and MuSiQue, while using GPT-4o mini for answer generation across all experiments. They also evaluated transfer performance on 11 unseen datasets. In cross-Wikipedia evaluations, GLM-RAG achieved higher Recall@2 than two GNN variants in most cases. For example, when trained only on MuSiQue and transferred to HotPotQA, it scored 65.7, compared with 59.4 and 60.3 for the baselines. It also achieved what the authors describe as new state-of-the-art results on the medical and computer science multi-hop tasks in G-Bench.

The more important takeaway for practitioners is that Graph RAG is not a universal replacement for vector indexes. Standard vector RAG outperformed graph-based methods on all seven single-hop, cross-domain datasets, while GNNs can cover larger subgraphs at a lower training cost. GLM-RAG’s advantage is concentrated in multi-hop paths that require semantic discrimination, at the cost of local-subgraph tokenization, T5 inference, and graph construction. Each experiment in the paper was run only once, some G-Bench scores rely on LLM-as-a-judge evaluation, and the code, model, and data are still marked for later release. Future work should compare end-to-end latency, index update costs, and transfer performance on real-world enterprise knowledge graphs.

Sources

  1. GLM-RAG: Graph Language Models for Graph-Based Retrieval-Augmented Generation
  2. Heidelberg University computational linguistics colloquium: GLM-RAG