Goto

Collaborating Authors

 neurasp


Accelerating NeurASP with vectorization and caching

arXiv.org Artificial Intelligence

Neurosymbolic AI combines neural networks with symbolic programs to create robust and explainable predictions. One such framework is NeurASP, which trains a neural network to predict concepts and reasons over them using rules written in answer set programming (ASP) to solve downstream tasks. Crucially, labels are only provided for the downstream prediction produced by the symbolic rules, not for the latent concepts themselves. Backpropagation through the non-differentiable ASP component requires expensive probability and gradient calculations, which has hindered scalability to more sophisticated tasks. In this paper, we address the current limitations of NeurASP by improving its computational performance through vectorization, batch processing and caching of intermediate computations during training. We compare computation speeds between the original and our new implementation of NeurASP and report speedups of multiple orders of magnitude for larger tasks. To this end, we propose a new dataset of difficult tasks involving playing cards, which we use to test the capabilities of NeurASP's enhanced learning function.


NeurASP: Embracing Neural Networks into Answer Set Programming

arXiv.org Artificial Intelligence

Reasoning way to integrate sub-symbolic and symbolic can help identify perception mistakes that violate semantic computation. We demonstrate how NeurASP can constraints, which in turn can make perception more make use of a pre-trained neural network in symbolic robust. For example, a neural network for object detection computation and how it can improve the neural may return a bounding box and its classification "car," but it network's perception result by applying symbolic may not be clear whether it is a real car or a toy car. The reasoning in answer set programming. Also, distinction can be made by applying reasoning about the relations NeurASP can be used to train a neural network with the surrounding objects and using commonsense better by training with ASP rules so that a neural knowledge. Or when it is unclear whether a round object attached network not only learns from implicit correlations to the car is a wheel or a doughnut, the reasoner could from the data but also from the explicit complex conclude that it is more likely to be a wheel by applying commonsense semantic constraints expressed by the rules.


Extending Answer Set Programs with Neural Networks

arXiv.org Artificial Intelligence

The integration of low-level perception with high-level reasoning is one of the oldest problems in Artificial Intelligence. Recently, several proposals were made to implement the reasoning process in complex neural network architectures. While these works aim at extending neural networks with the capability of reasoning, a natural question that we consider is: can we extend answer set programs with neural networks to allow complex and high-level reasoning on neural network outputs? As a preliminary result, we propose NeurASP -- a simple extension of answer set programs by embracing neural networks where neural network outputs are treated as probability distributions over atomic facts in answer set programs. We show that NeurASP can not only improve the perception accuracy of a pre-trained neural network, but also help to train a neural network better by giving restrictions through logic rules. However, training with NeurASP would take much more time than pure neural network training due to the internal use of a symbolic reasoning engine. For future work, we plan to investigate the potential ways to solve the scalability issue of NeurASP. One potential way is to embed logic programs directly in neural networks. On this route, we plan to first design a SAT solver using neural networks, then extend such a solver to allow logic programs.