Manuscript Offprint
arXiv:2609.11538Particle GFlowNets: Rethinking Generative Marginalization Models
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Generative Marginalization Models (MaMs) have been recently introduced as efficient neural sampling models for any-order autoregressive modelling of discrete distributions. By learning both the marginal and conditional probabilities of a persistent-block Gibbs sampler, MaMs enable fast posterior evaluation with a single neural network forward pass. While prior work has considered MaMs to be distinct from Generative Flow Networks (GFlowNets), a well-established paradigm for inference in discrete stochastic models, we show that they are equivalent. Then, we also extend MaMs' sampling strategy to non-autoregressive generative processes. In particular, we describe an automatic criterion for full-state rejuvenation of the Gibbs sampler, derived from the Gelman-Rubin statistic, which plays a key role in speeding up learning convergence. Our experiments show that our method, called Particle GFlowNets, markedly accelerates training in large combinatorial spaces.
1 INTRODUCTION
Generative Flow Networks [GFlowNets; Bengio et al., 2021, 2023] have been used in recent years as flexible samplers for distributions over compositional, discrete objects such as sequences and sets. Notably, they were successfully applied to problems in computational biology [Jain et al., 2022, 2023a, Laajil et al., 2025], combinatorial optimization [Zhang et al., 2023a,b, Zhang and Cao, 2025], and Bayesian inference [Deleu et al., 2022, 2023], several of which seem not to be as easily solvable with other approaches. In fact, given a positive function defined over a finite and combinatorial space, a GFlowNet can often generate independent samples from the corresponding probability distribution with remarkable accuracy [Shen et al., 2023]. To achieve this, GFlowNets learn a policy function for a Markov Decision Process (MDP) whose marginal distribution over terminal states matches [Tiapkin et al., 2024]. However, training is frequently bottlenecked by the simulation of long, overlapping trajectories, requiring countless neural network forward passes for each gradient step. Generative Marginalization Models [MaMs; Liu et al., 2024] mitigate this issue by learning both the marginal and conditional distributions of a Gibbs sampler [Geman and Geman, 1984]. In doing so, each learning step requires a constant number of model evaluations—corresponding to a single Gibbs transition—regardless of the state space’s size.
Contrarily to conventional understanding, we demonstrate that MaMs are equivalent to permutation-conditioned (PC) GFlowNets, which we introduce as a particular case of the well-established conditional GFlowNet framework [Bengio et al., 2023, Jain et al., 2023b]. Specifically, we show that MaMs' learning objective corresponds to the traditional detailed balance loss function [Bengio et al., 2023, Example 5] for PC-GFlowNets. With this in mind, the key contribution of MaMs is a computationally efficient Gibbs sampling algorithm that minimizes the number of neural network evaluations during training. Their core assumption, however, is that is supported on a factorized domain (i.e., ), which limits MaMs' applicability in permutation-invariant (e.g., graph-structured) spaces [Liu et al., 2024, Section 3]. The central question we ask in this work is whether such an approach can be adapted to non-factorized domains. We answer it affirmatively.
For this, we propose Particle (P) GFlowNets. As in MaMs, a P-GFlowNet maintains a persistent Gibbs sampler over terminal states. Similarly to PC-GFlowNets, a P-GFlowNet optimizes a learning objective that enforces the detailed balance condition of the underlying Markov chain. In contrast to both methods, which were designed for autoregressive modelling, the reverse (backward) move for P-GFlowNets is non-deterministic, as the forward mapping is non-injective. To circumvent this, we use a stochastic reverse transition kernel, which can also be learned. Importantly, once trained, a P-GFlowNet can generate both independent or correlated samples via MDP simulation or Gibbs sampling, respectively. The crucial difference lies in the per-generation computational cost and the effective sample size of the generated samples, both of which are larger for independent sampling. Given a limited time budget, the optimal approach will likely need to be determined in a case-by-case basis.
In practice, we find that samples from P-GFlowNet's persistent Gibbs chain can become highly correlated during training, reducing the accuracy of gradient estimates and slowing down convergence. To address this limitation, we occasionally refresh the stochastic process based on the Gelman-Rubin statistics Gelman and Rubin [1992], Carpenter et al. [2017], also known as R-hat or , being above a certain threshold. We empirically show that this process, called rejuvenation in the probabilistic programming literature Lew et al. [2022a,b], significantly accelerates learning convergence.
Additionally, we evaluate P-GFlowNets on both established benchmarks and novel tasks for which relevant functionals can be efficiently computed and used for reliable performance assessment. Our experiments show that P-GFlowNets significantly accelerate training convergence when the cost of MDP simulation exceeds that of evaluating the target distribution, which is typical for large, long-horizon state spaces. In summary, our contributions are as follows.
-
We show MaMs can be represented as PC GFlowNets, and that their learning objective is equivalent to Bengio et al. [2023]'s expected detailed balance loss function.
-
We introduce P-GFlowNets. When compared to prior methods for GFlowNet training, P-GFlowNets asymptotically reduce the average number of forward passes per gradient step as the MDP's horizon increases.
-
We empirically demonstrate that P-GFlowNets significantly reduce wall-clock time for learning convergence.
The reader only interested in learning about P-GFlowNets may skip Section 3 and focus on Sections A, 4 and 5 instead.
Our objectives are to generate in proportion to a given positive measure in , the probability mass of which we will denote by , and to evaluate the marginal probability of subsets of under . We will call the normalized distribution. As in Bengio et al. [2021], Malkin et al. [2023], we refer to as a reward function. Additionally, we will define the space as
Clearly, . As in Bengio et al. [2021, 2023], we call the state space, and define as the initial state. Similarly, we let , , be the state graph. Intuitively, in if differs from by a single additional component. We say that the generative process is autoregressive when is a tree rooted at ; see Figure 1.

(a) Autoregressive.

