用张量运算统一逻辑推理与神经网络,实现可解释的多跳推理。
Implementing Tensor Logic: Unifying Datalog and Neural Reasoning via Tensor Contraction
- 用张量迭代替代递归规则,计算家谱图的传递闭包
- 零样本完成复合推理,在知识图谱上达到0.3346的准确率
- 适合研究可解释AI与神经符号系统融合的研究者
符号推理与神经网络的统一仍是人工智能的核心挑战。符号系统可靠且可解释,但难以扩展;神经网络具备学习能力,却缺乏透明性。张量逻辑提出逻辑规则与爱因斯坦求和在数学上等价,为统一提供了理论路径。本文通过三个实验验证该框架:第一,用张量迭代计算包含1,972人的圣经家谱图的传递闭包,经74次迭代发现33,945个祖先关系;第二,在嵌入空间中训练可学习变换矩阵,实现对未见查询的零样本组合推理;第三,在包含14,541实体和237种关系的FB15k-237知识图谱上验证张量逻辑超位置构造,采用Domingos的关系矩阵形式$R_r = E^ op A_r E$,在标准链接预测任务中取得MRR 0.3068,组合推理任务中(训练时移除直接边)取得MRR 0.3346,证明矩阵复合可实现无需直接训练样例的多跳推理。
原文摘要 · Abstract (English)
The unification of symbolic reasoning and neural networks remains a central challenge in artificial intelligence. Symbolic systems offer reliability and interpretability but lack scalability, while neural networks provide learning capabilities but sacrifice transparency. Tensor Logic, proposed by Domingos, suggests that logical rules and Einstein summation are mathematically equivalent, offering a principled path toward unification. This paper provides empirical validation of this framework through three experiments. First, we demonstrate the equivalence between recursive Datalog rules and iterative tensor contractions by computing the transitive closure of a biblical genealogy graph containing 1,972 individuals and 1,727 parent-child relationships, converging in 74 iterations to discover 33,945 ancestor relationships. Second, we implement reasoning in embedding space by training a neural network with learnable transformation matrices, demonstrating successful zero-shot compositional inference on held-out queries. Third, we validate the Tensor Logic superposition construction on FB15k-237, a large-scale knowledge graph with 14,541 entities and 237 relations. Using Domingos's relation matrix formulation $R_r = E^\top A_r E$, we achieve MRR of 0.3068 on standard link prediction and MRR of 0.3346 on a compositional reasoning benchmark where direct edges are removed during training, demonstrating that matrix composition enables multi-hop inference without direct training examples.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。