Efficient and Accurate Contextual Re-Ranking for Knowledge Graph Question Answering

Kexuan Sun, Nicolaas Paul Jedema, Karishma Sharma, Ruben Janssen, Jay Pujara, Pedro A. Szekely, Alessandro MoschittiCOLING 2024

Abstract

The efficacy of neural “retrieve and generate” systems is well established for question answering (QA) over unstructured text. Recent efforts seek to extend this approach to knowledge graph (KG) QA by converting structured triples to unstructured text. However, the relevance of KG triples retrieved by these systems limits their accuracy. In this paper, we improve the relevance of retrieved triples using a carefully designed re-ranker. Specifically, our pipeline (i) retrieves over documents of triples grouped by entity, (ii) re-ranks triples from these documents with context: triples in the 1-hop neighborhood of the documents’ subject entity, and (iii) generates an answer from highly relevant re-ranked triples. To train our re-ranker, we propose a novel “triple-level” labeling strategy that infers fine-grained labels and shows that these significantly improve the relevance of retrieved information. We show that the resulting “retrieve, re-rank, and generate” pipeline significantly improves upon prior KGQA systems, achieving a new state-of-the-art on FreebaseQA by 5.56% Exact Match. We perform multiple ablations that reveal the distinct benefits of our contextual re-ranker and labeling strategy and conclude with a case study that highlights opportunities for future works.

Introduction

Knowledge Graph Question Answering (KGQA) involves finding answers to natural language questions using structured data, typically represented as triples (subject, relation, object). A common modern approach is to treat KGQA as a Retrieval-Augmented Generation (RAG) task: converting triples into text, retrieving relevant ones, and using a Language Model (LM) to generate an answer.

However, Knowledge Graphs are massive and inherently noisy. Standard retrievers often struggle to distinguish between a highly relevant triple and a "distractor" triple that shares entities but does not answer the specific question. Traditional solutions like semantic parsing (translating questions into SPARQL) are accurate but slow and brittle. This work introduces an efficient, text-based pipeline that enhances retrieval precision through contextual re-ranking and a novel labeling strategy.

The Retrieve-Re-rank-Generate Pipeline

The proposed system follows a three-stage architecture: Retrieve, Re-rank, and Generate.

The proposed KGQA pipeline: (1) KG indexing, (2) Entity-centric retrieval, (3) Contextual triple preparation, (4) Re-ranking, and (5) Answer generation.
  1. Entity-Centric Retrieval: Instead of indexing every triple individually, triples are grouped by their subject entity into "documents." Standard retrieval tools (BM25 and DPR) identify the top $N$ documents related to a question.
  2. Contextual Re-ranking: For each candidate triple, the model incorporates "contextual triples"—other facts from the 1-hop neighborhood of the subject entity. A cross-encoder (ELECTRA-large) processes the [Question, Candidate Triple, Context] to predict a relevance score. This context helps disambiguate entities and provides semantic signals to filter noise.
  3. Generation: The top-K re-ranked triples are processed by a Fusion-in-Decoder (FiD) model to generate the final answer.

Triple-Level Labeling Strategy

A key contribution of this work is the "Triple-Level" labeling strategy used to train the re-ranker. In standard RAG systems, "document-level" labeling is common: if a retrieved passage contains the answer, all sentences within it are marked as positive. For KGs, this is too coarse.

Comparison of labeling strategies: (a) classic pipeline, (b) document-level labeling where all triples in a relevant document are marked positive, and (c) the proposed triple-level labeling which isolates the specific answering triple.

As shown in the figure above, the Triple-Level strategy only labels the specific triple that connects the topic entity to the answer entity as positive. This fine-grained supervision forces the re-ranker to be much more precise, significantly improving its ability to filter out distractors that might otherwise confuse the generator.

Experimental Results

The model was evaluated on FreebaseQA and WebQSP. On FreebaseQA, the system achieved 84.3% Hit@1, a 5.56% improvement over the previous state-of-the-art (DecAF). Notably, the "base" version of the model outperformed previous systems while utilizing 550 million fewer parameters.

Ablation studies confirmed the importance of both core innovations. Removing context from the re-ranker led to a performance drop of approximately 1% across datasets. More dramatically, switching from triple-level to document-level labeling caused a significant performance hit, validating the need for fine-grained supervision in KG retrieval.

Conclusion

This work demonstrates that a well-tuned "retrieve, re-rank, and generate" pipeline can outperform complex logical-form-based systems in KGQA. By leveraging contextual information and precise triple-level labeling, the system achieves state-of-the-art results with greater efficiency. Future work will focus on extending this approach to multi-hop reasoning and addressing complex constraints such as temporal sequences and superlatives.

Summary updated

BibTeX
@inproceedings{sun2024efficient,
  author = {Kexuan Sun and Nicolaas Paul Jedema and Karishma Sharma and Ruben Janssen and Jay Pujara and Pedro A. Szekely and Alessandro Moschitti},
  title = {{Efficient and Accurate Contextual Re-Ranking for Knowledge Graph Question Answering}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=PRyAG7mL2D},
}
Figure