Skip to main content
QUICK REVIEW

[Paper Review] Learning GFlowNets from partial episodes for improved convergence and stability

Kanika Madan, Jarrid Rector-Brooks|arXiv (Cornell University)|Sep 26, 2022
Reinforcement Learning in RoboticsComputer Science5 citations
TL;DR

This paper proposes Subtrajectory Balance (SubTB), a novel training objective for GFlowNets that enables learning from partial action subsequences of varying lengths, balancing gradient bias and variance. SubTB accelerates convergence, improves stability in sparse or long-horizon environments, and outperforms existing objectives like TB and FM in both reward and diversity metrics across synthetic and real-world tasks including peptide and protein generation.

ABSTRACT

Generative flow networks (GFlowNets) are a family of algorithms for training a sequential sampler of discrete objects under an unnormalized target density and have been successfully used for various probabilistic modeling tasks. Existing training objectives for GFlowNets are either local to states or transitions, or propagate a reward signal over an entire sampling trajectory. We argue that these alternatives represent opposite ends of a gradient bias-variance tradeoff and propose a way to exploit this tradeoff to mitigate its harmful effects. Inspired by the TD($λ$) algorithm in reinforcement learning, we introduce subtrajectory balance or SubTB($λ$), a GFlowNet training objective that can learn from partial action subsequences of varying lengths. We show that SubTB($λ$) accelerates sampler convergence in previously studied and new environments and enables training GFlowNets in environments with longer action sequences and sparser reward landscapes than what was possible before. We also perform a comparative analysis of stochastic gradient dynamics, shedding light on the bias-variance tradeoff in GFlowNet training and the advantages of subtrajectory balance.

Motivation & Objective

  • To address the bias-variance tradeoff in GFlowNet training, where local objectives (e.g., detailed balance) have low variance but high bias, and trajectory-level objectives (e.g., trajectory balance) have low bias but high variance.
  • To develop a flexible training objective that can learn from incomplete or partial episodes, enabling more efficient and stable training in environments with long action sequences or sparse rewards.
  • To improve convergence speed and robustness to hyperparameter choices in GFlowNet training, especially in challenging probabilistic modeling settings.
  • To provide a unified framework that interpolates between local consistency and full-trajectory credit assignment via a learnable $λ$ parameter.

Proposed method

  • Proposes SubTB($\lambda$), a training objective inspired by TD($\lambda$) in reinforcement learning, which balances credit assignment across subtrajectories of varying lengths.
  • Uses a weighted sum of temporal difference targets over subtrajectories, where the weighting is determined by the eligibility trace parameter $\lambda$, allowing interpolation between local (DB-like) and global (TB-like) learning.
  • Derives the objective as a generalization of trajectory balance, enabling learning from incomplete episodes by assigning credit to intermediate states based on future rewards.
  • Employs a stochastic gradient update rule that computes gradients using subtrajectory segments, reducing variance compared to full-trajectory backpropagation.
  • Introduces a differentiable mechanism to sample and weight subtrajectories dynamically, improving data efficiency and convergence.
  • Applies the objective to train GFlowNets via policy gradient methods, with the policy parameterized by a neural network that generalizes across unseen states.

Experimental results

Research questions

  • RQ1Can a GFlowNet training objective that learns from partial episodes improve convergence speed and stability compared to full-trajectory or local objectives?
  • RQ2How does the hyperparameter $\lambda$ in SubTB($\lambda$) affect the bias-variance tradeoff in GFlowNet training?
  • RQ3Does SubTB($\lambda$) enable effective training in environments with long action sequences or sparse reward functions where prior methods fail?
  • RQ4To what extent does SubTB($\lambda$) reduce gradient variance compared to trajectory balance, and how does this impact training dynamics?
  • RQ5Can SubTB($\lambda$) improve both sample quality (reward) and diversity in sequential generation tasks?

Key findings

  • SubTB($\lambda$) achieves faster convergence and lower sensitivity to hyperparameter choices compared to TB, FM, and DB objectives in synthetic and real-world environments.
  • In the antimicrobial peptide generation task, SubTB($\lambda$) achieved a mean top-100 reward of 0.96 ± 0.02, significantly outperforming TB (0.90 ± 0.03) and FM/DB (0.78 ± 0.05).
  • On the fluorescent protein generation task with 237-length sequences, SubTB($\lambda$) achieved a top-100 reward of 1.18 ± 0.10 and diversity of 204.44 ± 0.45, surpassing TB (0.76 ± 0.19 and 204.31 ± 0.44) and other baselines.
  • Models trained with SubTB($\lambda$) discovered more modes and showed higher Spearman correlation with the target distribution earlier in training, indicating faster and more effective exploration.
  • The variance of stochastic gradients was significantly lower under SubTB($\lambda$) compared to TB, validating the hypothesis that SubTB reduces gradient variance while maintaining low bias.
  • SubTB($\lambda$) enables effective training in environments with sparse rewards and long trajectories—settings where previous GFlowNet objectives struggled or failed to converge.

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.