Unifying Generative Flow Networks and Reinforcement Learning

21 concepts9 papers1 proposal

Generative Flow Networks (GFlowNets) have emerged as a powerful framework for sampling discrete, compositional objects—like molecules, graphs, or sequences—with a probability proportional to a given reward function $R(x)$. Traditionally, GFlowNets are framed around a fluid flow metaphor: states and actions form a Directed Acyclic Graph (DAG), and training enforces a conservation principle where the total flow into a state equals the total flow out plus any terminal reward, as described by Li et al..

While this flow-matching paradigm is elegant, it historically stood isolated from the decades of research in Reinforcement Learning (RL). Recent insights have shattered this isolation, proving that GFlowNets are not merely "inspired" by RL—they are mathematically equivalent to entropy-regularized (or maximum entropy) RL under specific reward transformations.

Understanding this equivalence uncovers why GFlowNets work, bridges the theoretical gap between generative modeling and control, and allows researchers to port powerful RL optimization tools directly into discrete sampling tasks.

The Core Obstacle: Path Multiplicity

To understand why a simple mapping between RL and GFlowNets isn't immediate, consider how both frameworks treat sequences of decisions.

In standard Maximum Entropy (MaxEnt) RL, an agent maximizes both the expected reward and the entropy of its actions. This causes the agent to distribute its probability mass evenly across different paths through the environment.

However, in generative modeling, our goal is to sample diverse final states $x$ proportional to their reward $R(x)$. In a DAG, many different sequences of actions (paths) can terminate at the exact same state $x$. If we apply standard MaxEnt RL, a final state that can be reached through hundreds of distinct paths will be severely over-sampled compared to a state with the same reward that can only be reached through a single path. This discrepancy is known as the path multiplicity problem.

Path-Based Entropy (Standard MaxEnt RL)         State-Proportional Flow (GFlowNet)
       [Root]                                         [Root]
      /   |   \                                      /   |   \
   [A1]  [A2]  [A3]                               [A1]  [A2]  [A3]
      \   |   /                                      \   |   /
     [State X] (High path count)                    [State X] (Sampled ∝ R(X))

To resolve this, Deleu et al. and Bengio et al. demonstrated that if you modify the RL reward function to explicitly penalize or account for the number of paths leading to a state, the mathematical objectives align perfectly. Specifically, they proved that GFlowNet objectives like trajectory balance or subtrajectory balance are functionally identical to path consistency learning in MaxEnt RL once rewards are corrected for path multiplicity.

The Formal Reduction to Soft RL

Building on this alignment, Tiapkin et al. provided a formal reduction showing that GFlowNets can be cast as an entropy-regularized RL problem on a specially constructed Markov Decision Process (MDP) with intermediate rewards.

