arXiv:2610.17007cs.LGOct 2026

Manuscript Offprint

arXiv:2610.17007

Mixture of GFlowNets

Omar G. Younis, Joseph D. Viviano, Chirayu Anant Haryan, MD Vasimuddin, Sanchit Misra, Yoshua Bengio

ABSTRACT

Generative Flow Networks (GFlowNets) learn a policy that samples compositional objects in proportion to an unnormalized reward R(x)R(x). This makes them useful wherever many diverse, high-reward candidates are needed and oracle queries are expensive, as in AI for Science. In practice, a single GFlowNet often fails to cover all modes of a complex distribution, and the obvious ways to scale compute saturate: larger batches and data-parallel gradient averaging draw every trajectory from one, possibly biased, policy, so extra rollouts rediscover known modes instead of finding new ones. We explore whether this mode-bias problem (mode collapse in the extreme) can be addressed with a population of asynchronously trained policies which divide the state space between them. Mixture of GFlowNets (MoG) replaces the single forward policy with a community of K independent GFlowNets coupled through one jointly trained soft classifier, which assigns each member its own region of the state space through reward shaping. Mixing the members under their learned partition functions provably recovers the target p(x)∝R(x)p(x) \propto R(x). MoG exchange (MoGX) also lets the classifier route sampled trajectories: a trajectory the classifier assigns to another member is sent to that member and trained on there, with no importance sampling. We evaluate both methods by keeping the environment-interaction budget fixed while scaling the community size, turning parallel compute into mode coverage without extra oracle calls. On HyperGrid, across six reward landscapes and communities of up to K=64, MoG and MoGX keep finding new modes as K grows, while data-parallel training saturates. On a genomic ideotype-design task, MoGX covers 39% of the 1024 optima at K=64, against 31% for independent agents and 20% for data-parallel training. MoG also has a lower per-iteration synchronization cost than data-parallel training.

1 INTRODUCTION

Many AI for Science problems, such as drug design, materials discovery and biological sequence engineering, require searching huge combinatorial spaces for many distinct, high-reward objects. Here sample diversity is the goal, and the dominant cost is the environment query rather than gradient compute, so the number of sampled trajectories should be minimized. Generative Flow Networks (GFlowNets) fit this regime (Bengio et al., 2021; Jain et al., 2022; Bengio et al., 2023; Pan et al., 2024). They amortize sampling from an unnormalized reward R(x)R(x), so the trained policy samples x∝R(x)x \propto R(x) and spreads over the high-reward regions instead of collapsing onto one, as return-maximizing RL tends to (Malkin et al., 2022; Madan et al., 2023). 1^{1}

In practice, trained GFlowNets often miss modes and concentrate on a subset of the high-reward regions; Dall'Antonia et al. (2025) report this on synthetic benchmarks and on peptide design. Two lines of work try to fix this. The first adds exploration to a single policy: intermediate rewards, intrinsic bonuses, Thompson sampling, local search, replay prioritization, or exploratory “sibling”

1^{1}Entropy-regularized RL and samplers for unnormalized densities are closely related; see section A.

networks (Pan et al., 2023; Kim et al., 2023; Rector-Brooks et al., 2023; Shen et al., 2023; Schaul et al., 2016; Vemgal et al., 2023; Madan et al., 2025). These raise trajectory diversity, but all exploration happens around one learned sampler, and a biased sampler limits what can be reached at any iteration. The second uses several GFlowNets. Dall'Antonia et al. (2025) fit a chain of GFlowNets, each targeting the reward its predecessors left uncovered, which helps coverage but is serial, and therefore cannot leverage parallel compute. In contrast, Ikram et al. (2025) (EGFN) evolve a parallel population of GFlowNet agents by weight mutation and distill the population's best trajectories into one gradient-trained sampler through a prioritized replay buffer. The population's search is uncoordinated, and so it serves as an exploration front for that one sampler.

