arXiv:2610.07562cs.LGOct 2026

Manuscript Offprint

arXiv:2610.07562

Learning a Mixture of GFlowNets

Tiago da Silva, Amauri H. Souza, Salem Lahlou

Abstract

Learning an ensemble of GFlowNets to sample from a discrete target distribution has become a common approach for achieving better state space exploration and convergence than that of a monolithic sampler. However, these methods often add a substantial runtime overhead to the base model, and their conceptual connection remains elusive. To address this, we first propose a general-purpose theoretical framework for describing a mixture of GFlowNets, which we specialize into continuously (CI) and discretely indexed (DI) collections. On the one hand, we show CI GFlowNets can be interpreted through the lens of a random features expansion, provably boosting the sampler's expressivity in graph-structured tasks and reducing learning instability via spectral shifting. On the other hand, we demonstrate DI GFlowNets encompass prior approaches for GFlowNet training and provide the foundation for the newly proposed Stratum-Conditioned (SC) GFlowNets. This method, which is inspired by the Doob's h-transform of Markov chains, decomposes the state space according to a prescribed modular function and restricts each component to sample from a distinct subset of it. Importantly, SC GFlowNets support centralized and component-wise embarrassingly parallel training, and we show both of them significantly speed up learning convergence and mode coverage without introducing any non-negligible extra computation.

1 Introduction

Suppose we are given an unnormalized distribution R over a discrete space X. A common problem in both statistical inference and probabilistic machine learning is to draw samples from X distributed according to R (Bishop, 2007; Neal et al., 2011; Blei & et al., 2017). When X is intractably large—e.g., the space of graphs containing N nodes or of subsets of a set with N elements for largish N—addressing this challenge often requires the use of approximate algorithms such as Markov chain Monte Carlo (MCMC) or variational inference (VI). Notably, MCMC suffers from slow convergence and correlated samples, especially in discrete spaces, and its correctness cannot be tractably assessed in general (Owen, 2013). VI, in contrast, reframes the sampling problem as that of finding the best approximation to R within a tractable family, thereafter enabling the generation of independent samples from a measurably correct distribution (Malkin et al., 2023; Zimmermann et al., 2023).

As a major milestone of VI for discrete spaces, GFlowNets (Bengio et al., 2021; Lahlou et al., 2023) learn a sequential decision process that iteratively constructs each x∈Xx \in \mathcal{X} from an initial (empty) state in proportion to R(x)R(x). Since their conception, they have been successfully deployed into applications ranging from causal discovery (Deleu et al., 2022, 2023) to LLM fine-tuning (Hu et al., 2023; Venkatraman et al., 2024) and phylogenetic inference (Zhou et al., 2024). Despite their potential, they suffer from insufficient state space exploration (Kim et al., 2025b; Madan et al., 2025), slow training convergence (Liu et al., 2024), and learning instability (Figure 10), often failing to simulate even simple multi-modal distributions defined over relatively small X\mathcal{X} (Figure 20).

Figure

Figure 1: An ensemble of GFlowNets that, when averaged, matches the target.

To mitigate this issue, recent works have proposed learning an ensemble of GFlowNets in which each component focuses on a nearly-unique subset of the state space (Yu et al., 2026a,b; Dall'Antonia et al., 2026b); in doing so, they incentivize the exploration of unvisited high-probability regions and accelerate learning convergence. However, they often incur a substantial computational overhead—requiring several neural networks to be separately trained—and, despite being similar, lack a shared conceptual foundation. In this scenario, our first contribution is to introduce a unifying theory to describe a mixture of GFlowNets (Figure 1), shedding light on the applicability and limitations of such an approach. Drawing on this framework, we propose distinct algorithms that we show to both stabilize and accelerate learning convergence.

In this context, we separate our presentation into continuously (CI) and discretely indexed (DI) mixtures of GFlowNets. On the one hand, CI GFlowNets learn an uncountable collection of samplers, each of which is associated to a real-valued vector whose value serves as an extra input to the underlying neural network parameterizing the sampler. We demonstrate this formulation is connected to the theory of random features for graph learning (Sato et al., 2021; Abboud et al., 2021), providing a computationally simple approach to provably boost the sampler's expressivity in graph-structured tasks (Sections C and 4). In addition, we show CI GFlowNets stabilize learning by shifting the spectrum of the loss function's Hessian, reducing the dependence of the learned model on exogenous factors such as the initial value of the pseudorandom number generator (Proposition C.7).

On the other hand, DI GFlowNets consist of a finite (or countably infinite) mixture of samplers. Each sampler learns in proportion to a re-weighted target; for the kth component, this is x↦R(x)q(k∣x)x \mapsto R(x)q(k|x) for a posterior mixing distribution q(⋅∣x)q(\cdot|x) (see Section 5). In this sense, DI GFlowNets support two learning modalities: centralized, with an embedding of k being used as extra input to a component-wise shared model, and embarrassingly parallel (Neiswanger et al., 2014), with distinct components being independently trained across non-communicating processes. We prove this framework encompasses two prior methods, Subgraph Asynchronous Learning (Silva et al., 2025b) and Boosted GFlowNets (Dall'Antonia et al., 2026b), unifying otherwise disparate algorithms.

As the simplest non-trivial instantiation of DI GFlowNets, we propose setting q(⋅∣x)q(\cdot|x) as a sparse distribution assigning zero probability to all but a few components. This effectively corresponds to defining a covering of the state space. We show, however, that conditioning a sampler to exclusively explore an arbitrary subset of X\mathcal{X} is NP-complete in general. We consequently introduce Stratum-Conditioning (SC) as a tractable approach for learning DI GFlowNets. Simply put, SC partitions the state space by binning the outputs of a modular and real-valued function defined on X\mathcal{X}, with each bin being called a stratum (hence the name). This function can be set to the trajectory length required for reaching x∈Xx \in \mathcal{X}, for instance, or as the distance between x∈Xx \in \mathcal{X} and a chosen reference point according to a prescribed metric (Section 5.1). We demonstrate the set of samplers learned in this way are connected via Doob's h-transform of a base GFlowNet (Section 5.2).

Our experiments highlight SC GFlowNets substantially improve both learning convergence and state space exploration across diverse benchmark tasks. Importantly, contrarily to recent algorithmic advances in the GFlowNet literature, SC adds no computational overhead to training, being as fast to train as a single-component sampler (see Figure 4 and Figures 11 to 13). As with most of machine learning research, which historically started from simple algorithms that have been incrementally enhanced over time, we believe SC GFlowNets set a minimal baseline for learning a mixture of GFlowNets. In summary, our contributions are as follows.

  1. We introduce an abstract framework for learning an ensemble of GFlowNets, demonstrating its usefulness in providing an unifying view of prior techniques and in designing novel algorithms.

  2. We define continuously (CI) and discretely indexed (DI) GFlowNets, outlining their empirical and theo-retical advantages over a single-component sampler.

  3. We propose Stratum-Conditioned (SC) GFlowNets as an effective form of learning DI GFlowNets, supporting both centralized and parallel training.

  4. We show that SC GFlowNets speed up convergence and mode discovery across benchmark tasks.