Introduction
Neurosymbolic AI aims to bridge the gap between "low-level" neural perception and "high-level" logical reasoning. While deep learning excels at identifying patterns in raw data, logic programming provides a framework for complex reasoning and domain knowledge integration. However, existing neurosymbolic frameworks often suffer from significant implementation overhead, restricted logic support (e.g., inability to handle negative cycles), and a lack of support for vague or interval-valued probabilities.
The dPASP framework addresses these challenges by providing a high-performance environment that integrates PyTorch-based deep learning with Answer Set Programming (ASP). It supports complex logical structures, including contradictions and nondeterminism, while significantly outperforming existing tools like DeepProbLog and NeurASP in training efficiency.
Methodology
dPASP extends the syntax of the clingo logic solver to incorporate neural components through Neural Annotated Disjunctive Rules (NADRs). These rules allow logic atoms to have probabilities determined directly by neural network outputs.
A key technical contribution is the use of Lagrangian Parameter Learning. By deriving a learning rule using Lagrange multipliers, dPASP ensures that probability updates remain mathematically valid (summing to one) throughout the training process. Furthermore, the framework supports eight distinct combinations of logic and probabilistic semantics, most notably Credal Semantics, which allows for reasoning with probability intervals rather than fixed points. The core engine is implemented in C to minimize the Python overhead that typically bottlenecks neurosymbolic systems.
Experimental Evaluation
The framework was evaluated on two primary tasks:
- MNIST Addition: A standard benchmark where the model must learn to recognize handwritten digits and perform addition simultaneously, given only the images and their sum.
- Ensemble Classification: A synthetic task involving conflicting predictions from multiple pre-trained classifiers, designed to test the system's ability to handle contradictions and perform cautious reasoning.
Key Results and Insights
The most significant finding is the dramatic improvement in training speed. On the MNIST addition task, dPASP achieved competitive accuracy while being orders of magnitude faster than its predecessors.
As shown in Figure 3, dPASP (1000 batch size) completed training in just 14 seconds, compared to approximately 9 minutes for NeurASP and over 17 minutes for DeepProbLog. This performance gain is attributed to the optimized C-based implementation and reduced "glue code" overhead.
Beyond speed, dPASP's support for diverse semantics allows for more robust reasoning. In the ensemble classification task, the use of Credal Semantics—which considers probability intervals—slightly outperformed standard maximum entropy averaging.
Table 1 (Figure 4) illustrates that being "cautious" about conflicting evidence through Credal semantics can lead to higher overall accuracy (89.99% vs 89.73%). Additionally, dPASP's support for L-stable semantics prevents system failure when encountering inconsistent or contradictory information by allowing for "undefined" states.
Conclusion and Future Work
dPASP represents a significant step forward in making neurosymbolic AI practical and scalable. By moving the interface between neural networks and logic into an optimized C core, it removes a major bottleneck in current research.
Future work will focus on scaling inference. Currently, dPASP relies on exact inference, which is computationally expensive for programs with many probabilistic components. Integrating approximate inference methods, such as sampling or variational techniques, will be essential for applying dPASP to larger domains like natural language processing. Additionally, the authors aim to extend parameter learning capabilities to Credal and L-stable semantics.
Summary updated