ULLER (Unified Language for LEarning and Reasoning) offers a unified first-order logic (FOL) syntax, enabling its knowledge bases to be used directly across a wide range of neurosymbolic systems. The original specification endows this syntax with three pairwise independent semantics: classical, fuzzy, and probabilistic, each accompanied by dedicated semantic rules. We show that these seemingly disparate semantics are all instances of one categorical framework based on monads, the very construct that models side effects in functional programming. This enables the modular addition of new semantics and systematic translations between them. As example, we outline the addition of generalised quantification in Logic Tensor Networks (LTN) to arbitrary (also infinite) domains by extending the Giry monad to probability spaces. In particular, our approach allows a modular implementation of ULLER in Python and Haskell, of which we have published initial versions on GitHub.
翻译:ULLER(统一学习和推理语言)提供了一种统一的一阶逻辑语法,使其知识库能够直接用于多种神经符号系统。原始规范为这种语法赋予了三种两两独立的语义:经典语义、模糊语义和概率语义,每种语义都配有专门的语义规则。我们证明这些看似不同的语义均是基于单子(即函数式编程中建模副作用的构造)的同一范畴框架的实例。这实现了新语义的模块化添加以及它们之间的系统转换。作为示例,我们通过将Giry单子扩展到概率空间,概述了在逻辑张量网络(LTN)中将广义量化添加到任意(包括无限)域的方法。特别地,我们的方法允许在Python和Haskell中模块化实现ULLER,我们已在GitHub上发布了初始版本。