Order-Preserving GFlowNets

Yihang Chen, Lukas Mauch · OpenReview

Abstract

Generative Flow Networks (GFlowNets) have been introduced as a method to sample a diverse set of candidates with probabilities proportional to a given reward. However, GFlowNets can only be used with a predefined scalar reward, which can be either computationally expensive or not directly accessible, in the case of multi-objective optimization (MOO) tasks for example. Moreover, to prioritize identifying high-reward candidates, the conventional practice is to raise the reward to a higher exponent, the optimal choice of which may vary across different environments. To address these issues, we propose Order-Preserving GFlowNets (OP-GFNs), which sample with probabilities in proportion to a learned reward function that is consistent with a provided (partial) order on the candidates, thus eliminating the need for an explicit formulation of the reward function. We theoretically prove that the training process of OP-GFNs gradually sparsifies the learned reward landscape in single-objective maximization tasks. The sparsification concentrates on candidates of a higher hierarchy in the ordering, ensuring exploration at the beginning and exploitation towards the end of the training. We demonstrate OP-GFN's state-of-the-art performance in single-objective maximization (totally ordered) and multi-objective Pareto front approximation (partially ordered) tasks, including synthetic datasets, molecule generation, and neural architecture search.

Introduction

Generative Flow Networks (GFlowNets) are a powerful class of models designed to sample diverse, high-quality objects with probabilities proportional to a reward function $R(x)$. However, they face significant hurdles in practice: defining a single scalar reward is difficult in multi-objective settings, evaluating rewards can be computationally prohibitive (e.g., in Neural Architecture Search), and the common practice of using a reward exponent $\beta$ to control exploration introduces a sensitive hyperparameter that is difficult to tune.

The OP-GFN Approach

Order-Preserving GFlowNets (OP-GFNs) shift the learning paradigm from absolute reward values to relative candidate orderings. Instead of requiring an explicit reward function, OP-GFNs only need a partial or total order over candidates (e.g., "Candidate A is better than B"). The model learns an internal reward function consistent with these rankings by minimizing the KL divergence between a ranking-derived labeling distribution and the model's own sampling distribution.

A key theoretical contribution is the sparsification property: the training objective naturally drives the rewards of lower-ranked candidates toward zero over time. This creates an automatic curriculum where the model explores broadly in early stages and gradually focuses on the most promising candidates, effectively solving the "Goldilocks" problem of manual reward exponent tuning.

Experimental Results

The authors evaluated OP-GFNs across a wide range of benchmarks, demonstrating state-of-the-art performance in both single-objective and multi-objective tasks.

Neural Architecture Search (NAS)

In NAS, calculating the true reward (final test accuracy) is extremely slow. OP-GFNs utilize the ordering provided by "proxy" rewards (accuracy after minimal training) to guide the search. As shown in the performance plots below, OP-GFN variants consistently achieve higher accuracy more quickly than standard GFlowNets and traditional search algorithms like BOHB or REINFORCE across multiple datasets.

Performance of OP-GFNs on Neural Architecture Search (NAS) benchmarks. OP-GFN variants (e.g., OP-TB-KL) demonstrate superior convergence speed and final accuracy compared to baselines.

Multi-Objective Optimization (MOO)

OP-GFNs are particularly well-suited for MOO, where they use Pareto dominance to establish a partial order. Unlike preference-conditioned models that rely on linear scalarization, OP-GFNs can capture the entire Pareto front more accurately. The heatmaps below illustrate how OP-GFNs maintain a distribution that closely matches the true Pareto front compared to baseline methods.

Pareto front approximation in synthetic multi-objective tasks. OP-GFN (middle row) provides a significantly more accurate representation of the true Pareto distribution (top row) than the PC-GFN baseline (bottom row).

Conclusion

Order-Preserving GFlowNets offer a robust alternative to traditional reward-based generative modeling. By focusing on the relative quality of candidates, they provide a more efficient and hyperparameter-free approach to complex optimization tasks in scientific discovery and machine learning.

Summary updated

BibTeX
@inproceedings{chen2024order,
  author = {Yihang Chen and Lukas Mauch},
  title = {{Order-Preserving GFlowNets}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=VXDPXuq4oG},
}
Figure