Beyond Squared Error: Exploring Loss Design for Enhanced Training of Generative Flow Networks

## Abstract

Abstract Generative Flow Networks (GFlowNets) are a novel class of generative models designed to sample from unnormalized distributions and have found applications in various important tasks, attracting great research interest in their training algorithms.
In general, GFlowNets are trained by fitting the forward flow to the backward flow on sampled training objects.
Prior work focused on the choice of training objects, parameterizations, sampling and resampling strategies, and backward policies,
aiming to enhance credit assignment, exploration, or exploitation of the training process.
However, the choice of regression loss, which can highly influence the exploration and exploitation behavior of the under-training policy, has been overlooked.
Due to the lack of theoretical understanding for choosing an appropriate regression loss, most existing algorithms train the flow network by minimizing the squared error of the forward and backward flows in log-space, i.e., using the quadratic regression loss.
In this work, we rigorously prove that distinct regression losses correspond to specific divergence measures, enabling us to design and analyze regression losses according to the desired properties of the corresponding divergence measures.
Specifically, we examine two key properties: zero-forcing and zero-avoiding, where the former promotes exploitation and higher rewards, and the latter encourages exploration and enhances diversity.
Based on our theoretical framework, we propose three novel regression losses, namely, Shifted-Cosh, Linex(1/2), and Linex(1). We evaluate them across three benchmarks: hyper-grid, bit-sequence generation, and molecule generation.
Our proposed losses are compatible with most existing training algorithms, and significantly improve the performances of the algorithms concerning convergence speed, sample diversity, and robustness.

## 1 Introduction

Generative Flow Networks (GFlowNets), introduced by Bengio et al. (, ), represent a novel class of generative models. They have been successfully employed in a wide range of important applications including molecule discovery (Bengio et al., ), biological sequence design (Jain et al., ), combinatorial optimization (Zhang et al., ), and text generation (Hu et al., ), attracting increasing interests for their ability to generate a diverse set of high-quality samples.

GFlowNets are learning-based methods for sampling from an unnormalized distribution. Compared to the learning-free Monte-Carlo Markov Chain (MCMC) methods, GFlowNets provide an alternative to exchange the complexity of iterative sampling through long chains for the complexity of training a sampler (Bengio et al., ).
GFlowNets achieves this by decomposing the generating process into multiple steps and modeling all possible trajectories as a directed acyclic graph (DAG). The training goal is to determine a forward policy on this DAG, ensuring that the resulting probability distribution over terminal states aligns with the unnormalized target distribution. However, achieving this alignment is challenging due to the necessity of marginalizing the forward policy across a vast trajectory space. To address this, GFlowNets utilize a backward flow to distribute the unnormalized target distribution over trajectories, thereby aligning the forward and backward flows.

Figure: Figure 1: An illustration of our main theoretical results: the unified framework for GFlowNet training algorithms and the correspondence between regression losses over forward and backward flows on training objects and $f$-divergences between the two flows over minimal cuts.
Refer to caption: x1.png

Building on this foundation, various training algorithms for GFlowNets have been proposed, aiming to enhance the training of GFlowNets from different aspects such as credit assignment, exploration, and exploitation. Depending on the main focus of the methods, these algorithms can be divided into four categories, including
training objects (Malkin et al., ; Madan et al., ), parameterization methods (Pan et al., ; Deleu et al., ), sampling and resampling strategies (Rector-Brooks et al., ; Kim et al., ; Lau et al., ) and the selection of backward policies (Shen et al., ; Jang et al., ).

Most existing algorithms train the flow network by minimizing the squared error of the forward and backward flows in log-space, i.e., using the quadratic regression loss.
However, there may exist more potential choices for loss functions beyond square error. Intuitively, any convex function that is minimized at zero point also provides a valid objective, in the sense that the forward and backward policies are aligned if and only if the loss is minimized. Further, the gradients of different regression losses lead to different optimization trajectories of the forward policy, thus highly influencing the exploration and exploitation behaviors.
Yet, due to the lack of theoretical understanding for choosing an appropriate regression loss, it is unclear whether the above intuition is practical. In particular, the following central question remains open:

*Can a theoretical foundation be established for designing and analyzing regression loss functions?*

To answer this question, we conduct a systematic investigation of the largely overlooked regression loss aspect in GFlowNet training. Specifically, building on the work of Malkin et al. (), which established that training GFlowNets is analogous to optimizing a KL divergence, we rigorously prove that the gradient of the objective function using different regression losses, when combined with appropriate proposal distributions and resampling weights, equal to that of distinct divergence measures between the target distribution and the flow network-induced distribution.
As different divergence measures endow the training objectives with different properties, and hence show different characteristics in the training process, our results provide a unified framework to generalize existing training methods and provide a principled way of designing efficient regression losses for GFlowNets training. Fig. 1 provides an overview of our technical results.

Figure: Figure 2: Our proposed regression losses and their properties.
Refer to caption: x3.png

In particular, we study two important properties of the training objectives, i.e., zero-forcing and zero-avoiding, and systematically investigate their effects. In general, zero-forcing losses encourage exploitation, while zero-avoiding losses encourage exploration.
Equipped with our new framework, we design three novel regression losses, namely Linex(1), Linex(1/2), and Shifted-Cosh, filling the four quadrants made up of the zero-forcing and zero-avoiding properties.
We evaluate the new losses on three popular benchmarks: hyper-grid, bit-sequence generation, and molecule generation. Our results show that the newly proposed losses exhibit significant advantages over existing losses in terms of diversity, quality, and robustness, demonstrating the effectiveness of our design framework.

Our contributions can be summarized as follows:

- •
We develop a novel framework of the objective functions for training GFlowNets. The new framework offers a clear identification of the key components in the objective function and unifies all existing GFlowNet training algorithms including Flow-Matching GFlowNets (Bengio et al., ), Detailed-Balance GFlowNets (Bengio et al., ), Trajectory-Balance GFlowNets (Malkin et al., ), Sub-Trajectory-Balance GFlowNets (Madan et al., ) and their variants like Forward-Looking GFlowNets (Pan et al., ) and DAG GFlowNets (Deleu et al., ), etc (see Section 4.1).
- •
We establish the correspondence between the various objective functions for GFlowNets and different divergence measures. This insight facilitates a deeper understanding of how to design and analyze effective training objectives for GFlowNets (See Section 4.2).
- •
Based on our framework, we conduct an in-depth investigation on two key properties of regression losses, i.e., zero-forcing and zero-avoiding. We then
design three new loss functions possessing different exploration/exploitation features, namely, Linex(1), Linex(1/2), and Shifted-Cosh (see Section 4.3).
- •
We conduct extensive experiments on three popular benchmarks: hyper-grid (Bengio et al., ), bit-sequence generation (Malkin et al., ), and molecule generation (Bengio et al., ). Our results demonstrate that the new losses significantly outperform the common squared loss in metrics including convergence speed, diversity, quality, and robustness (see Section 5).

## 2 Related Work

Generative Flow Networks (GFlowNets). GFlowNets were initially proposed by Bengio et al. () for scientific discovery (Jain et al., ) as a framework for generative models capable of learning to sample from unnormalized distributions. The foundational theoretical framework was further developed by Bengio et al. (). Since then, numerous studies have focused on enhancing GFlowNet training from various perspectives, such as introducing novel balance conditions and loss functions (Malkin et al., ; Madan et al., ), refining sampling and resampling strategies (Shen et al., ; Rector-Brooks et al., ; Kim et al., ; Lau et al., ), improving credit assignment (Pan et al., ; Jang et al., ) and exploring different options for backward policies (Shen et al., ; Mohammadpour et al., ; Jang et al., ).

People also try to extend the formulation of GFlowNets to more complex scenarios, allowing continuous space (Lahlou et al., ), intermediate rewards (Pan et al., ), stochastic rewards (Zhang et al., ), implicit reward given by priority (Chen & Mauch, ), conditioned rewards (Kim et al., ), stochastic transitions (Pan et al., ), non-acyclic transitions (Brunswic et al., ), etc. Equipped with these techniques, GFlowNets are applied to a increasingly wide range of fields including molecular discovery (Jain et al., ; Zhu et al., ; Pandey et al., ), biological sequence design (Jain et al., ; Ghari et al., ), causal inference (Zhang et al., ; Atanackovic et al., ; Deleu et al., ), combinatorial optimization (Zhang et al., ; Kim et al., ), diffusion models (Zhang et al., ; Venkatraman et al., ) and large language models (Hu et al., ; Song et al., ).

#### Theoretical aspects on GFlowNets and f 𝑓 f italic_f -divergence.

From a theoretical perspective, GFlowNets are closely related to variational inference (VI, Malkin et al. ) and entropy-regularized reinforcement learning (RL) on deterministic MDPs (Tiapkin et al., ; Mohammadpour et al., ). All of them can be viewed as solving distribution matching problems, and the gradients of their training objectives are consistent with that of the reverse KL divergence. The properties of divergence measures and their effects as training objectives have been studied by Minka et al. (). The idea of introducing a more general class of divergence measures has successfully improved the performances of a variety of algorithms for training generative models, including GAN (Nowozin et al., ; Arjovsky et al., ), VAE (Zhang et al., ), VI (Li & Turner, ; Dieng et al., ), Distributional Policy Gradient (DPG for RL, Go et al. ), and Direct Preference Optimization (DPO for RLHF, Wang et al. ). Garg et al. () proposes to use the Linex function of the TD error to learn a soft Q-function that solves the soft Bellman equation.

Different from the aforementioned studies, in this work, we establish a theoretical framework for the regression loss component of GFlowNets and prove that different regression losses correspond to specific divergence measures. By analyzing the zero-forcing and zero-avoiding properties of these divergence measures, we can opt for the desired regression loss for enhancing exploitation and/or exploitation in GflowNets training algorithms.

