Improved off-policy training of diffusion samplers
Marcin SenderaMinsu KimSarthak MittalPablo LemosLuca ScimecaJarrid Rector-BrooksAlexandre AdamYoshua BengioNikolay Malkin
Presents a unified benchmark and an effective replay-buffer exploration strategy for training diffusion models to sample from unnormalized energy densities via continuous generative flow networks.
Generating samples and estimating partition functions from unnormalized probability densities or energy functions is a foundational challenge in modern machine learning and computational science. While standard simulation-based Markov Chain Monte Carlo methods struggle with slow mode-mixing and prohibitive computational costs in high-dimensional multimodal spaces, amortized variational inference aims to train parametric models that generate samples rapidly. Diffusion models and continuous generative flow networks (GFlowNets) have emerged as powerful paradigms for this task. However, the existing research landscape suffers from benchmarking inconsistencies, differing architectures, unstated hyperparameters, and conflicting claims regarding algorithmic performance and sample efficiency.
The article systematically benchmarks and evaluates continuous-time diffusion-structured inference algorithms under a unified framework. It also introduces and tests a novel exploration mechanism designed to enhance sampling quality and mode coverage in off-policy training.
To establish reliable comparisons, the authors developed an open-source codebase unifying simulation-based variational approaches (such as the Path Integral Sampler) and reinforcement-learning-inspired continuous GFlowNets (such as Trajectory Balance). Using consistent neural architectures and shared training settings, the authors evaluated these models across diverse synthetic and applied benchmarks ranging from 2 to 1600 dimensions, including Gaussian mixture models, funnel distributions, multi-well potentials, Log-Gaussian Cox processes, and conditional latent posterior sampling for a variational autoencoder. The core algorithmic contribution augments continuous GFlowNets with a local search exploration strategy, executing parallel Metropolis-adjusted Langevin algorithm chains directly in target space and storing accepted high-probability samples in a prioritized replay buffer for subsequent training.
The findings provide crucial clarity on model behavior. First, baseline GFlowNet objectives without exploration exhibit severe mode collapse, but adding the proposed local search replay buffer substantially improves sample quality, mode coverage, and log-partition function accuracy across tasks. Second, incorporating a Langevin parametrization inductive bias—directly leveraging target energy gradients within the policy—consistently improves performance across both on-policy and off-policy models, despite introducing a two- to three-fold computational slowdown per iteration. Third, the analysis reveals that partial-trajectory optimization (Subtrajectory Balance) offers no consistent performance benefit over standard whole-trajectory balance while incurring noticeable computational overhead, directly contradicting claims in previous literature. Fourth, in conditional variational autoencoder experiments, standard Trajectory Balance struggles to learn conditional partition functions, whereas policy-only variance-reduction estimators (VarGrad) match or outperform simulation-based baselines.
These results demonstrate that the primary bottleneck in continuous amortized inference lies in exploration efficiency and gradient-guided credit assignment rather than partial-trajectory loss formulation. For engineering and scientific practitioners, adopting prioritized replay buffers with local search provides an effective, computationally lightweight safeguard against mode collapse. However, teams must weigh the high computational cost of Langevin gradient evaluations against the necessity for sharp mode resolution in high-dimensional tasks.
Practitioners deploying amortized diffusion samplers should utilize trajectory-level objectives (such as Trajectory Balance or VarGrad) combined with local search exploration buffers, while avoiding the added complexity of subtrajectory flow modeling. In discrete-time sampling with few time steps, practitioners should also parameterize and learn the forward diffusion variance rather than keeping it fixed, which prevents over-smoothing around target peaks. Further pilot investigations are recommended before scaling these methods to full expectation-maximization training loops in large-scale generative pipelines or complex physical inverse problems.
While the empirical conclusions are supported across multiple repeated trials and rigorous statistical significance tests, readers should note certain limitations. The benchmarks rely primarily on Gaussian discretization bridges, fixed step discretizations, and specific low-to-moderate dimensional potentials. Furthermore, high-dimensional benchmarks like Log-Gaussian Cox processes lack exact ground-truth partition functions, introducing minor baseline variance. Nonetheless, the comparative insights regarding exploration, replay buffers, and credit assignment remain highly robust.
- Paper: GFlowNet Foundations, Yoshua Bengio et al. (2023). Its flow-conservation theory and sampling objectives establish the GFlowNet foundations needed to follow the source’s Trajectory Balance methods.
- Paper: Score-Based Generative Modeling through Stochastic Differential Equations, Yang Song et al. (2021). Its continuous-time SDE and score-based sampling framework supplies the diffusion machinery the source adapts to unnormalized target densities.
- Paper: Learning GFlowNets From Partial Episodes For Improved Convergence And Stability, Kanika Madan et al. (2023). Its subtrajectory-balance formulation provides the necessary context for the source’s direct comparison of partial- and whole-trajectory objectives.
- Paper: Better Training of GFlowNets with Local Credit and Incomplete Trajectories, Ling Pan et al. (2023). Its analysis of local credit assignment and incomplete GFlowNet trajectories clarifies the credit-assignment alternatives assessed in the source.
- Paper: Adjoint Sampling: Highly Scalable Diffusion Samplers via Adjoint Matching, Aaron J. Havens et al. (2025). It carries diffusion sampling for unnormalized energies forward with adjoint-based optimization and replay, extending the source’s exploration-focused sampler training.
- Paper: NETS: A Non-equilibrium Transport Sampler, Michael Samuel Albergo et al. (2025). It continues off-policy learning for unnormalized-distribution sampling by adding a learned transport drift to annealed Langevin dynamics.
