Stepwise Contrastive Reasoning for Retrieval-Augmented Generation over Knowledge Graphs
DOI:
https://doi.org/10.1609/aaai.v40i18.38549Abstract
Retrieval-augmented generation (RAG) enhances the reasoning capabilities of large language models (LLMs) by incorporating external knowledge. Among available sources, knowledge graphs (KGs) offer a structured and reliable foundation for factual information, making them increasingly popular in efforts to improve reasoning faithfulness in RAG. Most existing KG-based RAG methods rely on LLMs to extract knowledge from KGs. However, these approaches often require costly fine-tuning and struggle to navigate deep graph structures, limiting their effectiveness in multi-hop reasoning tasks. To address these challenges, we propose Stepwise Contrastive Reasoning (SCR), a lightweight framework that integrates graph structure and textual context for efficient and interpretable RAG over KGs. SCR combines relational message passing layers to encode KG entities with a Transformer encoder for processing question text. It decomposes reasoning into a series of alignment steps. At each step, SCR compares the current topic entity and its neighbors with the question representation, selecting the most relevant entity as the next topic entity. The question is then updated with this entity's textual description. This process continues until the selected entity no longer changes, indicating that the answer entity has been reached. Through stepwise alignment, SCR enables compact models to perform faithful and interpretable reasoning over large-scale KGs. Extensive experiments on several widely used KGQA benchmarks demonstrate that SCR not only achieves state-of-the-art performance but also effectively boosts the capabilities of smaller language models to match those of LLMs.Published
2026-03-14
How to Cite
Lin, C., Luo, Y., Liu, K., & Wu, Q. (2026). Stepwise Contrastive Reasoning for Retrieval-Augmented Generation over Knowledge Graphs. Proceedings of the AAAI Conference on Artificial Intelligence, 40(18), 15243–15251. https://doi.org/10.1609/aaai.v40i18.38549
Issue
Section
AAAI Technical Track on Data Mining & Knowledge Management II