arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2403.11314cs.LGcs.CL
收藏

Transformer中的推理——缓解虚假相关与推理捷径

Reasoning in Transformers -- Mitigating Spurious Correlations and Reasoning Shortcuts

University of Gothenburg(哥德堡大学);Chalmers University of Technology(查尔姆斯理工大学)

Daniel Enström, Viktor Kjellberg, Moa Johansson

AI总结:

本文研究Transformer在命题逻辑推理中如何避免虚假相关导致的推理捷径,提出神经符号模型SIP-BART并验证其有效性,同时识别出四类新的推理错误。

摘要:

Transformer语言模型是用于处理各种自然语言任务的神经网络,其中一些任务还需要逻辑推理。然而,Transformer模型可能轻易学习到数据中的虚假模式,从而短路实际的推理过程。在本文中,我们研究了Transformer在多大程度上可以被训练以a)近似命题逻辑中的推理,同时b)避免通过训练数据中的虚假相关而导致的已知推理捷径。为此,我们使用了一个已知在真值与问题中规则数量等之间存在虚假相关的数据集。我们用证明来增强数据,并训练了两个模型:一个生成式Transformer模型WP-BART,在问题及其完整证明上进行训练;以及一个神经符号模型SIP-BART,在单个证明步骤上进行训练,并将生成式Transformer模型BART与符号证明检查器相结合。我们发现,SIP-BART成功避免了推理捷径,而WP-BART则没有。对于SIP-BART,我们随后识别出一些先前文献中未描述的、因使用预训练语言模型而产生的剩余推理错误。我们对这些错误进行了定性分析,以构建一个包含四种不同类型额外陷阱的分类体系。

英文摘要:

Transformer language models are neural networks used for a wide variety of tasks concerning natural language, including some that also require logical reasoning. However, a transformer model may easily learn spurious patterns in the data, short-circuiting actual reasoning. In this paper we investigate to what extent transformers can be trained to a) approximate reasoning in propositional logic while b) avoiding known reasoning shortcuts via spurious correlations in the training data. To do so, we use a dataset with known spurious correlation between truth and e.g. the number of rules in the problem. We augment the data with proofs, and train two models: a generative transformer, WP-BART, trained on problems and their whole proofs, and a neuro-symbolic model, SIP-BART, trained on individual proof steps and combining the generative transformer model BART with a symbolic proof checker. We find that SIP-BART succeeds in avoiding reasoning shortcuts, while WP-BART does not. For SIP-BART, we then identify a few remaining reasoning errors, not previously described in the literature, arising from using a pre-trained language model. These are qualitatively analysed to create a taxonomy of four different types of additional pitfalls.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