  Generative Flow Networks (or GFlowNets for short) are a family of
probabilistic agents that learn to sample complex combinatorial structures
through the lens of "inference as control". They have shown great potential in
generating high-quality and diverse candidates from a given energy landscape.
However, existing GFlowNets can be applied only to deterministic environments,
and fail in more general tasks with stochastic dynamics, which can limit their
applicability. To overcome this challenge, this paper introduces Stochastic
GFlowNets, a new algorithm that extends GFlowNets to stochastic environments.
By decomposing state transitions into two steps, Stochastic GFlowNets isolate
environmental stochasticity and learn a dynamics model to capture it. Extensive
experimental results demonstrate that Stochastic GFlowNets offer significant
advantages over standard GFlowNets as well as MCMC- and RL-based approaches, on
a variety of standard benchmarks with stochastic dynamics.
