Neuro-Symbolic Generative Diffusion Models for Physically Grounded, Robust, and Safe Generation

Jacob K. Christopher, Michael Cardei, Jinhao Liang, Ferdinando Fioretto

Introduction

Diffusion models have become the standard for high-fidelity generative tasks, yet they often struggle with "hallucinations" that violate fundamental physical or logical constraints. In safety-critical domains like robotics, drug discovery, and material science, a result that merely "looks right" but is physically impossible or toxic is unusable. Neuro-Symbolic Diffusion (NSD) addresses this by forcing generative models to adhere to strict rules through a combination of statistical learning and symbolic optimization.

The Neuro-Symbolic Diffusion Framework

The core innovation of NSD is treating the reverse diffusion process as a constrained optimization problem. Instead of allowing the model to denoise a sample freely, NSD interleaves each diffusion step with a projection operator ($P_C$). This operator finds the nearest feasible point that satisfies user-defined constraints.

Constraint violation comparison between NSD and standard conditional diffusion over the diffusion process.

To solve this projection efficiently, the authors utilize an Augmented Lagrangian Projection method. This approach creates a penalty for violating constraints and iteratively nudges the sample back into the feasible zone during generation. The framework is versatile, handling continuous data (like robot paths) via Euclidean distance and discrete data (like molecular SMILES strings) through Gumbel-Softmax relaxations.

Key Insights and Robustness

  • Constraints as a Correction Mechanism: By projecting at every step, the model is actively steered toward a "feasible sub-distribution" rather than just hoping to land on a valid solution.
  • Out-of-Domain (OOD) Generalization: Because constraints are mathematical and logical, the model can generate valid data for conditions it never encountered during training. For example, a model trained on Earth's gravity can generate physically accurate "Moon gravity" simulations simply by updating the symbolic constraint.
  • Efficiency via Warm-Starting: The projection operators are "warm-started" using results from previous diffusion steps, accelerating the optimization process as the sample evolves.

Experimental Results

The authors evaluated NSD across diverse domains, including multi-agent pathfinding, material microstructure generation, and natural language toxicity filtering. One of the most significant results was in the field of molecular biology.

Performance of NSD variants compared to state-of-the-art baselines in molecule generation metrics.

In molecule generation tasks using the QM9 dataset, NSD achieved 0% violation of toxicity filters and produced 3.5x more valid, novel, and non-toxic molecules than state-of-the-art baselines like MDLM or UDLM. Similarly, in robotics, NSD maintained a 93% success rate in complex 9-robot navigation tasks, whereas existing baselines plummeted to 45%.

Limitations and Future Work

While powerful, NSD introduces a higher computational cost due to the inner optimization loop required at every diffusion step. Furthermore, the framework's theoretical guarantees are strongest for convex constraints; empirical success with non-convex constraints (like collision avoidance) suggests robustness, but with less formal certainty. Future research will likely focus on accelerating these projection steps and expanding the framework to even more complex, multi-modal scientific simulations.

Summary updated

Abstract

Despite the remarkable generative capabilities of diffusion models, their integration into safety-critical or scientifically rigorous applications remains hindered by the need to ensure compliance with stringent physical, structural, and operational constraints. To address this challenge, this paper introduces Neuro-Symbolic Diffusion (NSD), a novel framework that interleaves diffusion steps with symbolic optimization, enabling the generation of certifiably consistent samples under user-defined functional and logic constraints. This key feature is provided for both standard and discrete diffusion models, enabling, for the first time, the generation of both continuous (e.g., images and trajectories) and discrete (e.g., molecular structures and natural language) outputs that comply with constraints. This ability is demonstrated on tasks spanning three key challenges: (1) Safety, in the context of non-toxic molecular generation and collision-free trajectory optimization; (2) Data scarcity, in domains such as drug discovery and materials engineering; and (3) Out-of-domain generalization, where enforcing symbolic constraints allows adaptation beyond the training distribution.
BibTeX
@inproceedings{christopher2025neuro,
  author = {Jacob K. Christopher and Michael Cardei and Jinhao Liang and Ferdinando Fioretto},
  title = {{Neuro-Symbolic Generative Diffusion Models for Physically Grounded, Robust, and Safe Generation}},
  booktitle = {NeuS},
  year = {2025},
  url = {https://openreview.net/forum?id=subxuBEzoY},
}
Figure