In this framework, the standard GFlowNet forward policy $\P_F(s'|s)$ behaves exactly like a soft policy in value-based RL. The log of the state flow, $\log F(s)$, maps directly to a soft value function, and the flow conservation equations transform into soft Bellman equations.

This theoretical bridge means that specialized GFlowNet training objectives can be replaced by standard, mature soft RL algorithms. For instance, Tiapkin et al. demonstrated that standard off-the-shelf RL algorithms like SoftDQN and MunchausenDQN can match or outperform traditional GFlowNet objectives in discovering diverse modes in complex spaces.

Cross-Framework Algorithmic Transfer

The unification of GFlowNets and RL is not just a theoretical curiosity; it enables a massive algorithmic transfer from control to generative modeling. Researchers can now leverage advanced RL optimization techniques to solve the instabilities, sample inefficiencies, and mode-collapse issues that frequently plague GFlowNets.

In complex discrete spaces, look-ahead planning is vital. By viewing GFlowNets through the lens of entropy-regularized RL, Morozov et al. successfully integrated Monte Carlo Tree Search (MCTS)—specifically adapting the Maximum Entropy Tree Search (MENTS) algorithm. This allows the generator to plan ahead during training, significantly boosting sample efficiency and generation quality.

2. Policy Gradient Methods

Traditional GFlowNets rely heavily on value-based or flow-based losses, which can be unstable during training. By reformulating GFlowNet training as a policy gradient problem with policy-dependent rewards, Niu et al. enabled the direct optimization of the forward policy using robust policy gradient techniques like Trust Region Policy Optimization (TRPO).

Expanding on this, Zykova-Myzina et al. adapted Proximal Policy Optimization (PPO) to create "Entropic PPO" (Ent-PPO). By combining an analytic KL trust region derived from the soft RL formulation with standard PPO clipping, Ent-PPO achieves highly stable, data-efficient training while preventing the mode collapse common in discrete sampling.

Value-Based GFlowNet (Flow Matching)  ──►  Susceptible to propagation errors & instability
Policy Gradient GFlowNet (Ent-PPO)    ──►  Stable trust-regions, explicit entropy control

3. Actor-Critic Architectures

In actor-critic RL, a critic evaluates the current policy to guide the actor's updates. Niu et al. bridged this concept to generative modeling by showing that the state flow function in a GFlowNet is mathematically equivalent to a policy evaluation function representing Kullback-Leibler (KL) divergence. They introduced Subtrajectory Evaluation Balance (Sub-EB), which uses this equivalence to build a more reliable critic, stabilizing policy-based training and enabling effective learning from offline data.

Ultimate Simplification: Random Policy Evaluation

Perhaps the most surprising result of this unification is that GFlowNet training can be stripped of its complex trajectory-based losses entirely.

He et al. proved that the state flow $F(s)$ of a target GFlowNet policy is directly proportional to the value function of a simple, uniform random policy, provided the rewards are scaled by the state space's branching structure.

This means that finding a policy that samples proportional to a reward $R(x)$ does not require complex actor-critic loops or policy gradient updates. Instead, it can be reduced to the simplest operation in reinforcement learning: policy evaluation. By using standard temporal difference (TD) learning or value iteration to evaluate a fixed, exploratory random policy, their Rectified Random Policy Evaluation (RPE) algorithm uncovers the target generative policy with high stability, matching or exceeding traditional GFlowNet performance on demanding molecular and biological design tasks.

Why It Works: A Shared Foundation

The convergence of these distinct viewpoints highlights a profound truth: probabilistic inference in multi-path environments is fundamentally a control problem.

Framework Core Mechanism Core Objective
Generative Flow Networks Flow Conservation Match target reward distribution at terminal states
Maximum Entropy RL Soft Bellman Optimality Maximize reward while maintaining path diversity
Unified View Branching-Corrected Value Estimation Propagate terminal rewards backward via soft consistency

By mapping state flows to value functions, forward policies to soft control policies, and path multiplicity corrections to intermediate rewards, this research direction replaces a specialized generative framework with a well-understood control paradigm. The reader should take away that GFlowNets succeed not because they are a fundamentally different way of learning, but because they are an elegant formulation of maximum entropy control over structured graphs.

Key Foundational Work

Discrete Probabilistic Inference as Control in Multi-path Environments (2024) — contributed 5 concept elements to this direction.
Improving GFlowNets with Monte Carlo Tree Search (2024) — contributed 2 concept elements to this direction.
GFlowNet Training by Policy Gradients (2024) — contributed 2 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_gflownets_as_soft_rl_d1c77f8b,
  title = {GFlowNets as soft RL},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/gflownets-as-soft-rl/rdr_d1c77f8b22d145a789963fdd65830ecb},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-26},
}

This exact version (version 1, frozen text):

@misc{lacuna_gflownets_as_soft_rl_d1c77f8b_v1,
  title = {GFlowNets as soft RL},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/gflownets-as-soft-rl/rdr_d1c77f8b22d145a789963fdd65830ecb/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-26},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake