ROG: Retrieval-Augmented LLM Reasoning for Complex First-Order Queries over Knowledge Graphs
Ziyan Zhang, Chao Wang, Zhuo Chen, Chiyi Li, Kai Song
TL;DR
Answering first-order logic queries over incomplete knowledge graphs with complex operator compositions (including $P$, $\wedge$, $\vee$, and $\neg$) is challenging. ROG combines retrieval-aware neighborhood retrieval with chain-of-thought reasoning in an LLM, decomposing multi-operator queries into single-operator steps and caching intermediate results to stabilize reasoning, while using an abstract identifier scheme to reduce hallucination. It introduces a deterministic execution plan and evidence-grounded prompting to replace learned operators with retrieval-grounded, stepwise inference, achieving robust performance across diverse KGs. Experiments on standard benchmarks show consistent gains over strong embedding-based baselines, with particularly large improvements for high-complexity and negation-heavy queries, highlighting practical impact for scalable KG reasoning across heterogeneous graphs.
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.
