Flowette: Flow-Matching Graph Generation
- Flowette is a graph generation framework that combines continuous flow matching with graphettes to enforce permutation consistency and preserve complex topologies.
- It uses a topology-aware GNN transformer to evolve node, edge, and adjacency features, ensuring accurate velocity matching and long-range endpoint coherence via controlled ODE integration.
- The framework overcomes limitations of prior methods by integrating optimal transport alignment, structural regularization, and domain-specific motifs to generate coherent and valid graphs.
Flowette is a flow-matching framework for graph generation that studies generative modeling of graphs with recurring subgraph motifs, including rings, stars, trees, and community structure. It combines a continuous flow model over attributed graph representations with a probabilistic prior family called graphettes, with the stated goal of making flow-based graph generation permutation consistent, topology preserving, globally coherent under finite-step ODE integration, and compatible with domain priors such as ring-rich molecular graphs or tree-like graphs (Wijesinghe et al., 27 Feb 2026). The framework has two main parts: a topology-aware GNN/transformer velocity field, and graphettes, which generalize graphons via controlled structural edits (Wijesinghe et al., 27 Feb 2026).
1. Problem setting and design rationale
Flowette is motivated by a specific limitation of prior flow-matching and diffusion-based graph generators: they often pair noise and data graphs using implicit batch pairing or Euclidean OT-like schemes that ignore graph isomorphism, permutation symmetry, and size variability (Wijesinghe et al., 27 Feb 2026). In this setting, the model is asked to learn paths between source and target graphs that may be topologically mismatched, so velocity supervision becomes noisy, permutation consistency is harmed, and sampling becomes unstable, especially when recurring motifs are important.
The framework is organized around four design requirements stated explicitly in the formulation: structure-aware coupling between noise and data graphs, continuous flow matching over graph attributes, explicit structural regularization during training, and structural priors in the source distribution (Wijesinghe et al., 27 Feb 2026). This places Flowette at the intersection of optimal transport, permutation-equivariant graph representation learning, and prior-driven graph generation.
The graph state is defined as
with adjacency , node features , and edge features (Wijesinghe et al., 27 Feb 2026). The model is therefore not limited to topology alone; it evolves adjacency, node attributes, and edge attributes jointly.
A common misconception would be to regard Flowette as a standard graph diffusion model with a different neural backbone. The formulation instead identifies supervision alignment as a central issue: the source distribution, the source–target coupling, and the training objective are all modified so that graph transport is structurally meaningful rather than an artifact of arbitrary pairing (Wijesinghe et al., 27 Feb 2026).
2. Continuous flow matching on attributed graphs
For a source graph and a target graph , Flowette uses a rectified linear interpolant
with (Wijesinghe et al., 27 Feb 2026). The corresponding ideal transport directions are constant along the path:
The learned object is a time-conditioned velocity field
trained to regress to the rectified displacement. The flow-matching loss is
0
where, in the rectified setting,
1
(Wijesinghe et al., 27 Feb 2026). In other words, the model learns a constant velocity field along each interpolation path.
Sampling is performed by solving the ODE
2
and taking 3 as the generated graph; Euler integration is used in practice (Wijesinghe et al., 27 Feb 2026). The framework therefore adopts a continuous-time generative perspective, but one in which the source distribution 4 is itself structurally informed through graphettes rather than being pure unstructured noise.
This suggests that Flowette treats graph generation as transport between graph-valued random variables under an explicitly chosen coupling, rather than as denoising from an arbitrary perturbation process. That distinction is central to the method’s stated emphasis on topology preservation.
3. Velocity-field architecture and permutation symmetry
Flowette parameterizes the velocity field with a permutation-equivariant GNN transformer that jointly evolves node, edge, and adjacency states (Wijesinghe et al., 27 Feb 2026). At time 5, node features are embedded with 6, edge features with 7, and time with 8. The initial hidden states are
9
where 0 and 1 denote node and edge hidden states at layer 2 (Wijesinghe et al., 27 Feb 2026).
Each layer computes query and key projections,
3
then forms topology-biased attention logits, softmax-normalized attention weights, edge-conditioned messages, node aggregation, and residual updates for both node and edge hidden states (Wijesinghe et al., 27 Feb 2026). The final velocity heads are linear projections: 4
To preserve undirected structure, the outputs are symmetrized: 5 (Wijesinghe et al., 27 Feb 2026). This symmetry enforcement is operational rather than merely conceptual: it constrains the learned dynamics to remain compatible with undirected graphs.
A theorem in the formulation proves permutation equivariance of the velocity field. If a permutation matrix 6 relabels the graph as
7
then
8
(Wijesinghe et al., 27 Feb 2026). This is critical because graph generation should be invariant to node ordering, and Flowette makes that property explicit at the level of the velocity field rather than relying on it implicitly.
4. Topology-preserving coupling and training objective
A key contribution of Flowette is the use of fused Gromov-Wasserstein coupling to align source and target graphs in a structure-preserving way (Wijesinghe et al., 27 Feb 2026). Before computing FGW, the method obtains node-level structural embeddings 9 using a pretrained edge-aware GIN encoder 0. These embeddings capture higher-order structural context and are incorporated into the FGW objective.
For graphs 1 and 2 with uniform node measures 3, the optimal transport plan satisfies
4
where
5
and
6
(Wijesinghe et al., 27 Feb 2026). Here 7 trades off feature similarity and structural similarity.
At the minibatch level, for noise graphs 8 and target graphs 9, Flowette forms a cost matrix
0
then solves the Hungarian assignment problem
1
to obtain a one-to-one FGW-coupling that is consistent across the batch (Wijesinghe et al., 27 Feb 2026). The theoretical results stated for this construction include permutation invariance of FGW distance, equivariant transformation of the optimal coupling under relabeling, zero FGW distance for exactly isomorphic graphs, and batch assignment consistency when the correct pairing uniquely yields zero FGW cost (Wijesinghe et al., 27 Feb 2026).
The training objective supplements local velocity matching with long-range and chemistry-aware constraints. The local velocity term is
2
Endpoint consistency is imposed by one-step rectified extrapolation,
3
followed by an endpoint loss that matches 4 to 5 (Wijesinghe et al., 27 Feb 2026). The stated purpose of this term is long-range coherence: local velocity accuracy must compose into a globally correct final graph.
For molecular graphs, Flowette adds a soft valence constraint and an atom-type marginal matching term. The valence penalty discourages chemically invalid overbonding via expected bond orders and expected valences computed from the predicted endpoint, while the atom-type marginal penalty preserves the global atom-type composition and is permutation invariant (Wijesinghe et al., 27 Feb 2026). Ablation results on QM9 and ZINC250K show that velocity loss only is far from sufficient, endpoint consistency is crucial for stable generation, valence regularization is the most important chemistry-specific term for validity, and atom-marginal matching mostly improves uniqueness and novelty (Wijesinghe et al., 27 Feb 2026).
Theoretical results further state that if 6, the model recovers the ideal constant transport field and Euler integration exactly reconstructs the endpoint; under bounded velocity error 7 and Lipschitzness, the finite-step Euler endpoint error satisfies
8
(Wijesinghe et al., 27 Feb 2026). This supports the claim that regularization improves sampling stability.
5. Graphettes as structural priors
The second major contribution is graphettes, defined as a probabilistic family
9
where 0 is a graphon, 1 is a sparsity/scale sequence with 2, and 3 is a graph edit function (Wijesinghe et al., 27 Feb 2026). Sampling proceeds in two stages: first sample 4 from the sparsified graphon 5, then edit the graph via 6. The formulation characterizes graphettes as graphons plus controlled structural edits (Wijesinghe et al., 27 Feb 2026).
A potential misconception is that graphettes merely rename graphons. Flowette explicitly states that graphons are recovered only as the special case
7
while sparsified graphons are recovered when
8
(Wijesinghe et al., 27 Feb 2026). Unlike standard sparsified graphons, graphettes do not require 9, so they can model both dense and sparse graphs.
The paper defines several motif edits. Identity leaves the graph unchanged. Cycle deletion, denoted 0, removes cycles and yields trees for connected graphs. Ring addition is
1
which adds a ring of size 2 with probability 3. Star addition is
4
which adds a Poisson number of stars to node 5, with node-specific intensity depending on 6 (Wijesinghe et al., 27 Feb 2026). These edits encode common real-world structure: rings for molecules, stars or hubs for social networks, and cycle removal for trees.
Flowette uses graphette sampling to generate the initial graph topology 7, while node and edge features are sampled from categorical priors (Wijesinghe et al., 27 Feb 2026). The stated consequence is that the flow does not need to invent the entire graph from pure noise; it starts from a topology already biased toward the target domain. This suggests that graphettes function as an inductive bias at the source-distribution level, not only as a standalone random graph model.
6. Theoretical properties, empirical results, and limitations
The theoretical analysis of graphettes shows recovery of graphons and sparsified graphons in the special cases above, and states that graphettes can generate dense graphs when 8, sparse graphs when the edit function and scaling produce subquadratic edge growth, and graphex-like graphs with stars and isolated edges (Wijesinghe et al., 27 Feb 2026). The formulation also introduces graph homomorphism counts
9
and proves that, for triangle-covered graphs 0, star and ring additions preserve homomorphism counts in a controlled way, including results such as
1
under the stated motif conditions, for example ring size 2 (Wijesinghe et al., 27 Feb 2026). These results are presented as evidence that the motif edits are mathematically well behaved and preserve relevant higher-order structure.
Empirically, Flowette is evaluated on synthetic graph tasks—Tree, Stochastic Block Model, and Ego-small—using Degree distribution MMD, Clustering coefficient MMD, Orbit count MMD, and Validity, Uniqueness, Novelty, and V.U.N. For synthetic graphs, chemistry regularization is disabled with 3 and 4. Training uses 100 epochs, AdamW, learning rate 5, hidden size 6, batch size 7, FGW tradeoff 8, 9, Euler sampling with 0, and 1 attention layers for Tree and Ego-small or 2 for SBM (Wijesinghe et al., 27 Feb 2026). Baselines include SPECTRE, DiGress, BwR, HSpectre, GruM, CatFlow, DisCo, Cometh, DeFoG, G2PT, GraphRNN, GRAN, EDGE, BiGG, GraphGen, and others.
On SBM, Flowette achieves best or near-best Orbit, 100% Valid, 100% Unique, 100% Novel, and best V.U.N.; the reported Orbit is essentially zero, while some degree and clustering metrics are marginally weaker than the best competitor, and the paper notes better preservation of mesoscopic community structure (Wijesinghe et al., 27 Feb 2026). On Tree, it reaches best Validity, best Uniqueness, best Novelty, best V.U.N., and orbit and clustering that are essentially perfect, though it slightly underperforms on degree distribution compared with the strongest baseline. On Ego-small, it achieves best or competitive Orbit, strong degree recovery, near-best clustering, and performs especially well on hub-and-spoke motif preservation (Wijesinghe et al., 27 Feb 2026).
For molecular graph generation, the benchmarks are QM9, ZINC250K, Guacamol, and MOSES, with metrics including Validity, Uniqueness, Novelty, SNN, Scaffold similarity, KL divergence over molecular descriptors, and NSPDK (Wijesinghe et al., 27 Feb 2026). Training uses 500 epochs, AdamW, learning rate 3, hidden size 4, batch size 5, FGW tradeoff 6, 7 layers for QM9, ZINC250K, and Guacamol, 8 for MOSES, and Euler sampling with 9. The chemistry regularization weights are 0, 1, 2 for QM9, ZINC250K, and Guacamol, and 3, 4, 5 for MOSES; generation counts are 10,000 graphs for QM9, ZINC250K, and Guacamol, and 25,000 for MOSES (Wijesinghe et al., 27 Feb 2026).
The reported molecular results are: on QM9, Validity 6, Uniqueness 7, and NSPDK 8; on ZINC250K, Validity 9, Uniqueness 00, and NSPDK 01; on Guacamol, Validity 02, V.U.N. 03, and KL divergence score 04; and on MOSES, Novelty 05, together with strong uniqueness and scaffold similarity and the best novelty among the reported models in the table (Wijesinghe et al., 27 Feb 2026). The ablation study identifies the full model as dramatically better than reduced variants, and specifically shows that velocity matching alone does not produce chemically valid or structurally faithful graphs (Wijesinghe et al., 27 Feb 2026).
The limitations stated explicitly are that FGW coupling is computationally expensive as graph size or batch size grows, graphette design requires domain knowledge and is therefore not fully automatic for arbitrary graph families, and the continuous relaxation requires a projection or discretization step at generation time that can introduce minor artifacts (Wijesinghe et al., 27 Feb 2026). Within those constraints, the framework’s central claim is that structural priors, optimal-transport alignment, flow matching, and regularization should be treated as a coupled system rather than as separable components of graph generation.