Introduction
Building robust systems for Knowledge Graph Question Answering (KGQA) typically requires large-scale datasets of natural language questions paired with formal queries, such as SPARQL. Traditionally, these datasets are curated through expensive and slow crowdsourcing processes, creating a "human-in-the-loop" bottleneck that prevents training data from scaling alongside rapidly evolving knowledge bases like Wikidata.
MK-SQuIT (Synthesizing Questions using Iterative Template-filling) addresses this challenge by providing a fully automated framework for generating semantically valid and logically complex question-query pairs. By leveraging knowledge graph ontologies and recursive grammars, the system produces high-quality training data without human intervention.
Methodology
The MK-SQuIT pipeline ensures that synthetic questions are not only grammatically correct but also "semantically felicitous"—meaning they make logical sense within the context of the underlying data. The process follows a multi-layered architecture:
- Context-Free Grammars (CFGs): The system uses recursive CFGs to define the structural "skeleton" of questions, allowing for the generation of deeply nested queries (e.g., "Who is the sibling of the director of [Movie]?").
- Predicate Graphs: To prevent nonsensical combinations, the framework utilizes a directed graph of the knowledge base's ontology. This ensures that predicates (properties) are only applied to entities of the correct ontological type.
- Iterative Template-Filling: The system traverses the predicate graph to identify valid relationship chains, which are then used to populate the CFG templates.
As shown in the transformation process, a base template is progressively refined into a numbered and typed version before being converted into both a natural language question and a corresponding SPARQL query.
Dataset Composition
The authors generated several datasets to evaluate the framework's efficacy:
- MKQA-1: A primary training set of 110,000 pairs across four domains: People, Films, Literary Works, and Television Series.
- TEST-EASY: 5,000 examples using known predicates but introducing a novel "Chemical" domain to test entity mapping.
- TEST-HARD: 5,000 examples featuring the new domain, increased template complexity, and "fuzzing" (noisy perturbations) to simulate real-world user input.
Experimental Results
The framework was evaluated using a baseline BART (Bidirectional and Auto-Regressive Transformers) model. On the TEST-EASY set, the model achieved near-perfect performance with a BLEU score of 0.988 and a ROUGE-L of 0.995, demonstrating that synthetic data is highly effective for standard, well-formatted queries.
However, performance declined on the TEST-HARD set (BLEU: 0.596, ROUGE-L: 0.781). This suggests that while the model masters the underlying logic of the knowledge graph, it remains sensitive to linguistic noise, conversational fillers, and irregular formatting. Despite these challenges, the system demonstrated significant promise in commercial settings, achieving high user satisfaction during live product integration.
Conclusion and Future Work
MK-SQuIT demonstrates that ontology-driven automation can successfully bridge the data gap in KGQA. By treating predicates as functions between ontological types, the framework generates complex, multi-hop questions that are rare in human-annotated sets but vital for logical reasoning.
Future iterations of the framework aim to expand support for non-English languages, incorporate temporal and string-manipulation operations, and introduce "telephonetic fuzz" modules to better simulate errors from voice-to-text systems. Additionally, the authors plan to explore "SPARQL-to-Text" translation to improve system explainability for end-users.
Summary updated