## 3 Preliminaries of GFlowNets and f 𝑓 f italic_f -Divergence

In this section, we first present preliminaries of GFlowNets and the $f$-divergence, which will be the foundation of our subsequent exposition.

### 3.1 GFlowNets

A GFlowNet is defined on a directed acyclic graph $G=(V,E)$ with a source node $s_{o}$ and a sink node $s_{f}$, such that every other vertex is reachable starting from $s_{o}$, and $s_{f}$ is reachable starting from any other vertex. Let $\mathcal{T}$ be the collection of all complete trajectories, and $\Sigma$ be the corresponding $\sigma$-algebra, then a flow is a measure $F$ on $(\mathcal{T},\Sigma)$.

Further, we define state-flow, edge-flow and total flow by

$$ $\displaystyle F(s)$ $\displaystyle:=F(\{\tau:s\in\tau\}),$ $\displaystyle F(s\to s^{\prime})$ $\displaystyle:=F(\{\tau:(s\to s^{\prime})\in\tau\}),$ $\displaystyle Z$ $\displaystyle:=F(\{\mathcal{T}\})=F(s_{0})=F(s_{f}).$ $$

A flow then induces a forward probability $P_{F}(s^{\prime}|s)$ and a backward probability $P_{B}(s|s^{\prime})$, defined as:

$$ $\displaystyle P_{F}(s^{\prime}|s):=P(s\to s^{\prime}|s)=\frac{F(s\to s^{\prime })}{F(s)},\quad P_{B}(s|s^{\prime}):=P(s\to s^{\prime}|s^{\prime})=\frac{F(s \to s^{\prime})}{F(s^{\prime})}.$ $$

Markovian flow is a special family of flows such that at each step, the future behavior of a particle in the flow stream only depends on its current state. Formally speaking, let $\iota$ be any trajectories from $s_{o}$ to $s$, then $P(s\to s^{\prime}|\iota)=P(s\to s^{\prime}|s)=P_{F}(s^{\prime}|s)$. We focus on Markovian flows in the following.

A set of (not necessarily complete) trajectories $C$ is a cut if and only if for any complete trajectory $\tau$, there exists $\iota\in C$ such that $\iota$ is a part of $\tau$. Here we view vertices and edges as trajectories of length $1$ or $2$ and further extend the definition of $F$ to all trajectories as

$$ $\displaystyle F(\iota)=F(\{\tau:\iota\text{ is a part of }\tau\}).$ $$

A minimal cut is a cut such that the sum of flows in the cut is minimized. According to the max-flow min-cut theorem, this amount is equal to $Z$ the total flow. Let $\mathcal{C}$ be the collection of all minimal cuts, then for each minimal cut $C\in\mathcal{C}$, let $p^{C}(\iota):=F(\iota)$ for all $\iota\in C$, then $p^{C}(\cdot)$ can be viewed as an unnormalized distribution over $C$.

Let the terminating set $S^{f}$ be the collection of nodes that directly link to $s_{f}$. Note that $C=\{(s\to s^{\prime}):s^{\prime}=s_{f}\}$ is a minimal cut, so $p^{C}(\cdot)$ induces a distribution over $S_{f}$. We denote it as $p_{F}^{T}$ and its induced probability distribution as $P_{T}$ (called the terminating probability):

$$ $\displaystyle\forall s\in S^{f},\$ $\displaystyle p_{F}^{T}(s)=F(s\to s_{f}),$ $\displaystyle P_{T}(s)=\frac{p_{F}^{T}(s)}{\sum_{s^{\prime}\in S^{f}}p_{F}^{T} (s^{\prime})}=\frac{F(s\to s_{f})}{Z}.$ $$

The ultimate goal of training a GFlowNet is to match $p_{F}^{T}$ with $R$, so that the forward policy draws samples from $P_{T}=P_{R}$, where $P_{R}$ denotes the normalized probability distribution defined by $R$.

### 3.2 f 𝑓 f italic_f -Divergence

The $f$-divergence is a general class of divergence measures (Liese & Vajda, ; Polyanskiy, ):

$$ $\displaystyle D_{f}(p||q)=\sum_{x\in\mathcal{X}}q(x)f\left(\frac{p(x)}{q(x)} \right)+f^{\prime}(\infty)p\left(\{x\in\mathcal{X}:q(x)=0\}\right),$ $$

where $p$ and $q$ are two probability distributions on a measurable space $(\mathcal{X},\mathcal{F})$, $f:\mathbb{R}_{++}\to\mathbb{R}$ is a twice differentiable convex function with $f(1)=f^{\prime}(1)=0$ , and $f^{\prime}(\infty)=\lim_{t\to+\infty}\frac{f(t)}{t}$. Hence, the Kullback-Leibler (KL) divergence (Zhu & Rohwer, ) $D_{\text{KL}}(p||q)$ and $D_{\text{KL}}(q||p)$ correspond to $D_{f}(p||q)$ with $f(t)=t\log t-t+1$ and $f(t)=t-\log t-1$, respectively.
When $f(t)=-\frac{t^{\alpha}}{\alpha(1-\alpha)}+\frac{t}{1-\alpha}+\frac{1}{\alpha}$, the $f$-divergence corresponds to the $\alpha$-divergence $D_{\alpha}(p||q)$ introduced in (Zhu & Rohwer, ; Amari, ).

The $f$-divergence preserves the following nice properties of KL divergence, ensuring that they can also serve as good optimization objectives.

###### Fact 3.1 ( Liese & Vajda ( 2006 ) ) .

$D_{f}(p||q)=0$ if and only if $p=q$.

###### Fact 3.2 ( Liese & Vajda ( 2006 ) ) .

$D_{f}(p||q)$ is convex with respect to either $p$ or $q$.

The definition of $D_{f}(p||q)$ can be further extended to all twice differentiable functions $f$ with $f(1)=f^{\prime}(1)=0$, termed pseudo $f$-divergence.

###### Fact 3.1 ( Liese & Vajda ( 2006 ) ) .

###### Fact 3.2 ( Liese & Vajda ( 2006 ) ) .

## 4 Training Generative Flow Networks

In this section, we present our perspective on analyzing GFlowNet training algorithms in detail. In Section 4.1, we provide a general framework with five customizable components to unify existing training algorithms.
In Section 4.2, we dive deep into the regression loss component, which has been overlooked in existing research, and establish a rigorous connection between it and divergence measures. In Section 4.3, we further show how to utilize this connection for designing and analyzing objective functions.

### 4.1 A Unified Framework for GFlowNet Training Algorithms

Consider the following general objective function for forward policy:

$$ $\displaystyle\mathcal{L}_{\mathcal{O},\widehat{p}_{\theta},\mu,P_{B},g}=$ $\displaystyle\sum_{o\in\mathcal{O}}\mu(o)g\left(\log\frac{\widehat{p}_{B}(o; \theta)}{\widehat{p}_{F}(o;\theta)}\right)$ (4.1) $$

This formulation is defined by five key components.
i) The set of training objects $\mathcal{O}$, which can include states, transitions, partial trajectories, or complete trajectories.
(ii) The parameterization mapping $\widehat{p}_{\theta}$, which defines how the parameters of the flow network represent the forward flow $\widehat{p}_{F}$ and the backward flow $\widehat{p}_{B}$.
(iii) The sampling and resampling weights $\mu$, which influence how training objects are sampled and weighted.
(iv) The choice of backward policy $P_{B}$, which can be either fixed or learned.
(v) The regression loss function $g$, ensuring that the forward and backward policies align when minimized.

**Table 1: Summary of existing GFlowNet training algorithms and techniques.**
| Design Component | Algorithms |
| --- | --- |
| Training Objects $\mathcal{O}$ and<br>Parameterization Mapping $\widehat{p}_{\theta}$ | FM-GFN (Bengio et al., ), DB-GFN (Bengio et al., ), TB-GFN (Malkin et al., ), STB-GFN (Madan et al., ), FL-GFN (Pan et al., ), DAG-GFN (Deleu et al., ; Hu et al., ) |
| Sampling/Resampling Weights $\mu$ | PRT (Shen et al., ), TS-GFN (Rector-Brooks et al., ), LS-GFN (Kim et al., ), QGFN (Lau et al., ) |
| Backward Policy $P_{B}$ | GTB (Shen et al., ), ME-GFN (Mohammadpour et al., ), PBP-GFN (Jang et al., ) |
| Regression Loss $g$ | Ours |

While most GFlowNets training objectives are not explicitly written in this form, Equation (4.1) unifies all existing training objectives. Table 1 below presents a categorization of existing algorithms according to the components they specify.

In previous literature, $g(t)=\frac{1}{2}t^{2}$ has been the only choice for regression loss, and the term $g\left(\log\frac{\widehat{p}_{B}(o;\theta)}{\widehat{p}_{F}(o;\theta)}\right)=
\frac{1}{2}\left(\log\frac{\widehat{p}_{B}(o;\theta)}{\widehat{p}_{F}(o;\theta
)}\right)^{2}$ is usually referred to as the balance loss. It is specified by the training objects and parameterization mapping. Popular balance losses are flow-matching (FM) loss, detailed-balance (DB) loss, trajectory-balance (TB) loss sub-trajectory-balance (STB) loss, and their modified versions.
For example, the objective function of on-policy TB loss with fixed uniform $P_{B}$ can be written as

$$ $\displaystyle\mathcal{L}=\sum_{\tau\in\mathcal{T}}\widehat{P}_{F}(\tau;\theta) \frac{1}{2}\left(\log\frac{\widehat{p}_{B}(\tau;\theta)}{\widehat{p}_{F}(\tau; \theta)}\right)^{2},$ $$

where for $\tau=(s_{0}=s_{o},s_{1},s_{2},\cdots,s_{T-1},s_{T}=s_{f})$, we have

