Semantic parsers convert natural language to logical forms, which can be evaluated on knowledge bases (KBs) to produce denotations. Recent semantic parsers have been developed with sequence-to-sequence (seq2seq) pre-trained language models (PLMs) or large language models, where the models treat logical forms as sequences of tokens. For syntactic and semantic validity, the semantic parsers use grammars that enable constrained decoding. However, the grammars lack the ability to utilize large information of KBs, although logical forms contain representations of KB elements, such as entities or relations. In this work, we propose a grammar augmented with candidate expressions for semantic parsing on a large KB with a seq2seq PLM. The grammar defines actions as production rules, and our semantic parser predicts actions during inference under the constraints by types and candidate expressions. We apply the grammar to knowledge base question answering, where the constraints by candidate expressions assist a semantic parser to generate valid KB elements. We also introduce two special rules, sub-type inference and union types, and a mask caching algorithm. In particular, sub-type inference and the mask caching algorithm greatly increase the decoding speed of our semantic parser. We experimented on two benchmarks, KQA Pro and Overnight, where the constraints by candidate expressions increased the accuracy of our semantic parser, whether it was trained with strong supervision or weak supervision. In addition, our semantic parser had a fast decoding speed in the experiments.


翻译:语义解析器将自然语言转换为逻辑形式,可在知识库上求值以生成指称。近期语义解析器基于序列到序列预训练语言模型或大语言模型开发,这些模型将逻辑形式视为词元序列。为确保句法和语义有效性,语义解析器采用支持约束解码的语法。然而,尽管逻辑形式包含知识库元素(如实体或关系)的表示,现有语法缺乏利用知识库海量信息的能力。本研究提出一种增强候选表达式的语法,用于基于序列到序列预训练语言模型的大规模知识库语义解析。该语法将动作定义为产生式规则,我们的语义解析器在类型与候选表达式的双重约束下预测推理动作。我们将该语法应用于知识库问答任务,其中候选表达式约束能辅助语义解析器生成有效的知识库元素。同时引入子类型推断与联合类型两条特殊规则,以及掩码缓存算法。特别地,子类型推断与掩码缓存算法显著提升了语义解析器的解码速度。我们在KQA Pro和Overnight两个基准测试上进行实验,结果表明无论采用强监督还是弱监督训练,候选表达式约束均能提升语义解析器的准确率。此外,我们的语义解析器在实验中展现出快速解码能力。

0
下载
关闭预览

相关内容

通过学习、实践或探索所获得的认识、判断或技能。
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
163+阅读 · 2019年10月12日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
A Survey on Deep Learning for Named Entity Recognition
Arxiv
73+阅读 · 2018年12月22日
VIP会员
相关资讯
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
相关基金
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员