论文标题

两个链接的故事:用于文本到SQL解析的模式链接和结构链接之间的动态门控

A Tale of Two Linkings: Dynamically Gating between Schema Linking and Structural Linking for Text-to-SQL Parsing

论文作者

Chen, Sanxing, San, Aidan, Liu, Xiaodong, Ji, Yangfeng

论文摘要

在文本到SQL语义解析中,为生成的SQL查询选择正确的实体(表和列)至关重要且具有挑战性。需要解析器将自然语言(NL)问题和SQL查询连接到数据库中的结构化知识。我们制定了两个链接过程来应对这一挑战:架构链接,该链接链接NL提到数据库和结构链接,这些链接将输出SQL中的实体与数据库架构中的结构关系联系起来。直观地,这两个链接过程的有效性会根据所生成的实体而变化,因此我们建议使用门控机制在它们之间进行动态选择。将所提出的方法与两个基于图的基于基于神经网络的语义解析器以及BERT表示形式集成在一起,证明了在具有挑战性的蜘蛛数据集上解析准确性的可观提高。分析表明,我们提出的方法有助于在生成复杂的SQL查询时增强模型输出的结构,并提供更多可解释的预测。

In Text-to-SQL semantic parsing, selecting the correct entities (tables and columns) for the generated SQL query is both crucial and challenging; the parser is required to connect the natural language (NL) question and the SQL query to the structured knowledge in the database. We formulate two linking processes to address this challenge: schema linking which links explicit NL mentions to the database and structural linking which links the entities in the output SQL with their structural relationships in the database schema. Intuitively, the effectiveness of these two linking processes changes based on the entity being generated, thus we propose to dynamically choose between them using a gating mechanism. Integrating the proposed method with two graph neural network-based semantic parsers together with BERT representations demonstrates substantial gains in parsing accuracy on the challenging Spider dataset. Analyses show that our proposed method helps to enhance the structure of the model output when generating complicated SQL queries and offers more explainable predictions.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源