Adding parallel rollouts during training of a single policy gives saturating returns. Obando Ceron et al. (2023) found that smaller batches improve value-based deep RL, and Singla et al. (2024) show that on-policy policy-gradient training plateaus at tens of thousands of parallel environments, because extra samples from one policy add diminishing trajectory diversity. SAPG overcomes this plateau by dividing the environments among several sub-policies, but the split helps only when each sub-policy also learns, off-policy, from the data the others collect. What scales is data that a single policy would not produce. GFlowNets saturate for the same reason: Every trajectory in a batch comes from the same forward policy PFπθiP_{F}^{\pi_{\theta}^{i}}, so extra trajectories land in modes the policy already knows and carry no additional signal about missing modes. If the policy's reachable set Rπθi(s0)\mathcal{R}^{\pi_{\theta}^{i}}(s_{0}) at iteration i is a strict subset of the terminal space X\mathcal{X}, no batch size closes the gap. This is known as the mode-bias problem (which leads to mode collapse in the extreme).

MoG / MoGX engine

Figure

MoGX: classifier-routed trajectory all-to-all destination k∗(x)=arg⁡max⁡jlog⁡fψ(x)jk^{*}(x) = \arg \max_{j} \log f_{\psi}(x)_{j}

Figure 1: Mixture of GFlowNets (MoG) and MoG exchange (MoGX) at a glance. A community of K GFlowNets is trained in parallel against a target R(x)R(x), coupled to one jointly trained soft classifier fψf_{\psi} that softly partitions the state space. Each GFlowNet trains on the shaped reward (blue arrows). The classifier is the only object whose gradients cross rank boundaries. MoGX routes part of the on-policy trajectory to other ranks based on the classifier. Post-training, the Z-weighted mixture provably recovers p(x)∝R(x)p(x) \propto R(x).

Existing work scales GFlowNet training asynchronously without addressing this bias. Asynchronous trajectory balance (Bartoldson et al., 2025) spreads off-policy searchers across nodes that feed a shared buffer, but the searchers are snapshots of one policy and share its reachable set. Embarrassingly Parallel GFlowNets (Da Silva et al., 2024) train one local GFlowNet per factor of a product reward R(⋅)∝R1(⋅)⋯RN(⋅)R(\cdot) \propto R_1(\cdot) \cdots R_N(\cdot) to distribute reward evaluation, not to cover a shared target better. Distributed RL (Espeholt et al., 2018; Horgan et al., 2018) and population-based training (Jaderberg et al., 2017) parallelize agents without encouraging specialization (section A).

We attack mode bias with a population of policies that divide the state space between them. Mixture of GFlowNets (MoG) replaces the single forward policy with a community of KK GFlowNets Πθ={πθ1,…,πθK}\Pi_{\theta} = \{\pi_{\theta_1}, \ldots, \pi_{\theta_K}\} trained in parallel and coupled to one jointly trained soft classifier fψ:X→ΔK−1f_{\psi} : \mathcal{X} \to \Delta^{K-1} that partitions X\mathcal{X}. Component kk trains on the shaped reward log⁡R~k(x)=log⁡R(x)+log⁡fψ(x)k\log \tilde{R}_k(x) = \log R(x) + \log f_{\psi}(x)_k, and mixing the components under their learned partition functions recovers p(x)∝R(x)p(x) \propto R(x) exactly. Only the small classifier's gradients are all-reduced across ranks, bounding communication costs, and the classifier pushes each GFlowNet toward its own subregion. This removes both the parameter coupling that limits data-parallel training and the redundancy that limits independent training. MoG exchange (MoGX) goes further and sends each on-policy trajectory to the rank the classifier assigns it to, through an MPI all-to-all keyed on arg⁡max⁡jlog⁡fψ(x)j\arg\max_j \log f_{\psi}(x)_j. GFlowNet losses accept off-policy data, so the exchange needs no importance correction. Figure 1 shows the full pipeline.

References (62)