(b) Non-autoregressive.
Figure 1: The state graph (G) is a tree in an autoregressive setting (a). When many trajectories lead to the same state, such as in (b), G is a non-tree DAG.
GFlowNets. A GFlowNet learns a forward policy function such that is a probability distribution supported on the children of in the state graph . By defining as the set of trajectories in from to , we seek a function satisfying
with , , and (with a slight abuse of notation) ; we refer to as the trajectory's length. Equation (2) represents the marginal distribution over induced by . When the generative process is autoregressive, contains a single trajectory , and . Otherwise, the set might be intractably large; see Figure 1. Under these conditions, we introduce a backward policy , which is a forward policy on the transposed state graph, and approximate Equation (2) via importance sampling,
in which we use and to distinguish the forward and backward trajectories. (We will drop this notation in the rest of the text for clarity). By letting be the partition function of our target distribution, the above equation may be re-arranged as (dividing both sides by )
The condition is known as trajectory balance [TB; Malkin et al., 2022]. In practice, is parameterized as a softmax neural network receiving s as input, and we optimize both and Z via stochastic gradient descent on the objective function
with as an exploratory (full-support) policy [see, e.g., Madan et al., 2025, Kim et al., 2025]. As the reader may have noticed, was chosen arbitrarily; it can be either learned [e.g., Shen et al., 2023, Gritsaev et al., 2025] or fixed [e.g., Deleu et al., 2022, Zhou et al., 2024].
Alternatively, we commonly parameterize the flow functions
for and , and define the detailed balance (DB) learning objective as
with as in Equation (2), , and as positive weights such that . Common choices for are either uniform [Bengio et al., 2023] or for , the intuition being that states closer to should be assigned with larger weights during training [Silva et al., 2025a]. Other learning objectives have also been studied [e.g., Madan et al., 2022, Zhang et al., 2023a]; see Section C for related works.
A conditional GFlowNet, on the other hand, models a family of distributions indexed by a parameter that is also used as input for both the policy ( and ) and flow ( ) functions. Prominent applications include multi-objective combinatorial optimization, in which is a simplex and represents a weighted mixture of each objective according to [Jain et al., 2023b, Roy et al., 2023, Zhu et al., 2023, Laajil et al., 2025], and distributed learning, with each representing a distinct subgraph of the state graph and simply referring to the restriction of a given to the corresponding subset of [Silva et al., 2025b].
MaMs. In the context of sampling, MaMs were designed by Liu et al. [2024] for fast autoregressive modelling of discrete models. Simply put, they concomitantly learn a marginal and conditional distributions, and , on satisfying both a correctness and consistency conditions. Given indices such that and , we respectively define these conditions as
for . As in Liu et al. [2024], we assume , although our analysis can be easily extended to by interpreting a group of adjacent variables as a single variable. As with GFlowNets, and are parameterized as neural networks. Also, a special symbol is used to represent a marginalized variable—e.g., if , then —and is a learned parameter. Once trained, the probability of any and any can be evaluated in a single neural network forward pass. To enforce Equation (5), we minimize
in which , is the Kullback-Leibler (KL) divergence between and , and ConsistencyError is defined as
with , , as any distribution over , as an uniform distribution over , (hard-coded) restriction , and uniformly picked from the space of permutations, which we denote by
To generate samples from , which are needed to estimate the KL divergence in Equation (6), Liu et al. [2024] implement a persistent-block Gibbs sampling scheme having as the transition kernel. As we explain next, under the consistency condition in Equation (5), the resulting Markov chain has the marginal as the stationary distribution.
Gibbs sampling. Originally designed by [Geman and Geman, 1984] to sample from the Gibbs distribution [Gibbs, 1902], and also known as Successive Substitution Sampling [SSS; Schervish, 2012], Gibbs sampling creates a Markov chain by iteratively modifying each coordinate of a state according to the conditionals of the target distribution . That is, we iteratively select and then , with as in Equation (5). This process may be pictured as for two-dimensional distributions. When is picked at random, the algorithm is known as random scan Gibbs sampler; otherwise, as systematic scan Gibbs sampler [Owen, 2013]. We will focus on the former. The reader is invited to notice that the resulting Markov chain is stationary with respect to the target distribution .
In the context of learning and energy-based models [Hinton, 2002, Tieleman, 2008, Liu et al., 2024], a persistent-block Gibbs sampler extends the canonical algorithm by (i) grouping variables into blocks, each of which is updated in a single step, and (ii) maintaining the Markov chain's state across gradient updates of the underlying neural sampling model. We notice that, in this case, the Markov chain ceases to be stationary until training converges.
3 RETHINKING MAMS AS GFLOWNETS
We now show that MaMs may be interpreted as a conditional GFlowNet (Section 3.1). In a nutshell, the conditioning space will be the space of permutations defined in Equation (7), and we will demonstrate the consistency loss function is equivalent to the weighted DB loss in Equation (4) in expectation (Section 3.2).
3.1 PERMUTATION-CONDITIONED GFLOWNETS
To understand the connection between MaMs and GFlowNets, we first introduce a family of permutation-conditioned (PC) GFlowNets for autoregressive modelling. Again, let . We define a learnable state-embedding function and weights such that for a given dimension . Then, recall from Section 2 that the state space is simply a subset of the power set of . As such, the policy function evaluated at and conditioned on a permutation is defined as
for and . Intuitively, fills up a sequence up to a prescribed size , in this case) according to the ordering imposed by . We illustrate this in Figure 2. Given a and a , there is only one state such that the transition has positive probability under . Hence, the only choice for the backward policy abiding by the TB condition in Equation (3) is for and with ; is the Dirac delta at , i.e., if and 0 otherwise. Thus, as plays no significant role in learning, we set it aside from most of our analysis until Section 4. Our main claim in this section is that there a bijective correspondence between MaMs and PC GFlowNets.
Claim 3.1. For each MaM, there is a unique and functionally equivalent PC GFlowNet; see Proposition 3.2.

(a)

