Papers › Better Training of GFlowNets with Local Credit and Incomplete Trajectories

Better Training of GFlowNets with Local Credit and Incomplete Trajectories

3 Feb 2023arXiv:2302.01687archive 2025-07-28

Ling Pan, Nikolay Malkin, Dinghuai Zhang, Yoshua Bengio

Generative Flow Networks or GFlowNets are related to Monte-Carlo Markov chain methods (as they sample from a distribution specified by an energy function), reinforcement learning (as they learn a policy to sample composed objects through a sequence of steps), generative models (as they learn to represent and sample from a distribution) and amortized variational methods (as they can be used to learn to approximate and sample from an otherwise intractable posterior, given a prior and a likelihood). They are trained to generate an object x through a sequence of steps with probability proportional to some reward function R(x) (or exp(-ℰ(x)) with ℰ(x) denoting the energy function), given at the end of the generative trajectory. Like for other RL settings where the reward is only given at the end, the efficiency of training and credit assignment may suffer when those trajectories are longer. With previous GFlowNet work, no learning was possible from incomplete trajectories (lacking a terminal state and the computation of the associated reward). In this paper, we consider the case where the energy function can be applied not just to terminal states but also to intermediate states. This is for example achieved when the energy function is additive, with terms available along the trajectory. We show how to reparameterize the GFlowNet state flow function to take advantage of the partial reward already accrued at each state. This enables a training objective that can be applied to update parameters even with incomplete trajectories. Even when complete trajectories are available, being able to obtain more localized credit and gradients is found to speed up training convergence, as demonstrated across many simulations.

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="2302.01687")

Code

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

By repository: official repository: 2 samples from 1 repository, 2 ran; community (archive-listed): 2 samples from 1 repository, 1 ran; found in paper text by Syntology: 3 samples from 1 repository, 3 ran; 4 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.

ling-pan/fl-gfn officialmentioned in paperpytorch report
tristandeleu/gfn-maxent-rl mentioned on GitHubjax 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

11 samples harvested; 7 ran; 2 honoured the contract we drafted; 4 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.

2ran · honoured contract
2ran · our draft was wrong
2ran · fixture could not drive it
1ran
4unverified

Licence: 6 of the 11 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 3 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.

detailed_balance_loss ling-pan/fl-gfn/mols/gflownet.py official repository ran · fixture could not drive it no licence file found · pointer only · 6a66411ce92ce864 · report
forward_looking_detailed_balance_loss ling-pan/fl-gfn/mols/gflownet.py official repository ran · fixture could not drive it no licence file found · pointer only · 5e61f433ec6df3d4 · report
ForwardLookingDetailedBalance tristandeleu/gfn-maxent-rl/gfn_maxent_rl/algos/forward_looking_detailed_balance.py community (archive-listed) ran MIT (permissive) · 7e0e4a02a27a4cc2 · report
BaseAlgorithm tristandeleu/gfn-maxent-rl/gfn_maxent_rl/algos/forward_looking_detailed_balance.py community (archive-listed) unverified MIT (permissive) · 1ce4fa344cce64f0 · report
branin gfnorg/gflownet/grid/cond_grid_dag.py found in paper text by Syntology ran · honoured contract fingerprinted MIT (permissive) · b8e02a8995424b4e · report
currin gfnorg/gflownet/grid/cond_grid_dag.py found in paper text by Syntology ran · honoured contract fingerprinted MIT (permissive) · 54dafc6a55c42deb · report
make_mlp gfnorg/gflownet/grid/cond_grid_dag.py found in paper text by Syntology ran · our draft was wrong MIT (permissive) · 2b63a9198ca42b4e · report
make_mlp identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · c59313aa188e63c6 · 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
train_model_with_proxy identical code first harvested elsewhere unverified licence of this copy not recorded · df792b9c5dae7a48 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SPEED

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