arXiv:2501.00759cs.CLcs.AI2025-01ACL被引 9

提升Transformer在逻辑推理中的泛化能力,解决其对未知知识和查询的适应问题。

Enhancing Transformers for Generalizable First-Order Logical Entailment

  • 设计Tega架构,增强Transformer对一阶逻辑蕴含的感知能力。
  • 在知识图谱查询任务中,模型性能优于以往专门方法。
  • 揭示位置编码等设计缺陷,为高效逻辑推理提供新思路。

Transformer作为基础深度学习架构,在推理任务中展现出强大能力。本文研究了其参数化知识下的可泛化一阶逻辑推理能力,并通过知识图谱查询任务量化评估其一阶逻辑蕴含能力。我们建立了分布外泛化中两种分布偏移与知识图谱查询中未见知识和查询设置之间的关联,从而实现细粒度泛化性刻画。在全面数据集上的实验表明,Transformer表现优于此前专门为此任务设计的方法,并提供了关于输入查询语法、词嵌入及Transformer架构对推理能力影响的详实证据。有趣的是,结果揭示了以往实践中位置编码及其他设计选择的不匹配问题。受此启发,我们提出Tega——一种面向逻辑的新型架构,显著提升了通用一阶逻辑蕴含任务的表现。

原文摘要 · Abstract (English)

Transformers, as the fundamental deep learning architecture, have demonstrated great capability in reasoning. This paper studies the generalizable first-order logical reasoning ability of transformers with their parameterized knowledge and how to improve it. Transformers' capability of first-order reasoning is further captured by whether they can conduct first-order logical entailment, which is quantitatively measured by their performance in answering knowledge graph queries. We establish the connections between (1) two types of distribution shifts studied in out-of-distribution generalization and (2) unseen knowledge and query settings discussed in the task of knowledge graph query answering, which makes it possible to characterize the fine-grained generalizability. Results on our comprehensive dataset showed that transformers \textit{outperform} previous methods designed particularly for this task and provided detailed empirical evidence about the impact of the input query syntax, token embedding, and transformer architectures on their reasoning capability. Interestingly, our results revealed the mismatch of positional encoding and other design choices of transformer architectures in previous practices. Motivated by this, we propose TEGA, a logic-aware architecture that significantly improves the performance in generalizable first-order logical entailment.

逻辑推理Transformer知识图谱泛化能力

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。