Papers › DeFoG: Discrete Flow Matching for Graph Generation

DeFoG: Discrete Flow Matching for Graph Generation

5 Oct 2024arXiv:2410.04263archive 2025-07-28

Yiming Qin, Manuel Madeira, Dorina Thanou, Pascal Frossard

Graph generation is fundamental in diverse scientific applications, due to its ability to reveal the underlying distribution of complex data, and eventually generate new, realistic data points. Despite the success of diffusion models in this domain, those face limitations in sampling efficiency and flexibility, stemming from the tight coupling between the training and sampling stages. To address this, we propose DeFoG, a novel framework using discrete flow matching for graph generation. DeFoG employs a flow-based approach that features an efficient linear interpolation noising process and a flexible denoising process based on a continuous-time Markov chain formulation. We leverage an expressive graph transformer and ensure desirable node permutation properties to respect graph symmetry. Crucially, our framework enables a disentangled design of the training and sampling stages, enabling more effective and efficient optimization of model performance. We navigate this design space by introducing several algorithmic improvements that boost the model performance, consistently surpassing existing diffusion models. We also theoretically demonstrate that, for general discrete data, discrete flow models can faithfully replicate the ground truth distribution - a result that naturally extends to graph data and reinforces DeFoG's foundations. Extensive experiments show that DeFoG achieves state-of-the-art results on synthetic and molecular datasets, improving both training and sampling efficiency over diffusion models, and excels in conditional generation on a digital pathology dataset.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2410.04263")

Code

Syntology Ran 7 of 15 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 5 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

manuelmlmadeira/DeFoG officialmentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 7 ran; 1 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
5ran
8unverified

Licence: 0 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from manuelmlmadeira/DeFoG. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

extract_smiles_from_csv manuelmlmadeira/DeFoG/src/datasets/moses_dataset.py official repository ran MIT (permissive) · ddbacf1b3a22d0c3 · report
get_smiles manuelmlmadeira/DeFoG/src/datasets/moses_dataset.py official repository ran MIT (permissive) · 15ea5f6142f381aa · report
l2 manuelmlmadeira/DeFoG/src/analysis/dist_helper.py official repository ran · honoured contract fingerprinted MIT (permissive) · 039fc6561a9516bc · report
load_pickle manuelmlmadeira/DeFoG/src/datasets/dataset_utils.py official repository ran · our draft was wrong MIT (permissive) · 70db7c9cbe9e680d · report
normalize manuelmlmadeira/DeFoG/src/utils.py official repository ran MIT (permissive) · e067f48b33fff70a · report
symmetrize_and_mask_diag manuelmlmadeira/DeFoG/src/utils.py official repository ran fingerprinted MIT (permissive) · 06bef51bb1d6d083 · report
unnormalize manuelmlmadeira/DeFoG/src/utils.py official repository ran MIT (permissive) · 1739cf39d80953b0 · report
compare_hash manuelmlmadeira/DeFoG/src/datasets/guacamol_dataset.py official repository unverified MIT (permissive) · ab10f4ba7e15c9c9 · report
degree_worker manuelmlmadeira/DeFoG/src/analysis/spectre_utils.py official repository unverified MIT (permissive) · 2830d89cd6960c9d · report
files_exist manuelmlmadeira/DeFoG/src/datasets/guacamol_dataset.py official repository unverified MIT (permissive) · 934e88324646e2d7 · report
mol2smiles manuelmlmadeira/DeFoG/src/analysis/rdkit_functions.py official repository unverified MIT (permissive) · 0c9e13c0bf546794 · report
mol2smilesWithNoSanitize manuelmlmadeira/DeFoG/src/analysis/rdkit_functions.py official repository unverified MIT (permissive) · 85807cf49bba7f49 · report
remove_hydrogens manuelmlmadeira/DeFoG/src/datasets/dataset_utils.py official repository unverified MIT (permissive) · dc5bc1ae656e5ea3 · report
spectral_worker manuelmlmadeira/DeFoG/src/analysis/spectre_utils.py official repository unverified MIT (permissive) · d06299b76725edd9 · report
to_list manuelmlmadeira/DeFoG/src/datasets/guacamol_dataset.py official repository unverified MIT (permissive) · 85832bcd5531c861 · report

Tasks

DenoisingGraph GenerationNavigate

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDiffusionDropoutGraph TransformerLabel SmoothingLapEigenLaplacian PELayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections