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. Our source code is publicly available at https://github.com/daehwannam/candexpr-sp.git.


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

0
下载
关闭预览

相关内容

【博士论文】基于知识的自然语言理解与生成,230页pdf
专知会员服务
41+阅读 · 2024年4月1日
面向知识库问答的问句语义解析研究综述
专知会员服务
33+阅读 · 2022年12月11日
专知会员服务
73+阅读 · 2021年10月6日
【IJCAI2021】复杂知识库问答研究: 方法、挑战与对策
专知会员服务
57+阅读 · 2021年5月27日
语料库构建——自然语言理解的基础
计算机研究与发展
11+阅读 · 2017年8月21日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Arxiv
0+阅读 · 2月1日
Arxiv
0+阅读 · 1月14日
VIP会员
相关VIP内容
【博士论文】基于知识的自然语言理解与生成,230页pdf
专知会员服务
41+阅读 · 2024年4月1日
面向知识库问答的问句语义解析研究综述
专知会员服务
33+阅读 · 2022年12月11日
专知会员服务
73+阅读 · 2021年10月6日
【IJCAI2021】复杂知识库问答研究: 方法、挑战与对策
专知会员服务
57+阅读 · 2021年5月27日
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员