$$ $\displaystyle\widehat{P}_{F}(\tau;\theta)=$ $\displaystyle\prod_{t=1}^{T}\widehat{P}_{F}(s_{t}|s_{t-1};\theta),$ $\displaystyle\widehat{p}_{F}(\tau;\theta)=$ $\displaystyle\widehat{Z}(\theta)\widehat{P}_{F}(\tau;\theta)=\widehat{Z}( \theta)\prod_{t=1}^{T}\widehat{P}_{F}(s_{t}|s_{t-1};\theta),$ $\displaystyle\widehat{p}_{B}(\tau;\theta)=$ $\displaystyle R(s_{T-1})P_{B}(\tau)=R(s_{T-1})\prod_{t=1}^{T-1}P_{B}(s_{t-1}|s _{t})=R(s_{T-1})\prod_{t=1}^{T-1}\frac{1}{\text{indegree}(s_{t})}.$ $$

Please refer to Appendix A for the detailed correspondence of other algorithms under this unified framework.

### 4.2 The Information-Theoretic Interpretation of Training Objectives

Based on our proposed framework, We establish a novel connection between the $g$ functions and the $f$-divergences. The result is summarized in Theorem 4.1 below.

###### Theorem 4.1 .

Let $\theta$ be the parameters for forward policies.
For each minimal cut $C\in\mathcal{C}$, the restrictions of both forward and backward flow functions on $C$ can be viewed as unnormalized distributions over it, denoted as $\widehat{p}^{C}_{F}$ and $\widehat{p}^{C}_{B}$, respectively.

If there exists $w:\mathcal{C}\to\mathbb{R}_{+}$ such that $\mu(o)=\widehat{p}_{F}(o)\sum_{C\in\mathcal{C},o\in C}w(C)$ for any $o\in\mathcal{O}$, then

$$ $\displaystyle\nabla_{\theta_{F}}\mathcal{L}_{\mathcal{O},\widehat{p}_{\theta}, \mu,P_{B},g}=\nabla_{\theta_{F}}\sum_{C\in\mathcal{C}}w(C)D_{f}(\widehat{p}^{C }_{B}||\widehat{p}^{C}_{F}),\,\text{where }f(t)=t\int_{1}^{t}\frac{g^{\prime}( \log s)}{s^{2}}ds.$ (4.2) $$

The theorem states that the expected gradient of the objective function equals the gradient of a weighted sum of $f$-divergence over minimal cuts if the sampling and resampling weights $\mu$ on each training object $o$ equals the forward flow times the accumulated weights on minimal cuts consisting of $o$. For example, $w(C)=\mathbb{I}[C=\mathcal{T}]$ corresponds to TB GFlowNets using on-policy sampling. The detailed proof of Theorem 4.1 is provided in Appendix B. We also provide a thorough discussion about the interpretations of FM, DB, and subTB loss under this framework. Please see Appendix C for details.

Note that when $g(t)=\frac{1}{2}t^{2}$, i.e., the popular squared loss, we obtain $f(t)=t-\log t-1$. Thus, $D_{f}$ is the reverse KL divergence, recovering the results in Malkin et al. (). Compared to existing work, Theorem 4.1 offers a general connection and applies to a wide range of algorithms shown in Table 1.
Below, we conclude this section with the following two remarks on the connections between function $g$ and $f$.

###### Remark 4.2 .

Note that $f(1)=0$, $f^{\prime}(1)=g^{\prime}(0)$, and $f^{\prime\prime}(t)=\frac{g^{\prime\prime}(\log t)}{t^{2}}$. If $g$ is twice differentiable, then $D_{f}$ is an $f$-divergence if and only if $g$ is convex.

###### Remark 4.3 .

Solving for $g$ from $f(t)=t\int_{1}^{t}\frac{g^{\prime}(\log s)}{s^{2}}ds$ and $g(0)=0$ gives $g(t)=f(e^{t})-\int_{1}^{e^{t}}\frac{f(s)}{s}ds$.

###### Theorem 4.1 .

###### Remark 4.2 .

###### Remark 4.3 .

### 4.3 Designing New Regression Losses

Equipped with the connection established in Theorem 4.1, we now show how one can build upon it and design regression losses with two important properties: zero-forcing and zero-avoiding. A zero-forcing objective leads to a conservative result, while a zero-avoiding objective offers a diverse approximated distribution.
As pointed out by previous studies (Minka et al., ; Go et al., ), zero-forcing property encourages exploitation, while zero-avoiding property encourages exploration. Therefore, a zero-avoiding loss may converge faster to a more diverse distribution, while a zero-forcing one may converge to a distribution with a higher average reward.

To this end, we first study the effect of using different divergence measures as optimization objectives.

###### Proposition 4.4 ( Liese & Vajda ( 2006 ) ) .

Denote $f(0)=\lim_{t\to 0^{+}}f(t)$, $f^{\prime}(\infty)=\lim_{t\to+\infty}\frac{f(t)}{t}$,

- 1.
Suppose $f(0)=\infty$, then $D_{f}(p||q)=\infty$ if $p(x)=0$ and $q(x)>0$ for some $x$.
- 2.
Suppose $f^{\prime}(\infty)=\infty$, then $D_{f}(p||q)=\infty$ if $p(x)>0$ and $q(x)=0$ for some $x$.

In particular, $D_{\alpha}(p||q)$ for $\alpha\leq 0$, including reverse KL divergence, satisfies the first condition, while $D_{\alpha}(p||q)$ for $\alpha\geq 1$, including forward KL divergence, satisfy the second condition. Proposition 4.4 leads to the following results of approximating a distribution by using $f$-divergence.

###### Proposition 4.5 ( Liese & Vajda ( 2006 ) ) .

Let $S$ be a subset of the collection of distributions over $\mathcal{X}$.
Let $\widehat{p}_{S}\in\mathop{\arg\min}_{q\in S}D_{f}(p||q)$.

- 1.
Zero-forcing: Suppose $f(0)=\infty$, then $\widehat{p}_{S}(x)=0$ if $p(x)=0$.
- 2.
Zero-avoiding: Suppose $f^{\prime}(\infty)=\infty$, then $\widehat{p}_{S}(x)>0$ if $p(x)>0$.

Proposition 4.5 suggests that when $S$ does not cover the target distribution $p$, the best approximation may vary according to the divergence chosen as the objective.

Since the objective functions for GFlowNets with varying regression losses are closely related to different divergence measures, we similarly define their zero-forcing and zero-avoiding properties.

###### Definition 4.6 .

An objective function $\mathcal{L}$ for training GFlowNets is

- 1.
Zero-forcing: if for any parameter space $\Theta$ and $\theta^{*}=\mathop{\arg\min}_{\theta\in\Theta}\mathcal{L}(\theta)$,
$\displaystyle\forall s\in S^{f}:R(s)=0\implies\widehat{P}_{T}(s;\theta^{*})=0,$
- 2.
Zero-avoiding: if for any parameter space $\Theta$ and $\theta^{*}=\mathop{\arg\min}_{\theta\in\Theta}\mathcal{L}(\theta)$,
$\displaystyle\forall s\in S^{f}:R(s)>0\implies\widehat{P}_{T}(s;\theta^{*})>0.$

In such cases, we also say that the regression function $g$ itself is zero-forcing or zero-avoiding.

We then have the following theorem regarding the zero-forcing and zero-avoiding objective functions and regression losses of GFlowNets.

###### Theorem 4.7 .

Let $\mathcal{L}$ be an objective function for training GFlowNets, whose regression loss $g$ corresponds to $D_{f}$ according to Theorem 4.1. If $D_{f}$ is zero-forcing, then $\mathcal{L}$ and $g$ are both zero-forcing. If $D_{f}$ is zero-avoiding, then $\mathcal{L}$ and $g$ are both zero-avoiding.

**Table 2: Four representative $g$ functions and their corresponding $f$-divergences. Quadratic loss corresponds to reverse KL-divergence or the $\alpha$-divergence with $\alpha\to 0$. Linex$(1)$ corresponds to forward KL-divergence or the $\alpha$-divergence with $\alpha\to 1$. Linex$\left(1/2\right)$ corresponds to the $\alpha$-divergence with $\alpha=0.5$. Shifted-Cosh corresponds to an $f$-divergence that is both zero-forcing and zero-avoiding.**
| Loss | $\bm{g(t)}$ | $\bm{f(t)}$ | $\bm{f(0)}$ | $\bm{f^{\prime}(\infty)}$ | Zero-forcing | Zero-avoiding |
| --- | --- | --- | --- | --- | --- | --- |
| Quadratic | $\frac{1}{2}t^{2}$ | $t-\log t-1$ | $\infty$ | $1$ | ✓ |  |
| Linex$(1)$ | $e^{t}-t-1$ | $t\log t-t+1$ | $1$ | $\infty$ |  | ✓ |
| Linex$\left(1/2\right)$ | $4e^{\frac{t}{2}}-2t-4$ | $2t-4\sqrt{t}+2$ | $2$ | $2$ |  |  |
| Shifted-Cosh | $e^{t}+e^{-t}-2$ | $t\log t-\frac{t}{2}+\frac{1}{2t}$ | $\infty$ | $\infty$ | ✓ | ✓ |

According to Theorem 4.7, the quadratic regression loss $g(t)=\frac{1}{2}t^{2}$ is a zero-forcing regression loss and focuses on exploitation.
Combined with Remark 4.3 that enables us to determine a $g$ from an arbitrary $D_{f}$, we can easily find regression losses with both, either or neither of the zero-forcing and zero-avoiding properties. Since these two properties are finally rooted in $f(0)$ and $f^{\prime}(\infty)$, our framework allows us to directly design a desired $g$ loss from a desired $D_{f}$. This provides a systematic and principled way of designing regression losses. For example, to obtain a zero-avoiding loss that focuses on exploration, we can solve for $g$ from $f(t)=t\log t-t-1$ the forward KL divergence, which gives $g(t)=e^{t}-t-1$ the Linex$(1)$ function. We also design Linex$(1/2)$ and Shifted-Cosh. The former is neither zero-forcing nor zero-avoiding, while the latter is both zero-forcing and zero-avoiding (see Table 2).

