The majority of Neural Semantic Parsing (NSP) models are developed with the assumption that there are no concepts outside the ones such models can represent with their target symbols (closed-world assumption). This assumption leads to generate hallucinated outputs rather than admitting their lack of knowledge. Hallucinations can lead to wrong or potentially offensive responses to users. Hence, a mechanism to prevent this behavior is crucial to build trusted NSP-based Question Answering agents. To that end, we propose the Hallucination Simulation Framework (HSF), a general setting for stimulating and analyzing NSP model hallucinations. The framework can be applied to any NSP task with a closed-ontology. Using the proposed framework and KQA Pro as the benchmark dataset, we assess state-of-the-art techniques for hallucination detection. We then present a novel hallucination detection strategy that exploits the computational graph of the NSP model to detect the NSP hallucinations in the presence of ontology gaps, out-of-domain utterances, and to recognize NSP errors, improving the F1-Score respectively by ~21, ~24% and ~1%. This is the first work in closed-ontology NSP that addresses the problem of recognizing ontology gaps. We release our code and checkpoints at https://github.com/amazon-science/handling-ontology-gaps-in-semantic-parsing.
翻译:大多数神经语义解析(NSP)模型的开发都基于一个假设:不存在超出这些模型能用其目标符号表示的概念(封闭世界假设)。这一假设导致模型生成幻觉输出,而非承认其知识缺失。幻觉可能引发错误或潜在冒犯性的用户响应。因此,建立防止此类行为的机制对于构建可信赖的基于NSP的问答代理至关重要。为此,我们提出幻觉模拟框架(HSF),这是一个用于激发和分析NSP模型幻觉的通用设置。该框架可应用于任何具有封闭本体论的NSP任务。利用所提出的框架及KQA Pro作为基准数据集,我们评估了最先进的幻觉检测技术。随后,我们提出了一种新颖的幻觉检测策略,该策略利用NSP模型的计算图来检测存在本体论缺口、领域外话语时的NSP幻觉,并识别NSP错误,分别将F1分数提高了约21%、约24%和约1%。这是封闭本体论NSP领域中首个解决识别本体论缺口问题的研究。我们在https://github.com/amazon-science/handling-ontology-gaps-in-semantic-parsing 发布了代码与模型检查点。