MCPcopy Create free account
hub / github.com/HEmile/neurosymbolic-diffusion

github.com/HEmile/neurosymbolic-diffusion @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,283 symbols 3,628 edges 165 files 467 documented · 36% updated 3mo ago★ 62

Browse by type

Functions 1,084 Types & classes 199
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Code for paper "Neurosymbolic Diffusion Models" (NeSyDMs) (NeurIPS 2025).

Download the paper from https://arxiv.org/abs/2505.13138 .

Setup

Install uv, then run uv sync.

Running experiments

For all scripts below, the hyperparameters as reported in the paper should be used. If not, please add an issue. This project relies on wandb for reporting measures. Some customisation may be needed to ensure runs go in the right wandb project.

Commands

MNIST Add N=4:

uv run expressive/experiments/mnist_op/mnistop.py

MNIST Add N=15:

uv run expressive/experiments/mnist_op/mnistop.py --N 15 --epochs 1000

Path Planning 12x12:

./expressive/experiments/path_planning/download.sh # If data is not yet downloaded
uv run expressive/experiments/path_planning/path_planning.py

Path Planning 30x30:

./expressive/experiments/path_planning/download.sh  # If data is not yet downloaded
uv run expressive/experiments/path_planning/data/merge.py # Data postprocessing step required for N=30
uv run expressive/experiments/path_planning/path_planning.py --grid_size 30 --loss_S 4 --variational_K 2 --test_K 2 --variational_T 2

MNIST Half:

cd expressive/experiments/rsbench
uv run nesydiffusion.py

MNIST Even/Odd

cd expressive/experiments/rsbench
uv run nesydiffusion.py --dataset shortmnist

BDD-OIA: We use preprocessed embeddings. Download these from the RSBench data at https://drive.google.com/drive/folders/1PB4FZrZ_iZ_XH28u-nAykkVqMLDYqACB . Grab BDD-OIA-preprocessed.zip, and extract in expressive/experiments/rsbench/data/.

cd expressive/experiments/rsbench
uv run nesydiffusion.py --dataset boia --task boia --lr 0.0001 --batch_size 256 --epochs 30 --w_denoise_weight 0.000005 --entropy_weight 2.0 --backbone fullentangled

Citation

If you use this work, please cite NeSy Diffusion Models as

@inproceedings{
krieken2025neurosymbolic,
title={Neurosymbolic Diffusion Models},
author={Emile van Krieken and Pasquale Minervini and Edoardo Ponti and Antonio Vergari},
booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},
year={2025},
url={https://openreview.net/forum?id=HfdzglsZQH}
}

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 738
Function 346
Class 199

Languages

Python100%

Modules by API surface

expressive/models/diffusion_model.py52 symbols
expressive/experiments/rsbench/utils/metrics.py38 symbols
expressive/experiments/rsbench/preprocessing/clip/model.py36 symbols
expressive/experiments/rsbench/models/utils/utils_problog.py36 symbols
expressive/experiments/rsbench/utils/losses.py27 symbols
expressive/models/dit.py25 symbols
expressive/methods/logger.py24 symbols
expressive/experiments/rsbench/models/utils/deepproblog_modules.py24 symbols
expressive/experiments/rsbench/datasets/utils/kand_creation.py24 symbols
expressive/methods/base_model.py20 symbols
expressive/experiments/rsbench/datasets/shortcutmnist.py19 symbols
expressive/experiments/rsbench/datasets/utils/base_dataset.py17 symbols

For agents

$ claude mcp add neurosymbolic-diffusion \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page