Abstract
Despite significant progress in the development of neural-symbolic frameworks, the question of how to integrate a neural and a symbolic system in a compositional manner remains open. Our work seeks to fill this gap by treating these two systems as black boxes to be integrated as modules into a single architecture, without making assumptions on their internal structure and semantics. Instead, we expect only that each module exposes certain methods for accessing the functions that the module implements: the symbolic module exposes a deduction method for computing the function's output on a given input, and an abduction method for computing the function's inputs for a given output; the neural module exposes a deduction method for computing the function's output on a given input, and an induction method for updating the function given input-output training instances. We are, then, able to show that a symbolic module—with any choice for syntax and semantics, as long as the deduction and abduction methods are exposed—can be cleanly integrated with a neural module, and facilitate the latter's efficient training, achieving empirical performance that exceeds that of previous work.
Introduction
The integration of deep learning and symbolic logic represents a fundamental challenge in artificial intelligence. While deep learning excels at perception—transforming raw data into high-level concepts—symbolic logic is unparalleled in its ability to reason over those concepts using formal rules. The primary obstacle to their seamless integration is the non-differentiable nature of logical reasoning, which prevents standard backpropagation from flowing through symbolic components.
Existing neuro-symbolic solutions often resort to compromises, such as restricting logic to simple forms or replacing classical logic with "fuzzy" differentiable variants that alter underlying semantics. Furthermore, many systems suffer from scalability issues, requiring the entire logic theory to be "grounded" (expanded into every possible instance) during each training step. This work introduces NEUROLOG, a framework that addresses these issues by treating neural and symbolic components as independent, compositional "black-box" modules.
The NEUROLOG Framework
NEUROLOG facilitates communication between neural and symbolic modules through a clean interface of deduction and abduction. The architecture operates as a pipeline where a neural module processes raw input (e.g., images of a chessboard) to output probabilities. These are converted into symbolic atoms by a translator, which the symbolic module then uses to deduce a final outcome.
Abductive Feedback and Differentiable Loss
During training, NEUROLOG utilizes the provided label to perform abduction, working backward from the final answer to determine what the neural module must have perceived for that answer to be logically valid. Unlike prior frameworks that might select a single "best" explanation, NEUROLOG considers the disjunction of all valid abductive proofs. By applying Weighted Model Counting (WMC), the framework transforms this logical formula into a differentiable loss function. This allows the neural network to learn from the collective weight of all possible logical explanations, leading to more stable training.
To further optimize this process, the authors introduce Neural-Guided Abduction (NGA). In this mode, the neural module’s current predictions are used to prune the search space for abduction, focusing the reasoner on explanations most consistent with the current state of the perceiver.
Experimental Evaluation
The framework was evaluated across a diverse set of complex benchmarks, including standard vision-logic tasks (MNIST, HASY, GTSRB) and algorithmic scenarios like grid summation (ADD2x2) and pathfinding between road signs (PATH(n)). A particularly challenging Chess Domain was also introduced, requiring the system to handle intricate integrity constraints, such as ensuring no two pieces occupy the same square.
Key Results
NEUROLOG consistently outperformed state-of-the-art competitors such as DeepProbLog, NeurASP, and ABL in both accuracy and efficiency:
- Accuracy: In the complex
MATH(5)scenario, NEUROLOG achieved 92.2% accuracy, significantly outperforming NeurASP, which reached only 18.2%. - Efficiency: NEUROLOG demonstrated orders-of-magnitude speed improvements. For the
PATH(6)task, NEUROLOG completed training in 43 minutes, while competing systems timed out. - Robustness: The system showed reduced sensitivity to initial random weights, maintaining a tighter performance spread across different runs compared to its peers.
Discussion and Future Work
A core insight of this research is that compositionality allows for the use of standard logic engines (like Prolog) without modifying their syntax or semantics. Additionally, the ability to cache abductive proofs—which depend only on labels and the logic theory—provides a significant speed advantage over grounding-heavy systems.
While highly effective, the framework faces limitations due to the NP-hard nature of abduction, which may become a bottleneck for extremely large-scale theories. Furthermore, the current model assumes the symbolic rules are largely known. Future research will explore extending this compositional approach to non-declarative symbolic modules, such as procedural code, and investigating methods for the automated discovery of complex logical theories.
Summary updated