TL;DR
This paper bridges the theoretical gap between Generative Flow Networks (GFNs) and Maximum Entropy Reinforcement Learning (RL) by deriving a specific reward function that makes them exactly equivalent. By leveraging this connection, the authors introduce Maximum Entropy GFNs, which use a learned backward policy to achieve the highest possible exploration entropy, significantly outperforming standard uniform-backward GFNs in complex graph-building tasks.
What Problem Does This Paper Address?
Generative Flow Networks (GFNs) are a powerful class of models designed to sample discrete objects (like molecules or graphs) with a probability proportional to a given reward. While GFNs were inspired by RL, the formal connection between the two has been murky. Previous research established an equivalence between GFNs and Soft Q-Learning (SQL) only for tree-structured problems. In more general directed acyclic graphs (DAGs), where multiple paths can lead to the same state, standard RL approaches often suffer from a "sampling bias," over-representing objects that can be reached through many different sequences of actions.
The authors set out to answer: Can we formulate a version of RL that is mathematically identical to GFNs for any acyclic environment, and can this connection help us build better generative models?
Methods
The core contribution is the development of Generative Soft Q-Learning (GSQL). The authors prove that by modifying the reward function in a standard Maximum Entropy RL framework, they can recover the GFN sampling property.
- The "Magic" Reward: They propose a terminal reward $R_T(t) = \log \tilde{p}(t) - \log n(t)$, where $\tilde{p}(t)$ is the target unnormalized distribution and $n(t)$ is the number of paths leading to state $t$.
- Maximum Entropy Backward Policy: In GFNs, the "backward policy" $q(s, a|s')$ defines how to deconstruct an object. While most GFNs use a simple uniform backward policy, this paper derives a "maximum entropy" version: $q(s, a|s') = n(s)/n(s')$.
- Learning the Path Count: Since counting paths ($n(s)$) is computationally expensive in large spaces, the authors propose learning it as an auxiliary task. They show that $\log n(s)$ satisfies a soft Bellman equation on an inverted version of the MDP, making it learnable using standard RL tools like Path Consistency Learning (PCL).
Datasets
The authors evaluated their approach on four distinct environments:
- Simple MDP: A toy 4-state DAG used to illustrate the entropy difference between uniform and maxent policies.
- Hypergrid: A standard GFN benchmark (64x64 and $8^4$ grids) where the agent moves to reach high-reward cells.
- sEH (soluble epoxide hydrolase): A molecule design task using a tree-building MDP.
- QM9: A more challenging molecule design task using a graph-building MDP, where states are connected graphs and actions add nodes or edges.
Key Insights and Ideas
- Fixing the Bias: The "sampling bias" identified in prior work isn't an inherent flaw of RL, but rather a consequence of using the wrong reward. Subtracting the log-path-count ($\log n(s)$) perfectly offsets the over-representation of states with many paths.
- Unique Solutions: Unlike standard GFNs, which can have infinite valid solutions for the flow, Maximum Entropy GFNs have a unique solution that maximizes exploration.
- Uniform isn't always MaxEnt: A common assumption in GFN literature is that a uniform backward policy is "good enough" for exploration. This paper proves that uniform is only optimal under very restrictive conditions (e.g., all nodes in a layer having the same number of parents).
- Visualizing Flow: As seen in Figure 2, the maximum entropy policy distributes the "flow" of probability much more smoothly across the state space compared to the uniform backward policy, which tends to accumulate flow at the boundaries.
Key Results
- Better Exploration: In the complex QM9 graph-building task, Maximum Entropy GFNs and GSQL found significantly more high-reward "modes" (unique molecules) than standard GFNs.
- Higher Entropy: The proposed methods consistently achieved higher policy entropy across all experiments, confirming they are better at exploring the state space.
- Learning $n(s)$ is Feasible: The authors demonstrated that learning the path count is often easier than learning the target distribution itself, providing a robust way to implement these models in practice.
Limitations and Future Work
- Deterministic Environments: The current theory is limited to MDPs with deterministic transitions and a single initial state. Extending this to stochastic environments is a significant challenge.
- Inverse MDP Definition: While the inverted MDP works well for deterministic cases, defining a proper "inverse" for stochastic transitions is not yet clear.
- Reachability: The maximum entropy backward policy relaxes some reachability assumptions, but this might require more complex sampling techniques for very sparse reward spaces.
The authors suggest that as GFN environments become more complex and deviate further from simple tree structures, the benefits of Maximum Entropy GFNs will become even more pronounced.
Summary updated