###### Proposition 4.4 ( Liese & Vajda ( 2006 ) ) .

###### Proposition 4.5 ( Liese & Vajda ( 2006 ) ) .

###### Definition 4.6 .

###### Theorem 4.7 .

## 5 Experiments

In this section, we consider four representative $g$-functions (Table 2) and evaluate their performances over Flow-matching GFlowNets, Trajectory-balance GFlowNets, Detailed-balance GFlowNets, and Sub-trajectory-balance GFlowNets, across different choices of backward policies and sampling strategies. We consider the following three popular benchmarks, hyper-grid, bit-sequence generation, and molecule generation. Although the sampling and resampling weights $\mu$ may not fully meet the conditions of Theorem 4.1, the effects of zero-forcing and zero-avoiding properties are significant, demonstrating great compatibility with existing algorithms.

### 5.1 Hyper-grid

We first consider the didactic environment hyper-grid introduced by Bengio et al. ().
In this setting, the non-terminal states are the cells of a $D$-dimensional hypercubic grid with side length $H$. Each non-terminal state has a terminal copy. The initial state is at the coordinate $x=(0,0,\cdots,0)$. For a non-terminal state, the allowed actions are to increase one of the coordinates by $1$ without exiting the grid and to move to the corresponding terminal state.

The reward of coordinate $x=(x_{1},\cdots,x_{D})$ is given according to

$$ $\displaystyle R(x)=R_{0}+R_{1}\prod_{i=1}^{D}\mathbb{I}\left[\left|\frac{x_{i} }{H}-0.5\right|>0.25\right]+R_{2}\prod_{i=1}^{D}\mathbb{I}\left[0.3<\left| \frac{x_{i}}{H}-0.5\right|<0.4\right],$ $$

where $0<-R_{1}<R_{0}\ll R_{2}$. Therefore, there are $2^{D}$ reward modes near the corners of the hypercube.

In our experiments, we set $D=4,H=20,R_{0}=10^{-4},R_{1}=-9.9\times 10^{-5},R_{2}=1-10^{-6}$. The backward policy is learned using the same objectives as the forward policy. We use the forward policy to sample training objects. We plot the empirical $L_{1}$ errors between $P_{T}$ and $P_{R}$ in Figure 3. Additional details can be found in Appendix E.1.

Figure: Figure 3: Hyper-grid results: the empirical L1 distance between $P_{T}$ and $P_{R}$.
Refer to caption: x4.png

As shown in Figure 3, the quadratic loss (baseline) leads to the slowest convergence among the four choices. This is because it has the poorest exploration ability. Despite the differences in convergence speed, the $L_{1}$ errors between $P_{T}$ and $P_{R}$ are almost the same at convergence when using different regression functions.

### 5.2 Bit-sequence generation

In our second experimental setting, we study the bit-sequence generation task proposed by Malkin et al. () and Tiapkin et al. (). The goal is to generate binary strings of length $n$ given a fixed word length $k\mid n$. In this setup, an $n$-bit string is represented as a sequence of $n/k$ $k$-bit words. The generation process starts with a sequence of $n/k$ special empty words. At each step, a valid action replaces an empty word with any $k$-bit word. Terminal states are sequences with no empty words. The reward is defined based on the minimal Hamming distance to any target mode in the given set $M\subset\mathbb{Z}_{2}^{n}$. Specifically, $R(x)=\exp\left\{-\min_{x^{\prime}\in M}d(x,x^{\prime})\right\}$.

Figure: Figure 4: The number of modes found by the algorithm during training.
Refer to caption: x9.png

In our experiments, we follow the setup in Tiapkin et al. () where $n=120,k=8,|M|=60$. $P_{B}$ is fixed to be uniform during training. We use the $\epsilon$-noisy forward policy with a random action probability of $0.001$ to sample training objects and the forward-looking style parameterizations for DB and STB experiments. We evaluate the number of modes found during training (the number of bit sequences in $M$ such that a candidate within a distance $\Delta=30$ has been generated) as well as the Spearman Correlation between $P_{T}$ and $P_{R}$ over a test set, which has also been adopted by Malkin et al. (), Madan et al. () and Tiapkin et al. (). Additional details can be found in Appendix E.2.

**Table 3: The number of runs that find all modes within 250k steps, and the median of the steps before they find all modes.**
|  | Quadratic (baseline) | Linex$(1)$ | Linex$\left(1/2\right)$ | Shifted-Cosh |
| --- | --- | --- | --- | --- |
| TB | 1/5,    – | 5/5, 98.0k | 5/5, 111.2k | 4/5, 92.2k |
| DB | 5/5, 13.4k | 5/5, 10.8k | 5/5, 11.7k | 0/5,    – |
| STB | 4/5, 50.6k | 5/5, 20.3k | 5/5, 55.9k | 5/5, 90.0k |

As shown in Figure 4, the quadratic loss seems to find new modes faster than the other three, but it always slows down and then is overtaken before finding all modes. As shown in Table 3, quadratic loss fails to find all modes in one of the five STB runs, and four out of the five TB runs. On the contrary, Linex(1) and Linex(1/2) succeed in finding all modes in all 15 runs with three different settings, and Linex(1) is always faster. The performance of shifted-Cosh varies from different algorithms. As we analyzed in Section 4.3, a zero-avoiding loss benefits exploration, while a zero-forcing loss does the opposite. These results are consistent with our analysis in general.

**Table 4: The Spearman correlation between $P_{T}$ and $P_{R}$ over a test set (the higher the better). The failed runs that modal collapse happened are eliminated.**
|  | Quadratic (baseline) | Linex$(1)$ | Linex$\left(1/2\right)$ | Shifted-Cosh |
| --- | --- | --- | --- | --- |
| zero-forcing | ✓ | ✗ | ✗ | ✓ |
| DB | $\underline{0.7907}{(\pm 0.0175)}$ | $0.7464(\pm 0.0107)$ | $0.7580(\pm 0.0132)$ | $\mathbf{0.8213}{(\pm 0.0094)}$ |
| TB | $\underline{0.8081}{(\pm 0.0159)}$ | $0.7421(\pm 0.0216)$ | $0.7454(\pm 0.0021)$ | $\mathbf{0.8122}{(\pm 0.0145)}$ |
| STB | $\underline{0.8088}{(\pm 0.0169)}$ | $0.7517(\pm 0.0246)$ | $0.7711(\pm 0.0190)$ | $\mathbf{0.8132}{(\pm 0.0149)}$ |

In this environment, the state space is so large that the training objects can not fully cover the whole space. Consequently, although the algorithms appear to converge, the distribution $\widehat{P}_{T}$ only approximates $P_{R}$ rather than perfectly matching it. In such cases, zero-forcing losses have advantages on the qualities of samples compared to non-zero-forcing ones. As shown in Table 4, zero-forcing losses (Quadratic and Shifted-Cosh) result in a higher correlation between $P_{T}$ and $P_{R}$, meaning that they fit the target distribution better within its support. Besides, we also observe that for TB GFlowNets with quadratic loss, the forward policy sometimes collapses to fitting only a small proportion of the modes in the target distribution, resulting in extremely low correlation. We eliminate these runs when presenting Table 4.

### 5.3 Molecule generation

Figure: Figure 5: Molecule generation results. Top: Average reward and pair-wise similarities of all $200k$ generated molecules during each training episode. The similarities are calculated among a randomly chosen subset of $1000$ molecules. Bottom: Average reward and pair-wise similarities of the top $k$ generated molecules during each training episode.
Refer to caption: x13.png

The goal of this task is to generate binders of the sEH (soluble epoxide hydrolase) protein by sequentially joining ‘blocks’ from a fixed library to the partial molecular graph (Jin et al. ()). The reward function is given by a pretrained proxy model given by Bengio et al. (), and then adjusted by a reward exponent hyperparameter $\beta$, i.e., $R(x)=\widetilde{R}(x)^{\beta}$ where $\widetilde{R}(x)$ is the output of the proxy model. For DB, TB, and STB experiments, the backward policies are fixed to be uniform. The training objects are sampled from the $\epsilon$-noisy forward policy with a random action probability of $0.05$. Additional details can be found in Appendix E.3.

It can be seen in Figure 5 that zero-forcing objectives (Quadractic and shifted-Cosh) have a higher overall average reward, while zero-avoiding objectives (Linex$(1)$ and Linex$\left(1/2\right)$) have lower overall similarities, meaning that the samples are more diverse. However, things become different when it comes to the top $k$ molecules, but Linex$\left(1/2\right)$, which is neither zero-forcing nor zero-avoiding, demonstrates the best robustness among them.

## 6 Conclusion

In this work, we develop a principled and systematic approach for designing regression losses for efficient GFlowNets training. Specifically, we
rigorously prove that distinct regression losses correspond to specific divergence measures, enabling us to design and analyze regression losses according to the desired properties of the corresponding divergence measures.
Based on our theoretical framework, we designed three novel regression losses: Shifted-Cosh, Linex(1/2), and Linex(1). Through extensive evaluation across three benchmarks: hyper-grid, bit-sequence generation, and molecule generation, we show that our newly proposed losses are compatible with most existing training algorithms and significantly improve the performance of the algorithms in terms of convergence speed, sample diversity, and robustness.

## Appendix A Unifying Training Algorithms of GFlowNets

An objective function for training GFlowNets is specified by five key components, the training objects $\mathcal{O}$, the parameterization mapping $\widehat{p}_{\theta}$, the sampling and resampling weights $\mu$, the backward policy $P_{B}$ and the regression loss $g$. Most existing algorithms specify only one to two of the former four components.

