Hard-Constrained Graph Generation with Discrete-Projection Diffusion
Xuesong Zhang, Haifeng Sun, Qi Qi, Shengkuan Li, Yuhao Li, Tianyi Kou, Zirui Zhuang, Bo He, Jianxin Liao, Jingyu Wang
Abstract
Diffusion models have achieved remarkable success in graph generation, but enforcing hard constraints on generated graphs remains challenging, limiting their deployment in constraint-critical applications. Existing approaches either fail to guarantee strict constraint satisfaction or are limited to narrow constraint types, lacking the flexibility to handle diverse constraint specifications. To address this challenge, we exploit the discrete structure of graphs, which allows hard constraints to be formulated as symbolic reasoning problems. Building on this insight, we propose NSPSG, a framework that integrates unconstrained diffusion models with discrete projection operators. NSPSG employs an SMT (Satisfiability Modulo Theories)-based projector to ensure that the generated graphs strictly satisfy constraints while remaining within the training data distribution. To further accelerate generation, we employ a supervised auto-regressive neural projector to approximate the symbolic reasoning process. Across heterogeneous constraints and various graph generation datasets, NSPSG achieves 99%-100% validity rates, demonstrating state-of-the-art performance. Notably, for a complex non-linear constraint, it improves data validity by up to 43% and reaches 99% validity while maintaining comparable generation. Code is available at https://github.com/zhangxuesong2000/Neuro-Symbolic-Projected-Sampling-for-Graphs.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Builds on33
- Score-based Generative Modeling of Graphs via the System of Stochastic Differential EquationsJaehyeong Jo, Seul Lee, Sung Ju HwangICML 2022 · 327 citations
- GraphGen: A Scalable Approach to Domain-agnostic Labeled Graph GenerationNikhil Goyal, Harsh Vardhan Jain, Sayan RanuWWW 2020 · 110 citations
- Constrained Synthesis with Projected Diffusion ModelsJacob K. Christopher, Stephen Baek, Ferdinando FiorettoNeurIPS 2024 · 110 citations
- SPECTRE: Spectral Conditioning Helps to Overcome the Expressivity Limits of One-shot Graph GeneratorsKarolis Martinkus, Andreas Loukas, Nathanaël Perraudin, Roger WattenhoferICML 2022 · 109 citations
- Autoregressive Diffusion Model for Graph GenerationLingkai Kong, Jiaming Cui, Haotian Sun, Yuchen Zhuang et al.ICML 2023 · 105 citations
Related papers
- Diffuse, Sample, Project: Plug-And-Play Controllable Graph GenerationKartik Sharma, Srijan Kumar, Rakshit S. TrivediICML 2024 · 8 citations
- Generative Modelling of Structurally Constrained GraphsManuel Madeira, Clément Vignac, Dorina Thanou, Pascal FrossardNeurIPS 2024 · 20 citations
- Constraints-Guided Diffusion Reasoner for Neuro-Symbolic LearningXuan Zhang, Zhijian Zhou, Weidi Xu, Yanting Miao et al.AAAI 2026
- Zero-Shot Conditioning of Score-Based Diffusion Models by Neuro-Symbolic ConstraintsDavide Scassola, Sebastiano Saccani, Ginevra Carbone, Luca BortolussiAAAI 2025 · 2 citations
- Achieving Multi-Hop Calculation and Safe Abstention in Financial Numerical Reasoning by Metric Graph Constrained LLMsAoyuan Jiang, Liang Hong, Haoxuan Liu, Rui WangACL 2026
