Question-guided Knowledge Graph Re-scoring and Injection for Knowledge Graph Question Answering

Yu Zhang, Kehai Chen, Xuefeng Bai, Zhao Kang, Quanjiang Guo, Min Zhang

Abstract

Knowledge Graph Question Answering (KGQA) systems often struggle with noisy retrieved subgraphs that introduce irrelevant concepts, leading to reasoning errors in Large Language Models (LLMs). We propose Q-KGR, a method that re-scores graph edges based on semantic relevance to the input question, and Knowformer, a novel architecture that injects this structured knowledge directly into the LLM's internal layers. Our framework demonstrates substantial improvements across multiple commonsense reasoning benchmarks, including a 23-point accuracy jump on physical reasoning tasks (PIQA) while maintaining parameter efficiency.

Introduction: The Noise Problem in KGQA

KGQA enhances LLMs by providing access to structured external knowledge. However, standard retrieval methods often pull in "noisy" subgraphs. For example, a query about a "bank" where children save money might retrieve facts about "river banks" or "bank robbers" due to keyword overlap. This irrelevant information distracts the model and degrades performance.

Figure 1: Illustration of a noisy retrieved subgraph where the term "bank" leads to irrelevant nodes like "river bank" and "robber".

Current approaches typically treat all retrieved nodes equally or rely on simple heuristics, failing to capture the nuanced semantic relationships between the question and specific graph connections (edges).

Methodology

The proposed framework consists of two primary components: Question-guided Knowledge Graph Re-scoring (Q-KGR) and the Knowformer architecture.

Question-guided Knowledge Graph Re-scoring (Q-KGR)

Unlike traditional methods that focus on node importance, Q-KGR prioritizes edges. It utilizes a pre-trained language model to evaluate the semantic similarity between the input question and each triplet (subject-relation-object) in the subgraph. By assigning relevance scores to edges, the system effectively "mutes" noisy pathways before they reach the reasoning stage.

Knowformer Architecture

Knowformer is designed for deep knowledge injection. Instead of appending graph data to the text prompt (soft prompting), Knowformer projects structured graph representations into the Feed-Forward Network (FFN) layers of the LLM.

Figure 3: The Q-KGR and Knowformer architecture, showing the edge re-scoring process (I), the overall injection pipeline (II), and the internal Knowformer layer structure (III).

The architecture employs a "knowledge projector" to align graph data with the LLM's latent space. It is highly parameter-efficient, utilizing Low-Rank Adaptation (LoRA) to enable fine-tuning without the need to retrain the entire model. A "global node" is also introduced to aggregate a high-level summary of the retrieved context, which significantly boosts performance.

Experimental Results

The framework was evaluated on four commonsense reasoning benchmarks: OpenBookQA, ARC, RiddleSense, and PIQA, using ConceptNet as the knowledge source.

  • Physical Reasoning Breakthrough: On the PIQA dataset, the model achieved 87.03% accuracy, representing a staggering ~23-point improvement over the standard LoRA baseline.
  • Robustness to Noise: In stress tests with 50% distractor nodes, Q-KGR maintained high performance, whereas baseline models showed significant degradation.
  • Parameter Efficiency: The method outperformed full fine-tuning while training significantly fewer parameters, demonstrating that targeted knowledge injection is more effective than brute-force retraining.

Conclusion

By focusing on edge-level relevance and deep architectural integration, Q-KGR and Knowformer provide a robust solution for noisy KGQA. While the model excels at commonsense tasks, future work will explore improving symbolic reasoning capabilities and aligning knowledge-injected models with human-like logic through Reinforcement Learning from Human Feedback (RLHF).

Summary updated

BibTeX
@inproceedings{zhang2024question,
  author = {Yu Zhang and Kehai Chen and Xuefeng Bai and Zhao Kang and Quanjiang Guo and Min Zhang},
  title = {{Question-guided Knowledge Graph Re-scoring and Injection for Knowledge Graph Question Answering}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.524},
}
Figure