首页 | 本学科首页   官方微博 | 高级检索  
     

辅助任务增强的中文跨域NL2SQL算法
引用本文:胡亚红,刘亚冬,朱正东,刘鹏杰. 辅助任务增强的中文跨域NL2SQL算法[J]. 国防科技大学学报, 2024, 46(2): 197-204
作者姓名:胡亚红  刘亚冬  朱正东  刘鹏杰
作者单位:浙江工业大学 计算机科学与技术学院, 浙江 杭州 310023;西安交通大学 软件学院, 陕西 西安 710049;西安交通大学 计算机科学与技术学院, 陕西 西安 710049
基金项目:国家重点研发计划资助项目(2018YFB0204003,2018YFB0204004)
摘    要:自然语言到结构化查询语言(natural language to structured query language,NL2SQL)任务旨在将自然语言询问转化为数据库可执行的结构化查询语言(structured query language,SQL) 语句。本文提出了一种辅助任务增强的中文跨域 NL2SQL 算法,其核心思想是通过在解码阶段添加辅助任务以结合原始模型来进行多任务训练,提升模型的准确率。辅助任务的设计是通过将数据库模式建模成图,预测自然语言询问与数据库模式图中的节点的依赖关系,显式地建模自然语言询问和数据库模式之间的依赖关系。针对特定的自然语言询问,通过辅助任务的提升,模型能够更好地识别数据库模式中哪些表/列对预测目标 SQL 更有效。在中文 NL2SQL 数据集 DuSQL 上的实验结果表明,添加辅助任务后的算法相对于原始模型取得了更好的效果,能够更好地处理跨域 NL2SQL 任务。

关 键 词:人工智能  深度学习  自然语言处理  语义解析
收稿时间:2022-01-18

Chinese cross-domain NL2SQL algorithm enhanced by auxiliary task
HU Yahong,LIU Yadong,ZHU Zhengdong,LIU Pengjie. Chinese cross-domain NL2SQL algorithm enhanced by auxiliary task[J]. Journal of National University of Defense Technology, 2024, 46(2): 197-204
Authors:HU Yahong  LIU Yadong  ZHU Zhengdong  LIU Pengjie
Affiliation:College of Computer Science and Technology, Zhejiang University of Technology, Hangzhou 310023, China;School of Software Engineering, Xi′an Jiaotong University, Xi′an 710049, China;School of Computer Science and Technology, Xi′an Jiaotong University, Xi′an 710049, China
Abstract:NL2SQL(natural language to structured query language) task aims to translate natural language queries into SQL(structured query language) executable by the database. A Chinese cross-domain NL2SQL algorithm enhanced by auxiliary tasks was proposed. Core idea was to perform multi-task training and improve the accuracy of the model by adding auxiliary tasks in the decoder and combining the prototype model. Auxiliary task was designed by modeling the database schema into a graph, predicting the dependency relations between the natural language queries and the nodes in the database schema graph, and explicitly modeling the dependency relations between the natural language query and the database schema. Through the improvement of auxiliary tasks, the model can better identify which tables/columns in the database schema are more effective for predicting the target SQL for specific natural language queries. Experimental results on the Chinese NL2SQL dataset DuSQL show that the algorithm after adding auxiliary tasks has achieved better results than the prototype model, and can better handle cross-domain NL2SQL task.
Keywords:artificial intelligence   deep learning   natural language processing   semantic parsing
点击此处可从《国防科技大学学报》浏览原始摘要信息
点击此处可从《国防科技大学学报》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号