Text2SQL论文-10:Model-based Interactive Semantic Parsing: Text-to-SQL

原文链接:https://blog.csdn.net/Joycezzz/article/details/109539389

一、摘要&总结&未来工作

1 摘要

设计一个基于模型的智能代理-- decides whether and where human intervention is needed
预测语义解析,确定是否需要人工干预以及在何处需要人工干预,并以自然语言生成一个澄清问题。
代理的关键部分是一个世界模型:它接受一个感知(一个初始问题或来自用户的后续反馈)并过渡到一个新状态
文本到SQL数据集(WikiSQL和Spider)
与现有的将基本解析器视为黑匣子的交互式语义解析方法相比,我们的方法征求的用户反馈较少,但运行时准确性更高。
2 总结和未来工作

提出了一个新的统一框架,名为MISP
组件可以灵活提高性能:
the error detector——通过概率校准增强MISP-SQL中基于概率的错误检测器(有助于使模型置信度与其可靠性保持一致

可以使用基于学习的方法,例如强化决策政策
终身学习的语义解析——从用户获得反馈!——从逐次更新转为批量更新
未来工作:
free-form text as user feedback
strengthening the world model
training the agent
二、Introduction

允许用户无需编程即可查询数据和调用服务的自然语言接口已被确定为语义解析的关键应用程序

挑战:
(1)话语不清楚
(2)现有的精度不足
(3) they are often bound to a certain type of formal language or dataset 难以推广
目前应对:
检测生成的SQL查询中的错误并通过对话请求用户选择其他选项
在生成If-Then程序时询问用户澄清问题
用户本身更倾向于有交互的系统
to develop a general principle for building interactive semantic parsing systems
MISP:

通过error detector决定是否询问用户
通过world model 不断迭代解析后的语句,最后达到稳定状态(世界模型(Ha和Schmidhuber,2018)(因此基于模型),该模型合并了来自环境的用户反馈并过渡到新的代理状态(例如,更新的语义解析)。重复此过程,直到达到终端状态。)
整个问题从概念上讲减少到构建三个关键组件(即,世界模型,错误检测器和执行器)——提出了这个相对简化的框架,但是也因此生成了butch批量迭代和系统不稳定问题!

展示了基于三个基本语义解析器(SQLNet,SQLova和SyntaxSQLNet)和两个数据集(WikiSQL和Spider)的框架的有效性——交互式语义解析器可以将准确性提高10%至15%的绝对值

与现有的交互式语义解析系统DialSQL(Gur et al。,2018)相比,我们的方法尽管简单得多但更通用,但它的系统设计仅通过询问一半的问题就可以实现更好的解析精度。

三、Background & Related Work

1 Semantic Parsing(语义解析):将自然语言话语映射到其形式语义表示

text-to-SQL
数据集:WikiSQL
model:
SQLNet ——leverages the pre-defined SQL grammar sketches on WikiSQL and solves the SQL generation problem via“slotfilling.” augmentingSQLNet with a table-aware BERT encoder【基于预训练模型】
revising the value prediction in WHERE clauses, SQLova (Hwang et al., 2019) advances further the state of the art;Groupby【修正结构】
SyntaxSQLNet,一种具有模块化解码器的语法树网络,该网络通过按照SQL语法递归调用模块来生成SQL查询。(20%的精度)【语法树】
MISP可以将上面三个解析器放入模型,作为底层的解析器(模型对比)
2 交互式语义解析!

扩展性差:

SQL查询都遵循相同且给定的语法sketch。|| If-Then程序中组件之间的预定义两级层次结构,并且无法泛化成具有更深层次结构的形式语言。
MISP aims for a general design principle by explicitly identifying and decoupling important components, such as error detector, question generator and world model.尝试集成和利用强大的基础语义解析器,并将其转换为自然的交互式语义解析系统,从而大大降低了工程成本。
四、Model-based Interactive Semantic Parsing

MISP框架


(1)Environment::具有特定意图的用户(an expected semantic parse)


(2)Agent State:
A straightforward design of the agent state is as the currently predicted semantic parse. It can also be endowed with meta information of the parsing process such as prediction probability or uncertainty to facilitate error detection.

(3)World model: 模型的Key component!
compresses the historical percepts throughout the interaction and predicts the future based on the agent’s knowledge of the world————>it models the transition of the agent state:

The transition can be deterministic or stochastic(随机的 )

(4)Error Detection:对其状态进行自省,并确定是否以及在何处需要人工干预。

**(5)Actuator: **执行器
具有面向用户的界面||can be a natural language generator (NLG) ||或直观的图形用户界面

五、MISP-SQL: An Instantiation of MISP for Text-to-SQL

黄色显示 更改Base Semantic Parser 的过程(changing the probability distribution or removing certain prediction paths)
错误检测器基于 语义解析的不确定性
执行器是为通用SQL语言开发的基于模板的自然语言问题生成器。
(1)Agent State

基本解析器通过预测一系列SQL组件来生成SQL查询


each prediction is associated with its uncertainty
(2)Error Detector

具有内省性(uncertain probability)和贪婪性,它的决定完全基于最后的预测Ot(probability和standard deviation under Bayesian dropout )而不是整个状态st。

Probability-based Uncertainty:
阈值确定法:


Dropout-based Uncertainty:
与防止模型在训练时过度拟合的标准应用不同,我们在测试时使用它来测量模型不确定性,

(3)Actuator: An NL Generator——rule based

generating questions about a certain SQL component in a systematic way.
consists of a seed lexicon(词典) and a grammar(语法) for deriving questions.下面是示例,更具体的见于 Appendix A


COL for columns and Q for generated questions.


(4)world model

直接使用基本语义解析器转换状态,从而节省了额外的训练工作。(训练完的结果)
user只能确认预测,或者否认预测(很多时候他也不清楚,所以我们返回一个猜测的东西让他判断对错)

用户反馈后:

考虑最大数量的K个替代方案(除了原始预测之外)来征求用户反馈。

六、Experiments

数据集:WikiSQL

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值