[Paper Review] FlexKBQA: A Flexible LLM-Powered Framework for Few-Shot Knowledge Base Question Answering
FlexKBQA uses LLMs as program translators to generate synthetic data, plus execution-guided self-training and inherent reasoning to tackle few-shot KBQA across multiple datasets, achieving strong results with minimal annotations.
Knowledge base question answering (KBQA) is a critical yet challenging task due to the vast number of entities within knowledge bases and the diversity of natural language questions posed by users. Unfortunately, the performance of most KBQA models tends to decline significantly in real-world scenarios where high-quality annotated data is insufficient. To mitigate the burden associated with manual annotation, we introduce FlexKBQA by utilizing Large Language Models (LLMs) as program translators for addressing the challenges inherent in the few-shot KBQA task. Specifically, FlexKBQA leverages automated algorithms to sample diverse programs, such as SPARQL queries, from the knowledge base, which are subsequently converted into natural language questions via LLMs. This synthetic dataset facilitates training a specialized lightweight model for the KB. Additionally, to reduce the barriers of distribution shift between synthetic data and real user questions, FlexKBQA introduces an executionguided self-training method to iterative leverage unlabeled user questions. Furthermore, we explore harnessing the inherent reasoning capability of LLMs to enhance the entire framework. Consequently, FlexKBQA delivers substantial flexibility, encompassing data annotation, deployment, and being domain agnostic. Through extensive experiments on GrailQA, WebQSP, and KQA Pro, we observe that under the few-shot even the more challenging zero-shot scenarios, FlexKBQA achieves impressive results with a few annotations, surpassing all previous baselines and even approaching the performance of supervised models, achieving a remarkable 93% performance relative to the fully-supervised models. We posit that FlexKBQA represents a significant advancement towards exploring better integration of large and lightweight models. The code is open-sourced.
Motivation & Objective
- Address the data annotation bottleneck in KBQA across heterogeneous KB schemas and query languages.
- Leverage LLMs to generate diverse, executable programs from KB templates and translate them into natural language questions.
- Close the distribution gap between synthetic data and real user questions via execution-guided self-training (EGST).
- Enhance the framework with the inherent reasoning capability of LLMs to improve KBQA performance.
- Demonstrate domain-agnostic, deployable KBQA with a lightweight underlying model achieving strong few-shot results.
Proposed method
- Automatic program sampling to generate executable KB programs via template collection and step-wise grounding.
- Low-resource program translation with LLMs acting as program translators from programs to natural language questions.
- Execution-guided self-training (EGST) to iteratively annotate unlabeled user questions using a teacher-student loop and filter noisy pseudo-labels.
- Inherent reasoning augmentation to leverage LLMs' internal knowledge for data augmentation and fallback when semantic parsing fails.
- Combination of synthetic data, small labeled data, and unlabeled user questions to train a lightweight model for KBQA.
- Implementation uses a lightweight underlying KBQA model (RnG-KBQA for GrailQA/WebQSP, BART-SPARQL for KQA Pro) and gpt-3.5-turbo for translation.
Experimental results
Research questions
- RQ1Can a flexible KBQA framework use LLMs as program translators to generate high-quality synthetic data for few-shot KBQA?
- RQ2Does execution-guided self-training mitigate distribution shifts between synthetic data and real user questions in KBQA tasks?
- RQ3To what extent can inherent reasoning in LLMs boost KBQA performance, especially in zero-shot and low-resource settings?
- RQ4How does FlexKBQA perform across diverse KBs (GrailQA, WebQSP, KQA Pro) and program types (S-expression, SPARQL) with limited annotations?
Key findings
- FlexKBQA achieves strong few-shot performance across GrailQA, WebQSP, and KQA Pro, outperforming baselines and approaching supervised models.
- With only 25 labeled examples on GrailQA, FlexKBQA surpasses prior 100-shot methods and nears fully supervised performance (93% relative to fully supervised).
- EGST significantly boosts performance by 10.3 F1 on GrailQA and 7.1 F1 on WebQSP, and 10.2 accuracy on KQA Pro, evidencing effective distribution-shift mitigation.
- Inherent Reasoning provides additional gains, especially on KQA Pro where entity linking is absent and LLMs can provide accurate answers directly.
- FlexKBQA demonstrates zero-shot potential and maintains advantages as more annotated data becomes available, indicating strong generalization and data augmentation benefits.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.