Source-linked AI summary
Integrating Learning and Reasoning with Deep Logic Models
Giuseppe Marra, Francesco Giannini, Michelangelo Diligenti, Marco Gori
TL;DR
Deep learning handles low-level perception, whereas probabilistic logic supports high-level reasoning, but integrating them remains an open problem. This paper introduces Deep Logic Models, which embed neural learners in a differentiable logic architecture and jointly learn neural and reasoning parameters. Experiments report improved performance over competing approaches, while learning uses a MAP-based approximation because direct expected-value computation is infeasible.
Problem
Integrating deep learning for low-level perception with symbolic reasoning for high-level decisions remains an open research problem.
Source: §1 · p. 2Method
Deep Logic Models embed neural learners in a graphical model with differentiable potentials representing first-order-logic constraints, jointly learning neural weights and reasoning parameters.
Source: §1 · p. 2, §2 · p. 3, §2.3 · p. 7Results
DLMs outperform competing methods on knowledge-graph tasks S2 and S3 and solve task S1 perfectly when the transitive relation is learned.
Source: §4.2 · p. 14Takeaways & Limitations
Jointly learning low-level representations and semantic reasoning improves the accuracy of both layers within the proposed framework.
Source: §5 · p. 15Direct computation of expected values in the learning derivatives is infeasible, requiring a MAP-centered approximation.
Source: §2.2 · p. 5
Abstract
from arXiv · showhide
Deep learning is very effective at jointly learning feature representations and classification models, especially when dealing with high dimensional input patterns. Probabilistic logic reasoning, on the other hand, is capable to take consistent and robust decisions in complex environments. The integration of deep learning and logic reasoning is still an open-research problem and it is considered to be the key for the development of real intelligent agents. This paper presents Deep Logic Models, which are deep graphical models integrating deep learning and logic reasoning both for learning and inference. Deep Logic Models create an end-to-end differentiable architecture, where deep learners are embedded into a network implementing a continuous relaxation of the logic knowledge. The learning process allows to jointly learn the weights of the deep learners and the meta-parameters controlling the high-level reasoning. The experimental results show that the proposed methodology overtakes the limitations of the other approaches that have been proposed to bridge deep learning and reasoning.
1 Introduction
Deep learning excels at low-level perception and joint representation learning, while symbolic reasoning supports interpretable high-level inference under uncertainty. Deep Logic Models address the open challenge of combining these strengths through a unified, jointly trainable framework.
- Deep learning effectively learns feature representations and classification models for high-dimensional perception tasks, including speech, vision, and language processing.Source: §1 · pp. 1–2
- Symbolic reasoning enables high-level logical and probabilistic inference with more interpretable chains of reasoning than typical sub-symbolic models.Source: §1 · p. 2
- The need to learn high-level reasoning from data can make deep learning require substantially more training data for complex tasks.Source: §1 · p. 2
- Combining symbolic and sub-symbolic approaches remains a major open problem addressed by recent neurosymbolic methods.Source: §1 · p. 2
- DLMs jointly train low-level neural weights and high-level reasoning parameters within a differentiable architecture supporting general deep learners and output structures.Source: §1 · p. 2
- The paper evaluates the proposed framework experimentally after presenting its model, relating it to prior work, and describing its conclusions and future work.Source: §1 · p. 2
2 Model
DLMs combine a neural sensorial stage with a semantic reasoning stage whose constraints are represented as differentiable potentials. The model supports MAP inference and alternating learning of neural and constraint parameters, using a continuous fuzzy-logic relaxation of first-order logic.
2 Model
- DLM outputs are computed through a low-level neural stage producing f and a semantic stage applying constraints to obtain y from the input X.The parameters split into neural weights w and constraint-enforcement weights λ.Source: §2 · p. 3, Figure 1 · p. 3
2.1 MAP Inference
- MAP inference finds the output assignment y that maximizes p(y|f nn, λ) without computing the partition function when parameters are fixed.The maximization can be optimized by gradient descent.Source: §2.1 · p. 4
2.2 Learning
- Direct expected-value computation in the learning derivatives is infeasible, so the method approximates expectations using values at the MAP solution.This approximation assumes most probability mass is centered around the MAP assignment.Source: §2.2 · p. 5
- Training alternates MAP-solution computation, gradient evaluation, and parameter updates to jointly learn neural weights w and constraint weights λ.The objective is a local approximation of full likelihood maximization for the current MAP solution.Source: §2.2 · p. 6
2.3 Mapping Constraints into a Continuous Logic
- The framework permits general output constraints, while this paper focuses on first-order logic and supports alternative potential choices beyond the selected quadratic form.Source: §2.2 · p. 5, §2.3 · p. 6
- DLMs map closed first-order-logic formulas into differentiable potentials by replacing logical connectives with fuzzy-logic operations in expression trees.Grounded predicate values enter the tree, whose root evaluates the grounded rule.Source: §2.3 · pp. 6–7
- Universal quantifiers are aggregated by averaging grounded truth degrees, whereas existential quantifiers use the maximum over groundings.Source: §2.3 · pp. 7–8
2.4 Potentials expressing the logic knowledge
- Each unknown grounded predicate becomes a variable in y and a corresponding neural value in f nn, while logical dependencies form constraint cliques in the graphical model.The resulting model combines neural-output cliques with rule-induced cliques.Source: §2.4 · p. 8
3 Related Works
Related approaches connect logic and learning through graphical models, differentiable relaxations, structured outputs, or neural theorem proving, but differ in flexibility, training, and computational requirements.
- DLMs extend probabilistic soft logic by jointly integrating deep learners with logical reasoning rather than using simple stacking without joint training.DLM rule weights represent constraint reactions, whereas PSL restricts rule weights to positive values measuring distance from rule satisfaction.Source: §3 · pp. 8–9
- Semantic-based regularization and Logic Tensor Networks use continuous logic relaxations but keep reasoning-layer parameters frozen during learning.These methods are therefore less suitable when reasoning must account for uncertainty rather than only hard constraints.Source: §3 · pp. 9–10
- Conditional random fields can be viewed as a special case of DLMs when potentials encode correlations among consecutive recurrent-network outputs.Their demonstrated use includes structured sequence labeling in natural language processing.Source: §3 · p. 10
- DeepProbLog integrates neural learners with probabilistic programming but requires probabilistic neural outputs and atom independence for tractable inference.The independence assumption restricts settings where several neural layers share weights.Source: §3 · p. 10
- Neural Theorem Provers use differentiable Prolog backward chaining, while DLMs learn arbitrary relation functions but require fully grounding the knowledge base.NTPs can be more efficient in some cases because they expand only groundings on the explored frontier.Source: §3 · p. 10
- Deep Structured Models bridge sensory and semantic levels through output correlations, whereas DLMs additionally target logic reasoning and iterative constrained optimization.DLMs also support iterative integration of rule-induction mechanisms from inductive logic programming.Source: §3 · p. 10
4 Experimental Results
The experiments evaluate DLMs on a structured digit-pair task and increasingly difficult Countries link-prediction tasks, testing whether learned logical constraints improve neural predictions.
4.1 The PAIRS artificial dataset
- The PAIRS experiment uses rotated MNIST image pairs with same-parity constraints, probabilistic digit dependencies, and 100 learned rules linking digit predicates.Images are represented by pixel-brightness vectors, and a single network predicts ten digit-membership predicates.Source: §4.1 · pp. 11–12
- DLM output from MAP inference significantly improves over its neural output, while DLM-NN already beats the unstructured neural network and SBR on PAIRS.The comparison uses accuracy across different models on the PAIRS dataset.Source: §4.1 · p. 12, Table 2 · p. 12
4.2 Link Prediction in Knowledge Graphs
- The Countries benchmark predicts locatedIn links among 244 countries, five regions, and 23 sub-regions across three tasks with progressively harder missing facts.Task S1 is solvable through transitivity, S2 requires neighbor-based inference, and S3 requires multiple reasoning steps.Source: §4.2 · p. 13
- DLM learns embeddings and separate neural relation functions for locatedIn and neighborOf, jointly optimizing them with the MAP solution.All eight two-step rules are included, with their strengths estimated during training.Source: §4.2 · pp. 13–14
- DLM perfectly solves S1, where transitive locatedIn reasoning is sufficient, except that the comparison identifies plain NTP as unable to do so.The reported comparison covers ComplEx, NTP, and NTPλ.Source: §4.2 · pp. 13–14, Table 3 · p. 14
- DLMs outperform the competing methods on S2 and S3 because jointly trained neural relation functions provide greater flexibility than competitors’ simple vectorial operations.S3 particularly exploits the model’s sub-symbolic reasoning capability.Source: §4.2 · pp. 13–14
5 Conclusions and future work
Deep Logic Models integrate deep learning and logic reasoning in a single fully differentiable architecture, combining low-level representation learning with high-level semantic reasoning. Jointly learning both components improves accuracy, while future work targets more selective theorem-proving search.
- Deep Logic Models integrate deep learning and logic reasoning into a single fully differentiable architecture.Source: §5 · p. 15
- Unrestricted FOL rules become differentiable potential functions that can be incorporated into the learning process.Source: §5 · p. 15
- Jointly learning deep-learner weights and reasoning parameters creates a positive feedback loop that improves both layers’ accuracy.Source: §5 · p. 15
- Future work aims to connect fully grounded Deep Logic Models with theorem provers that expand only the groundings needed to advance the search frontier.Source: §5 · p. 15