### A.1 Training Objects and Parameterization Mapping

The choice of these two components are usually coupled since the parameters are mapped to the flow functions defined on training objects. The choice of training objects include states, edges, partial trajectories and complete trajectories, corresponding to Flow-Matching GFlownets (FM-GFN, Bengio et al. ), Detailed-Balance GFlowNets (DB-GFN, Bengio et al. ), Sub-Trajectory-Balance GFlowNets (STB-GFN, Madan et al. ) and Trajectory-Balance GFlowNets (TB-GFN, Malkin et al. ), respectively. Detailed-Balance GFlowNets and Sub-Trajectory-Balance GFlowNets can be parameterized in different ways, the variants of which are Forward-Looking GFlowNets (FL-GFN, Pan et al. ) and DAG GFlowNets (DAG-GFN, also called modified-DB or modified-STB, Deleu et al. ; Hu et al. ). These algorithms can be summarized in Table 5.

**Table 5: The training objects and parameterization mappings of different GFlowNet training algorithms. Among the parameters, $\widehat{P}_{B}$ can be either fixed or learned.**
| Algorithm | Training Objects | Parameters | Parameterization mapping |
| --- | --- | --- | --- |
| FM | states | $\widehat{F}(s\to s^{\prime})$ | Equation (A.1), (A.2) |
| DB | transitions | $\widehat{F}(s),\widehat{P}_{F}(s^{\prime}|s)\,(,\widehat{P}_{B}(s|s^{\prime}))$ | Equation (A.3), (A.4) |
| FL-DB | transitions | $\widetilde{F}(s),\widehat{P}_{F}(s^{\prime}|s)\,(,\widehat{P}_{B}(s|s^{\prime}))$ | Equation (A.9), (A.10) |
| modified-DB | transitions | $\widehat{P}_{F}(s^{\prime}|s)\,(,\widehat{P}_{B}(s|s^{\prime}))$ | Equation (A.13), (A.14) |
| TB | complete trajectories | $\widehat{Z},\widehat{P}_{F}(s^{\prime}|s)\,(,\widehat{P}_{B}(s|s^{\prime}))$ | Equation (A.5), (A.6) |
| STB | partial trajectories | $\widehat{F}(s),\widehat{P}_{F}(s^{\prime}|s)\,(,\widehat{P}_{B}(s|s^{\prime}))$ | Equation (A.7), (A.8) |
| FL-STB | partial trajectories | $\widetilde{F}(s),\widehat{P}_{F}(s^{\prime}|s)\,(,\widehat{P}_{B}(s|s^{\prime}))$ | Equation (A.11), (A.12) |
| modified-STB | partial trajectories | $\widehat{P}_{F}(s^{\prime}|s)\,(,\widehat{P}_{B}(s|s^{\prime}))$ | Equation (A.15), (A.16) |

#### Flow-Matching GFlowNets (FM-GFN).

An FM-GFN is parameterized by an edge-flow function $\widehat{F}:E\to\mathbb{R}_{+}$. It uniquely determines a valid flow network if and only if the flow-matching conditions hold:

$$ $\displaystyle\forall s\in V\setminus\{s_{o},s_{f}\},\sum_{(s^{\prime}\to s)\in E }\widehat{F}(s^{\prime}\to s)=R(s)+\sum_{\begin{subarray}{c}(s\to s^{\prime \prime})\in E\\ s^{\prime\prime}\neq s_{f}\end{subarray}}\widehat{F}(s\to s^{\prime\prime})$ $$

The flow-matching loss for state $s$ is defined as

$$ $\displaystyle L_{FM}(s)=$ $\displaystyle\frac{1}{2}\left(\log\frac{\widehat{p}_{B}(s)}{\widehat{p}_{F}(s) }\right)^{2}$ $\displaystyle\text{where }\widehat{p}_{F}(s)=$ $\displaystyle\sum_{(s^{\prime}\to s)\in E}\widehat{F}(s^{\prime}\to s)$ (A.1) $\displaystyle\widehat{p}_{B}(s)=$ $\displaystyle R(s)+\sum_{\begin{subarray}{c}(s\to s^{\prime\prime})\in E\\ s^{\prime\prime}\neq s_{f}\end{subarray}}\widehat{F}(s\to s^{\prime\prime})$ (A.2) $$

#### Detailed-Balance GFlowNets (DB-GFN).

A DB-GFN is parameterized by a state-flow function $\widehat{F}:V\setminus\{s_{f}\}\to\mathbb{R}_{+}$, a forward probability function $\widehat{P}_{F}:V\setminus\{s_{f}\}\to\Delta(V)$ and a backward probability function $\widehat{P}_{B}:V\setminus\{s_{0},s_{f}\}\to\Delta(V)$. They uniquely determine a valid flow network if and only if the detailed balance conditions hold:

$$ $\displaystyle\forall s\in S^{f},\widehat{F}(s)\widehat{P}_{F}(s_{f}|s)=R(s)$ $\displaystyle\forall(s\to s^{\prime})\in E,s^{\prime}\neq s_{f},\widehat{F}(s) \widehat{P}_{F}(s^{\prime}|s)=\widehat{F}(s^{\prime})\widehat{P}_{B}(s|s^{ \prime})$ $$

The detailed-balance loss for transition $s\to s^{\prime}$ is defined as

$$ $\displaystyle L_{DB}(s\to s^{\prime})=$ $\displaystyle\frac{1}{2}\left(\log\frac{\widehat{p}_{B}(s\to s^{\prime})}{ \widehat{p}_{F}(s\to s^{\prime})}\right)^{2}$ $\displaystyle\text{where }\widehat{p}_{F}(s\to s^{\prime})=$ $\displaystyle\widehat{F}(s)\widehat{P}_{F}(s^{\prime}|s)$ (A.3) $\displaystyle\widehat{p}_{B}(s\to s^{\prime})=$ $\displaystyle\begin{cases}\widehat{F}(s^{\prime})\widehat{P}_{B}(s|s^{\prime}) &,s^{\prime}\neq s_{f}\\ R(s)&,s^{\prime}=s_{f}\end{cases}$ (A.4) $$

#### Trajectory-Balance GFlowNets (TB-GFN).

A TB-GFN is parameterized by a total flow function $\widehat{Z}$, a forward probability function $\widehat{P}_{F}:V\setminus\{s_{f}\}\to\Delta(V\setminus\{s_{0}\})$ and a backward probability function $\widehat{P}_{B}:V\setminus\{s_{0}\}\to\Delta(V\setminus\{s_{f}\})$. They uniquely determine a GFlowNet if and only if the trajectory balance conditions hold:

$$ $\displaystyle\forall\tau=(s_{0}=s_{o},s_{1},\cdots,s_{T-1},s_{T}=s_{f}),$ $\displaystyle\ \widehat{Z}\prod_{t=0}^{T=1}\widehat{P}_{F}(s_{t+1}|s_{t})=R(s_ {T-1})\prod_{t=1}^{T-1}\widehat{P}_{B}(s_{t-1}|s_{t})$ $$

The trajectory-balance loss for complete trajectory $\tau=(s_{0}=s_{o},s_{1},\cdots,s_{T-1},s_{T}=s_{f})$ is defined as

$$ $\displaystyle L_{TB}(\tau)=$ $\displaystyle\frac{1}{2}\left(\log\frac{\widehat{p}_{B}(\tau)}{\widehat{p}_{F} (\tau)}\right)^{2}$ $\displaystyle\text{where }\widehat{p}_{F}(\tau)=$ $\displaystyle\widehat{Z}\prod_{t=0}^{T=1}\widehat{P}_{F}(s_{t+1}|s_{t})$ (A.5) $\displaystyle\widehat{p}_{B}(\tau)=$ $\displaystyle R(s_{T-1})\prod_{t=1}^{T-1}\widehat{P}_{B}(s_{t-1}|s_{t})$ (A.6) $$

#### Sub-Trajectory-Balance GFlowNets (STB-GFN).

An STB-GFN uses the same parameters as a DB-GFN with an alternative loss, the sub-trajectory-balance loss. It is defined for partial trajectory $\iota=(s_{0},s_{1},\cdots,s_{T-1},s_{T})$ as

$$ $\displaystyle L_{STB}(\iota)=$ $\displaystyle\frac{1}{2}\left(\log\frac{\widehat{p}_{B}(\iota)}{\widehat{p}_{F }(\iota)}\right)^{2}$ $\displaystyle\text{where }\widehat{p}_{F}(\iota)=$ $\displaystyle\widehat{F}(s_{0})\prod_{t=0}^{T=1}\widehat{P}_{F}(s_{t+1}|s_{t})$ (A.7) $\displaystyle\widehat{p}_{B}(\iota)=$ $\displaystyle\begin{cases}\widehat{F}(s_{T})\prod_{t=1}^{T}\widehat{P}_{B}(s_{ t-1}|s_{t})&,s_{T}\neq s_{f}\\ R(s_{T-1})\prod_{t=1}^{T-1}\widehat{P}_{B}(s_{t-1}|s_{t})&,s_{T}=s_{f}\end{cases}$ (A.8) $$

#### Forward-looking GFlowNets (FL-GFN).

FL-GFNs require the assumption that the reward function can be extended to the whole state space, instead of restricted to only terminal states. The parameters of FL-GFN are quite similar to that of the original DB GFlowNets and STB GFlowNets, including a forward-looking state-flow function $\widetilde{F}:V\setminus\{s_{f}\}\to\mathbb{R}_{+}$, a forward probability function $\widehat{P}_{F}:V\setminus\{s_{f}\}\to\Delta(V)$ and a backward probability function $\widehat{P}_{B}:V\setminus\{s_{0},s_{f}\}\to\Delta(V)$. The only difference is that the original state-flow function $\widehat{F}$ is replaced by the forward-looking version $\widetilde{F}$, following $\widehat{F}(s)=R(s)\widetilde{F}(s)$. The forward-looking detailed-balance loss and forward-looking sub-trajectory-balance loss can be obtained by substituting them with the original ones:

