arXiv:2606.19279cs.AIcs.LG2026-06

统一神经符号语义框架,实现可微分的逻辑学习与高效训练。

NeSyCat Torch: A Differentiable Tensor Implementation of Categorical Semantics for Neurosymbolic Learning

  • 基于单子构建统一逻辑语义,支持多种推理系统融合。
  • 在手写数字加法任务中速度与精度优于LTN和DeepProbLog。
  • 支持神经网络学习谓词函数,适用于多种一阶神经符号方法。

神经符号语义体系分散:经典、模糊、概率和神经系统各自定义真值规则。NeSyCat扩展ULLER,以强单子和真值聚合结构为参数,统一代数真值定义。现有框架缺乏对神经网络学习的谓词与函数的建模。本文提出NeSyCat Torch,通过神经网络解释计算符号,实现在概率编程与张量后端的统一框架。采用分布单子进行参考语义与度量评估,辅以数值稳定的可微训练单子——对数半环上的懒惰对数张量单子。为批量训练效率引入批处理单子。公理即源码:使用单子绑定语法编写一次,绑定操作实现边缘化并懒惰剪枝冗余分支。在MNIST加法任务中,我们的HaskTorch、JAX和PyTorch实现,在速度与准确率上均超越LTN和DeepProbLog,接近DeepStochLog性能。但不同于DeepStochLog,本方法保持统一框架,适用于多种一阶神经符号方法。该构造依赖于单子参数化;例如,用吉里单子可扩展至连续概率(此处神经表示暂留未来工作)。

原文摘要 · Abstract (English)

Neurosymbolic semantics is fragmented: classical, fuzzy, probabilistic and neural systems each define truth by their own inductive rules. NeSyCat, extending ULLER, subsumes them under a single inductive definition of truth, parametric in a strong monad and an aggregation structure on truth-values. NeSyCat has so far lacked an account of predicates and functions learned by neural networks. We provide NeSyCat Torch as the missing link and interpret computational symbols via neural networks, implementing the framework in probabilistic programming and tensor-based backends. We use the distribution monad for reference semantics and metric evaluation, and complement it by a monad for numerically stable, differentiable training: the lazy log-tensor monad over the log-semiring. For efficient training in batches, we furthermore employ a batch monad. The axioms are the source code: written once in monad-based do-notation, monadic bind performs marginalisation, lazily pruning unneeded branches. On MNIST addition, our HaskTorch, JAX, and PyTorch implementations outperform LTN and DeepProbLog in speed and accuracy, while achieving nearly the accuracy of DeepStochLog. However, unlike DeepStochLog, we stay in a uniform framework that applies to many first-order NeSy approaches. Namely, the construction is parametric in the monad; instantiating it with, e.g., the Giry monad extends the approach to continuous probability (working out a neural representation here is left for future work).

神经符号可微分逻辑张量计算单子

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