Abstract
Generative Flow Networks (GFlowNets) have emerged as a powerful framework for sampling diverse, high-reward objects in combinatorial spaces. Despite their potential, standard training objectives like Flow Matching and Trajectory Balance face significant hurdles regarding data efficiency and scalability to large action spaces. We introduce Bifurcated GFlowNets (BN), which factorize the network's flow into a state flow and an edge-based allocation. This architectural innovation, reminiscent of dueling architectures in reinforcement learning, enhances learning efficiency and scales linearly with trajectory length while removing the requirement for a backward policy. Experimental results on RNA and molecular generation tasks show that BN significantly outperforms traditional GFlowNet variants in discovering high-reward, diverse candidates.
1. Introduction
Generative Flow Networks (GFlowNets) are designed to learn a stochastic policy that samples objects—such as molecules, proteins, or sequences—with a probability proportional to a given reward function. By treating the generation process as a flow through a directed acyclic graph (DAG), GFlowNets ensure "flow consistency," where the total flow into a state must equal the total flow out. While effective, the practical application of GFlowNets is often limited by the efficiency of their training objectives and their ability to handle environments with massive action spaces.
2. Challenges in GFlowNet Training
Existing GFlowNet training objectives generally fall into two categories, each with distinct drawbacks:
- Flow Matching (FM): FM parameterizes the flow of every individual edge. This approach is notoriously data-inefficient. When a high reward is discovered, FM updates only the specific edges in the successful trajectory. It fails to generalize the value of the state itself, meaning sibling actions from that state remain underexplored until they are explicitly sampled.
- Balance-based Objectives (DB, TB, SubTB): These methods improve efficiency but typically require a learned or predefined backward policy ($P_B$). In complex environments—such as molecular assembly with thousands of possible building blocks—defining or learning a backward policy becomes computationally expensive or even intractable. Furthermore, high-performing variants like Sub-Trajectory Balance (SubTB) exhibit $O(n^2)$ computational scaling relative to trajectory length, limiting their use in long-horizon tasks.
3. Bifurcated GFlowNets (BN)
To address these limitations, we propose Bifurcated GFlowNets (BN). The core insight of BN is the factorization of the edge flow $F(s \to s')$ into two distinct components:
- State Flow $F(s)$: Representing the total flow passing through state $s$.
- Edge Advantage $A(s'|s)$: A probability distribution that determines how the state flow is distributed among outgoing edges.
Mathematically, this is expressed as $F(s \to s') = F(s)A(s'|s)$. This factorization is conceptually similar to the Dueling DQN architecture in reinforcement learning, which separates state value from action advantage.
3.1 Architectural Implementation
BN utilizes a bifurcated neural network architecture. A shared state encoder processes the input state and then splits into two specialized heads: one scalar head predicting the state flow and one policy head predicting the edge advantage distribution. This structure ensures that any update to a single transition propagates information to the shared state flow component. Consequently, the model learns that a state is "valuable" regardless of which specific action was taken, allowing for much faster generalization across the action space.
4. Experimental Evaluation
The performance of BN was evaluated across several benchmarks, ranging from synthetic tasks to high-dimensional biological and chemical design problems.
4.1 HyperGrid and RNA Generation
In the HyperGrid benchmark, BN demonstrated superior convergence speeds in both update counts and wall-clock time compared to FM, DB, and TB. In RNA sequence generation (14-nucleobase sequences), BN more accurately matched the target reward distribution and discovered a higher number of high-reward modes than all baseline models.
4.2 Large-Scale Molecule Generation
The most significant test involved generating molecular graphs using 105 building blocks to minimize binding energy to the sEH protein. This environment features a state space of approximately $10^6$ and an action space of roughly 2,000. BN dominated this task, discovering $2,345 \pm 92$ novel, high-reward molecules (score > 8). In comparison, the strongest baseline, Flow Matching, discovered only $1,447 \pm 267$.
Furthermore, BN maintained higher diversity among its top candidates. The average Tanimoto similarity for BN was 0.472, compared to 0.497 for FM, indicating that BN is less prone to mode collapse and more effective at exploring the vast chemical space.
5. Discussion and Conclusion
Bifurcated GFlowNets represent a significant step forward in making flow-based generative models more practical for complex domains. By factorizing the flow, BN achieves the data efficiency of state-based updates without the computational overhead of a backward policy. The $O(n)$ scaling of BN makes it particularly suitable for long-trajectory tasks where SubTB becomes prohibitive.
Future research will explore the application of the bifurcated architecture to combinatorial optimization and the alignment of Large Language Models (LLMs), where large action spaces and the need for diverse sampling are prevalent.
Summary updated