(b)
Figure 2: A PC GFlowNet fills up a sequence according to a given permutation ( ). After trained, it supports fast evaluation of any-subset marginals. ( means no token.)
Clearly, the conditioning permutation only affects the navigation of , as both and remain unchanged under (except for re-labeling). Interestingly, however, the permutation-conditioned flow function satisfying the DB condition in Equation (4) can be exactly interpreted as the marginal probability distribution of a sequence under . This result, outlined below, is crucial in bridging the gap between GFlowNets and MaMs.
Proposition 3.1. Let be a flow function abiding by the DB condition of a permutation-conditioned GFlowNet, i.e.,
and for . Then, denoting by for ,
in which means that agrees with on the first coordinates according to the permutation , i.e., . In other words, is the marginal distribution of under .
As in Section 2, the state in the Proposition 3.1 can be written as for and otherwise.
When learning a conditional GFlowNet, we often augment the input of the neural networks parameterizing both and with [Bengio et al., 2023, Zhang et al., 2023a]. As MaMs avoid such augmentation, we ask: is it needed for PC GFlowNets? The following corollary shows that, when states and differ solely by the permutation , the optimal flow function in Equation (9) does not depend on .
Corollary 3.1. Let be permutations, and define and . Then, if satisfies , i.e., and coincide on ,
To evaluate , however, information about is needed. As we show below, and coincide on , then for each .
Corollary 3.2. Let . Define and as in Corollary 3.1. Assume . Then,
i.e., if correspond to the same object in , .
In practice, we parameterize as a neural network returning a matrix with sum( ) = 1 representing the probability of each variable being in the th position, , and mask out all columns except the -th one, which results in Equation (8). Drawing on the derivations above, Claim 3.1 is only a matter of bookkeeping.
Notation mapping. We recall a MaM is characterized by a marginal and conditional distributions. Also, for each with or (i.e., is marginalized), as described in Section 2, there is a permutation and an index for which in the PC GFlowNet's state graph. By Corollary 3.1, we can unambiguously define . Similarly, let be subsets of , and define . (Recall ). As before, given , there is a permutation such that , , and
Under Corollary 3.2, does not depend on for . Again, we can thus define without ambiguity. Our central result, stated below, establishes that there is a unique PC GFlowNet for each MaM satisfying both the distributional (i.e., for ) and consistency conditions, and vice-versa.
Proposition 3.2 (MaMs are PC GFlowNets). Let be a consistent MaM satisfying . Then, there is a unique PC GFlowNet such that and for each triplet as in Equation (11). This PC GFlowNet satisfies the DB condition in Equation (9). Conversely, a PC GFlowNet satisfying DB induces a unique consistent MaM such that .
From an operational viewpoint, both MaMs and PC GFlowNets allow for the evaluation of any-subset marginals with a single neural network forward pass in discrete models. In fact, the only lingering difference between MaMs and PC GFlowNets is their differing learning objectives.
As we discuss next, however, the estimator used for MaM's loss function is biased unless the consistency condition holds. Hence, it might be unsuited for training. We instead derive a novel unbiased estimator that preserves MaMs' constant number of forward passes per gradient step.
3.2 REVISITING MAMS' OBJECTIVE
At a basic level, MaMs aim to minimize the KL divergence between and under the consistency constraint, i.e.,
for each set of indices I, J as in Proposition 3.2. As directly enforcing to be consistent with is computationally unfeasible, a penalty function—the ConsistencyError—is introduced instead; recall Equation (6). A central question, however, remains unanswered: how to generate samples from to estimate the objective function ?
When the consistency constraint is satisfied, a persistent Gibbs sampling scheme using as the transition kernel would realize a Markov chain ergodic with respect to , the samples of which could be used for estimating . However, is only approximately consistent with . Thus, the generated samples would produce biased estimates of the KL objective. Based on the connection between MaMs and PC GFlowNets in Proposition 3.2, we propose instead minimizing the consistency-only objective below.
Definition 3.1. We let for given parametric function and and indices with learnable. The consistency-only objective is
in which , for and , and is a full-support distribution over . Additionally, we restrict for .
The only difference between and MaMs' consistency error is that we enforce for instead of minimizing . Clearly, when is globally minimized, , which allows for direct evaluation of . Moreover, the corresponds to the DB loss in Equation (4) with a specific weight scheme . In contrast to , however, a Monte Carlo approximation of requires a constant number of forward passes with respect to the state space's dimension.
Proposition 3.3. Let be a PC GFlowNet. (By Corollary 3.1, does not depend on ). Let be an exploratory policy such that the marginal of over matches the distribution defined in Definition 3.1. Then,
with , , and .
Proposition 3.3 establishes that MaMs’ ConsistencyError corresponds to a transition-wise estimator of the conventional DB loss function for conditional GFlowNets. After thoroughly outlining the connection between PC GFlowNets and MaMs, we ask: how can we leverage our results to improve GFlowNet training? We investigate this next.
4 PARTICLE GFLOWNETS
We extend the persistent-block Gibbs sampling scheme to non-autoregressive generative processes, such as set generation, in which multiple trajectories may lead to the same object. As with MaMs, this reduces the number of forward passes from to per gradient step. We also develop an automatic criterion for refreshing the Gibbs chain, which improves exploration and accelerates convergence.
Particle GFlowNets. We recall from Section 2 that a compositional object is represented as a collection of components from a set , i.e., . In this scenario, a policy function induces a probability distribution over a subset of conditioned on a state . For PC GFlowNets, and induces a distribution over , as in Proposition 3.1. We henceforth assume that each is naturally represented by exactly components, i.e., . This is often the case for usual applications and benchmarks in the GFlowNet literature, such as set generation Jang et al. [2024], phylogenetic inference [Zhou et al., 2024], design of mRNA sequences [Laajil et al., 2025], causal discovery [Silva et al., 2026], and certain combinatorial optimization tasks [Zhang et al., 2023b].

Figure 3: A transition for P-GFlowNets' persistent Gibbs sampler. At each iteration, we replace a component of the current state x and evaluate the loss function in Equation (12) by averaging over the B stochastic processes. This requires forward passess, regardless of d.
To build intuition, consider Figure 3. We start by generating samples from an untrained GFlowNet. Each can be thought of as a -sized subset of , for instance, . At each iteration, we remove a component from according to , resulting in . We then choose a according to the forward policy and attach it to , generating . In conclusion, we may update each model via a gradient step on
Upon repetition, this produces a coupled Markov chain satisfying the DB condition for terminal and near-terminal states. However, independent sampling via MDP simulation can only be achieved if the DB condition is satisfied for every intermediate state. In view of this, we also sample by removing components from ; denotes 's -fold composition. Then, we select and compute
In practice, we pick with as the probabilities of a truncated Poisson distribution with average equal to . As suggested by Proposition 3.3, this choice provides larger weight to near-terminal states, which has been shown to be beneficial [Silva et al., 2025a], while ensuring coverage of the entire state graph. We then define
as our loss function. We refer to a model trained by minimizing as a Particle (P) GFlowNet. Notably, we show below that the Markov chain described above is ergodic with respect to the target when the P-GFlowNet abides by the DB condition. This ensures P-GFlowNets support both correlated and independent sampling, the choice of which to use being a trade off between computational cost with statistical efficiency.
Proposition 4.1. Let be a P-GFlowNet abiding by the detailed balance condition. Define as the Markov chain with the transition kernel depicted in Figure 3. Then, is ergodic with respect to .
Importantly, our persistent Gibbs chain might suffer from inadequate state space exploration due to the structural similarity of adjacent states. To mitigate this issue, we occasionally refresh the process with fresh independent samples from the current policy . This approach is discussed next.
Chain rejuvenation. We use the metric to decide when to restart our stochastic process. Following standard statistical practice, we define as our condition for rejuvenation [Carpenter et al., 2017]. To understand this, recall that the measures the discrepancy between the within- and inter-chain variances. When samples are independently generated, . A large indicates that the diversity of our batched stochastic process is significantly larger than that of each individual sequence, which suggests inefficient state space exploration. To account for the non-stationarity of our Gibbs sampler, we use Gelman's split metric.
As we are dealing with discrete state spaces, however, we cannot directly compute meaningful variances. Instead, we use the last layer embeddings of the forward policy's neural network to compute the split metric. As we show in the following section, the proposed criterion notoriously improves learning convergence and exploration.
5 EXPERIMENTS
Our experimental campaign addresses the following research questions (RQs) regarding P-GFlowNets.
RQ1 Under which conditions do P-GFlowNets improve convergence relative to a standard GFlowNet?
RQ2 How effective is our approach for chain rejuvenation?

