TL;DR
Generative Flow Networks (GFlowNets) are powerful tools for sampling diverse structured objects but suffer from severe training instability. This paper reveals a fundamental mismatch where near-optimal models can still experience exploding training losses, derives the first theoretical bounds linking training loss to global Total Variation (TV) error, and introduces Stable GFlowNets—a novel framework that uses adaptive reference flows to stabilize training and provide probabilistic quality certificates.
What Problem Does This Paper Address?
GFlowNets model object generation as a sequential decision process on a Directed Acyclic Graph (DAG). Unlike reinforcement learning, which maximizes expected reward, GFlowNets aim to sample objects with a probability proportional to their reward, making them ideal for discovering diverse molecular candidates.
However, training them is notoriously unstable, frequently plagued by sudden loss spikes and mode collapse. The authors identify a critical gap: standard GFlowNet training objectives (like Trajectory Balance) only guarantee correctness when the loss is exactly zero everywhere. In realistic settings with finite data, it has been entirely unclear whether a non-zero training loss meaningfully reflects global sampling error, or if controlling the loss is sufficient to guarantee distributional fidelity.
Methods
To bridge this gap, the authors execute a three-part strategy:
- Sensitivity Analysis: They mathematically characterize how standard GFlowNet objectives behave under distribution perturbations.
- Loss-to-TV Bounds: They derive the first mathematical bounds showing that a bounded trajectory balance loss formally guarantees a maximum global Total Variation (TV) error. Because checking every single trajectory is intractable, they develop a trajectory-sampling method to compute a finite-sample, probabilistic TV certificate.
- Stable GFlowNets: They introduce an adaptive reference flow—a customized background flow injected into the flow conservation constraints. This reference flow dynamically caps extreme local contrast ratios (the source of loss spikes) without shifting the global optimization target, utilizing an exponential moving-average rule to adaptively update the loss threshold.
Datasets
The authors evaluate their approach across four distinct environments:
- Regular Tree: A synthetic 3-ary tree used for exact TV computation and theoretical validation.
- Hypergrid: A standard grid-based benchmark environment for GFlowNets.
- L14-RNA1: A biological sequence design task focused on generating RNA sequences with high binding affinity to a human transcription factor.
- sEH: A massive, complex molecular discovery task targeting the soluble epoxide hydrolase protein, featuring a combinatorial state space of approximately $10^{16}$ reachable terminating states.
Key Insights and Ideas
- The "One More Mode" Explosion: The authors show that adding a single high-reward state to an already well-fitted model can cause local training losses to diverge to infinity ($\mathcal{O}((\log \epsilon)^2)$), even though the global distribution remains nearly perfect. This explains why incremental learning in GFlowNets is so brittle.
- Asymmetric Mismatch: While a low TV error does not prevent an unbounded training loss, the reverse does hold: keeping trajectory balance losses bounded strictly limits global sampling errors.
- Reference Flows as Shock Absorbers: Artificially inflating background flow via an adaptive threshold smooths out extreme gradient spikes, acting as a numerical stabilizer during training without altering the final target distribution.
Key Results
- Massive Mode Discovery Gains: On the highly complex sEH molecular task, Stable GFlowNets discovered 14,142.6 scaffolds, compared to just 137.2 for standard Trajectory Balance (TB)—a massive improvement in diversity and robustness.
- Effective Error Tracking: The proposed Monte Carlo estimator ($\mathcal{M}_{\text{TV}}$) tightly tracks the true TV error throughout training across multiple tasks, offering a reliable, scalable training-time signal where exact TV calculation is impossible.
Limitations and Future Work
- Dependence on Backward Sampling: The current theoretical guarantees rely heavily on backward sampling from a target distribution, which can be challenging or intractable in continuous state spaces.
- Conservative Certificates: The probabilistic certificates ($\mathcal{B}_{\text{TV}}$) can sometimes be overly conservative due to their worst-case dependence on the reference flow magnitude.
- Future Directions: Promising future work includes extending the framework to continuous state settings and exploring latent representations as alternative stabilization mechanisms.
Summary updated