LLM-based Discriminative Reasoning for Knowledge Graph Question Answering

Mufan Xu, Kehai Chen, Xuefeng Bai, Muyun Yang, Tiejun Zhao, Min Zhang

TL;DR

Generative Large Language Models (LLMs) often hallucinate non-existent paths or ungrounded answers when tackling Knowledge Graph Question Answering (KGQA) tasks. To solve this, the authors introduce READS, a framework that reformulates KGQA into three sequential discriminative subtasks: graph searching, graph pruning, and answer inference. By replacing open-ended text generation with constrained selection from valid option pools, READS eliminates hallucinations and achieves state-of-the-art performance on major benchmarks.

What Problem Does This Paper Address?

Knowledge Graph Question Answering (KGQA) requires an AI to answer natural language questions by navigating a structured knowledge graph (KG). While LLMs excel at reasoning, their standard generative paradigm is a poor fit for the deterministic nature of graph databases.

When prompted to find answers, generative LLMs frequently suffer from hallucinations: they plan paths that do not exist in the graph, retrieve massive amounts of redundant data to compensate for uncertainty, or generate final answers that are completely ungrounded in the retrieved context.

Generative vs. Discriminative Subtask Approach

The authors address this fundamental mismatch by shifting the LLM's role from an open-ended text generator to a precise, discriminative decision-maker.

Methods

The proposed framework, READS (Reasoning With Discriminative Subtasks), deconstructs the KGQA pipeline into three sequential, discriminative steps:

  1. Question-Related Subgraph Searching: Instead of generating a full path out of thin air, the LLM iteratively selects the next logical step (entity + relation) from a dynamically updated option pool of feasible graph triples. This process constructs an abstract "subgraph structure" ($S_k$) using semantic nodes while simultaneously pulling the real subgraph ($G_k$) from the database.
  2. Question-Related Subgraph Pruning: The model identifies semantic constraints from the question (e.g., specific dates or qualifying entities) and maps them onto the abstract structure. It then prunes entire subtrees from the real subgraph that violate these constraints using logical operators ($=, <, \le, >, \ge, \min, \max$).
  3. Answer Inference: Rather than generating the text of the answer, the LLM selects the exact position (node) within the abstract structure $S_k$ where the answer resides. All real-world entities matching that position in the pruned subgraph are automatically returned as the final answer set.
Figure 2: The proposed READS for KGQA. Start from the question (bottom left) with a given starting entity "Coronation Street", READS sequentially conducts subgraph retrieval, subgraph pruning, and answer inference. Then READS automatically uses the reasoning results to prune Gk and then retrieve the answers from it. In this figure, the node’s color in subgraph Gk (middle center) represents its position in subgraph structure Sk (top center).

Datasets

The authors evaluated READS using two widely recognized Freebase-backed benchmarks:

  • WebQSP: A dataset consisting of questions answerable via up to two-hop relations.
  • CWQ (ComplexWebQuestions): A more challenging dataset containing multi-hop questions with explicit structural constraints.
  • GrailQA (Dev Set): Used additionally to evaluate the model's generalization capabilities across i.i.d., compositional, and zero-shot settings.

Key Insights and Ideas

  • Structure vs. Instance Reasoning: By separating the abstract logic of the graph ($S_k$) from the specific entity instances ($G_k$), the LLM can reason about the type of relationship required (e.g., "find the actor who played this character") without being overwhelmed by millions of unique entity names.
  • Robustness to Context Clutter: Generative models degrade significantly as the size of the retrieved subgraph grows because the context window becomes noisy. READS remains remarkably stable because its discriminative selection mechanism naturally filters out irrelevant context clutter.
Figure 4: The trend of average Hits@1 as the size (number of triplets) of retrieved subgraph increases.
  • Abandoning Internal Knowledge: READS forces the LLM to rely entirely on the provided graph structure for answer extraction. Counterintuitively, restricting the model from using its internal weights to "guess" answers actually leads to a massive boost in accuracy and reliability.

Key Results

READS achieved state-of-the-art (SOTA) performance across the board using Llama2-7b as its base model:

  • WebQSP: Achieved 0.840 Hits@1 and 0.845 F1, outperforming strong interactive baselines like ToG and KG-Agent.
  • CWQ: Achieved 0.802 Hits@1 and 0.820 F1. This represents a massive leap over the previous generative SOTA method, RoG, which scored 0.567 Hits@1.
  • Reduced Error Rates: Detailed error analysis confirmed that READS completely eliminated instances where the model generated answers not present in the subgraph (C2 errors).
  • Efficiency Gains: READS halved the reasoning cost compared to interactive methods like ToG, requiring significantly fewer model calls (5.7 vs 14.3 calls on CWQ) and fewer input tokens.

Limitations and Future Work

The authors note two primary limitations currently slated for future research:

  1. Gold Query Dependency: Constructing the fine-tuning data for the discriminative subtasks currently relies on decomposing gold SPARQL queries from the training sets. The authors plan to explore using LLM-generated pseudo-labels to alleviate this data requirement.
  2. Entity Linking Assumption: Like many KGQA frameworks, READS assumes that entities mentioned in the text have already been correctly mapped to the knowledge graph by an external tool. Integrating entity linking directly into the discriminative loop remains an open challenge.

Summary updated

BibTeX
@misc{xu2024llm,
  author = {Mufan Xu and Kehai Chen and Xuefeng Bai and Muyun Yang and Tiejun Zhao and Min Zhang},
  title = {{LLM-based Discriminative Reasoning for Knowledge Graph Question Answering}},
  year = {2024},
  eprint = {2412.12643},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.12643},
}
Figure