Neural-Probabilistic Answer Set Programming

Arseny Skryagin, Wolfgang Stammer, Daniel Ochs, Devendra Singh Dhami, Kristian Kersting

Introduction

Neuro-symbolic AI seeks to synthesize the robust perception of deep neural networks with the high-level reasoning capabilities of symbolic logic. While existing Deep Probabilistic Programming Languages (DPPLs) like DeepProbLog and NeurASP have made significant strides, they often treat neural networks as "neural predicates" that output simple conditional probabilities. This approach creates a "one-way street" where reasoning is dependent on perception, but perception cannot easily be guided by complex logical constraints involving missing or generative data.

To address these limitations, we present SLASH, a novel DPPL that bridges the gap between neural perception and logical reasoning through Neural-Probabilistic Predicates (NPPs). By enabling joint probability estimation, SLASH allows for advanced tasks such as reasoning with highly incomplete data and generative logic-based learning that were previously out of reach for neuro-symbolic systems.

The SLASH Framework

The core innovation of SLASH is the integration of Answer Set Programming (ASP) with NPPs. Unlike standard neural predicates, NPPs can incorporate both neural networks and Probabilistic Circuits (PCs).

The SLASH architecture for set prediction on ShapeWorld4.

Neural-Probabilistic Predicates (NPPs)

NPPs allow the model to estimate joint distributions $P(X, C)$ rather than just conditional distributions $P(C|X)$. This is achieved by using Probabilistic Circuits, which are deep models designed for tractable joint density estimation. This tractability ensures that complex operations, such as calculating marginal probabilities when data is missing, can be performed efficiently and exactly. This allows the system to maintain high performance even when inputs are severely degraded.

Syntax and Logic Integration

SLASH introduces a flexible syntax to define queries using a +/- notation. A + denotes an observed variable, while a - indicates a query variable. For instance, color(+X, -C) computes the probability of a color $C$ given an image $X$. Conversely, color(-X, +C) can be used for generative tasks, determining the likelihood of an image given a specific color label.

Example SLASH program and query for set prediction tasks.

The framework combines these predicates within an ASP program, allowing for complex logical rules and constraints. Training is performed using a unified loss function that balances negative log-likelihood for the probabilistic modules and cross-entropy for logical queries, optimized via coordinate descent.

Experimental Evaluation

The researchers evaluated SLASH across several challenging benchmarks to demonstrate its versatility and robustness.

MNIST Addition and Missing Data

In the standard MNIST addition task, SLASH achieved a state-of-the-art accuracy of 98.99%, outperforming existing frameworks with significantly lower variance during training. More impressively, in a "Missing Data MNIST" variant where up to 97% of pixels were removed, SLASH maintained an accuracy of 84.2%. In contrast, the performance of DeepProbLog dropped to approximately 32% under the same conditions, highlighting the power of marginalization in NPPs.

ShapeWorld4 and Compositional Generalization

On the ShapeWorld4 dataset, SLASH was tasked with set prediction—identifying the attributes of multiple objects in an image. The inclusion of logical constraints (e.g., "each object has exactly one color") acted as a powerful regularizer, improving both the convergence speed and final performance of the underlying neural slot-attention mechanism. Furthermore, in the CoGenT task, which tests generalization to unseen attribute combinations (like "yellow circles"), SLASH improved average precision by 13% over purely neural baselines.

Key Insights

  • Joint Probabilities as a Superpower: By modeling $P(X, C)$, SLASH can "marginalize out" missing information, allowing it to reason effectively even when the input data is severely degraded.
  • Logic as a Regularizer: Symbolic constraints provide a strong inductive bias that helps neural components learn more structured and interpretable representations, particularly in complex multi-object scenes.
  • Generative Reasoning: SLASH possesses a "probabilistic imagination." It can perform generative tasks, such as producing a likely image of a missing digit to satisfy a logical sum, a feat beyond the reach of purely discriminative neuro-symbolic systems.

Conclusion

SLASH represents a significant step forward for neuro-symbolic AI. By moving beyond simple classification and embracing joint probability estimation, it enables models to reason about what they don't see as effectively as what they do. While future work will focus on improving optimization strategies and generative visual quality, SLASH provides a robust foundation for the next generation of reasoning-capable AI systems.

Summary updated

BibTeX
@inproceedings{skryagin2022neural,
  author = {Arseny Skryagin and Wolfgang Stammer and Daniel Ochs and Devendra Singh Dhami and Kristian Kersting},
  title = {{Neural-Probabilistic Answer Set Programming}},
  booktitle = {KR},
  year = {2022},
}
Figure