https://github.com/april-tools/pal
PAL - your probabilistic algebraic layer
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.8%) to scientific vocabulary
Repository
PAL - your probabilistic algebraic layer
Basic Info
- Host: GitHub
- Owner: april-tools
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Size: 19.4 MB
Statistics
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
PAL - A Probabilistic Neuro-symbolic Layer for Algebraic Constraint Satisfaction
This repo contains the code for PAL, a probabilistic neuro-symbolic layer for algebraic constraint satisfaction. This is a simplified implementation that focuses on the spline-case.
Check out the paper: https://arxiv.org/abs/2503.19466v1
Example Prediction
This is an example prediction of PAL on the Constrained Stanford Drone Dataset (https://github.com/april-tools/constrained-sdd). We predict a probability distribution over the future trajectory while guaranteeing constraint-satisfaction.

Citation
Leander Kurscheidt, Paolo Morettin, Roberto Sebastiani, Andrea Passerini, Antonio Vergari, A Probabilistic Neuro-symbolic Layer for Algebraic Constraint Satisfaction, arXiv:2503.19466
Installation
Just clone it and run:
bash
./setup.sh
And you're ready to go!
Constrained Stanford Drone Dataset
We provide an example script how to train a simple MLP on the constrained SDD-dataset. A model can be trained like this:
bash
python pal/training/train_mlp_sdd.py --epochs 10 --init_last_layer_positive --seed 1744909132
This should result in a (mean) test log-likelihood of -1.9149.
GASP!
The dependency was added via subtree from https://github.com/april-tools/gasp.git into pal/wmi/gasp!
update via:
bash
git subtree pull --prefix pal/wmi/gasp https://github.com/april-tools/gasp.git main --squash
push via:
bash
git subtree push --prefix pal/wmi/gasp https://github.com/april-tools/gasp.git main
Owner
- Name: april-tools
- Login: april-tools
- Kind: organization
- Repositories: 6
- Profile: https://github.com/april-tools
GitHub Events
Total
- Watch event: 2
- Push event: 3
- Public event: 1
- Pull request event: 1
Last Year
- Watch event: 2
- Push event: 3
- Public event: 1
- Pull request event: 1
Dependencies
- actions/checkout v4 composite
- actions/setup-python v3 composite
- Explicitly *
- Install *
- Main *
- PySMT >=0.9.6.dev53
- networkx *
- numpy *
- pytest *
- pytest-runner *
- sympy >=1.13
- test *
- torch >=2.6.0
- wmipa *
- PySMT >=0.9.6.dev53
- constrained-sdd >=0.1.5
- frozendict *
- jupyterlab *
- matplotlib *
- networkx *
- numpy >=2.2.4
- package_root *
- pytest >=8.3.5
- requests >=2.32.3
- scikit-learn >=1.6.1
- sympy >=1.13
- torch >=2.6.0
- tqdm *