A Probabilistic Neuro-symbolic Layer for Algebraic Constraint Satisfaction

Leander Kurscheidt, Paolo Morettin, Roberto Sebastiani, Andrea Passerini, Antonio Vergari
3/25/2025
11 citations
cs.LG

Official code: april-tools/pal (14 stars, Jupyter Notebook, MIT, last commit 2026-03-20). 1 more implementation below.

Abstract

In safety-critical applications, guaranteeing the satisfaction of constraints over continuous environments is crucial, e.g., an autonomous agent should never crash into obstacles or go off-road. Neural models struggle in the presence of these constraints, especially when they involve intricate algebraic relationships.

Show full abstract

To address this, we introduce a differentiable probabilistic layer that guarantees the satisfaction of non-convex algebraic constraints over continuous variables. This probabilistic algebraic layer (PAL) can be seamlessly plugged into any neural architecture and trained via maximum likelihood without requiring approximations. PAL defines a distribution over conjunctions and disjunctions of linear inequalities, parameterized by polynomials. This formulation enables efficient and exact renormalization via symbolic integration, which can be amortized across different data points and easily parallelized on a GPU. We showcase PAL and our integration scheme on a number of benchmarks for algebraic constraint integration and on real-world trajectory data.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
april-tools/palOfficial14Jupyter NotebookMIT2026-03-20
april-tools/constrained-sddOfficial10Jupyter NotebookMIT2026-04-15
april-tools/palOfficial100%
MIT

PAL - your probabilistic algebraic layer

141Jupyter Notebook, PythonFeb 21, 20258 months agoMIT
MIT

Stanford Drone Dataset with non-convex Constraints

100Jupyter Notebook, PythonMar 20, 20257 months agoMIT

Similar Papers

Cite this paper

@article{kurscheidt2025probabilistic,
  title  = {A Probabilistic Neuro-symbolic Layer for Algebraic Constraint Satisfaction},
  author = {Leander Kurscheidt and Paolo Morettin and Roberto Sebastiani and Andrea Passerini and Antonio Vergari},
  year   = {2025},
  eprint = {2503.19466},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.19466v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.19466.svg)](https://codeofpaper.com/paper/2503.19466)

Discussion