NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

PathMind: A Retrieve-Prioritize-Reason Framework for Knowledge Graph Reasoning with Large Language Models

Yu Liu, Xixun Lin, Yanmin Shang, Yangxi Li, Shi Wang, Yanan Cao

TL;DR

PathMind is a novel framework that enhances Large Language Models (LLMs) for Knowledge Graph Reasoning (KGR) by intelligently prioritizing important reasoning paths. This approach leads to more faithful, interpretable, and efficient KGR, outperforming existing methods on complex reasoning tasks.

What Problem Does This Paper Address?

Knowledge Graphs (KGs) are powerful tools for representing structured information, and Knowledge Graph Reasoning (KGR) aims to infer new knowledge from them. While Large Language Models (LLMs) have shown great promise in complex reasoning, current LLM-based KGR methods face two main challenges:

  1. Noisy Reasoning Paths: Existing methods often retrieve reasoning paths indiscriminately, meaning they don't differentiate between paths that are crucial for an answer and those that are irrelevant or misleading. This can lead LLMs astray.
  2. Computational Inefficiency: Some methods involve LLMs iteratively exploring KGs, which can be computationally expensive due to high retrieval demands and numerous LLM calls, limiting their practical use.

PathMind aims to solve these issues by introducing a "Retrieve-Prioritize-Reason" paradigm that selectively guides LLMs with only the most important reasoning paths.

Methods

PathMind introduces a three-component framework:

  1. Subgraph Retrieval: Given a query, the system first retrieves a relevant subgraph from the KG. This is done by extracting the k-hop neighborhood of the topic entities in the query, effectively reducing the search space while preserving essential information. Graph Neural Networks (GNNs) are then used to learn representations of nodes and relations within this subgraph.
  2. Path Prioritization: This is the core innovation. PathMind employs a semantic-aware path priority function inspired by the A* pathfinding algorithm. It calculates a priority score for each entity based on two factors:
  3. Accumulative Cost (d(q, e)): The cost of reaching the current entity 'e' from the query 'q', considering the semantic representations of the triples along the path.
  4. Estimated Future Cost (f(e, a)): The estimated cost to reach the target answer 'a' from entity 'e', reparameterized using the query and current entity representations. This function helps identify "important reasoning paths" that are semantically relevant and likely to lead to the correct answer, avoiding noisy or irrelevant paths.

  5. Knowledge Reasoning: The identified important reasoning paths are then used to fine-tune LLMs through a two-phase strategy:

  6. Task-Specific Instruction Tuning (SFT): The LLM is trained to interpret and solve reasoning problems by adhering to instructions, using the query and the verbalized important reasoning paths as input.
  7. Path-Wise Preference Alignment (DPO): Direct Preference Optimization is used to further align the LLM with more accurate and logically consistent reasoning. This phase leverages pairs of preferred and less preferred reasoning paths to refine the LLM's decision-making.

Datasets

PathMind was evaluated on two standard KGR benchmark datasets:

  • WebQuestionSP (WebQSP)
  • Complex WebQuestions (CWQ)

Key Insights and Ideas

  • Importance of Path Prioritization: The paper strongly emphasizes that not all reasoning paths are created equal. Indiscriminately using all paths can introduce noise and mislead LLMs, while prioritizing semantically relevant paths significantly improves reasoning accuracy and interpretability.
  • Semantic Distance for Path Selection: The novel path priority function, which combines accumulative and future costs based on semantic representations, is a key contribution. It allows for a more nuanced understanding of path relevance than simple distance metrics.
  • Balancing Performance and Efficiency: PathMind achieves strong performance without the high computational overhead of iterative LLM interactions seen in some synergy-augmented methods. This is achieved by identifying essential paths upfront, reducing the need for extensive LLM calls.
  • Interpretability through Important Paths: By focusing on and explicitly using important reasoning paths, PathMind offers a more interpretable reasoning process, allowing users to understand why a particular answer was generated.

Key Results

  • State-of-the-Art Performance: PathMind consistently outperforms competitive baselines on both WebQSP and CWQ datasets. For example, it achieved a Hits@1 of 0.895 on WebQSP and 0.707 on CWQ, outperforming the second-best method (EPERM) by 0.8% and the strong baseline GNN-RAG by 5.1% (Hits@1 on CWQ).
  • Module Contributions: Ablation studies show that removing path prioritization significantly degrades performance, highlighting its critical role. Similarly, excluding the path-wise preference alignment also leads to inferior results.
  • Efficiency Gains: PathMind demonstrates efficiency by requiring fewer LLM calls and input tokens compared to many synergy-augmented methods, while maintaining high performance.
  • Generalizability: The framework shows strong transferability across different LLMs (Qwen2-7B, Llama2-7B, Llama3.1-8B), indicating its adaptability.

Limitations and Future Work

  • Data Dependency: The performance of PathMind, like most LLM-based methods, is dependent on the quality and coverage of the underlying KG and the training data.
  • KG Completeness: The paper acknowledges that KGs are often incomplete. In Case 3 of their study, an incorrect prediction occurred due to a missing important path in the KG, underscoring the reliance on KG completeness for optimal reasoning.
  • Future Directions: The authors suggest further research into more advanced path prioritization mechanisms and exploring how to better handle KG incompleteness. The framework's adaptability to various LLMs also opens avenues for exploring its use with even larger and more capable models.

Summary updated

BibTeX
@inproceedings{liu2026pathmind,
  author = {Yu Liu and Xixun Lin and Yanmin Shang and Yangxi Li and Shi Wang and Yanan Cao},
  title = {{PathMind: A Retrieve-Prioritize-Reason Framework for Knowledge Graph Reasoning with Large Language Models}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i18.38565},
}
Figure