Relational Neural Machines

Giuseppe Marra, Michelangelo Diligenti, Francesco Giannini, Marco Gori, Marco Maggini

Abstract

Relational Neural Machines (RNMs) provide a unified framework to jointly train deep learning "learners" and symbolic "reasoners" based on First-Order Logic (FOL). By co-optimizing neural network weights and logic rule strengths within an exponential family distribution, RNMs exploit high-level domain knowledge while remaining robust to noisy data and scalable to large-scale relational problems. This approach bridges the gap between the perceptual strengths of deep learning and the structured reasoning of symbolic logic.

Introduction

Deep learning excels at perception—transforming raw sensory data into labels—but often struggles with reasoning, particularly when decisions require understanding complex relationships between objects. Conversely, symbolic logic is excellent at reasoning but remains brittle when faced with the uncertainty and noise inherent in real-world data.

Existing neuro-symbolic approaches typically suffer from two primary issues: brittle integration, where reasoners are simply stacked on top of pre-trained learners, and fixed knowledge, where logic rules are assumed to be 100% true with fixed importance. RNMs address these gaps by creating a single, differentiable architecture where perception (neural networks) and logic (Markov Logic Networks) are trained together.

Methodology

RNMs are defined using an exponential family distribution where the probability of a set of labels is determined by two types of potentials:

  • Supervised Potentials ($\Phi_0$): These represent the standard mapping from input data to labels. Standard Softmax and Sigmoid classifications are shown to be special cases of these potentials.
  • Logic Potentials ($\Phi_c$): These represent FOL rules. Each rule is assigned a weight ($\lambda$) that determines its influence on the final prediction.
Graphical representation of an RNM, showing the interaction between neural features and logical predicates.

Technical Innovations

To make this integration tractable, RNMs employ several key innovations. First, they utilize joint training to learn both neural network weights ($w$) and logic rule weights ($\lambda$) simultaneously. To handle the computational complexity of large graphs, the authors use piecewise local approximations and pseudo-likelihood. Furthermore, discrete logic is relaxed into continuous values $[0, 1]$ using T-Norms (Product, Gödel, or Łukasiewicz), allowing for gradient-based optimization. For transductive learning scenarios with unobserved data, an Expectation-Maximization (EM) schema is employed.

Experimental Evaluation

The framework was evaluated on two distinct tasks: MNIST Following Pairs and the CiteSeer document classification dataset. CiteSeer consists of 3,312 scientific papers and 4,732 citation links, where the goal is to classify papers into six categories by leveraging both text content and the citation network.

Key Results

In the MNIST task, RNM demonstrated significant robustness to noise; as logic rules became noisier, accuracy gracefully degraded to the neural network baseline but never fell below it. In the CiteSeer experiment, RNM consistently outperformed both the baseline Neural Network and Semantic Based Regularization (SBR).

Performance comparison on the CiteSeer dataset across varying amounts of training data.

As shown in the results, the performance gap is most pronounced in partially observed (transductive) cases. With only 10% of labels available, RNM achieved 70.8% accuracy, significantly outperforming the NN baseline of 64.0%.

Discussion and Insights

A critical insight from this work is the use of soft logic as a safety net. If a logic rule proves irrelevant or incorrect for the data, the RNM automatically learns a low weight ($\lambda$) for it, effectively ignoring the rule and relying on raw data. This proves that standard deep learning is essentially an RNM where all logic weights are zero. Furthermore, the model's ability to learn specific weights for citation behaviors in different research communities highlights the importance of relational context.

Conclusion

While RNMs offer a powerful framework for neuro-symbolic integration, challenges remain regarding computational complexity during the "grounding" of logic rules in dense graphs. Future work may explore structured problems where outputs are complex objects, such as parse trees or segmented images. Nonetheless, RNMs represent a significant step toward unifying perception and reasoning in a robust, differentiable manner.

Summary updated

BibTeX
@inproceedings{marra2020relational,
  author = {Giuseppe Marra and Michelangelo Diligenti and Francesco Giannini and Marco Gori and Marco Maggini},
  title = {{Relational Neural Machines}},
  booktitle = {ECAI},
  year = {2020},
  doi = {10.3233/faia200237},
}
Figure