Local Search GFlowNets

Minsu Kim, Taeyoung Yun, Emmanuel Bengio, Dinghuai Zhang, Yoshua Bengio, Sungsoo Ahn, Jinkyoo Park · DOI

Introduction

Generative Flow Networks (GFlowNets) have emerged as a powerful tool for sampling diverse discrete objects, such as molecular graphs or biological sequences, with probabilities proportional to a given reward function. However, in high-dimensional search spaces, GFlowNets often struggle to identify the global optima—the "highest peaks" of the reward landscape. This post explores Local Search GFlowNets (LS-GFN), a novel approach presented at ICLR 2024 that integrates local search directly into the GFlowNet training loop to enhance both exploration and exploitation.

The Challenge: Bridging Global and Local Exploration

In scientific discovery tasks, the goal is often to find a diverse set of high-performing candidates. While GFlowNets excel at inter-mode exploration—jumping between different regions of the search space to find various "hills"—they frequently lack the precision for intra-mode exploration, or climbing to the very top of those hills.

Conceptual overview of inter-mode vs. intra-mode exploration.

This "needle in a haystack" problem leads to training inefficiencies. Because standard GFlowNets generate objects from scratch (forward-only), they spend significant time in low-reward regions, learning primarily from the mediocre samples they generate themselves.

Methodology: The LS-GFN Framework

LS-GFN addresses these limitations by augmenting the standard training process with a three-step iterative loop that combines global generative modeling with local refinement.

The LS-GFN training loop, consisting of a sampling step and an iterative refining step.

1. Step A: Sampling

The model uses its current forward policy to generate a set of complete trajectories, constructing objects (e.g., DNA sequences) from an initial state.

2. Step B: Refining

This is the core innovation. Instead of training directly on the initial samples, the model refines them using its learned policies:

  • Backtracking: The model uses its backward policy ($P_B$) to backtrack $K$ steps, effectively "undoing" part of the construction.
  • Reconstruction: It then uses its forward policy ($P_F$) to complete the object again, potentially finding a higher-reward path.
  • Filtering: A refinement is accepted or rejected based on a filtering rule. The authors primarily use a Deterministic Filter, which accepts the new trajectory only if it results in a higher reward.

3. Step C: Training

Finally, the GFlowNet is trained on these refined, higher-quality trajectories using the Trajectory Balance (TB) objective. This ensures the model "sees" high-reward regions earlier and more frequently during training.

Experimental Evaluation

The authors evaluated LS-GFN across several biochemical benchmarks, including molecule optimization (QM9, sEH) and biological sequence design (TFBind8, RNA-Binding).

Key Results

  • Enhanced Mode Discovery: In the complex sEH molecule task, LS-GFN discovered over 5,200 unique high-reward modes, compared to just 706 for the standard Trajectory Balance baseline.
  • Superior Reward Accuracy: LS-GFN consistently matched the target reward distribution more accurately than baselines, often achieving near-perfect scores where standard GFNs lagged.
  • Outperforming RL: LS-GFN surpassed traditional Reinforcement Learning methods like PPO and Soft Q-Learning. While RL methods often suffer from mode collapse (focusing on a single peak), LS-GFN maintained high sample diversity while finding higher rewards.

Key Insights

  • Synergy: Global and local search are synergistic. GFlowNets provide the global "jumps" to find new modes, while local search provides the "climbing" to exploit them.
  • Self-Improvement: As the model's forward and backward policies improve, its internal local search capability also becomes more effective.
  • Diversity and Greed: Surprisingly, making the model more "greedy" through local search actually increased diversity. By reaching peaks faster, the model can more quickly move on to explore other regions of the space.

Conclusion and Future Work

LS-GFN represents a significant step forward in making GFlowNets more practical for real-world scientific discovery. By refining trajectories during training, it overcomes the traditional trade-off between exploration and exploitation. Future work may involve optimizing the backward policy specifically for search or introducing stochastic elements into the backtracking phase to further enhance diversity.

Summary updated

BibTeX
@inproceedings{kim2024local,
  author = {Minsu Kim and Taeyoung Yun and Emmanuel Bengio and Dinghuai Zhang and Yoshua Bengio and Sungsoo Ahn and Jinkyoo Park},
  title = {{Local Search GFlowNets}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=6cFcw1Rxww},
}
Figure