Abstract
Generating Directed Acyclic Graphs (DAGs) that satisfy specific functional or structural conditions is a fundamental challenge in domains such as electronic design automation and molecular discovery. Existing approaches typically rely on either autoregressive (AR) models, which capture local dependencies but lack global structural awareness, or one-shot diffusion models, which provide a global view but struggle with the strict hierarchical dependencies of DAGs. We introduce SeaDAG, a semi-autoregressive diffusion framework that bridges this gap. By employing a layer-wise denoising schedule, SeaDAG captures topological dependencies while maintaining a complete, noisy graph representation at every timestep. This allows for the integration of a differentiable property decoder to explicitly guide the generation process toward target conditions.
Introduction
Directed Acyclic Graphs (DAGs) are characterized by a strict, layer-wise hierarchy where modifications in lower layers propagate through the entire structure. Generating these graphs conditionally—for instance, creating a logic circuit from a truth table or a molecule with specific quantum properties—requires a model that understands both local connectivity and global functionality.
Traditional Autoregressive (AR) models build graphs sequentially. While effective at capturing local dependencies, they cannot evaluate global properties until the graph is complete, making it difficult to guide the generation process toward a specific target. Conversely, One-shot diffusion models generate the entire graph simultaneously. While this provides a global perspective, these models often fail to respect the directional, layer-by-layer dependencies inherent in DAG structures. SeaDAG addresses these limitations by simulating a sequential generation process within a diffusion framework.
Methodology
Semi-Autoregressive Diffusion
The core innovation of SeaDAG is its layer-wise diffusion schedule. Unlike standard diffusion models that apply noise uniformly, SeaDAG assigns different denoising speeds to different topological layers of the DAG.
As illustrated in the diffusion process, bottom layers are denoised faster than top layers. This "speed as sequence" approach mimics the benefits of autoregressive modeling—ensuring that lower-level dependencies are established first—while ensuring that a noisy version of the entire graph exists at every step. This global presence is crucial for evaluating properties during the generation process.
Explicit Condition Learning
Because SeaDAG maintains a complete graph structure throughout training, the authors can evaluate the graph's properties dynamically. The framework incorporates a differentiable property decoder (e.g., a logic gate evaluator for circuits or a neural network for molecular properties).
This decoder allows for the calculation of a "condition loss," which explicitly penalizes the model if the intermediate generated graph deviates from the target condition. This training-time guidance is more robust than traditional sampling-time guidance, as it allows the model to learn the fundamental relationship between structure and function without sacrificing graph realism.
Experimental Evaluation
Datasets
SeaDAG was evaluated on three primary benchmarks:
- AIG Dataset: A newly generated dataset of And-Inverter Graphs (AIGs) representing logic circuits, paired with their truth tables.
- QM9: A benchmark for molecule generation containing molecules with up to 9 heavy atoms and their associated quantum properties.
- ZINC: A large-scale dataset used for goal-directed molecule optimization.
Key Results
SeaDAG demonstrates significant improvements over state-of-the-art baselines like DiGress and LDM-3DG:
- Circuit Synthesis: In the AIG task, SeaDAG achieved 92.38% structural validity and 89.25% functional accuracy (matching the target truth table), whereas the one-shot model DiGress achieved only 43.21% validity.
- Molecular Properties: On QM9, SeaDAG achieved the lowest Mean Absolute Error (MAE) in 4 out of 5 quantum property categories while maintaining 100% molecular validity.
- Optimization and Extrapolation: In the ZINC optimization task, SeaDAG generated molecules with a penalized logP score of 8.52, significantly exceeding the maximum score in the training set (4.52), demonstrating its ability to extrapolate beyond known data.
Conclusion
SeaDAG successfully combines the dependency-modeling strengths of autoregressive generation with the global structural view of diffusion models. By varying denoising speeds across topological layers and incorporating explicit condition learning, it provides a powerful framework for conditional DAG generation. Future work will focus on improving the computational efficiency of the layer-wise schedule and extending the differentiable decoder approach to more complex, non-mathematical domains.
Summary updated