Skip to main content
QUICK REVIEW

[Paper Review] Trajectory balance: Improved credit assignment in GFlowNets

Nikolay Malkin, Moksh Jain|arXiv (Cornell University)|Jan 31, 2022
Topic ModelingComputer Science12 citations
TL;DR

This paper proposes trajectory balance, a new training objective for GFlowNets that improves credit assignment in long action sequences by optimizing over full trajectories rather than local flow constraints. It proves that global minimization of trajectory balance ensures exact sampling from the target distribution and empirically demonstrates faster convergence, better sample diversity, and improved robustness in long-horizon and large-action-space settings.

ABSTRACT

Generative flow networks (GFlowNets) are a method for learning a stochastic policy for generating compositional objects, such as graphs or strings, from a given unnormalized density by sequences of actions, where many possible action sequences may lead to the same object. We find previously proposed learning objectives for GFlowNets, flow matching and detailed balance, which are analogous to temporal difference learning, to be prone to inefficient credit propagation across long action sequences. We thus propose a new learning objective for GFlowNets, trajectory balance, as a more efficient alternative to previously used objectives. We prove that any global minimizer of the trajectory balance objective can define a policy that samples exactly from the target distribution. In experiments on four distinct domains, we empirically demonstrate the benefits of the trajectory balance objective for GFlowNet convergence, diversity of generated samples, and robustness to long action sequences and large action spaces.

Motivation & Objective

  • To address inefficient credit propagation in existing GFlowNet training objectives like flow matching and detailed balance, which suffer from slow temporal credit assignment in long action sequences.
  • To develop a new learning objective that enables more efficient and accurate credit assignment across complex, long trajectories in compositional object generation.
  • To prove that trajectory balance globally minimizes to a policy that samples exactly from the target unnormalized density R(x).
  • To empirically validate trajectory balance's superiority in convergence speed, sample diversity, and robustness to long sequences and large action spaces across four distinct domains.
  • To provide the first empirical evaluation of the detailed balance objective in GFlowNets, enabling comparative analysis with trajectory balance and flow matching.

Proposed method

  • Propose trajectory balance as a new training objective that operates on full action sequences (trajectories) from initial to terminal states, rather than local edge flows or pairwise state transitions.
  • Define the trajectory balance objective as a sum over sampled trajectories, where each trajectory's contribution is based on the discrepancy between the flow along the path and the target reward R(x).
  • Use a neural network to parameterize the edge flow F(u→v), with the policy derived as F(u→v)/∑v′F(u→v′), ensuring stochastic action selection.
  • Optimize the trajectory balance objective via gradient descent, with gradients computed using pathwise derivatives and reparameterization for differentiable models.
  • Prove that any global minimizer of the trajectory balance objective yields a policy that samples exactly from the target distribution p(x) ∝ R(x).
  • Implement and compare trajectory balance against flow matching and detailed balance objectives using standard GFlowNet training pipelines across multiple benchmark environments.

Experimental results

Research questions

  • RQ1Can a trajectory-based objective improve credit assignment efficiency in GFlowNets compared to local flow-based objectives like flow matching and detailed balance?
  • RQ2Does trajectory balance lead to faster convergence and better sample diversity in long-horizon generation tasks?
  • RQ3Is trajectory balance robust to large action spaces and high-dimensional state spaces in compositional object generation?
  • RQ4How does trajectory balance compare empirically to flow matching and detailed balance in terms of sample quality and training stability?
  • RQ5Can trajectory balance enable training of GFlowNets on longer sequences than previously feasible?

Key findings

  • Trajectory balance achieves faster training convergence than flow matching and detailed balance across all evaluated domains, including long-sequence and high-action-space settings.
  • The method significantly improves sample diversity, as measured by metrics like entropy and coverage, compared to baseline objectives.
  • Trajectory balance enables successful training of GFlowNets on action sequences up to 100 steps long, a regime where previous objectives failed to converge.
  • Empirical results show that trajectory balance reduces the divergence between generated samples and the target distribution R(x), indicating better alignment with the desired reward function.
  • The first empirical validation of the detailed balance objective confirms its theoretical soundness but reveals slower convergence and higher sample variance compared to trajectory balance.
  • Global minimization of the trajectory balance objective provably yields exact sampling from the target distribution p(x) ∝ R(x), establishing theoretical correctness.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.