In many scientific and engineering tasks, we don't just want to find the "single best" solution; we want to discover a diverse set of high-quality candidates. Whether designing new molecules, generating aesthetic images, or sampling from complex physical systems, the goal is to capture all the "modes" (peaks) of a reward or energy landscape.
Traditional Reinforcement Learning (RL) often fails here because it is designed to maximize expected reward, which typically leads to "mode collapse"—the model converges on a single optimal path and ignores other equally valid solutions. A growing body of research suggests that the key to maintaining diversity lies in off-policy training, specifically through the use of replay buffers and exploratory samplers.
The Problem with On-Policy Learning
In a standard on-policy setting, a model learns only from the trajectories it currently generates. This creates a dangerous feedback loop: as the model becomes more confident about a specific high-reward region, it samples from that region more often, further reinforcing its preference for that mode while "forgetting" other parts of the state space.
Emmanuel Bengio, Moksh Jain, and Yoshua Bengio addressed this in Flow Network based Generative Models for Non-Iterative Diverse Candidate Generation by introducing Generative Flow Networks (GFlowNets). Unlike RL, GFlowNets are trained to sample objects with a probability proportional to their reward. A critical insight of this work is that GFlowNets can learn from any exploratory trajectory, not just their own. This off-policy robustness allows them to incorporate high-reward states discovered by chance or by external exploration policies.
Replay Buffers as Global Memory
To operationalize this off-policy advantage, researchers have turned to the replay buffer, a classic tool from RL. In the context of generative modeling, the buffer acts as a long-term memory of every high-reward mode the agent has ever encountered.
Nikhil Vemgal and Doina Precup demonstrated in An Empirical Study of the Effectiveness of Using a Replay Buffer on Mode Discovery in GFlowNets that this simple addition significantly improves diversity. By mixing fresh on-policy samples with historical off-policy samples from the buffer, the model is forced to maintain its knowledge of distant peaks in the reward landscape, even as its current policy explores new territory.
Scaling to Diffusion and Continuous Spaces
The benefits of off-policy training are not limited to discrete graphs or molecules; they are increasingly being applied to continuous diffusion models. Diffusion samplers often struggle to move between isolated modes in high-dimensional energy landscapes because the "bridge" between modes has near-zero probability.
In Improved off-policy training of diffusion samplers, Marcin Sendera and Minsu Kim propose combining GFlowNet objectives with Local Search and Replay Buffers. By using Langevin-based local exploration to find nearby peaks and storing those peaks in a buffer, the model learns a much more accurate representation of the global distribution.
Similarly, Junhua Chen and Anima Anandkumar introduced Sequential Controlled Langevin Diffusions (SCLD) in Sequential Controlled Langevin Diffusions. Their framework uses a replay buffer to store particle trajectories, which stabilizes training and prevents the sampler from collapsing into a subset of modes. This approach allows diffusion models to achieve high performance with significantly less training data by effectively "re-using" successful paths from the past.
Preventing Reward Over-Optimization
Off-policy mechanisms also solve a critical problem in fine-tuning: reward over-optimization. When we fine-tune a pre-trained model (like an image generator) to maximize a specific reward (like "aesthetic score"), the model often loses its original diversity and starts producing repetitive, "uncanny" outputs.
Hyeongyu Kang and Jinkyoo Park address this in Diffusion Fine-Tuning via Reparameterized Policy Gradient of the Soft Q-Function. Their SQDF framework uses an off-policy replay buffer to maintain a collection of diverse historical samples. By revisiting these samples during the fine-tuning process, the model adapts to the new reward while anchored to its original distributional variety, preventing the collapse typically seen in on-policy optimization.
Why It Works: Decoupling Discovery from Learning
The core intuition behind this research direction is the decoupling of discovery and density estimation.
- Discovery: Exploratory samplers (like MCMC or Langevin dynamics) or random search find new modes.
- Memory: The replay buffer stores these discoveries so they are never forgotten.
- Learning: The generative model (GFlowNet or Diffusion) uses off-policy losses to ensure its output distribution matches the rewards of all samples in the buffer.
By breaking the dependence on the current policy's samples, these methods allow generative models to act as "global integrators" of knowledge, successfully mapping complex, multimodal landscapes that on-policy methods would inevitably simplify. As shown by Arran Carter and Víctor Elvira in Discrete Diffusion Samplers and Bridges, this strategy is even effective in discrete latent spaces, enabling "data-free" sampling of complex posteriors by treating the sampling process as an off-policy reinforcement learning problem.