Generating Controllable Questions from Knowledge Graph via SPARQL Encoding and Reinforcement Learning
摘要
Recent years have seen a surge in the popularity of Knowledge Graphs (KG), making it a crucial research area to develop natural language questions derived from KG. However, previous works have predominantly focused on question generation, with limited attention given to generating controllable questions that allow manipulation of difficulty and question types. In our study, we initially define question difficulty as the number of reasoning steps required to answer it within the Knowledge Graph. The sequence of reasoning steps within the Knowledge Graph is referred to as the reasoning subgraph. During the conversion of the reasoning subgraph to a SPARQL query, we introduce various constraints to generate diverse types and levels of difficulty in the resulting SPARQL queries. Subsequently, natural language questions corresponding to the given SPARQL queries are generated. Leveraging both structural and sequential information inherent in SPARQL queries, we introduce the SPARQL2Seq model for the automatic generation of controllable questions. This model incorporates an Encoder Fusion mechanism to encode both structural and sequential information. Furthermore, we augment our RNN decoder with a token-level copying mechanism, enabling direct token copying from the input SPARQL query to the output question. To enhance the controllability of question generation, we employ reinforcement learning to assess the relevance between the output question and the input SPARQL query, using it as a reward to refine the training of our SPARQL2Seq model. Extensive experiments conducted on the ComplexWebQuestion dataset demonstrate that our model surpasses state-of-the-art approaches in both automated evaluations and human assessments.