$$ $\displaystyle L_{\text{FL-DB}}(s\to s^{\prime})=$ $\displaystyle\frac{1}{2}\left(\log\frac{\widehat{p}_{B}(s\to s^{\prime})}{ \widehat{p}_{F}(s\to s^{\prime})}\right)^{2}$ $\displaystyle\text{where }\widehat{p}_{F}(s\to s^{\prime})=$ $\displaystyle R(s)\widetilde{F}(s)\widehat{P}_{F}(s^{\prime}|s)$ (A.9) $\displaystyle\widehat{p}_{B}(s\to s^{\prime})=$ $\displaystyle\begin{cases}R(s^{\prime})\widetilde{F}(s^{\prime})\widehat{P}_{B }(s|s^{\prime}),&s^{\prime}\neq s_{f}\\ R(s),&s^{\prime}=s_{f}\end{cases}$ (A.10) $\displaystyle L_{\text{FL-STB}}(\iota)=$ $\displaystyle\frac{1}{2}\left(\log\frac{\widehat{p}_{B}(\iota)}{\widehat{p}_{F }(\iota)}\right)^{2}$ $\displaystyle\text{where }\widehat{p}_{F}(\iota)=$ $\displaystyle R(s_{0})\widetilde{F}(s_{0})\prod_{t=0}^{T=1}\widehat{P}_{F}(s_{ t+1}|s_{t})$ (A.11) $\displaystyle\widehat{p}_{B}(\iota)=$ $\displaystyle\begin{cases}R(s_{T})\widetilde{F}(s_{T})\prod_{t=1}^{T}\widehat{ P}_{B}(s_{t-1}|s_{t}),&s_{T}\neq s_{f}\\ R(s_{T-1})\prod_{t=1}^{T-1}\widehat{P}_{B}(s_{t-1}|s_{t}),&s_{T}=s_{f}\end{cases}$ (A.12) $$

#### DAG GFlowNets (DAG-GFN).

DAG-GFNs require that each state is terminated and has a non-zero reward. Then according to the detailed-balance condition, $\widehat{F}(s)=\frac{R(s)}{\widehat{p}_{F}(s_{f}|s)}$ for all $s$. Therefore, the flow network can be parameterized by only the forward probability function $\widehat{P}_{F}:V\setminus\{s_{f}\}\to\Delta(V)$ and the backward probability function $\widehat{P}_{B}:V\setminus\{s_{0},s_{f}\}\to\Delta(V)$. The modified detailed-balance loss and modified sub-trajectory-balance loss can be obtained by substituting them into the original ones:

$$ $\displaystyle L_{\text{modified-DB}}(s\to s^{\prime})=$ $\displaystyle\frac{1}{2}\left(\log\frac{\widehat{p}_{B}(s\to s^{\prime})}{ \widehat{p}_{F}(s\to s^{\prime})}\right)^{2}$ $\displaystyle\text{where }\widehat{p}_{F}(s\to s^{\prime})=$ $\displaystyle\frac{R(s)\widehat{P}_{F}(s^{\prime}|s)}{\widehat{P}_{F}(s_{f}|s)}$ (A.13) $\displaystyle\widehat{p}_{B}(s\to s^{\prime})=$ $\displaystyle\begin{cases}\frac{R(s^{\prime})\widehat{P}_{B}(s|s^{\prime})}{ \widehat{P}_{F}(s_{f}|s^{\prime})}&,s^{\prime}\neq s_{f}\\ R(s)&,s^{\prime}=s_{f}\end{cases}$ (A.14) $\displaystyle L_{\text{modified-STB}}(\iota)=$ $\displaystyle\frac{1}{2}\left(\log\frac{\widehat{p}_{B}(\iota)}{\widehat{p}_{F }(\iota)}\right)^{2}$ $\displaystyle\text{where }\widehat{p}_{F}(\iota)=$ $\displaystyle\frac{R(s_{0})}{\widehat{P}_{F}(s_{f}|s_{0})}\prod_{t=0}^{T=1} \widehat{P}_{F}(s_{t+1}|s_{t})$ (A.15) $\displaystyle\widehat{p}_{B}(\iota)=$ $\displaystyle\begin{cases}\frac{R(s_{T})}{\widehat{P}_{F}(s_{f}|s_{T})}\prod_{ t=1}^{T}\widehat{P}_{B}(s_{t-1}|s_{t})&,s_{T}\neq s_{f}\\ R(s_{T-1})\prod_{t=1}^{T-1}\widehat{P}_{B}(s_{t-1}|s_{t})&,s_{T}=s_{f}\end{cases}$ (A.16) $$

### A.2 Sampling and Resampling Weights

There exist various strategies to sample training objects to enhance exploration and hence accelerate convergence.
The usual practice is to use the forward policy, the backward policy, a tempered or $\epsilon$-noisy version of them, an offline dataset, or a mixture of these strategies.
Other choices include using a reward prioritized replay buffer (Shen et al., ), applying Thompson sampling (Rector-Brooks et al., ) or local search (Kim et al., ) to the sampled trajectories for extra samples, increasing greediness according to state-action value $Q$ (Lau et al., ), etc. The sampled objects may also be reweighed. For example, STB-GFN weights each partial trajectory by a factor proportional to $\lambda^{l}$, where $l$ is its length and $\lambda$ is a hyper-parameter.

### A.3 Backward Policy

The most common choice of $P_{B}$ is to either fix it to be uniform or simultaneously train it using the same objective as the forward policy. Other criteria include matching a (possibly non-Markovian) prior (Shen et al., ), maximizing the entropy of the corresponding forward policy (Mohammadpour et al., ) and learning a pessimistic one that focuses on observed trajectories (Jang et al., ).

## Appendix B Theorem 4.1 and its Proof

###### Theorem B.1 (An extension of Theorem 4.1 ) .

Let $\theta_{F}$ and $\theta_{B}$ be the parameters for forward and backward policies, respectively. For each minimal cut $C\in\mathcal{C}$, the restrictions of both forward and backward flow functions on $C$ can be viewed as unnormalized distributions over it, denoted as $\widehat{p}^{C}_{F}$ and $\widehat{p}^{C}_{B}$, respectively.

If there exists $w:\mathcal{C}\to\mathbb{R}_{+}$ such that $\mu(o)=\widehat{p}_{F}(o)\sum_{C\in\mathcal{C},o\in C}w(C)$ for any $o\in\mathcal{O}$, then

$$ $\displaystyle\nabla_{\theta_{F}}\mathcal{L}_{\mathcal{O},\widehat{p}_{\theta}, \mu,P_{B},g}=\nabla_{\theta_{F}}\sum_{C\in\mathcal{C}}w(C)D_{f_{1}}(\widehat{p }^{C}_{B}||\widehat{p}^{C}_{F}),\text{where }f_{1}(t)=t\int_{1}^{t}\frac{g^{ \prime}(\log s)}{s^{2}}ds$ $\displaystyle\nabla_{\theta_{B}}\mathcal{L}_{\mathcal{O},\widehat{p}_{\theta}, \mu,P_{B},g}=\nabla_{\theta_{B}}\sum_{C\in\mathcal{C}}w(C)D_{f_{2}}(\widehat{p }^{C}_{B}||\widehat{p}^{C}_{F}),\text{where }f_{2}(t)=g(\log t)$ $$

If there exists $w:\mathcal{C}\to\mathbb{R}_{+}$ such that $\mu(o)=\widehat{p}_{B}(o)\sum_{C\in\mathcal{C},o\in C}w(C)$ for any $o\in\mathcal{O}$, then

$$ $\displaystyle\nabla_{\theta_{F}}\mathcal{L}_{\mathcal{O},\widehat{p}_{\theta}, \mu,P_{B},g}=\nabla_{\theta_{F}}\sum_{C\in\mathcal{C}}w(C)D_{f_{3}}(\widehat{p }^{C}_{B}||\widehat{p}^{C}_{F}),\text{where }f_{3}(t)=tg(\log t)$ $\displaystyle\nabla_{\theta_{B}}\mathcal{L}_{\mathcal{O},\widehat{p}_{\theta}, \mu,P_{B},g}=\nabla_{\theta_{B}}\sum_{C\in\mathcal{C}}w(C)D_{f_{4}}(\widehat{p }^{C}_{B}||\widehat{p}^{C}_{F}),\text{where }f_{4}(t)=\int_{1}^{t}g^{\prime}( \log s)ds$ $$

###### Proof.

We prove the theorem by deriving the correspondence. Specifically, assume $\mu(o)=\widehat{p}_{F}(o)\sum_{C\in\mathcal{C},o\in C}w(C)$. Then,

