Papers › Flow Network based Generative Models for Non-Iterative Diverse Candidate Generation

Flow Network based Generative Models for Non-Iterative Diverse Candidate Generation

8 Jun 2021NeurIPS 2021 12arXiv:2106.04399archive 2025-07-28

Emmanuel Bengio, Moksh Jain, Maksym Korablyov, Doina Precup, Yoshua Bengio

This paper is about the problem of learning a stochastic policy for generating an object (like a molecular graph) from a sequence of actions, such that the probability of generating an object is proportional to a given positive reward for that object. Whereas standard return maximization tends to converge to a single return-maximizing sequence, there are cases where we would like to sample a diverse set of high-return solutions. These arise, for example, in black-box function optimization when few rounds are possible, each with large batches of queries, where the batches should be diverse, e.g., in the design of new molecules. One can also see this as a problem of approximately converting an energy function to a generative distribution. While MCMC methods can achieve that, they are expensive and generally only perform local exploration. Instead, training a generative policy amortizes the cost of search during training and yields to fast generation. Using insights from Temporal Difference learning, we propose GFlowNet, based on a view of the generative process as a flow network, making it possible to handle the tricky case where different trajectories can yield the same final state, e.g., there are many ways to sequentially add atoms to generate some molecular graph. We cast the set of trajectories as a flow and convert the flow consistency equations into a learning objective, akin to the casting of the Bellman equations into Temporal Difference methods. We prove that any global minimum of the proposed objectives yields a policy which samples from the desired distribution, and demonstrate the improved performance and diversity of GFlowNet on a simple domain where there are many modes to the reward function, and on a molecule synthesis task.

PaperPDFConference PDFCodeCode 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="2106.04399")

Code

Syntology Ran 16 of 31 code samples harvested from 5 repositories linked to this paper; 15 have no recorded run. Of those that ran: 3 ran · honoured contract; 1 ran · violated contract; 8 ran · our draft was wrong; 2 ran · fixture could not drive it; 2 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 3 ran; community (archive-listed): 8 samples from 3 repositories, 7 ran; community: 1 sample from 1 repository, 1 ran; 7 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

bengioe/gflownet officialmentioned in papermentioned on GitHubpytorchMIT report
SeonghwanSeo/RxnFlow mentioned on GitHubpytorch report
gfnorg/gflownet mentioned on GitHubpytorch report
lazaratan/gflownet-generalization mentioned on GitHubpytorch report
princetonlips/mam mentioned on GitHubpytorch report
recursionpharma/gflownet mentioned on GitHubpytorch 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

31 samples harvested; 16 ran; 3 honoured the contract we drafted; 15 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.

3ran · honoured contract
1ran · violated contract
8ran · our draft was wrong
2ran · fixture could not drive it
2ran
15unverified

Licence: 10 of the 31 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 5 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “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.

branin bengioe/gflownet/grid/cond_grid_dag.py official repository ran · honoured contract fingerprinted MIT (permissive) · b8e02a8995424b4e · report
currin bengioe/gflownet/grid/cond_grid_dag.py official repository ran · honoured contract fingerprinted MIT (permissive) · 54dafc6a55c42deb · report
make_mlp bengioe/gflownet/grid/cond_grid_dag.py official repository ran · our draft was wrong MIT (permissive) · 2b63a9198ca42b4e · report
array_may_18 bengioe/gflownet/mols/ppo.py official repository unverified MIT (permissive) · c3caff85ecc30396 · report
func_corners bengioe/gflownet/grid/toy_grid_dag.py official repository unverified MIT (permissive) · bf7643eca4bc2a69 · report
func_corners_floor_A bengioe/gflownet/grid/toy_grid_dag.py official repository unverified MIT (permissive) · 58d90758e97a6d03 · report
func_corners_floor_B bengioe/gflownet/grid/toy_grid_dag.py official repository unverified MIT (permissive) · aa7a567324830eab · report
generate_batch bengioe/gflownet/grid/toy_grid_dag_al.py official repository unverified MIT (permissive) · f08d023272aa048c · report
get_network_output bengioe/gflownet/grid/toy_grid_dag_al.py official repository unverified MIT (permissive) · 7ff5d9aaf5641dd3 · report
mol2graph bengioe/gflownet/mols/model_block.py official repository unverified MIT (permissive) · f763f98f79152e0e · report
mols2batch bengioe/gflownet/mols/model_atom.py official repository unverified MIT (permissive) · 06477cbf36090384 · report
mols2batch bengioe/gflownet/mols/model_block.py official repository unverified MIT (permissive) · e2f61d62c1a23b4e · report
mols2batch bengioe/gflownet/mols/model_fingerprint.py official repository unverified MIT (permissive) · 32208d4977dcb086 · report
train_generative_model bengioe/gflownet/mols/gflownet_activelearning.py official repository unverified MIT (permissive) · c29d60fd9bc56a0c · report
train_model_with_proxy bengioe/gflownet/mols/gflownet.py official repository unverified MIT (permissive) · df792b9c5dae7a48 · report
GraphAgent gfnorg/gflownet/mols/model_block.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · ece02e732c2290ba · report
MAM princetonlips/mam/mam/models/mam.py community (archive-listed) ran no licence file found · pointer only · b78da7a4b43fba13 · report
array_may_17 GFNOrg/gflownet/mols/mars.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · af9f0f910f9bbc52 · report
cross recursionpharma/gflownet/src/gflownet/algo/trajectory_balance.py community (archive-listed) ran · fixture could not drive it fingerprinted MIT (permissive) · 2a8ed5bf472b7004 · report
gen_order princetonlips/mam/mam/models/mam.py community (archive-listed) ran · honoured contract no licence file found · pointer only · e9f231473aac8e22 · report
sample_order princetonlips/mam/mam/models/mam.py community (archive-listed) ran · fixture could not drive it no licence file found · pointer only · afd6888b673d0c17 · report
shift_right recursionpharma/gflownet/src/gflownet/algo/trajectory_balance.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · a508d01ed77ced0b · report
subTB recursionpharma/gflownet/src/gflownet/algo/trajectory_balance.py community (archive-listed) unverified MIT (permissive) · d2e1d2a558b75603 · report
make_opt alexhernandezgarcia/gflownet/gflownet/gflownet.py community ran · our draft was wrong Apache-2.0 (permissive) · 30d10fc001f71c75 · report
safe identical code first harvested elsewhere ran · violated contract licence of this copy not recorded · 1061c8464b631df1 · report
binarize_static identical code first harvested elsewhere ran · our draft was wrong fingerprinted licence of this copy not recorded · 4e16af7e5dbea818 · report
make_mlp identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · c59313aa188e63c6 · report
sample identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · bf574d554afe6839 · report
sleep_step identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · 0461df5888f82edd · report
branin identical code first harvested elsewhere unverified licence of this copy not recorded · e81128bd6b1cab12 · report
currin identical code first harvested elsewhere unverified licence of this copy not recorded · 9c972ac9b931bb9e · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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