RNG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answering

Xi YeSemih YavuzKazuma HashimotoYingbo ZhouCaiming Xiong

article2022ACL217 citations
Listen

Modern knowledge bases contain massive stores of structured information, but querying them typically requires specialized database languages. Natural language question answering systems aim to make these databases accessible to non-technical users. However, existing methods struggle to answer complex queries that involve new combinations of concepts or entirely unseen database elements. Pure generation models fail to invent unseen schema items reliably, while ranking-based systems struggle to cover the massive combinatorial space of possible database queries.

The article demonstrates and evaluates a hybrid "Rank-and-Generate" framework, named RnG-KBQA, designed to overcome these coverage and generalization bottlenecks. The primary objective is to evaluate whether coupling an iterative contrastive ranking model with a sequence-to-sequence generation model can accurately answer questions across both familiar and novel domains.

The researchers designed a two-stage approach using pre-trained language models. First, candidate database queries are enumerated up to two steps away from identified entities and evaluated using a contrastive bi-encoder ranker trained via iterative negative bootstrapping. Second, a sequence-to-sequence generator takes the user's question and the top-ranked candidate queries to synthesize the final executable query, effectively repairing missing constraints or operations. An execution-guided decoding fallback ensures that returned queries are syntactically valid and executable. The system was benchmarked on two primary datasets: GRAILQA, which explicitly tests generalization across standard, compositional, and zero-shot settings, and WEBQSP, a standard benchmark for multi-hop question answering.

The evaluation produced four key findings. First, the proposed framework established a new state of the art on GRAILQA, achieving an exact match score of 68.8% and an F1 score of 74.4%, outperforming the previous leading baseline by 10.7 exact match points and 9.1 F1 points. Second, the system demonstrated exceptional zero-shot generalization on unseen schema items, exceeding the prior best baseline by 16.7 F1 points (69.2% versus 52.5%). Third, on the WEBQSP benchmark, the framework attained a top-performing 75.6% F1 score, surpassing earlier systems that relied on perfect oracle entity linking. Fourth, ablation analyses showed that omitting either the ranker or the generator caused substantial performance drops of up to 27.5 and 5.3 F1 points, respectively, confirming that both stages are necessary for robust performance.

These findings indicate that combining candidate ranking with generative refinement resolves the trade-off between search space coverage and generalization. Rather than requiring exhaustive rule enumeration or relying on unconstrained generation, systems can leverage rankers to retrieve relevant schema context and use generators to compose precise logic. For enterprise operations, this approach reduces the cost and risk of deploying natural language interfaces across evolving databases without requiring extensive retraining for new data schemas.

Organizations developing automated querying or knowledge base interfaces should adopt two-stage rank-and-generate architectures over single-stage generative or ranking pipelines. Engineering teams should also incorporate execution-guided validation during inference to guarantee valid database outputs. Future technical work should focus on extending candidate generation beyond two-hop paths and exploring constrained decoding mechanisms to further minimize false constraints in zero-shot queries.

The findings are supported by strong benchmark performance across diverse query types. However, users should note key limitations: the generation stage occasionally introduces incorrect constraints in ambiguous queries, and performance gains are less pronounced when queries involve zero-shot relations that cannot be captured in initial candidate enumeration. Overall, confidence in the methodology is high for both standard and compositional querying tasks.

Cover for RNG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answering

Abstract

Existing KBQA approaches, despite achieving strong performance on i.i.d. test data, often struggle with generalizing to questions involving unseen KB schema items. Prior ranking-based approaches have shown some success in generalization, but suffer from the coverage issue. We present RnG-KBQA, a Rank-and-Generate approach for KBQA, which remedies the coverage issue with a generation model while preserving a strong generalization capability. Our approach first uses a contrastive ranker to rank a set of candidate logical forms obtained by searching over the knowledge graph. It then introduces a tailored generation model conditioned on the question and the top-ranked candidates to compose the final logical form. We achieve new state-of-the-art results on GRAILQA and WEBQSP datasets. In particular, our method surpasses the prior state-of-the-art by a large margin on the GRAILQA leaderboard. In addition, RnG-KBQA outperforms all prior approaches on the popular WEBQSP benchmark, even including the ones that use the oracle entity linking. The experimental results demonstrate the effectiveness of the interplay between ranking and generation, which leads to the superior performance of our proposed approach across all settings with especially strong improvements in zero-shot generalization.

Citation

MLA
Ye, X., et al. “RNG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answering”. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2022, pp. 6032–43, https://doi.org/10.18653/v1/2022.acl-long.417.
APA
Ye, X., Yavuz, S., Hashimoto, K., Zhou, Y., & Xiong, C. (2022). RNG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answering. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 6032–6043. https://doi.org/10.18653/v1/2022.acl-long.417
Chicago
Ye, X., S. Yavuz, K. Hashimoto, Y. Zhou, and C. Xiong. 2022. “RNG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answering”. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 6032–43. https://doi.org/10.18653/v1/2022.acl-long.417.
Harvard
Ye, X. et al. (2022) “RNG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answering”, Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Association for Computational Linguistics, pp. 6032–6043. Available at: https://doi.org/10.18653/v1/2022.acl-long.417.
Vancouver
1. Ye X, Yavuz S, Hashimoto K, Zhou Y, Xiong C (2022) RNG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answering. In: Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Association for Computational Linguistics, pp 6032–6043

BibTeX

@inproceedings{ye-etal-2022-rng,
    title = "{RNG}-{KBQA}: Generation Augmented Iterative Ranking for Knowledge Base Question Answering",
    author = "Ye, Xi  and
      Yavuz, Semih  and
      Hashimoto, Kazuma  and
      Zhou, Yingbo  and
      Xiong, Caiming",
    editor = "Muresan, Smaranda  and
      Nakov, Preslav  and
      Villavicencio, Aline",
    booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = may,
    year = "2022",
    address = "Dublin, Ireland",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.acl-long.417/",
    doi = "10.18653/v1/2022.acl-long.417",
    pages = "6032--6043"
}
Metadata:ACL Anthology

Source Code

This paper has an official code repository available. Click below to access the source code.

View Repository

Access the Paper

This paper is available from its original source. Click below to access the PDF.

Open PDF
License: https://creativecommons.org/licenses/by/4.0/