$$ $\displaystyle\nabla_{\theta_{F}}\sum_{C\in\mathcal{C}}w(C)D_{f_{1}}(\widehat{p }^{C}_{B}||\widehat{p}^{C}_{F})=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}\nabla_{\theta_{F}}\left[ \widehat{p}^{C}_{F}(o)f_{1}\left(\frac{\widehat{p}^{C}_{B}(o)}{\widehat{p}^{C} _{F}(o)}\right)\right]$ $\displaystyle=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}\left[f_{1}\left(\frac{ \widehat{p}^{C}_{B}(o)}{\widehat{p}^{C}_{F}(o)}\right)-\frac{\widehat{p}^{C}_{ B}(o)}{\widehat{p}^{C}_{F}(o)}f_{1}^{\prime}\left(\frac{\widehat{p}^{C}_{B}(o) }{\widehat{p}^{C}_{F}(o)}\right)\right]\nabla_{\theta_{F}}\widehat{p}^{C}_{F}(o)$ $\displaystyle=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}-g^{\prime}\left(\log\frac {\widehat{p}^{C}_{B}(o)}{\widehat{p}^{C}_{F}(o)}\right)\nabla_{\theta_{F}} \widehat{p}^{C}_{F}(o)$ $\displaystyle=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}\widehat{p}^{C}_{F}(o)g^{ \prime}\left(\log\frac{\widehat{p}^{C}_{B}(o)}{\widehat{p}^{C}_{F}(o)}\right) \left(-\frac{1}{\widehat{p}^{C}_{F}(o)}\right)\nabla_{\theta_{F}}\widehat{p}^{ C}_{F}(o)$ $\displaystyle=$ $\displaystyle\sum_{o\in\mathcal{O}}\mu(o)\nabla_{\theta_{F}}g\left(\log\frac{ \widehat{p}^{C}_{B}(o)}{\widehat{p}^{C}_{F}(o)}\right)$ $\displaystyle=$ $\displaystyle\nabla_{\theta_{F}}\mathcal{L}_{\mathcal{O},\widehat{p}_{\theta}, \mu,P_{B},g}$ $\displaystyle\nabla_{\theta_{B}}\sum_{C\in\mathcal{C}}w(C)D_{f_{2}}(\widehat{p }^{C}_{B}||\widehat{p}^{C}_{F})=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}\nabla_{\theta_{B}}\left[ \widehat{p}^{C}_{F}(o)f_{2}\left(\frac{\widehat{p}^{C}_{B}(o)}{\widehat{p}^{C} _{F}(o)}\right)\right]$ $\displaystyle=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}\left[\widehat{p}^{C}_{F}( o)\nabla_{\theta_{B}}g\left(\log\frac{\widehat{p}^{C}_{B}(o)}{\widehat{p}^{C}_ {F}(o)}\right)\right]$ $\displaystyle=$ $\displaystyle\sum_{o\in\mathcal{O}}\mu(o)\nabla_{\theta_{B}}g\left(\log\frac{ \widehat{p}^{C}_{B}(o)}{\widehat{p}^{C}_{F}(o)}\right)$ $\displaystyle=$ $\displaystyle\nabla_{\theta_{B}}\mathcal{L}_{\mathcal{O},\widehat{p}_{\theta}, \mu,P_{B},g}$ $$

In the second case, suppose $\mu(o)=\widehat{p}_{B}(o)\sum_{C\in\mathcal{C},o\in C}w(C)$. Then,

$$ $\displaystyle\nabla_{\theta_{F}}\sum_{C\in\mathcal{C}}w(C)D_{f_{3}}(\widehat{p }^{C}_{B}||\widehat{p}^{C}_{F})=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}\nabla_{\theta_{F}}\left[ \widehat{p}^{C}_{F}(o)f_{3}\left(\frac{\widehat{p}^{C}_{B}(o)}{\widehat{p}^{C} _{F}(o)}\right)\right]$ $\displaystyle=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}\left[f_{3}\left(\frac{ \widehat{p}^{C}_{B}(o)}{\widehat{p}^{C}_{F}(o)}\right)-\frac{\widehat{p}^{C}_{ B}(o)}{\widehat{p}^{C}_{F}(o)}f_{3}^{\prime}\left(\frac{\widehat{p}^{C}_{B}(o) }{\widehat{p}^{C}_{F}(o)}\right)\right]\nabla_{\theta_{F}}\widehat{p}^{C}_{F}(o)$ $\displaystyle=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}-\frac{\widehat{p}^{C}_{B} (o)}{\widehat{p}^{C}_{F}(o)}g^{\prime}\left(\log\frac{\widehat{p}^{C}_{B}(o)}{ \widehat{p}^{C}_{F}(o)}\right)\nabla_{\theta_{F}}\widehat{p}^{C}_{F}(o)$ $\displaystyle=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}\widehat{p}^{C}_{B}(o)g^{ \prime}\left(\log\frac{\widehat{p}^{C}_{B}(o)}{\widehat{p}^{C}_{F}(o)}\right) \left(-\frac{1}{\widehat{p}^{C}_{F}(o)}\right)\nabla_{\theta_{F}}\widehat{p}^{ C}_{F}(o)$ $\displaystyle=$ $\displaystyle\sum_{o\in\mathcal{O}}\mu(o)\nabla_{\theta_{F}}g\left(\log\frac{ \widehat{p}^{C}_{B}(o)}{\widehat{p}^{C}_{F}(o)}\right)$ $\displaystyle=$ $\displaystyle\nabla_{\theta_{F}}\mathcal{L}_{\mathcal{O},\widehat{p}_{\theta}, \mu,P_{B},g}$ $\displaystyle\nabla_{\theta_{B}}\sum_{C\in\mathcal{C}}w(C)D_{f_{4}}(\widehat{p }^{C}_{B}||\widehat{p}^{C}_{F})=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}\nabla_{\theta_{B}}\left[ \widehat{p}^{C}_{F}(o)f_{4}\left(\frac{\widehat{p}^{C}_{B}(o)}{\widehat{p}^{C} _{F}(o)}\right)\right]$ $\displaystyle=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}f_{4}^{\prime}\left(\frac{ \widehat{p}^{C}_{B}(o)}{\widehat{p}^{C}_{F}(o)}\right)\nabla_{\theta_{B}} \widehat{p}^{C}_{B}(o)$ $\displaystyle=$ $\displaystyle\sum_{C\in\mathcal{C}}w(C)\sum_{o\in C}\widehat{p}^{C}_{B}(o)g^{ \prime}\left(\log\frac{\widehat{p}^{C}_{B}(o)}{\widehat{p}^{C}_{F}(o)}\right) \frac{1}{\widehat{p}^{C}_{B}(o)}\nabla_{\theta_{B}}\widehat{p}^{C}_{B}(o)$ $\displaystyle=$ $\displaystyle\sum_{o\in\mathcal{O}}\mu(o)\nabla_{\theta_{B}}g\left(\log\frac{ \widehat{p}^{C}_{B}(o)}{\widehat{p}^{C}_{F}(o)}\right)$ $\displaystyle=$ $\displaystyle\nabla_{\theta_{B}}\mathcal{L}_{\mathcal{O},\widehat{p}_{\theta}, \mu,P_{B},g}$ $$

∎

###### Theorem B.1 (An extension of Theorem 4.1 ) .

###### Proof.

## Appendix C Interpretation of Theorem 4.1 for Different Kinds of Losses

### C.1 Flow Matching Loss

For any $s\in V$, let $l(s)$ be the length of the longest trajectory from $s_{o}$ to $s$. For any $(s\to s^{\prime})\in E$, if $l(s)+1<l(s^{\prime})$, then we insert $l(s^{\prime})-l(s)-1$ virtual states on this edge, denoted as $s_{(s\to s^{\prime}),l}$ for $l(s)<l<l(s^{\prime})$, and define

$$ $\displaystyle\widehat{p}_{F}(s_{(s\to s^{\prime}),l})=\widehat{p}_{B}(s_{(s\to s ^{\prime}),l})=\widehat{F}(s\to s^{\prime})$ $$

then these virtual states have no contribution to the total loss, thus we can assign to them arbitrary weights.

Let $V^{i}$ be the collections of states in layer $i$, and let $w(V^{i})=1$, then we have

$$ $\displaystyle\mu(s)=\widehat{p}_{F}^{V^{l(s)}}(s)=\widehat{p}_{F}(s)$ $$

### C.2 Detailed Balance Loss

For any $s\in V$, let $l(s)$ be the length of the longest trajectory from $s_{o}$ to $s$. For any $(s\to s^{\prime})\in E$, if $l(s)+1<l(s^{\prime})$, then we insert $l(s^{\prime})-l(s)-1$ virtual states on this edge, denoted as $s_{(s\to s^{\prime}),l}$ for $l(s)<l<l(s^{\prime})$, and define

$$ $\displaystyle\widehat{p}^{l}_{F}(s\to s^{\prime})=$ $\displaystyle\widehat{p}_{F}(s\to s^{\prime})$ $\displaystyle\widehat{p}^{l}_{B}(s\to s^{\prime})=$ $\displaystyle\begin{cases}\widehat{p}_{F}(s\to s^{\prime})&,l<l(s^{\prime})\\ \widehat{p}_{B}(s\to s^{\prime})&,l=l(s^{\prime})\end{cases}$ $$

then these virtual transitions have no contribution to the total loss, thus we can assign to them arbitrary weights.

Let $E^{i}$ be the collections of edges from layer $i$ to layer $i+1$, and let $w(E^{i})=1$, then we have

$$ $\displaystyle\mu(s\to s^{\prime})=\widehat{p}_{F}^{E^{l(s)}}(s\to s^{\prime})= \widehat{p}_{F}(s\to s^{\prime})$ $$

### C.3 Sub-Trajectory Balance Loss

Assume that $G$ is a graded DAG with $L+1$ layers. Suppose $\tau=(s_{0}=s_{o},s_{1},\cdots,s_{L}=s_{f})$ is a complete trajectory, we use $\tau_{i:j}=(s_{i},s_{i+1},\cdots,s_{j})$ to denote a partial trajectory. Let $\mathcal{T}^{i:j}$ be the collections of trajectories from layer $i$ to layer $j$, then

$$ $\displaystyle\mu(\iota)=$ $\displaystyle\sum_{\tau:\iota=\tau_{i:j}}\widehat{P}_{F}(\tau)\frac{\lambda^{j -i}}{\sum_{0\leq i<j\leq L}\lambda^{j-i}}$ $\displaystyle\approx$ $\displaystyle\frac{\lambda^{j-i}}{\sum_{0\leq i<j\leq L}\lambda^{j-i}}\widehat {p}_{F}^{\mathcal{T}^{i:j}}(\iota)$ $$

Hence $w(\mathcal{T}^{i:j})=\frac{\lambda^{j-i}}{\sum_{0\leq i<j\leq L}}$ and 0 0 otherwise.

