Generating Directed Graphs with Dual Attention and Asymmetric Encoding
Alba Carballo-Castro, Manuel Madeira, Yiming Qin, Dorina Thanou, Pascal Frossard
TL;DR
This work introduces Directo, the first discrete flow matching–based generator for directed graphs, integrating direction-aware asymmetric positional encodings and a dual-attention graph transformer to capture both incoming and outgoing dependencies. By decoupling training and sampling, Directo achieves strong unconditional and conditional generation across synthetic DAGs and real-world digraphs, supported by a standardized benchmarking suite that evaluates validity, diversity, and distributional alignment. The approach demonstrates state-of-the-art performance on diverse graph types, including graphs with cycles and acyclic constraints, and showcases robustness through extensive ablations on dual attention and positional encodings. The work lays a solid foundation for directed graph generation with practical applicability to domains such as neural architecture search and scene graphs, while outlining clear avenues for scalability, conditioning, and constraint enforcement.
Abstract
Directed graphs naturally model systems with asymmetric, ordered relationships, essential to applications in biology, transportation, social networks, and visual understanding. Generating such graphs enables tasks such as simulation, data augmentation and novel instance discovery; however, directed graph generation remains underexplored. We identify two key factors limiting progress in this direction: first, modeling edge directionality introduces a substantially larger dependency space, making the underlying distribution harder to learn; second, the absence of standardized benchmarks hinders rigorous evaluation. Addressing the former requires more expressive models that are sensitive to directional topologies. We propose Directo, the first generative model for directed graphs built upon the discrete flow matching framework. Our approach combines: (i) principled positional encodings tailored to asymmetric pairwise relations, (ii) a dual-attention mechanism capturing both incoming and outgoing dependencies, and (iii) a robust, discrete generative framework. To support evaluation, we introduce a benchmark suite covering synthetic and real-world datasets. It shows that our method performs strongly across diverse settings and even competes with specialized models for particular classes, such as directed acyclic graphs. Our results highlight the effectiveness and generality of our approach, establishing a solid foundation for future research in directed graph generation.
