We study generative modeling of graphs with recurring subgraph motifs. We propose Flowette, a continuous flow matching framework that employs a graph neural network-based transformer to learn a velocity field over graph representations with node and edge attributes. Our model promotes topology-aware alignment through optimal transport-based coupling and preserves structural fidelity through endpoint- and chemistry-aware regularisation. To incorporate domain-driven structural priors, we introduce graphettes, a new probabilistic family of graph structure models that generalize graphons via controlled structural edits for motifs such as rings, stars, and trees. We theoretically analyze the coupling, invariance, and structural properties of the framework, evaluate it on synthetic and molecular benchmarks, and isolate the contributions of the structural prior, the optimal-transport coupling, and the regularisation terms through controlled ablations. Flowette achieves competitive performance overall, attaining state-of-the-art results on several metrics across multiple benchmarks, highlighting the effectiveness of combining structural priors with flow-based training for modeling complex graph distributions.
Figures & tables
Figure 1: Flowette training scheme. FGW optimal transport with Hungarian matching discussed in Sec. 3.1 , GNN Transformer in App. C , Topology-aware loss and regularisation in Sec. 3.3 and graphettes in Sec. 4 . See Algorithm 1 for details.
Application
Graphette W=(W,ρn,f)
Community graphs
f=I (GEF H.1 ), ρn=1 , and W is a mixture of stochastic block model graphons
Tree graphs
f=h (GEF H.1 ), ρn=(Wˉn)−1+ϵ and W(x,y)=0.2
Egonets
f=R∘S (GEF H.1 and H.1 ), ρn=1 and W(x,y)=exp(−310(x+y))
Molecular graphs
f=R (GEF H.1 ), ρn=(Wˉn)−1+ϵ , where Wˉ=∫01∫01W(x,y)dxdy and W(x,y)=0.2
Table 1: Graphette priors, as used in empirical benchmarks in Section 5 .
Figure 2: Flowette-generated synthetic graphs: Ego-small (a), SBM (b), and Tree (c).
Table 2: Generation performance on QM9 and ZINC250K molecular graphs.
Guacamol
MOSES
Model
Valid ↑
V.U.N ↑
KL div. ↑
Unique ↑
Novelty ↑
SNN ↑
Scaff. ↑
DiGress Vignac et al. (2023)
85.2
85.1
92.9
100.0
95.0
0.52
14.8
DisCo Xu et al. (2024)
86.6
86.5
92.6
100.0
97.7
0.50
15.1
Cometh Siraudin et al. (2024)
98.9
97.6
96.7
99.9
92.6
0.54
16.0
GraphBFN Song et al. (2025)
-
-
-
99.8
89.0
0.59
10.0
G2PT Chen et al. (2025)
95.3
94.8
95.6
100.0
79.4
0.55
2.9
Table 3: Generation performance on Guacamol and MOSES molecular graphs.
Dataset
Edit function
Prior variant
Valid
Unique
NSPDK
QM9
R (Ring addition)
Intended prior
99.81± 0.09
99.30± 0.05
0.0003± 0.0002
S (Star addition)
Incorrect motif
70.50± 0.06
69.30± 0.06
0.0160± 0.0008
h (Cycle deletion)
Contradictory motif
53.70± 0.04
54.45± 0.06
0.0540± 0.0004
ZINC250K
R (Ring addition)
Intended prior
99.90± 0.10
100.00± 0.0
0.0006± 0.0004
S (Star addition)
Incorrect motif
73.40± 0.06
75.30± 0.06
0.1105± 0.0006
h (Cycle deletion)
Contradictory motif
51.58± 0.04
50.65± 0.05
0.2050± 0.0007
Table 4: Sensitivity of Flowette to graphette edit-function misspecification on QM9 and ZINC250K. All components other than f are held fixed.
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 4: Three G(n,p) graphs for n∈{50,100,500} with edge probability p=0.2 converging to W=0.2 .
Figure 5: Two graphons on the left and W-random graphs G(n,W) for different n on the right.
Figure 6: Graphon sparsification where Wn=ρnW . Top row shows the original graphon W and two instances of ρnW . The bottom row shows 3 graphs sampled from the graphon directly above.
Model
Deg. ↓
Clus. ↓
Orbit ↓
Valid ↑
Unique ↑
Novel ↑
V.U.N ↑
SPECTRE [ 51 ]
0.0015
0.0521
0.0412
52.5
100.0
100.0
52.5
DiGress [ 67 ]
0.0018
0.0485
0.0415
60.0
100.0
100.0
60.0
BwR [ 18 ]
0.0478
0.0638
0.1139
7.5
100.0
100.0
7.5
HSpectre [ 4 ]
0.0141
0.0528
0.0809
75.0
100.0
100.0
75.0
GruM [ 31 ]
0.0015
0.0589
0.0450
-
-
-
85.0
CatFlow [ 19 ]
0.0012
0.0498
0.0357
-
-
-
85.0
Appendix
Table 5: Generation performance on SBM synthetic graphs.
Model
Deg. ↓
Clus. ↓
Orbit ↓
Valid ↑
Unique ↑
Novel ↑
V.U.N ↑
GRAN [ 39 ]
0.1884
0.0080
0.0199
0.0
100.0
100.0
0.0
DiGress [ 67 ]
0.0002
0.0000
0.0000
90.0
100.0
100.0
90.0
BwR [ 18 ]
0.0016
0.1239
0.0003
0.0
100.0
100.0
0.0
EDGE [ 13 ]
0.2678
0.0000
0.7357
0.0
7.5
100.0
0.0
BiGG [ 15 ]
0.0014
0.0000
0.0000
100.0
87.5
50.0
75.0
GraphGen [ 23 ]
0.0105
0.0000
0.0000
95.0
100.0
100.0
95.0
Appendix
Table 6: Generation performance on Tree synthetic graphs.
Model
Deg. ↓
Clus. ↓
Orbit ↓
GraphRNN [ 73 ]
0.0768
1.1456
0.1087
GRAN [ 39 ]
0.5778
0.3360
0.0406
GraphCNF [ 42 ]
0.1010
0.7654
0.0820
GDSS [ 32 ]
0.8189
0.6032
0.3315
DiscDDPM [ 25 ]
0.4613
0.1681
0.0633
DiGress [ 67 ]
0.0708
0.0092
0.1205
Appendix
Table 7: Generation performance on Ego-small synthetic graphs.
Dataset
DeFoG Model Train (h)
Flowette Pairing (h)
Flowette Model Train (h)
DeFoG Sample (h)
Flowette Sample (h)
Graphs Sampled
Tree
8.0
0.016
8.50
0.07
0.04
40
QM9
6.5
0.560
6.90
0.20
0.16
10,000
ZINC250K
14.0
0.750
14.60
4.80
3.70
10,000
MOSES
46.0
1.680
46.50
5.00
4.30
25,000
Appendix
Table 8: Runtime comparison between Flowette (under the default online coupling protocol; see Sec. J.8 for amortised alternatives) and DeFoG. Flowette training time and pairing time (FGW + Hungarian) are reported separately to highlight the marginal overhead of coupling.
Dataset
n
Online (h)
Fixed-pool (h)
Periodic, R~=10 (h)
Tree
100
8.90
3.50
5.15
500
16.25
5.86
9.45
1000
26.30
8.67
12.36
SBM
100
12.25
5.65
7.91
500
22.05
8.82
12.75
1000
34.56
11.58
14.95
Appendix
Table 9: Total end-to-end training time (hours) under online, fixed-pool, and periodic ( R~=10 ) coupling, across graph size n and dataset family.
QM9
ZINC250K
Variant
Valid
Unique
Novel
Valid
Unique
Novel
only Lvel
69.0 ± 0.10
65.0 ± 0.02
65.0 ± 0.06
75.0 ± 0.05
83.1 ± 0.10
83.1 ± 0.03
no Lval
76.0 ± 0.07
90.7 ± 0.04
90.7 ± 0.06
88.0 ± 0.10
91.0 ± 0.05
91.0 ± 0.04
no Latom
79.0 ± 0.05
93.6 ± 0.06
93.6 ± 0.03
92.1 ± 0.02
95.0 ± 0.08
95.0 ± 0.06
no Lend
71.0 ± 0.06
79.0 ± 0.05
79.0 ± 0.05
79.0 ± 0.11
85.0 ± 0.04
85.0 ± 0.07
only Lvel and Lend
73.1 ± 0.05
85.0 ± 0.06
85.0 ± 0.05
82.6 ± 0.03
90.5 ± 0.04
90.5 ± 0.04
Appendix
Table 10: Ablation study of graph generation performance of QM9 and ZINC250K. Recall from Equation ( 6 ), the components in the training objective: the velocity loss Lvel , endpoint consistency loss Lend , soft valence constraint Lval , and atom-type matching Latom .
QM9
ZINC250K
Variant
Valid
Unique
NSPDK
Valid
Unique
NSPDK
Flowette (pretrained GIN encoder)
99.81 ± 0.09
99.30 ± 0.05
0.0003 ± 0.0002
99.90 ± 0.10
100.00 ± 0.0
0.0006 ± 0.0004
Flowette (1-WL features)
98.30 ± 0.05
98.00 ± 0.06
0.0008 ± 0.0003
98.70 ± 0.030
99.00 ± 0.050
0.0018 ± 0.0007
Flowette (Early stopped)
94.30 ± 0.06
93.00 ± 0.04
0.0153 ± 0.0008
93.80 ± 0.060
92.60 ± 0.030
0.0316 ± 0.0003
Flowette (Random encoder)
88.30 ± 0.08
87.00 ± 0.06
0.0656 ± 0.0006
88.80 ± 0.070
88.60 ± 0.050
0.0819 ± 0.0006
Appendix
Table 11: Sensitivity analysis of the pre-trained encoder on QM9 and ZINC250K datasets.
Dataset
Model Variant
Deg ↓
Clus. ↓
Orbit ↓
Valid ↑
Unique ↑
Novel ↑
V.U.N ↑
Tree
Flowette (graphette prior)
0.00005 ± 0.002
0.0000 ± 0.0
0.0000 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
Flowette (standard graphon)
0.0472 ± 0.008
0.0136 ± 0.001
0.0012 ± 0.005
75.5 ± 0.03
90.0 ± 0.02
100.0 ± 0.0
67.95 ± 0.06
SBM
Flowette (graphette prior)
0.0076 ± 0.003
0.0508 ± 0.01
0.0000 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
Flowette (standard graphon)
0.1207 ± 0.002
0.8515 ± 0.003
0.0105 ± 0.004
80.0 ± 0.02
90.5 ± 0.03
85.5 ± 0.04
61.90 ± 0.03
Appendix
Table 12: Ablation study: Graphette prior vs. standard graphon on synthetic datasets.
Dataset
Model Variant
Valid ↑
Unique ↑
NSPDK ↓
QM9
Flowette (graphette prior)
99.81 ± 0.09
99.30 ± 0.05
0.0003 ± 0.0002
Flowette (standard graphon)
75.50 ± 0.03
68.90 ± 0.05
0.0760 ± 0.0006
ZINC250K
Flowette (graphette prior)
99.90 ± 0.10
100.00 ± 0.0
0.0006 ± 0.0004
Flowette (standard graphon)
80.00 ± 0.05
85.00 ± 0.03
0.0560 ± 0.0005
Appendix
Table 13: Ablation study: Graphette prior vs. standard graphon on molecular datasets.
Dataset
Model Variant
Deg ↓
Clus. ↓
Orbit ↓
Valid ↑
Unique ↑
Novel ↑
V.U.N ↑
Tree
Flowette (FGW)
0.00005 ± 0.002
0.0000 ± 0.0
0.0000 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
Flowette (random)
0.00807 ± 0.005
0.0055 ± 0.003
0.0000 ± 0.0
90.50 ± 0.06
90.0 ± 0.02
100.0 ± 0.0
81.45 ± 0.04
Flowette (Euclidean OT)
0.00078 ± 0.003
0.0003 ± 0.005
0.0000 ± 0.0
95.50 ± 0.05
95.0 ± 0.04
100.0 ± 0.0
90.72 ± 0.06
SBM
Flowette (FGW)
0.0076 ± 0.003
0.0508 ± 0.01
0.0000 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
Flowette (random)
0.0151 ± 0.003
0.4759 ± 0.001
0.0012 ± 0.001
89.50 ± 0.03
90.25 ± 0.05
100.0 ± 0.0
80.77 ± 0.05
Flowette (Euclidean OT)
0.0091 ± 0.002
0.0932 ± 0.005
0.0005 ± 0.004
93.50 ± 0.06
95.20 ± 0.02
100.0 ± 0.0
89.01 ± 0.03
Appendix
Table 14: Ablation study: FGW coupling vs. alternative pairings on synthetic datasets.
Dataset
Model Variant
Valid ↑
Unique ↑
NSPDK ↓
QM9
Flowette (FGW)
99.81 ± 0.09
99.30 ± 0.05
0.0003 ± 0.0002
Flowette (random)
90.03 ± 0.01
89.65 ± 0.04
0.0180 ± 0.0005
Flowette (Euclidean OT)
94.50 ± 0.03
93.25 ± 0.02
0.0065 ± 0.0006
ZINC250K
Flowette (FGW)
99.90 ± 0.10
100.00 ± 0.0
0.0006 ± 0.0004
Flowette (random)
89.50 ± 0.07
91.50 ± 0.05
0.0160 ± 0.0003
Flowette (Euclidean OT)
94.00 ± 0.05
95.50 ± 0.03
0.0030 ± 0.0004
Appendix
Table 15: Ablation study: FGW coupling vs. alternative pairings on molecular datasets.
Dataset
Coupling
Deg. ↓
Clus. ↓
Orbit ↓
Valid ↑
Unique ↑
Novel ↑
V.U.N ↑
Tree
FGW ( α=0.5 )
0.00005± 0.002
0.0000± 0.0
0.0000± 0.0
100.0± 0.0
100.0± 0.0
100.0± 0.0
100.0± 0.0
GW ( α=1.0 )
0.00010± 0.003
0.0000± 0.0
0.0000± 0.0
100.0± 0.0
100.0± 0.0
100.0± 0.0
100.0± 0.0
SBM
FGW ( α=0.5 )
0.0076± 0.003
0.0508± 0.01
0.0000± 0.0
100.0± 0.0
100.0± 0.0
100.0± 0.0
100.0± 0.0
GW ( α=1.0 )
0.0080± 0.005
0.0595± 0.03
0.0000± 0.0
100.0± 0.0
100.0± 0.0
100.0± 0.0
100.0± 0.0
Appendix
Table 16: FGW ( α=0.5 ) vs. standard GW ( α=1.0 ) coupling on non-attributed synthetic benchmarks.
Dataset
Variant
Valid
Unique
Novel
Scaff.
QM9
Pre-projection
98.06± 0.06
98.28± 0.07
98.00± 0.04
11.30
Post-projection
99.81± 0.09
99.30± 0.05
99.40± 0.06
13.60
ZINC250K
Pre-projection
98.25± 0.02
98.35± 0.04
98.56± 0.05
14.10
Post-projection
99.90± 0.10
100.00± 0.0
100.00± 0.0
15.45
MOSES
Pre-projection
97.95± 0.05
98.00± 0.03
97.06± 0.05
14.45
Post-projection
99.05± 0.0
99.90± 0.0
98.10± 0.0
15.30
Appendix
Table 17: Validity, uniqueness, novelty, and scaffold similarity before and after valence-aware terminal projection. Pre-projection metrics isolate the contribution of the learned dynamics; post-projection metrics reflect the full generation pipeline reported in Tables 2 and 3 .
Figure 7: Graphs generated by Flowette for the Tree synthetic datasets.
Figure 8: Graphs generated by Flowette for the SBM synthetic datasets.
Figure 9: Graphs generated by Flowette for the Ego-small synthetic datasets.
Figure 10: Graphs generated by Flowette for the ZINC250k molecular datasets.
Figure 11: Graphs generated by Flowette for the QM9 molecular datasets.
Figure 12: Graphs generated by Flowette for the Guacamol molecular datasets.
Figure 13: Graphs generated by Flowette for the MOSES molecular datasets.
Generative modeling of graph-structured data is crucial for tasks ranging from drug discovery to social network simulation. Among these models, denoising diffusion models have achieved great success in graph generation by learning to progressively reverse a process that adds noise to the original graph. However, the standard noise-prediction approach of diffusion models is suboptimal for graph data. The goal for a graph generative model is to learn the clean graphs' topological properties, such as connectivity and degree distribution. Because a diffusion model that predicts noise does not explicitly learn these topological properties, it is challenging for the model to output graphs with the desired structural statistics. To address this challenge, we introduce Direct Graph Flow Matching (DiGFM), a novel graph transformer model guided by two goals: predict clean graphs and improve sampling efficiency. Distinct from the prevailing diffusion approach, DiGFM employs a continuous flow-matching paradigm and integrates direct graph prediction. Specifically, DiGFM maps the prior noise distribution to the clean graph distribution via a multi-step process: the model repeatedly predicts the underlying clean graph, and a transformation is employed to convert the model output to the velocity vector that points in the direction toward the clean graph distribution. This design enables DiGFM to generate high-quality samples using only 2.5% to 15.6% of the steps required by diffusion-based models, which leads to a 5.3x to 257x speedup in wall-clock inference time. Experiments demonstrate that DiGFM outperforms or matches prior state-of-the-art models across general graph benchmarks and molecular datasets, generating graphs with strong adherence to ground-truth structural statistics at significantly faster inference speeds.
Equivariance is central to graph generative models, as it ensures the model respects the permutation symmetry of graphs. However, strict equivariance can increase computational cost due to added architectural constraints, and can slow down convergence because the model must be consistent across a large space of possible node permutations. We study this trade-off for graph generative models. Specifically, we start from an equivariant discrete flow-matching model, and relax its equivariance during training via a controllable symmetry modulation scheme based on sinusoidal positional encodings and node permutations. Experiments first show that symmetry-breaking can accelerate early training by providing an easier learning signal, but at the expense of encouraging shortcut solutions that can cause overfitting, where the model repeatedly generates graphs that are duplicates of the training set. On the contrary, properly modulating the symmetry signal can delay overfitting while accelerating convergence, allowing the model to reach stronger performance with 19% of the baseline training epochs.
Benjamin Honoré, Alba Carballo-Castro, Yiming Qin +1
Denoising-based models, including diffusion and flow matching, have led to substantial advances in graph generation. Despite this progress, such models remain constrained by two fundamental limitations: a computational cost that scales quadratically with the number of nodes and a large number of function evaluations required during generation. In this work, we introduce a novel hierarchical generative framework that reduces the number of node pairs that must be evaluated and adopts discrete flow matching to significantly decrease the number of denoising iterations. We empirically demonstrate that our approach more effectively captures graph distributions while substantially reducing generation time.
Yoann Boget, Pablo Strasser, Alexandros Kalousis
Department of Computer Science, University of Geneva, Switzerland · DMML Group, Geneva School for Business administration HES-SO, Switzerland