## Appendix D Proof of Theorem 4.7

###### Theorem D.1 .

Let $\mathcal{L}$ be an objective function for training GFlowNets, whose regression loss $g$ corresponds to $D_{f}$ according to Theorem 4.1. If $D_{f}$ is zero-forcing, then $\mathcal{L}$ and $g$ are both zero-forcing. If $D_{f}$ is zero-avoiding, then $\mathcal{L}$ and $g$ are both zero-avoiding.

###### Proof.

Assume that $D_{f}$ is zero-forcing, and $\widehat{P}_{T}(s;\theta^{*})>0$ for some terminating state $s$. Then there exists a trajectory $\tau=(s_{o},\cdots,s,s_{f})$ such that $\widehat{P}_{F}(\tau;\theta)>0$, thus

$$ $\widehat{p}_{F}^{C}(o)=\widehat{p}_{F}(o)>0$ $$

for any $o\in\tau,o\in C,w(C)>0$. Since $D_{f}$ is zero-forcing, $\widehat{p}_{B}(o)=\widehat{p}_{B}^{C}(o)>0$ for any $o\in\tau$, meaning that $\widehat{P}_{B}(\tau)>0$ and $R(s)>0$. Thus, $R(s)=0$ implies $\widehat{P}_{T}(s;\theta)=0$ , so $\mathcal{L}$ is zero-forcing, and then $g$ is zero-forcing as well.

Similarly, assume that $D_{f}$ is zero-avoiding, and $R(s)>0$ for some terminating state $s$. Then there exists a trajectory $\tau=(s_{o},\cdots,s,s_{f})$ such that $\widehat{P}_{B}(\tau)>0$, thus

$$ $\widehat{p}_{B}^{C}(o)=\widehat{p}_{B}(o)>0$ $$

for any $o\in\tau,o\in C,w(C)>0$. Since $D_{f}$ is zero-avoiding, $\widehat{p}_{F}(o)=\widehat{p}_{F}^{C}(o)>0$ for any $o\in\tau$, meaning that $\widehat{P}_{F}(\tau;\theta)>0$, so $\widehat{P}_{T}(s;\theta)>0$. Thus, $R(s)>0$ implies that $\widehat{P}_{T}(s;\theta)>0$, so $\mathcal{L}$ is zero-avoiding, and then $g$ is zero-avoiding as well.
∎

###### Theorem D.1 .

###### Proof.

## Appendix E Experimental Details

### E.1 Hyper-grid

Our implementation of the baselines is based on Tiapkin et al. (). All models are parameterized by an MLP with 2 hidden layers of 256 neurons. We train the model with Adam optimizer using a batch size of 16 and a learning rate of 0.001. For the TB case, we use a larger learning rate of 0.1 for learnable total flow $\widehat{Z}$. For STB parameter $\lambda$, we use the value of $0.9$ following Tiapkin et al. () and Madan et al. (). We repeat each experiment 3 times using different random seeds. In each run, we train the models until 800k trajectories have been collected, and the empirical sample distribution is computed over the last 80k seen trajectories.

### E.2 Bit-sequence Generation

In this experiment, our implementation of the baselines is based on Tiapkin et al. () and Pan et al. (). The model is a 3-layer Transformer with 64 hidden units and 8 attention heads per layer. We train the model with Adam optimizer using a batch size of 16 and a learning rate of 0.001. For the TB case, we use a larger learning rate of 0.002 for learnable total flow $\widehat{Z}$. For STB parameter $\lambda$, we use the value of $1.5$. Following Tiapkin et al. (), we use a reward exponent of $2$. To calculate the Spearman Correlation, we use the same Monte-Carlo estimation for $P_{T}$ as Zhang et al. () and Tiapkin et al. (), namely

$$ $\displaystyle P_{T}(x)\approx\frac{1}{N}\sum_{i=1}^{N}\frac{P_{F}(\tau^{i})}{P _{B}(\tau^{i}|x)}$ $$

with $N=10$. We repeat each experiment 5 times using different random seeds.

### E.3 Molecule Generation

In the molecule generation experiment, our implementation of the baselines is based on Tiapkin et al. (). We use Message Passing Neural Networks (MPNN) as the model architecture. We train the model with Adam optimizer using a batch size of 4 and a learning rate of 0.0005. We use a reward exponent of $4$, and the STB parameter $\lambda$ is set to $0.99$. We repeat each experiment 4 times using different random seeds. In each run, We train the models for 50000 steps, generating 200k molecules.

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: Could the authors clarify if they’ve noticed stability shifts in higher-dimensional or complex tasks and if adjustments might bolster robustness? Additionally, what drives the choice of a limited set of losses—are there theoretical or practical reasons for omitting other f-divergences, like Hellinger? Lastly, insights into each loss function’s hyperparameter sensitivity and effects on convergence guarantees would further clarify their resilience and adaptability.
soundness: 2
strengths: This paper introduces a systematic framework for designing regression losses in GFlowNet training, linking each loss to specific divergence measures for targeted properties. Resulting in three new losses—Shifted-Cosh, Linex(1/2), and Linex(1)—that enhance exploration and exploitation balance.
summary: This paper presents a novel framework for GFlowNet objective functions, unifying existing training algorithms and clarifying key components. By establishing a connection between objective functions and divergence measures, it offers valuable insights into designing effective training objectives. The authors investigate key regression properties—zero-forcing and zero-avoiding—and propose three new loss functions (Linex(1), Linex(1/2), and Shifted-Cosh) to balance exploration and exploitation. Extensive experiments on benchmarks, including hyper-grid, bit-sequence, and molecule generation, show that these losses outperform the common squared loss in convergence speed, diversity, quality, and robustness.
weaknesses: Broader exploration of other potential divergence-based losses would offer a more comprehensive understanding of the effects of different divergence properties on GFlowNet training. Although the novelty lies in extending GFlowNet loss functions, there are similar attempts in reinforcement learning and generative models. Although the paper derives theoretical properties of zero-forcing and zero-avoiding, it lacks direct theoretical comparison with existing GFlowNet training algorithms.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: Areas for improvement and suggestions:

1. Making a literature connection with f-GAN, which also uses f-divergence in GANs, might be insightful to readers.


2. Include a discussion connecting with off-policy exploration methods. Are your loss and off-policy search orthogonal? Which means, is your loss function combined with an off-policy method (e.g., local search) better than the TB loss combined with an off-policy method?


3. It's good to see the categorization of prior GFlowNet works. Can you include this recent work [1] that uses genetic search as an off-policy method for training GFlowNets and provide some discussion?



[1] Hyeonah Kim et al., "Genetic-guided GFlowNets for Sample Efficient Molecular Optimization," NeurIPS 2024.
soundness: 3
strengths: 1. The paper is well-written and easy to follow.


2. The theories are insightful.
summary: This paper presents a novel theoretical finding for GFlowNets regarding their objective function. Using f-divergence theories, they connect existing objectives of GFlowNets and show that they are special cases of the squared loss. They design a new loss structure that combines both properties together: (1) zero forcing (as considered in existing losses) and (2) zero avoiding, which compensates for exploration. Their new loss function seems to have empirical benefits.
weaknesses: 1. The empirical results seem to be weak; they are only varied in synthetic tasks

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 4
questions: See Weaknesses.
soundness: 4
strengths: Contributions:
- generalizing the objective function of gflownet
- derive impact of loss function on the gradient
- define zero-forcing (encourage epxloitation) and zero-avoiding (encourage exploration) as two key properties induced by certain loss functions
- They create 3 new losses (alonside the existing quadratic loss) to tackle all 4 possible combinations (with/without zero-avoiding, with/without zero-forcing)
- Linex(1) corresponds to the KL divergence
- experiments on 3 datasets
	- Non-zero-forcing losses (Linex(1) and Linex(0.5)) converge faster on hyper-grid
	- Linex(1) obtains all the modes almost always the fastest, but spearman corr between train and test is highest for shifted-cos on bit-sequence
	- Linex(1) tends increase diversity while quadratic and shifted-cos give higher quality (high average rewards) on molecule generation

Paper is well written.
summary: The authors propose to modify the loss function of Gflownet (which has been completely overlooked by prior work). They show that dinstinct losses lead to different divergences. They propose three new loss functions, evaluate them extensively on diverse benchmarks.
weaknesses: - it would be nice to have a few more choices of losses, taking inspiration let say from f-divergences (Reverse-KL, JSD, etc.)
- there may be more than just zero-forcing and zero-avoiding to the key properties of loss functions hence why studying more losses would be helpful
- it would be nice to let say consider hybrid methods with some kind of annealing. For example, why not use Linex(1) for its fast convergence to a large number of nodes, before then transitioning to shifted-cos for higher rewards around those now-discovered modes.

So to me, the paper is great, but its kind of stopping too quickly, it feels like its only just tapping the surface. These kinds of ideas would be easy to test out and add to the papers. 

If the authors add bit more meat to the paper, i.e. extra loss functions and hybrid-annealing (as discussed above), I would likely increase my score. Like I said, its just missing a little bit of filling to make it a great paper.

Meta-review: In the paper, the authors addressed the issue of choosing regression loss in Generative Flow Networks (GFlowNets). They demonstrated a connection between regression losses and specific divergence measures. This connection enables the systematic design and evaluation of regression losses, tailored to the unique properties of their corresponding divergence measures. 

All the reviewers agree that the theoretical results are novel and insightful. The presentation of the paper is clear and easy to follow. After the rebuttal, most of the remaining concerns of the reviewers are addressed and all the reviewers are happy with the current stage of the paper. 

While there are some concerns about the limited experimental results, I believe that the current novelty and contribution of the paper are sufficient for ICLR. Therefore, I recommend accepting the paper at the current stage. The authors are encouraged to incorporate the feedbacks and comments of the reviewers into the camera-ready version of their paper.

Decision: Accept (Spotlight)