TL;DR
The paper introduces DIRECTO, the first generative model for directed graphs (digraphs) built on a discrete flow matching framework. By combining a novel bidirectional dual-attention mechanism with direction-aware asymmetric positional encodings, DIRECTO successfully navigates the massive structural search space inherent to directed graphs. Additionally, the authors introduce a comprehensive benchmark suite to standardize evaluation across synthetic and real-world digraph datasets.
What Problem Does This Paper Address?
While graph generative models have advanced significantly for undirected graphs (e.g., molecular generation, social network modeling), directed graph generation remains severely underexplored. Directed graphs are essential for modeling asymmetric, ordered relationships found in metabolic pathways, transportation flows, source-to-target scene graphs, and neural network architectures (DAGs).
The authors identify two primary roadblocks hindering progress:
- The Combinatorial Explosion of Directionality: Adding direction to edges exponentially increases the learnable dependency space. For a simple graph with just 4 nodes, there are only 11 possible undirected structures, but a staggering 218 possible directed configurations. Standard graph neural network architectures fail to capture these asymmetric dependencies.
- Lack of Standardized Benchmarks: Prior works often relied on proxy metrics from downstream tasks rather than directly evaluating generative quality, making fair comparison impossible.
Methods
DIRECTO addresses the modeling challenge by building on the Discrete Flow Matching (DFM) framework and introducing two direction-aware components:
- Dual-Attention Mechanism: Standard graph transformers treat edge features symmetrically. DIRECTO splits edge features into source-to-target (outgoing, $E_{ST}$) and target-to-source (incoming, $E_{TS}$) counterparts. It computes role-specific node projections and performs cross-attention between these directional edge features to explicitly model bidirectional information flow.
- Asymmetric Positional Encodings (PEs): Traditional positional encodings (like standard Laplacian eigenvectors) discard edge direction. DIRECTO incorporates direction-aware PEs, specifically experimenting with Magnetic Laplacian (MagLap) (which uses complex-valued phase shifts to preserve orientation) and Directed Relative Random Walk Probabilities (RRWP) (which combine forward and reverse transition probabilities).
- Multi-Scale Information Modulation: The architecture integrates Feature-wise Linear Modulation (FiLM) and Principal Neighbourhood Aggregation (PNA) layers to adaptively fuse local node/edge interactions with global graph-level signals during the denoising process.
Datasets
To address the evaluation bottleneck, the authors introduce a new benchmarking suite spanning both synthetic and real-world applications:
- Synthetic Datasets: Directed Erdős–Rényi (binomial) graphs, Directed Acyclic Graph (DAG) Erdős–Rényi models, Price’s model (simulating citation networks), and a directed version of the Stochastic Block Model (SBM) to test community structures.
- Real-World Datasets:
- TPU Tiles: A dataset of computational DAGs representing hardware execution plans from Tensor Processing Unit workloads, crucial for Neural Architecture Search (NAS).
- Visual Genome: Complex scene graphs where directed edges encode semantic relationships (e.g.,
[person] -> [wears] -> [shirt]) and attributes.
Key Insights and Ideas
- Decoupling Training and Sampling: By utilizing discrete flow matching rather than standard discrete diffusion, DIRECTO decouples training from inference. This allows researchers to apply post-training sampling optimizations—such as time-distortion schedules (
polydec,polyinc) and target guidance—to boost structural fidelity without retraining the model. - Inductive Bias Beats Parameter Scaling: A key ablation study revealed that simply doubling the depth of a standard undirected network fails to capture directed topologies. Explicitly embedding a directional inductive bias via the dual-attention block yields substantially higher fidelity while remaining parameter-efficient.
- The Power of Asymmetric PEs: Direction-aware positional encodings consistently outperform traditional, direction-agnostic alternatives. Directed RRWP proved to be particularly powerful, offering the best balance between scalability, runtime efficiency, and generative quality.
Key Results
DIRECTO was evaluated against standard undirected adaptations (DiGress, DeFoG) and specialized autoregressive DAG models (D-VAE, LayerDAG). Performance was measured using the V.U.N. ratio (the proportion of generated graphs that are simultaneously Valid, Unique, and Novel) and structural distribution alignment (Ratio).
- Synthetic Benchmarks: On the challenging SBM dataset, DIRECTO achieved a 99.5% V.U.N. score, vastly outperforming DiGress (41.5%) and DeFoG (37.0%). On ER-DAG, DIRECTO reached 94.0% V.U.N., proving highly capable of implicitly learning acyclicity.
- Real-World Benchmarks: On the Visual Genome scene graph dataset, DIRECTO achieved the highest V.U.N. (83.8%) and the lowest RBF MMD score (0.038), demonstrating an exceptional ability to capture joint node-label semantic dependencies.
- Conditional Generation: Using classifier-free guidance, DIRECTO successfully conditioned graph generation on target execution times for the TPU Tiles dataset, performing competitively with specialized, computationally expensive autoregressive baselines.
Limitations and Future Work
- Scalability Constraints: Due to the quadratic complexity of dense attention mechanisms and the combinatorial explosion of digraph edge spaces, DIRECTO is currently limited to small-to-medium graphs (up to ~200 nodes). The authors suggest exploring sparsity-aware attention or latent diffusion frameworks to scale up.
- Implicit vs. Hard Constraints: While DIRECTO implicitly learns global constraints like acyclicity remarkably well, it does not strictly guarantee them. Integrating hard-constraint enforcement techniques directly into the flow matching step remains an open area for future work.
Summary updated