(a) Set generation with log-additive rewards.

(b) Bayesian variable selection.
P-GFlowNet GFlowNet
Figure 4: P-GFlowNets often converge faster to the target distribution. As the MDP horizon d grows (a), the relative speed up of our method increases. In contrast (b), our method grows more effective as the reward query cost decreases relative to the sampling cost—i.e., as the number n of samples for likelihood evaluation becomes smaller.

Figure 5: Chain rejuvenation critically accelerates learning. Left: Equation (13). Right: throughout training.
As P-GFlowNets reduce the number of neural network forward passes for sample generation, we expect it to reduce training time when learning is bottlenecked by policy evaluation (RQ1). This is the case when trajectories are long, and sampling is expensive, and reward queries are cheaper than multiple model inferences. Our experiments confirm this intuition (see Figures 4 and 6).
We also show that chain rejuvenation does not only improve state space exploration, but significantly accelerates learning convergence (RQ2). All in all, our observations position P-GFlowNets as a compute-efficient and principled algorithm for GFlowNet training. We provide further details and computer code for our experiments in the supplement.
Set generation with log-additive rewards. Our first task consists of generating fixed-size subsets of a given set . Let be the space of -sized subsets of . Similarly, , and be the initial state. Given a utility function , we define the target distribution as
This function has several important features. First, despite being factorizable into 's components, it cannot be arbitrarily well-approximated by a mean-field variational approximation. Second, the function can be naturally extended to arbitrary (state graph's diameter) and (state graph branching's factor) with . Third, if denotes 's indicator function, both the partition function and the marginals for can be efficiently computed in through the following dynamic programming algorithm, which may be of independent interest for GFlowNet evaluation. Let denote the first elements of any in a fixed order, and define
for and . It should be clear that if then . Also, , with a similar recurrence equation for obtained by replacing by the appropriate -th element of . As such, we gauge the accuracy of a trained GFlowNet on this task by drawing independent states and computing
We consider and drawn from a standard Gaussian for . Then, we track the reduction in the above metric in terms of wall-clock time in Figure 4. As increases, the runtime gap between P-GFlowNet and a standard GFlowNet widens.
Additionally, Figure 5 shows our rejuvenation approach is paramount for speeding up training. There, we consider and the conditions for (default), , and (i.e., no rejuvenation).
Bayesian variable selection. When reward query costs offset the sampling overhead, we expect that allocating more compute per sample should speed up learning convergence. Indeed, this has been empirically observed by Madan et al. [2025], Kim et al. [2025], Dall'Antonia et al. [2026]. To understand how this behavior affects the training of P-GFlowNets, we consider the problem of Bayesian variable selection [George and McCulloch, 1993] with progressively larger sample sizes corresponding to increasingly expensive-to-evaluate posterior distributions. Let and be a dataset with samples and -dimensional features, and denote by the column-filtered data with . Also, let (resp. ) is -dimensional (resp. -dimensional) identity matrix, indicates each is sampled with probability for

(a) Ising model.

(b) Bit sequences.
P-GFlowNet GFlowNet
Figure 6: P-GFlowNets improve exploration. We show the average log-reward of the 10 most rewarding states found in training. As in Figure 4, the runtime gains from P-GFlowNets as the MDP horizon (d) grows.
. We then consider the linear model
and .
We assume , and are known. Under these conditions, the marginal posterior distribution over the set is
with denoting the density of a Gaussian distribution with mean and covariance . Clearly, evaluating costs . To assess a GFlowNet, we evaluate the log-predictive posterior density (LPPD) of a held-out dataset throughout training. Given samples , we approximate the LPPD as
with and and as posterior's mean and covariance given , respectively. In practice, each row of is independently sampled from , with and and for . Under this model, 's columns are highly correlated, and the posterior distribution over is multimodal.
Notably, Figure 4 shows that P-GFlowNets consistently outperform a standard GFlowNet when n small. However, as n grows, the posterior evaluation cost outpaces that of trajectory sampling, and the computational benefits from our model dwindle. As explained above, this confirms our initial assumptions regarding P-GFlowNets.
We next consider the tasks of Ising model simulation, also present in [Liu et al., 2024], and of bit generation, a common testbed for GFlowNets [e.g., Viviano et al., 2023]. For each example, X is the space of d-sized sequences with elements from and , respectively. As is standard practice Malkin et al. [2022], Pan et al. [2023], Kim et al. [2025], we evaluate a model by measuring the average log reward for the top 10 most valuable samples found throughout training.
Ising model. Simply put, let and . We define an energy function as , and as the probability of a configuration under a temperature . In Figure 6, we consider . We observe that P-GFlowNets drastically improve exploration when trajectories are long and sampling is consequently expensive.
Bit sequences. As in Malkin et al. [2022], Tiapkin et al. [2024], we let be a set of modes, and define , with as edit distance between and and is a temperature parameter. We consider and . As we consistently observed in prior experiments, Figure 6 shows P-GFlowNets significantly speed up the discovery of high-reward states as the MDP horizon grows.
6 DISCUSSION
We showed that MaMs [Liu et al., 2024], which were previously thought to be distinct from GFlowNets, can be seen as an instantiation of a conditional GFlowNet using a persistent Gibbs sampler for exploration during training. Based on this, we also demonstrated this strategy generalizes beyond autoregressive modelling, for which MaMs were originally designed, while maintaining its computational benefits. Our experiments highlighted that the resulting method, called Particle GFlowNets, significantly accelerated learning convergence in terms of wall-clock time when compared against conventional GFlowNet training algorithms.
From a broader perspective, our work (esp. Propositions 3.3 and 4.1) strengthens the connection between GFlowNets and Markov chain methods, which was also formally studied by Deleu and Bengio [2023]. This raises several questions. How to optimally decide when to rejuvenate the persistent Gibbs sampler? As noted in Silva et al. [2025a], diagnosing GFlowNets is strikingly difficult; can we draw inspirations from the MCMC literature to properly assess the distributional accuracy of GFlowNets? Successful Markov samplers, such as Langevin dynamics-based methods [Welling and Teh, 2011, Girolami and Calderhead, 2011], rely on simulating a latent dynamics for each transition of the underlying stochastic process; is such a technique extensible to GFlowNets, and when does it accelerate training? We believe these to be interesting directions for future research.
Acknowledgements
DM acknowledges the support of the Fundação Carlos Chagas Filho de Amparo à Pesquisa do Estado do Rio de Janeiro (FAPERJ) (SEI-260003/020348/2025, SEI-260003/020694/2025) and the Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq) (404336/2023-0, 305692/2025-9, 445170/2024-7).
References
Emmanuel Bengio, Moksh Jain, Maksym Korablyov, Doina Precup, and Yoshua Bengio. Flow network based generative models for non-iterative diverse candidate generation. In NeurIPS (NeurIPS), 2021.
Yoshua Bengio, Salem Lahlou, Tristan Deleu, Edward J. Hu, Mo Tiwari, and Emmanuel Bengio. Gflownet foundations. Journal of Machine Learning Research (JMLR), 2023.
James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018.
Bob Carpenter, Andrew Gelman, Matthew D Hoffman, Daniel Lee, Ben Goodrich, Michael Betancourt, Marcus Brubaker, Jiqiang Guo, Peter Li, and Allen Riddell. Stan: A probabilistic programming language. Journal of statistical software, 2017.
Sanghyeok Choi, Sarthak Mittal, Víctor Elvira, Jinkyoo Park, and Nikolay Malkin. Reinforced sequential monte carlo for amortised sampling, 2025. URL https://arxiv.org/abs/2510.11711.
Pedro Dall'Antonia, Tiago da Silva, Daniel Csillag, Salem Lahlou, and Diego Mesquita. Avoid what you know: Divergent trajectory balance for gflownets, 2026. URL https://arxiv.org/abs/2602.17827.
Tristan Deleu and Yoshua Bengio. Generative flow networks: a markov chain perspective, 2023.
Tristan Deleu, António Góis, Chris Chinenye Emezue, Mansi Rankawat, Simon Lacoste-Julien, Stefan Bauer, and Yoshua Bengio. Bayesian structure learning with generative flow networks. In UAI, 2022.
Tristan Deleu, Mizu Nishikawa-Toomey, Jithendaraa Subramanian, Nikolay Malkin, Laurent Charlin, and Yoshua Bengio. Joint Bayesian inference of graphical structure and parameters with a single generative flow network. In Advances in Neural Processing Systems (NeurIPS), 2023.
Walter M. Fitch. Toward defining the course of evolution: minimum change for a specific tree topology. Systematic Zoology, 20(4):406–416, 1971.
Andrew Gelman and Donald B. Rubin. Inference from iterative simulation using multiple sequences. Statistical Science, 1992.
Stuart Geman and Donald Geman. Stochastic relaxation, gibbs distributions, and the bayesian restoration of images. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-6(6), November 1984. doi:10.1109/tpami.1984.4767596.
Edward I George and Robert E McCulloch. Variable selection via gibbs sampling. Journal of the American Statistical Association, 88(423):881–889, 1993.
Josiah Willard Gibbs. Elementary Principles in Statistical Mechanics: Developed with Especial Reference to the Rational Foundation of Thermodynamics. Charles Scribner's Sons, New York, 1902. Reprinted by Dover Publications (1960) and others.
Mark Girolami and Ben Calderhead. Riemann manifold langevin and hamiltonian monte carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 2011.
Timofei Gritsaev, Nikita Morozov, Sergey Samsonov, and Daniil Tiapkin. Optimizing backward policies in gflownets via trajectory likelihood maximization, 2025. URL https://arxiv.org/abs/2410.15474.
Geoffrey E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Comput., 14(8):1771–1800, August 2002. ISSN 0899-7667. doi:10.1162/089976602760128018. URL https://doi.org/10.1162/089976602760128018.
Edward J. Hu, Moksh Jain, Eric Elmoznino, Younesse Kadar, and et al. Amortizing intractable inference in large language models, 2023a.
Edward J. Hu, Nikolay Malkin, Moksh Jain, Katie Everett, Alexandros Graikos, and Yoshua Bengio. Gflownet-em for learning compositional latent variable models, 2023b. URL https://arxiv.org/abs/2302.06576.
Rui Hu, Yifan Zhang, Zhuoran Li, and Longbo Huang. Beyond squared error: Exploring loss design for enhanced training of generative flow networks, 2024. URL https://arxiv.org/abs/2410.02596.
Moksh Jain, Emmanuel Bengio, Alex Hernandez-Garcia, Jarrid Rector-Brooks, Bonaventure F. P. Dossou, Chanakya Ajit Ekbote, Jie Fu, Tianyu Zhang, Michael Kilgour, Dinghuai Zhang, Lena Simine, Payel Das, and Yoshua Bengio. Biological sequence design with GFlowNets. In International Conference on Machine Learning (ICML), 2022.
Moksh Jain, Tristan Deleu, Jason Hartford, Cheng-Hao Liu, Alex Hernandez-Garcia, and Yoshua Bengio. Gflownets for ai-driven scientific discovery. Digital Discovery, 2023a.
Moksh Jain, Sharath Chandra Raparthy, Alex Hernandez-Garcia, Jarrid Rector-Brooks, Yoshua Bengio, Santiago Miret, and Emmanuel Bengio. Multi-objective GFlowNets. In International Conference on Machine Learning (ICML), 2023b.
Hyosoon Jang, Minsu Kim, and Sungsoo Ahn. Learning energy decompositions for partial inference in GFlownets. In The Twelfth International Conference on Learning Representations, 2024.
Keller Jordan, Yuchen Jin, Vlado Boza, You Jiacheng, Franz Cesista, Laker Newhouse, and Jeremy Bernstein. Muon: An optimizer for hidden layers in neural networks, 2024. URL https://kellerjordan.github.io/posts/muon/.
Minsu Kim, Taeyoung Yun, Emmanuel Bengio, Dinghuai Zhang, Yoshua Bengio, Sungsoo Ahn, and Jinkyoo Park. Local search gflownets. arXiv preprint arXiv:2310.02710, 2023.
Minsu Kim, Taeyoung Yun, Emmanuel Bengio, Dinghuai Zhang, Yoshua Bengio, Sungsoo Ahn, and Jinkyoo Park. Local search gflownets, 2024. URL https://arxiv.org/abs/2310.02710.
Minsu Kim, Sanghyeok Choi, Taeyoung Yun, Emmanuel Bengio, Leo Feng, Jarrid Rector-Brooks, Sungsoo Ahn, Jinkyoo Park, Nikolay Malkin, and Yoshua Bengio. Adaptive teachers for amortized samplers. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=BdmVgLMvaf.
Aya Laajil, Abduragim Shtanchaev, Sajan Muhammad, Eric Moulines, and Salem Lahlou. Curriculum-augmented gflownets for mrna sequence generation, 2025. URL https://arxiv.org/abs/2510.03811.
Salem Lahlou, Tristan Deleu, Pablo Lemos, Dinghuai Zhang, Alexandra Volokhova, Alex Hernández-García, Léna Néhale Ezzine, Yoshua Bengio, and Nikolay Malkin. A theory of continuous generative flow networks. In ICML, volume 202 of Proceedings of Machine Learning Research, pages 18269–18300. PMLR, 2023.
Elaine Lau, Nikhil Vemgal, Doina Precup, and Emmanuel Bengio. Dgfn: Double generative flow networks, 2023. URL https://arxiv.org/abs/2310.19685.
Alexander K. Lew, Monica Agrawal, David Sontag, and Vikash K. Mansinghka. Pclean: Bayesian data cleaning at scale with domain-specific probabilistic program-
ming, 2022a. URL https://arxiv.org/abs/2007.11838.
Alexander K. Lew, Marco Cusumano-Towner, and Vikash K. Mansinghka. Recursive monte carlo and variational inference with auxiliary variables, 2022b. URL https://arxiv.org/abs/2203.02836.
Sulin Liu, Peter J Ramadge, and Ryan P Adams. Generative marginalization models. In International Conference on Machine Learning (ICML), 2024.
Kanika Madan, Jarrid Rector-Brooks, Maksym Korablyov, Emmanuel Bengio, Moksh Jain, Andrei Cristian Nica, Tom Bosc, Yoshua Bengio, and Nikolay Malkin. Learning gflownets from partial episodes for improved convergence and stability. In International Conference on Machine Learning, 2022.
Kanika Madan, Alex Lamb, Emmanuel Bengio, Glen Berseth, and Yoshua Bengio. Towards improving exploration through sibling augmented GFlownets. In The Thirteenth International Conference on Learning Representations, 2025.
Idriss Malek, Aya Laajil, Abhijith Sharma, Eric Moulines, and Salem Lahlou. Loss-guided auxiliary agents for overcoming mode collapse in gflownets, 2025. URL https://arxiv.org/abs/2505.15251.
Nikolay Malkin, Moksh Jain, Emmanuel Bengio, Chen Sun, and Yoshua Bengio. Trajectory balance: Improved credit assignment in GFlownets. In NeurIPS (NeurIPS), 2022.
Nikolay Malkin, Salem Lahlou, Tristan Deleu, Xu Ji, Edward Hu, Katie Everett, Dinghuai Zhang, and Yoshua Bengio. GFlowNets and variational inference. International Conference on Learning Representations (ICLR), 2023.
Sean P Meyn and Richard L Tweedie. Markov Chains and Stochastic Stability. Cambridge University Press, Cambridge, 2nd edition, 2009. Cambridge Mathematical Library.
Art B. Owen. Monte Carlo theory, methods and examples. 2013.
Ling Pan, Nikolay Malkin, Dinghuai Zhang, and Yoshua Bengio. Better training of GFlowNets with local credit and incomplete trajectories. In International Conference on Machine Learning (ICML), 2023.
Ling Pan, Moksh Jain, Kanika Madan, and Yoshua Bengio. Pre-training and fine-tuning generative flow networks. In The Twelfth International Conference on Learning Representations, 2024.
Julien Roy, Pierre-Luc Bacon, Christopher Pal, and Emmanuel Bengio. Goal-conditioned gflownets for controllable multi-objective molecular design. arXiv preprint arXiv:2306.04620, 2023.
Mark J Schervish. Theory of statistics. Springer Science & Business Media, 2012.
Max W. Shen, Emmanuel Bengio, Ehsan Hajiramezanali, Andreas Loukas, Kyunghyun Cho, and Tommaso Biancalani. Towards understanding and improving gflownet training. In International Conference on Machine Learning, 2023.
Tiago Silva, Rodrigo Barreto Alves, Eliezer de Souza da Silva, Amauri H Souza, Vikas Garg, Samuel Kaski, and Diego Mesquita. When do GFlownets learn the right distribution? In The Thirteenth International Conference on Learning Representations, 2025a.
Tiago Silva, Amauri H Souza, Omar Rivasplata, Vikas Garg, Samuel Kaski, and Diego Mesquita. Generalization and distributed learning of GFlownets. In The Thirteenth International Conference on Learning Representations, 2025b.
Tiago Silva, Bruna Bazaluk, Eliezer da Silva, António Góis, Salem Lahlou, Dominik Heider, Samuel Kaski, Diego Mesquita, and Adele Ribeiro. Expert-aided causal discovery of ancestral graphs. SSRN, 01 2026. doi:10.2139/ssrn.6074306.
Daniil Tiapkin, Nikita Morozov, Alexey Naumov, and Dmitry Vetrov. Generative flow networks as entropy-regularized rl, 2024.
Tijmen Tieleman. Training restricted boltzmann machines using approximations to the likelihood gradient. In Proceedings of the 25th international conference on Machine learning, pages 1064–1071, 2008.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need, 2023. URL https://arxiv.org/abs/1706.03762.
Siddarth Venkatraman, Moksh Jain, Luca Scimeca, Minsu Kim, Marcin Sendera, Mohsin Hasan, Luke Rowe, Sarthak Mittal, Pablo Lemos, Emmanuel Bengio, Alexandre Adam, Jarrid Rector-Brooks, Yoshua Bengio, Glen Berseth, and Nikolay Malkin. Amortizing intractable inference in diffusion models for vision, language, and control, 2024. URL https://arxiv.org/abs/2405.20971.
Joseph D Viviano, Omar G Younis, Sanghyeok Choi, Victor Schmidt, Yoshua Bengio, and Salem Lahlou. torchgfn: A pytorch gflownet library. arXiv e-prints, pages arXiv–2305, 2023.
Max Welling and Yee Whye Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), 2011.
David W Zhang, Corrado Rainone, Markus Peschl, and Roberto Bondesan. Robust scheduling with gflownets. In International Conference on Learning Representations (ICLR), 2023a.
Dinghuai Zhang, Hanjun Dai, Nikolay Malkin, Aaron Courville, Yoshua Bengio, and Ling Pan. Let the flows tell: Solving graph combinatorial optimization problems with gflownets. In NeurIPS (NeurIPS), 2023b.
Ni Zhang and Zhiguang Cao. Hybrid-balance GFlownet for solving vehicle routing problems. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2025.
Ming Yang Zhou, Zichao Yan, Elliot Layne, Nikolay Malkin, Dinghuai Zhang, Moksh Jain, Mathieu Blanchette, and Yoshua Bengio. PhyloGFN: Phylogenetic inference with generative flow networks. In The Twelfth International Conference on Learning Representations, 2024.
Mingyang Zhou, Zichao Yan, Elliot Layne, Nikolay Malkin, Dinghuai Zhang, Moksh Jain, Mathieu Blanchette, and Yoshua Bengio. Phylogfn: Phylogenetic inference with generative flow networks, 2023.
Yiheng Zhu, Jialu Wu, Chaowen Hu, Jiahuan Yan, Chang-Yu Hsieh, Tingjun Hou, and Jian Wu. Sample-efficient multi-objective molecular optimization with gflownets, 2023.
Particle GFlowNets: Rethinking Generative Marginalization Models (Supplementary Material)
Tiago da Silva
Diego Mesquita
Salem Lahlou
MBZUAI
School of Applied Mathematics, Getulio Vargas Foundation
A SUMMARY & PSEUDOCODE
Table 1: Summary of our main theoretical results.
| Result | Name | Statement |
|---|---|---|
| Prop. 3.1 | Flow = Marginal | The flow at any partial state equals the sum of rewards over all completions consistent with that state. |
| Cor. 3.1 | -Independence of Flow | The optimal flow does not depend on the variable ordering used to construct the DAG. |
| Cor. 3.2 | -Independence of Policy | The forward policy is likewise permutation-independent, so the network need not receive as input. |
| Prop. 3.2 | MaMs PC-GFlowNets | Consistent MaMs and PC-GFlowNets satisfying detailed balance are equivalent. |
| Prop. 3.3 | Consistency Error = DB Loss | The MaM consistency error is an unbiased, -cost estimator of the weighted detailed balance training loss. |
| Prop. 4.1 | P-GFlowNet Ergodicity | The persistent Markov chain induced by a P-GFlowNet satisfying detailed balance converges to . |
The main purpose of our work is to show that MaMs and GFlowNets, previously thought to be distinct, are the same—with MaM differing from conventional GFlowNet implementations solely in how states are sampled during training. Building on this equivalence, we introduce P-GFlowNets, demonstrating its correctness and computational efficiency as a sampling model for discrete, compositional spaces. In this context, Table 1 summarizes our central claims regarding the equivalence between P-GFlowNets and MaMs (Propositions 3.1 and 3.2, Corollaries 3.1 and 3.2) and the correctness of P-GFlowNets (Propositions 3.3 and 4.1). We also provide a pseudocode description of P-GFlowNets in Algorithms 1 and 2.
Algorithm 1: Transition kernel for Algorithm 2.
1 Procedure TransitionKernel(x) /* One step of the persistent Gibbs chain (used to produce in ) */ 2 Sample ; // remove one component via backward policy 3 Sample ; // add one component via forward policy 4 return ; </procedure>
Algorithm 2: P-GFlowNet Training Loop
Input: Reward function , batch size , GR threshold , weight vector (truncated Poisson, mean )
Output: Trained parameters
/* Initialisation */
1 Sample particles via MDP simulation;
2 while not converged do
/* Complete loss (terminal / near-terminal transitions) */
3 for to do
4 ; // remove one component
5 ; // add one component
6 ;
7 /* Intermediate loss (interior transitions, depth sampled from ) */
8 for to do
9 Sample depth ; // truncated Poisson, mean
10 ; // remove components
11 ; // add one component
12 ;
13 /* Gradient step */
14 ;
15 ; /* Particle update via Gibbs step */
16 for to do
17 ; // advance persistent chain
18 /* Rejuvenation (Gelman-Rubin criterion) */
19 Compute split from last-layer embeddings of over the 512 most recent states;
20 if then
21 Resample all particles: for ;
22 return ;
B PROOFS
B.1 PROOF OF PROPOSITION 3.1
We first show that equals the partition function of and, in particular, does not depend on . To see this, notice that Equation (9) implies
for the only trajectory starting at and finishing at with positive probability under (as explained earlier, is either 1 or 0). Also, it should be clear that
as there is only one trajectory from to each and, separating the sum according to the terminal state of each , this is exactly for the introduced in Equation (2). Then, when we sum Equation (14) over ,
This shows does not depend on . Similarly, to show that Equation (10) is satisfied, we proceed by induction in . For this, let . Then, for , , and by definition. Assume, for , that for each -sized object . Then, summing over the support of in the DB condition in Equation (9), we observe that
Clearly, corresponds to an -sized sequence. Also, the sets are disjoint for as, if , then and . Additionally, (see Figure 2). By induction,
In particular,
which is exactly the marginal distribution of under R.
B.2 PROOF OF COROLLARY 3.1
This follows from Proposition 3.1. In fact, notice that , as if , then , and so , and vice-versa. As a consequence,
B.3 PROOF OF COROLLARY 3.2
This follows from Corollary 3.1. As both and satisfy the DB condition, for ,
with for some , and zero otherwise. As , Corollary 3.1 ensures that and , and then
B.4 PROOF OF PROPOSITION 3.2
This proposition follows directly from Corollaries 3.1 and 3.2, and the notational mapping discussed in Section 3.1. That said, we provide a comprehensive demonstration below.
( ) Let be a consistent MaM satisfying for all . Then, define a PC-GFlowNet as follows. For each , let be a permutation for which the first elements are . For , let be a permutation for which the first elements are , and the -th element is .
In this context, let . Also, let and , with and as in Equation (11).
By Corollaries 3.1 and 3.2, the above construction does not depend on the choice of permutation . Consequently, is equivalent to the MaM .
( ) Conversely, let be a PC-GFlowNet abiding by the DB condition. Let , , and be defined as above, and let
By Corollaries 3.1 and 3.2, again, the definition above does not depend on permutation and , as long as they satisfy the property that the first elements are , and the -th is .
Consequently, implements the PC-GFlowNet .
This shows the equivalence.
B.5 PROOF OF PROPOSITION 3.3
To see this, let be 's terminal state. First, notice that simply denotes a(exploratory) policy such that and have the same support for each . By the definition of PC GFlowNets, each has size and for . For conciseness, define
Then, the LHS of Proposition 3.3 can be written as
as the marginal of matches q. This is exactly the inner expectation of Proposition 3.3's RHS.
B.6 PROOF OF PROPOSITION 4.1
To ensure that is ergodic, we show that (i) it is irreducible (i.e., every state is reachable from every other state), (ii) aperiodic (i.e., the chain does not return to at regular intervals), and (iii) stationary with respect to [Meyn and Tweedie, 2009].
By definition of both and , and since neither or are degenerate (i.e., they do not assign zero probability to valid transition), the chain is irreducible. Additionally, for any , we can return to with positive probability after any number of steps. Hence, the chain is aperiodic.
To see that the chain is stationary with respect to , we first recall that the detailed balance implies
for any and . Denote by the transition kernel of . Our objective is to show that
which implies is stationary with respect to . For this, we notice that
Hence,
we highlight in teal and in blue the terms for which we apply the DB condition. This shows is stationary with respect to . Taken together, our results ensure is ergodic with respect to .
C RELATED WORKS
GFlowNets [Bengio et al., 2021, Lahlou et al., 2023, Bengio et al., 2023] are a topic of major interest in the probabilistic modelling literature, providing a clear framework for reasoning about complex hierarchical variational approximations of discrete stochastic models [Malkin et al., 2023, Choi et al., 2025]. The central challenge hampering GFlowNets' broader applicability, in our opinion, is that they are often notoriously difficult to train. A prominent research direction for mitigating this problem, in fact, has been the development of effective learning objectives [Madan et al., 2022, Malkin et al., 2022, Hu et al., 2024, Pan et al., 2024, 2023] that accelerate training convergence. As learning efficiency is characterized by not only the objective function, but also by which samples are observed throughout training, another significant recent line of research has explored meta-heuristic approaches for enhanced state space exploration [Lau et al., 2023, Kim et al., 2025, Madan et al., 2025, Malek et al., 2025, Dall'Antonia et al., 2026]. In particular, our method operationally resembles Kim et al. [2024], Hu et al. [2023b], both of which introduce a sampling technique based on repeated applications of forward and backward policies; however, only P-GFlowNets asymptotically reduces the number of forward passes per gradient step as a function of the underlying MDP's horizon. Nonetheless, despite significantly enhancing GFlowNet's sample efficiency, these approaches often incur in a significant computational cost due to expensive exploration strategies requiring numerous policy evaluations per sample. In fact, our evaluation of SA-GFlowNets, Adaptive Teachers GFlowNets, and ACE Madan et al. [2025], Kim et al. [2025], Dall'Antonia et al. [2026], alongside Local Search GFlowNets Kim et al. [2023], suggested an increase of up to in the per-sample processing time when compared against Madan et al. [2022], Malkin et al. [2022]'s traditional algorithms, which remain standard in the GFlowNet literature, e.g., [Hu et al., 2023a, Venkatraman et al., 2024, Zhou et al., 2023]. As in MaMs [Liu et al., 2024], our work addresses a fundamentally different problem: contrarily to prior approaches, we assume reward querying is cheap, and exploration cost is dominated by policy evaluation. This is the dominant setting for Bayesian inference over complex models in large state spaces, e.g., Deleu et al. [2022], wherein the policy is frequently parameterized with inference-intensive models such as a transformer Vaswani et al. [2023]. With this in mind, as discussed in Section 6, we believe the ideal algorithm would adaptively provision the appropriate amount of computation for each batch of samples. How such an approach would have to be implemented, however, remains open.
D EXPERIMENTAL DETAILS
Our models were implemented in JAX [Bradbury et al., 2018]. All our experiments were run in a Apple MacBook Pro, Apple M4 (10-core: 4P + 6E), 16 GB unified memory, macOS 26.2 (Tahoe). In Section 5, the GFlowNet was trained by minimizing the TB loss Malkin et al. [2022]. We used Muon optimizer Jordan et al. [2024] for minimizing the learning objectives for both GFlowNets and P-GFlowNets. As in Madan et al. [2022], we used a learning rate of for and of for and ; was fixed as an uniform policy. For each experiment, we implemented a 2-layer MLP with 256 hidden units for parameterizing the policy network, and fixed for the batch size. We trained each model with a fixed time budget shown in Figures 4 to 6. In particular, we also set for the task of Bayesian variable selection and,


