Neurosymbolic Diffusion Models

Emile van Krieken, Pasquale Minervini, Edoardo Ponti, Antonio Vergari

Neurosymbolic Diffusion Models (NESYDMS), presented at NeurIPS 2025, introduces a novel framework that integrates generative diffusion processes into neurosymbolic (NeSy) AI. By replacing the restrictive independence assumptions of traditional models with a discrete diffusion process, NESYDMS captures complex dependencies between latent concepts, effectively mitigating "reasoning shortcuts" and enabling scalability to high-dimensional tasks.

The Challenge: Reasoning Shortcuts and Independence Assumptions

Neurosymbolic AI typically employs a "concept extractor" (a neural network) to identify high-level features from raw data, which are then processed by a symbolic program. However, most existing models assume these concepts are conditionally independent given the input. This assumption leads to Reasoning Shortcuts (RS), where a model achieves correct outputs through incorrect logical paths—for instance, misidentifying digits in an addition task but still arriving at the correct sum. Such models often exhibit overconfidence, poor out-of-distribution generalization, and an inability to represent uncertainty when multiple concept assignments are logically valid.

Methodology: Masked Discrete Diffusion

NESYDMS addresses these issues by treating concept extraction as a masked discrete diffusion process. Instead of a single-pass prediction, the model begins with a fully masked state and iteratively unmasks or predicts concepts. While each step maintains local independence for computational efficiency, the iterative process allows the model to learn and enforce global dependencies.

The NESYDMS architecture: Input images are processed through a variational posterior and an unmasking model to predict concepts, which are then fed into a symbolic program (e.g., Dijkstra's algorithm) to produce a final output.

Key components of the methodology include:

  • Neurosymbolic Evidence Lower Bound (NELBO): A novel loss function derived for continuous-time diffusion that incorporates symbolic program feedback directly into the gradient.
  • Scalable Gradient Estimation: To overcome the #P-hard complexity of weighted model counting, the authors use REINFORCE Leave-One-Out (RLOO). This sampling-based approach allows the model to scale to significantly larger problem sizes than previous methods.
  • Variational Posterior: During training, this component samples concept assignments consistent with ground-truth labels, guiding the diffusion process toward logically sound interpretations.

Experimental Evaluation

The model was benchmarked against several challenging tasks:

  1. Visual Path Planning (Warcraft): Predicting movement costs from map images to find the shortest path using Dijkstra’s algorithm.
  2. Multidigit MNIST Addition: Testing combinatorial scalability with up to 15-digit numbers.
  3. RSBench: A diagnostic suite (MNIST Half, MNIST Even-Odd, BDD-OIA) designed to identify reasoning shortcuts and evaluate calibration.

Key Results and Insights

NESYDMS demonstrates a significant leap in scalability and reliability. On the $30 \times 30$ Warcraft path-planning task, it achieved 97.40% accuracy, whereas other approximate NeSy methods saw performance drop as low as 17.13%.

Performance comparison on the Warcraft path-planning task. NESYDMS (ours) significantly outperforms baselines, particularly as the grid size increases to 30x30.

Beyond raw accuracy, the model provides superior uncertainty quantification. In RSBench tasks, NESYDMS showed dramatically lower Expected Calibration Error (ECE). For example, on MNIST Half, it achieved an ECE of 4.18, compared to 69.40 for standard independent models. This "RS-awareness" allows the model to maintain a distribution over multiple valid concept assignments rather than forcing a single, potentially incorrect, "best" guess.

Conclusion and Future Directions

NESYDMS breaks the "scalability wall" that previously hindered RS-aware neurosymbolic models. By leveraging the iterative nature of diffusion, it builds global dependencies from simple local steps. Future work aims to extend this framework to hybrid diffusion models capable of handling both discrete symbolic concepts and continuous latent variables, as well as improving entropy approximations to further refine the variational training process.

Summary updated

BibTeX
@inproceedings{krieken2025neurosymbolic,
  author = {Emile van Krieken and Pasquale Minervini and Edoardo Ponti and Antonio Vergari},
  title = {{Neurosymbolic Diffusion Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=HfdzglsZQH},
}
Figure