A Semantic Framework for Neural-Symbolic Computing

Simon Odense, Artur d'Avila GarcezarXiv 2022

Abstract

The field of neuro-symbolic AI aims to benefit from the combination of neural networks and symbolic systems. A cornerstone of the field is the translation or encoding of symbolic knowledge into neural networks. Although many neuro-symbolic methods and approaches have been proposed, and with a large increase in recent years, no common definition of encoding exists that can enable a precise, theoretical comparison of neuro-symbolic methods. This paper addresses this problem by introducing a semantic framework for neuro-symbolic AI. We start by providing a formal definition of semantic encoding, specifying the components and conditions under which a knowledge-base can be encoded correctly by a neural network. We then show that many neuro-symbolic approaches are accounted for by this definition. We provide a number of examples and correspondence proofs applying the proposed framework to the neural encoding of various forms of knowledge representation. Many, at first sight disparate, neuro-symbolic methods, are shown to fall within the proposed formalization. This is expected to provide guidance to future neuro-symbolic encodings by placing them in the broader context of semantic encodings of entire families of existing neuro-symbolic systems. The paper hopes to help initiate a discussion around the provision of a theory for neuro-symbolic AI and a semantics for deep learning.

Introduction

Neuro-symbolic AI (NeSy) aims to combine the robust learning of neural networks with the clear reasoning of symbolic logic. However, the field has long been a "Wild West" of techniques, ranging from energy-based models like Hopfield networks to fuzzy logic loss functions in Logic Tensor Networks. Until now, there has been no common theoretical ground to compare these methods precisely. This paper, authored by Simon Odense and Artur d’Avila Garcez, provides a rigorous mathematical foundation by introducing a formal set-theoretic definition of semantic encoding.

The Semantic Framework

The proposed framework shifts the perspective from viewing a network as a black-box function to seeing its internal states as "beliefs" about the world that must satisfy logical constraints. The authors build this framework around three core components:

  1. Candidate Maps ($i$): A function that maps a neural network's state (its neuron activation values) to a set of logical interpretations. A primary example is the "neurons-as-atoms" mapping ($I_{NAT}$), where individual neurons represent specific logical propositions.
  2. Aggregation ($Agg$): Since neural networks are dynamical systems, they may settle into stable states, cycles, or complex limit points. The aggregation function defines how these multiple states combine to represent a single model of the world.
  3. Fidelity Measures ($Fid$): For modern approximate encodings, these functions measure the distance between a network's state and a perfect representation of a knowledge base, using either fuzzy logic ($Fid_{fuzzy}$) or probabilistic distributions ($Fid_{prob}$).
A neural network construction representing logical atoms and rules, typical of the CILP method.

Theoretical Foundations and Correspondence

As a theoretical work, the paper utilizes formal logical languages as its primary data. By applying correspondence proofs, the authors demonstrate that seemingly unrelated NeSy systems fit into this single framework:

  • Propositional Logic: Used to analyze the CORE and CILP methods, which utilize direct "neurons-as-atoms" encoding and union aggregation.
  • First-Order Logic (FOL) Fragments: Specifically the $FOC_2$ fragment (two-variable logic with counting) used to analyze Graph Neural Networks (GNNs).
  • Penalty Logic: Used to bridge symbolic constraints with the energy functions of Hopfield networks.

Key Insights and Results

A major contribution of the paper is the categorization of major NeSy architectures into a unified taxonomy. The authors show that standard supervised classification can be framed as a restricted type of semantic encoding where the training labels serve as the knowledge base. Furthermore, they argue that encoding is fundamentally about the limit points of a network's dynamics; whether a network converges to a fixed point or a cycle determines the logic it can represent.

To illustrate the necessity of aggregation functions, the authors use the Necker Cube analogy: just as the human brain cycles between two valid interpretations of an optical illusion, a recurrent network might cycle between multiple logical models. The framework handles this by aggregating those states into a coherent belief.

Limitations and Future Work

While the framework provides a robust semantic foundation, it currently focuses on mapping states to truth values and does not yet cover syntactic approaches where networks generate formula strings. Additionally, the current definitions assume stable dynamics (fixed points or cycles) and do not yet account for chaotic behavior. The primary direction for future research is the development of a learning theory that guarantees gradient descent algorithms will converge toward these valid semantic encodings.

Summary updated

BibTeX
@misc{odense2022semantic,
  author = {Simon Odense and Artur d'Avila Garcez},
  title = {{A Semantic Framework for Neural-Symbolic Computing}},
  year = {2022},
  eprint = {2212.12050},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.12050},
}
Figure