Figure 8: Per-training step runtime for ACE, AT, TB, and P-GFlowNets (ours). By circumventing complete trajectory sampling during training, P-GFlowNets reduce per-step computation cost by several orders of magnitude.

(a) error for set generation.

(b) LPPD for variable selection.
Figure 9: P-GFlowNets converge faster than AT, ACE, and TB GFlowNets in the set generation and variable selection tasks, achieving more accurate marginals (a) and larger log-predictive density (b), respectively, within a shorter time span.
for the bit sequence generation, followed Malkin et al. [2022]'s approach for constructing the set of modes M. All plots show the average across 3 independent runs; error bars represent one standard deviation from the average. We periodically evaluated the asynchronously based on the 512 most recently observed states, following the implementation in Stan [Carpenter et al., 2017], rejuvenating the chain when the computed exceeded 1.1.
E ADDITIONAL EXPERIMENTS

Figure 7: P-GFlowNets finds more parsimonious phylogenetic trees than ACE, AT GFlowNets and TB GFlowNets.
To further evaluate P-GFlowNets, we compare it against the recently proposed Adaptive Teachers (AT) Kim et al. [2025] and the Adaptive Complementary Exploration (ACE) Dall'Antonia et al. [2026] training algorithms. We also confirm P-GFlowNets' effectiveness in the phylogenetic inference task Zhou et al. [2024].
Comparison against AT and ACE. In contrast to P-GFlowNets, whose focus lies on reducing the per-step computational cost for both training and inference, AT and ACE aim at improving a GFlowNet's sample efficiency by training an exploratory model to search for highly informative (e.g., unvisited, high-probability under the target) regions during learning. In doing so, however, training cost often increases multifold due to the evaluation of both the exploratory and target GFlowNets on both forward and backward trajectories; see Figure 8. From this perspective, we found that P-GFlowNets converge significantly faster than AT and ACE with respect to wall-clock time. We show illustrate this in Figure 9 for both the set generation and variable selection tasks. In both cases, we followed the implementations of Dall'Antonia et al. [2026] for both AT and ACE GFlowNets.
The main setting for which these artificial curiosity-inspired strategies would be appropriate, in our opinion, is when the reward function is extremely expensive to evaluate relatively to the policy network and this expensiveness cannot be reduced by exploiting the shared structure of adjacent states through caching, as explained next.
Phylogenetic inference. To further evaluate P-GFlowNets, we also consider the problem of phylogenetic inference using the parsimony score as the log-reward function Fitch [1971]. We adopt the algorithm suggested by Zhou et al. [2024]. Given a phylogenetic tree T with leaves L annotated with {A, T, C, G}, let be the one-hot encoding of node . For in L, if is annotated with ; , if , and etc. Otherwise, . Then, by letting and denote the left and right child of , the parsimony score is recursively defined as
with the boundary condition for and being 1 if and match element-wise and 0 otherwise. The parsimony score of a tree whose leaves are annotated with a sequence of is the sum of the parsimony score of a tree whose leaves are solely annotated with each element in this sequence, corresponding to the usual bag-of-words assumption in phylogenetic statistical models. The intuition is that a tree is as parsimonious (having low parsimony score) as the number of disagreements between a parent and its children. We define as our reward function, with as the root of T.
Importantly, the modular nature of ParScore ensures that, in transitioning from T to T' using P-GFlowNets' backward-forward kernels, most of the computation required for ParScore(T') can be reused from ParScore(T), reducing the cost of reward querying. Based on this, we compare P-GFlowNets against AT and ACE GFlowNets on their state space exploration capabilities during training in Figure 7. The initial exploration phase, highlighted as a horizontal line for P-GFlowNets, corresponds to the period before which samples are collected for computing , which is used to decide whether the chain should be rejuvenated. As in the set generation and variable selection tasks, P-GFlowNets improve upon both AT and ACE given a similar wall-clock time budget. That said, extending P-GFlowNets to mixed, discrete and continuous, spaces—as often required in phylogenetic inference based on stochastic evolution models—remains an interesting venue for future research.