Abstract
Answering first-order logic (FOL) queries over incomplete knowledge graphs (KGs) is difficult, especially for complex query structures that compose projection, intersection, union, and negation. We propose ROG, a retrieval-augmented framework that combines query-aware neighborhood retrieval with large language model (LLM) chain-of-thought reasoning. ROG decomposes a multi-operator query into a sequence of single-operator sub-queries and grounds each step in compact, query-relevant neighborhood evidence. Intermediate answer sets are cached and reused across steps, improving consistency on deep reasoning chains. This design reduces compounding errors and yields more robust inference on complex and negation-heavy queries. Overall, ROG provides a practical alternative to embedding-based logical reasoning by replacing learned operators with retrieval-grounded, step-wise inference. Experiments on standard KG reasoning benchmarks show consistent gains over strong embedding-based baselines, with the largest improvements on high-complexity and negation-heavy query types.
Introduction
Knowledge Graphs (KGs) serve as the backbone for modern information systems, yet they are inherently incomplete. Answering complex questions like "Which founders of simulation software companies are not from Asia or Europe?" requires navigating multiple hops, intersections, and negations across missing data. Traditionally, researchers have relied on Knowledge Graph Embeddings (KGE) to "guess" missing links by mapping entities into geometric spaces. However, these "black-box" models often suffer from compounding errors—where small inaccuracies in early reasoning steps lead to massive failures in deep chains—and lack interpretability.
To address these challenges, we introduce ROG (Retrieval-Augmented LLM Reasoning), a framework that replaces geometric transformations with a transparent, step-by-step reasoning process powered by Large Language Models (LLMs).
Methodology
ROG adopts a "symbolic-meets-neural" approach, utilizing an LLM as a reasoning engine grounded in retrieved graph evidence. The framework operates through four primary stages:
- Query Decomposition: Complex multi-operator queries are broken down into a sequence of single-operator sub-queries. For instance, a multi-hop query is transformed into consecutive one-hop "projections."
- Identifier Abstraction: To mitigate LLM hallucinations based on pre-trained "world knowledge," ROG replaces real entity and relation names with unique identifiers (e.g.,
Entity_123). This forces the model to reason strictly from the provided evidence. - Neighborhood Retrieval: For each sub-query, ROG fetches a compact "neighborhood" of relevant triples from the KG, providing the necessary ground truth for that specific step.
- Step-wise Reasoning & Caching: The LLM processes sub-queries using retrieved evidence. Intermediate results are cached and passed to subsequent steps, ensuring consistency across deep reasoning chains.
Experimental Evaluation
We evaluated ROG on two gold-standard benchmarks:
- FB15k: A subset of Freebase containing general-world knowledge.
- NELL995: A dataset derived from the "Never-Ending Language Learning" project, characterized by its high sparsity.
The model was tested across nine query types, ranging from simple 1-hop projections (1p) to complex combinations of intersections (i), unions (u), and negations (n).
Results and Discussion
ROG demonstrated significant performance improvements over strong embedding-based baselines such as GQE, Query2Box (Q2B), and BetaE.
Superior Accuracy and Robustness
As shown in the experimental results, ROG consistently outperformed baseline models across various query structures. On the FB15k dataset, ROG achieved a Mean Reciprocal Rank (MRR) of 81.4 on 1-hop queries, a substantial lead over the 72.4 achieved by the best baseline (CQD). These gains were even more pronounced on the sparse NELL995 dataset, highlighting the effectiveness of explicit retrieval-based grounding when "guessing" via embeddings becomes unreliable.
Mastery of Negation
Negation (the "NOT" operator) has historically been the most challenging aspect of FOL queries. ROG handles this by explicitly representing the "to-be-removed" set, converting a fuzzy geometric problem into precise set subtraction. On the "pni" (projection-negation-intersection) query type, ROG outperformed BetaE by approximately 35% on the FB15k dataset.
Conclusion
By treating Knowledge Graph reasoning as a series of small, verifiable logical steps, ROG provides a robust and interpretable alternative to traditional embedding models. While the framework is sensitive to the completeness of the initial retrieval step and requires more computational resources than geometric models, its ability to ground reasoning in evidence and handle complex negation marks a significant advancement in KG-based AI reasoning. Future work will focus on optimizing retrieval efficiency and refining the integration between symbolic execution plans and LLM prompting.
Summary updated