Abstract
Large Language Models (LLMs) are powerful but prone to hallucinations when retrieving information from external sources. While Knowledge Graphs (KGs) provide structured facts, traditional Retrieval-Augmented Generation (RAG) methods often fail to capture the complex, non-linear relationships within these graphs. We present Language Message Passing (LMP), a novel framework that translates the "message passing" logic of Graph Neural Networks into the natural language domain. By aggregating graph neighborhoods into concise "semantic facts" and utilizing a hierarchical "topological readout," LMP enables LLMs to process graph data more effectively. Our results show state-of-the-art performance across multiple benchmarks with significant improvements in efficiency and noise robustness.
Introduction
The integration of LLMs with Knowledge Graphs typically relies on providing the model with linear paths—sequences of subject-predicate-object triples. However, this approach suffers from structural blindness, as linear paths cannot represent the branching nature of graphs, and information overload, where raw triples introduce significant semantic noise. To address these challenges, we propose Language Message Passing (LMP), which treats the LLM as a processor that "digests" graph neighborhoods into structured, hierarchical summaries.
The Language Message Passing (LMP) Framework
LMP mimics the behavior of Graph Neural Networks (GNNs) by operating entirely in natural language. The framework consists of four primary stages:
- Sampling: The LLM identifies the top-$K$ most relevant relations for a specific query, pruning irrelevant branches.
- Aggregation & Transformation: This core step groups neighboring entities and uses an LLM to synthesize them into "semantic facts." For instance, multiple triples regarding a team's history are condensed into a single descriptive sentence.
- Pooling: Neighboring entities are grouped into "hyper-entities," simplifying the graph's complexity into a "facts graph."
- Topological Readout: To maintain the graph's structural integrity, LMP uses Depth-First Search (DFS) to generate multi-level hierarchical lists (e.g., 1., 1.1, 1.2). This format aligns with the LLM's inherent ability to process structured outlines.
Experimental Evaluation
The LMP framework was evaluated on five major KGQA benchmarks, including WebQSP, CWQ, and GrailQA, using Freebase as the knowledge source.
Performance and Accuracy
LMP achieved state-of-the-art (SOTA) results across all datasets. On WebQSP, LMP combined with GPT-4 reached an accuracy of 90.0%. Notably, when using the Llama-2-70B model, LMP demonstrated a 46.9% improvement over baseline methods.
Robustness and Efficiency
A key strength of LMP is its resilience to noise. The model maintained high accuracy even when 80% of entity names were removed, as it could infer missing data from aggregated neighborhood context. Furthermore, LMP is highly efficient; compared to "Thought-on-Graph" (ToG), it requires approximately 3x fewer LLM calls and 4x fewer tokens per question.
Conclusion
Language Message Passing represents a significant shift in how LLMs interact with structured knowledge. By converting graph topology into a hierarchical language format, LMP overcomes the limitations of path-based RAG. Future work will explore extending this framework to unstructured data sources and a broader range of open-source language models.
Summary updated