Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inference
R. Thomas McCoy,1 Ellie Pavlick,2、Tal Linzen1 1Department of Cognitive Science, Johns Hopkins University 2Department of Computer Science, Brown University
Abstract
A machine learning system can score well on a given test set by relying on heuristics that are effective for frequent example types but break down in more challenging cases. We study this issue within natural language inference (NLI), the task of determining whether one sentence entails another. We hypothesize that statistical NLI models may adopt three fallible syntactic heuristics: the lexical overlap heuristic, the subsequence heuristic, and the constituent heuristic. To determine whether models have adopted these heuristics, we introduce a controlled evaluation set called HANS (Heuristic Analysis for NLI Systems), which contains many examples where the heuristics fail. We find that models trained on MNLI, including BERT, a state-of-the-art model, perform very poorly on HANS, suggesting that they have indeed adopted these heuristics. We conclude that there is substantial room for improvement in NLI systems, and that the HANS dataset can motivate and measure progress in this area.
中文速览
自然语言推断(NLI)模型在标准测试集上表现亮眼,但研究者怀疑它们其实是靠"走捷径"——依赖词汇重叠、子序列、成分短语等表面语法规律,而非真正理解语义。为此,作者构建了一个专门的评测集 HANS(Heuristic Analysis for NLI Systems),其中所有样本都是这三类捷径会做错的"反例",只要模型真的在靠捷径推断,就必然在这些样本上集体翻车。实验结果触目惊心:包括当时最强模型 BERT 在内的四个主流模型,在 HANS 的非蕴含样本上准确率普遍低于 10%,而随机猜测的基线是 50%,说明它们几乎全部陷入了这些启发式陷阱。这项工作揭示了当前 NLI 系统的系统性缺陷——高分并不等于真懂语言,HANS 数据集也因此可以作为推动和衡量 NLI 模型真实进步的诊断工具。
原文 arXiv:1902.01007;中英对照 + 大白话阅读 https://aha.fim.ai/paper/1902.01007v4