MetaGFN: Exploring Distant Modes with Adapted Metadynamics for Continuous GFlowNets

## Abstract

Abstract Generative Flow Networks (GFlowNets) are a class of generative models that sample objects in proportion to a specified reward function through a learned policy. They can be trained either on-policy or off-policy, needing a balance between exploration and exploitation for fast convergence to a target distribution. While exploration strategies for discrete GFlowNets have been studied, exploration in the continuous case remains to be investigated, despite the potential for novel exploration algorithms due to the local connectedness of continuous domains. Here, we introduce Adapted Metadynamics, a variant of metadynamics that can be applied to arbitrary black-box reward functions on continuous domains. We use Adapted Metadynamics as an exploration strategy for continuous GFlowNets. We show three continuous domains where the resulting algorithm, MetaGFN, accelerates convergence to the target distribution and discovers more distant reward modes than previous off-policy exploration strategies used for GFlowNets.

## 1 Introduction

Generative Flow Networks (GFlowNets) are a type of generative model that samples from a discrete space $\mathcal{X}$ by sequentially constructing objects via actions taken from a learned policy $P_{F}$ Bengio et al. (). The policy $P_{F}(s,s^{\prime})$ specifies the probability of transitioning from some state $s$ to some other state $s^{\prime}$. The policy is parameterised and trained so that, at convergence, the probability of sampling an object $x\in\mathcal{X}$ is proportional to a specified reward function $R(x)$. GFlowNets offer advantages over more traditional sampling methods, such as Markov chain Monte Carlo (MCMC), by learning an amortised sampler, capable of single-shot generation of samples from the desired distribution. Since GFlowNets learn a parametric policy, they can generalise across states, resulting in higher performance across various tasks Bengio et al. (); Malkin et al. (); Zhang et al. (); Jain et al. (); Deleu et al. (); Jain et al. (); Hu et al. (); Zhang et al. (); Shen et al. () and applications to conditioned molecule generation Shen et al. (), maximum likelihood estimation in discrete latent variable models Hu et al. (), structure learning of Bayesian networks Deleu et al. (), scheduling computational operations Zhang et al. (), and discovering reticular materials for carbon capture Cipcigan et al. ().

Although originally conceived for discrete state spaces, GFlowNets have been extended to more general state spaces, such as entirely continuous spaces, or spaces that are hybrid discrete-continuous Lahlou et al. (). In the continuous setting, given the current state, the policy specifies a continuous probability distribution over subsequent states, and the probability density over states $x\in\mathcal{X}$ sampled with the policy is proportional to a reward density function $r(x)$. The continuous domain unlocks more applications for GFlowNets, such as molecular conformation sampling Volokhova et al. () and continuous control problems Luo et al. ().

GFlowNets are trained like reinforcement learning agents. Trajectories of states are generated either on-policy or off-policy, with the terminating state $x\in\mathcal{X}$ providing a reward signal for informing a gradient step on the policy parameters. GFlowNets therefore suffer from the same training pitfalls as reinforcement learning. One such issue is slow temporal credit assignment, which has thus far been addressed by designing more effective loss functions, such as detailed balance Bengio et al. (), trajectory balance Malkin et al. () and sub-trajectory balance Madan et al. ().

Besides loss functions, another aspect of GFlowNet training is the exploration strategy for acquiring training samples. Exclusively on-policy learning is generally inadequate as it leads to inefficient exploration of new modes. More successful strategies therefore rely on off-policy exploration. For the discrete setting, numerous exploration strategies have been proposed including $\epsilon$-noisy with a uniform random policy, tempering, Generative Augmented Flow Networks (GAFN) Pan et al. (), Thompson sampling Rector-Brooks et al. () and Local Search GFlowNets Kim et al. (). While these approaches can be generalised to the continuous domain, there is no literature benchmarking their effectiveness in this setting.

Sampling in the continuous setting is a common occurrence in various domains such as molecular modelling Hawkins (); Yang et al. () and Bayesian inference Shahriari et al. (). The local connectedness of a continuous domain allows for novel exploration strategies that are not directly applicable in the discrete setting. In this work, we create MetaGFN, an exploration algorithm for continuous GFlowNets inspired by metadynamics, an enhanced sampling method widely used for molecular modelling Laio and Parrinello (). The main contributions of this work are:

- •
Presenting MetaGFN, an algorithm created by adapting metadynamics to black box rewards and continuous GFlowNets;
- •
Proving that the proposed Adapted Metadynamics is consistent and reduces to standard metadynamics in a limit;
- •
Showing empirically that MetaGFN outperforms existing GFlowNets exploration strategies.

The rest of the paper is as follows. In Section 2 we review the theory of discrete and continuous GFlowNets. We present Adapted Metadynamics and MetaGFN in Section 3. In Section 4, we evaluate MetaGFN against other exploration strategies, showing that MetaGFN outperforms existing exploration strategies in two continuous environments. We finish with limitations and conclusions in Sections 5 and 6. Code for MetaGFN is available at [link in camera-ready].

## 2 Preliminaries

### 2.1 Discrete GFlowNets

In a GFlowNet, the network refers to a directed acyclic graph (DAG), denoted as $G=(\mathcal{S},\mathcal{A})$. Nodes represent states $s\in\mathcal{S}$, and edges represent actions $s\rightarrow s^{\prime}\in\mathcal{A}$ denoting one-way transitions between states. The DAG has two distinguishable states: a unique source state $s_{0}$, that has no incoming edges, and a unique sink state $\perp$, that has no outgoing edges. The set of states, $\mathcal{X}\subset\mathcal{S}$, that are directly connected to the sink state are known as terminating states. GFlowNets learn forward transition probabilities, known as a forward policy $P_{F}(s^{\prime}|s)$,
along the edges of the DAG so that the resulting marginal distribution over the terminal states complete trajectories (the terminal distribution)
, denoted as $P^{\perp}(x)$,
is proportional to a given reward function $R\vcentcolon\mathcal{X}\rightarrow\mathbb{R}$. GFlowNets also introduce additional learnable objects, such as a backward policy $P_{B}(s|s^{\prime})$, which is a distribution over the parents of any state of the DAG, to create losses that train the forward policy. Objective functions for GFlowNets include flow matching (FM), detailed balance (DB), trajectory balance (TB) and subtrajectory balance (STB) Bengio et al. (, ); Malkin et al. (); Madan et al. ().
During training, the parameters of the flow objects are updated with stochastic gradients of the objective function applied to batches of trajectories. These trajectory batches can be obtained either directly from the current forward policy or from an alternative algorithm that encourages exploration. These approaches are known as on-policy and off-policy training respectively.

### 2.2 Continuous GFlowNets

Continuous GFlowNets extend the generative problem to continuous spaces Lahlou et al. (), where the analogous quantity to the DAG is a measurable pointed graph (MPG) Nummelin (). MPGs can model continuous spaces (e.g., Euclidean space, spheres, tori), as well as hybrid spaces, with a mix of discrete and continuous components, as often encountered in robotics, finance, and biology Neunert et al. (); Swiler et al. (); Bortolussi and Policriti ().

###### Definition 2.1 (Measurable pointed graph (MPG)) .

Let $(\bar{\mathcal{S}},\mathcal{T})$ be a topological space, where $\bar{\mathcal{S}}$ is the state space, $\mathcal{T}$ is the set of open subsets of $\bar{\mathcal{S}}$, and $\Sigma$ is the Borel $\sigma$-algebra associated with the topology of $\bar{\mathcal{S}}$. Within this space, we identify the source state $s_{0}\in\bar{\mathcal{S}}$ and sink state $\perp\in\bar{\mathcal{S}}$, both distinct and isolated from the rest of the space. On this space we define a reference transition kernel $\kappa\vcentcolon\bar{\mathcal{S}}\times\Sigma\rightarrow[0,+\infty)$ and a backward reference transition kernel $\kappa^{b}\vcentcolon\bar{\mathcal{S}}\times\Sigma\rightarrow[0,+\infty)$. The support of $\kappa(s,\cdot)$ are all open sets accessible from $s$. The support of $\kappa^{b}(s,\cdot)$ are all open sets where $s$ is accessible from. Additionally, these objects must be well-behaved in the following sense:

- (i)
Continuity: For all $B\in\Sigma$, the mapping $s\mapsto\kappa(s,B)$ is continuous.
- (ii)
No way back from the source: The backward reference kernel has zero support at the source state, i.e. for all $B\in\Sigma$, $\kappa^{b}(s_{0},B)=0$.
- (iii)
No way forward from the sink: When at the sink, applying the forward kernel keeps you there, i.e. $\kappa(\perp,\cdot)=\delta_{\perp}(\cdot)$, where $\delta_{\perp}$ is the Dirac measure of the sink state.
- (iv)
A fully-explorable space: The number of steps required to be able to reach any measurable $B\in\Sigma$ from the source state with the forward reference kernel is bounded.

The set of objects $(\bar{\mathcal{S}},\mathcal{T},\Sigma,s_{0},\perp,\kappa,\kappa^{b})$ then defines an MPG.

Note that the support of $\kappa(s,\cdot)$ and $\kappa^{b}(s,\cdot)$ are analogous to the child and parent sets of a state $s$ in a DAG. Similarly, a discrete GFlowNet’s DAG satisfies discrete versions of (ii), (iii), and (iv).

The set of terminating states $\mathcal{X}$ are the states that can transition to the sink, given by $\mathcal{X}=\left\{s\in\mathcal{S}\vcentcolon\kappa(s,\{\perp\})>0\right\}$, where $\mathcal{S}\vcentcolon=\bar{\mathcal{S}}\setminus\{s_{0}\}$. Trajectories $\tau$ are sequences of states that run from source to sink, $\tau=(s_{0},\dots,s_{n},\perp)$. The forward Markov kernel $P_{F}\vcentcolon\bar{\mathcal{S}}\times\Sigma\rightarrow[0,\infty)$ and backward Markov kernel $P_{B}\vcentcolon\bar{\mathcal{S}}\times\Sigma\rightarrow[0,\infty)$ have the same support as $\kappa(s,\cdot)$ and $\kappa^{b}(s,\cdot)$ respectively, where being a Markov kernel means states are mapped to probability measure, hence $\int_{\bar{\mathcal{S}}}P_{F}(s,ds^{\prime})=\int_{\bar{\mathcal{S}}}P_{B}(s,
ds^{\prime})=1$. A flow F is a tuple $F=(f,P_{F})$, where $f:\Sigma\rightarrow[0,\infty)$ is a flow measure, satisfying $f(\{\perp\})=f(s_{0})=Z$, where $Z$ is the total flow.

The reward measure is a positive and finite measure $R$ over the terminating states $\mathcal{X}$, we denote the density of this reward measure as $r(x)$, for $x\in\mathcal{X}$. A flow $F$ is said to satisfy the reward-matching conditions if

$$ $R(dx)=f(dx)P_{F}(x,\{\perp\}).$ $$

If a flow satisfies the reward-matching conditions and trajectories are recursively sampled from the Markov kernel $P_{F}$ starting at $s_{0}$, the resulting measure over terminating states, $P^{\perp}(B)$, is proportional to the reward: $P^{\perp}(B)=\frac{R(B)}{R(\mathcal{X})}$ for any $B$ in the $\sigma$-algebra of terminating states Lahlou et al. ().

Objective functions for discrete GFlowNets generalise to continuous GFlowNets. However, in the continuous case, the forward policy $\hat{p}_{F}:\mathcal{S}\times\bar{\mathcal{S}}\rightarrow[0,\infty)$, backward policy $\hat{p}_{B}:\mathcal{S}\times\bar{\mathcal{S}}\rightarrow[0,\infty)$ and parameterised flow $\hat{f}:\mathcal{S}\rightarrow[0,\infty)$ parameterise the $P_{F}$, $P_{B}$ transition kernels and flow measure $f$ on an MPG. Discrete GFlowNets parameterise log transition probabilities and flows on a DAG. In this work, we consider DB, TB and STB losses. For a complete trajectory $\tau$, the TB loss can be written as

$$ $L_{TB}(\tau)=\left(\log\frac{Z_{\theta}\prod_{t=0}^{n}\hat{p}_{F}(s_{t},s_{t+1 };\theta)}{r(s_{n})\prod_{t=0}^{n-1}\hat{p}_{B}(s_{t+1},s_{t};\theta)}\right)^ {2},$ $$

where $Z_{\theta}$ is the parameterised total flow (see Appendix A for the DB and STB loss functions).

###### Definition 2.1 (Measurable pointed graph (MPG)) .

### 2.3 Exploration strategies for GFlowNets

GFlowNets can reliably learn using off-policy trajectories, a key advantage over hierarchical variational models Malkin et al. (). For optimal training, it is common to use a replay buffer and alternate between on-policy and off-policy (exploration) batches Shen et al. (). Exploration strategies for discrete GFlowNets include $\epsilon$-noisy with a uniform random policy, tempering, Generative Augmented Flow Networks (GAFN) Pan et al. (), Local Search GFlowNets Kim et al. (), and Thompson sampling (TS), which outperforms the others in grid and bit sequence domains Rector-Brooks et al. (). TS aims to bias exploration in regions where there is high uncertainty. When the forward policy is parameterised as an MLP, this is achieved using an ensemble of $K\in\mathbb{Z}^{+}$ policy heads with a common network torso. During training, an ensemble member is randomly sampled and used to generate a trajectory $\tau$. In a training batch, each ensemble member is included with probability $p$ and parameters are updated by taking a gradient step on the total loss of $\tau$ over all included members.

No comparative literature exists on exploration strategies for continuous GFlowNets, but many methods can be adapted, and we do so here. For example, for TS in the continuous setting, policy heads parameterise forward policy functions instead of log probabilities. Another strategy unique to the continuous setting is what we call noisy exploration. This strategy involves introducing an additive noise parameter, denoted as $\bar{\sigma}$, to the variance parameters in the forward policy distribution, where the value of $\bar{\sigma}$ is scheduled to gradually decrease to zero over the course of training.

### 2.4 Metadynamics

Molecular dynamics (MD) uses Langevin dynamics (LD) Pavliotis (), a stochastic differential equation modelling particle motion with friction and random fluctuations, to simulate atomic trajectories that ergodically sample a molecule’s Gibbs measure, $\rho_{\beta}(x)\propto e^{-\beta V(x)}$. Here, $x$ and $p$ are atomic positions and momenta, $V(x)$ is the molecular potential, and $\beta$ is thermodynamic beta.(^1^11We review Langevin dynamics in Appendix B.) If the potential $V(x)$ has multiple local minima, then unbiased LD can get trapped in these minima, which can lead to inefficient sampling. Metadynamics is an algorithm that enhances sampling by regularly depositing repulsive Gaussian bias potentials at the centre of an evolving LD trajectory Laio and Parrinello (). At time $t>0$, metadynamics modifies LD such that the conservative component of the LD force is given by the negative gradient of the total potential, i.e. $-\nabla V_{\text{total},t}=-\nabla(V+V_{\text{bias},t})$, where $V_{\text{bias},t}$ is the cumulative bias at time $t$. Bias potentials are typically chosen to only vary in the direction of user-specified, low-dimensional collective variables (CVs), $z(x):\mathcal{X}\rightarrow\mathcal{Z}$, mapping from the original space $\mathcal{X}$ to the CV space $\mathcal{Z}$. For biomolecules, typical CVs include protein backbone angles or distances between charge centres; these are quantities that drive and parameterise rare-event transitions. As the bias potential progressively fills up the potential landscape, energetic barriers are reduced, thus accelerating exploration, eventually ensuring uniform diffusion in CV space. In practice, the bias is defined on a regular grid, which limits CV space dimensionality to 5-10 due to exponential memory costs. Thus, identifying good CVs is crucial for effective metadynamics simulations in applications such as drug discovery, chemistry and materials science De Vivo et al. (); Laio and Gervasio (). In this work, we adapt the original metadynamics algorithm discussed above. The method has also seen numerous extensions. For a detailed review, see Bussi and Laio (2020) and the references therein Bussi and Laio ().

## 3 MetaGFN: Adapted Metadynamics for GFlowNets

Training GFlowNets in high-dimensional continuous spaces requires exploration, especially if valuable reward peaks are separated by large regions of low reward. In some tasks, prior knowledge of the principal manifold directions along which the reward measure varies can reduce the effective dimension required for exploration. This is where exploration algorithms that guarantee uniform sampling in that low-dimensional manifold, such as metadynamics, become most effective. With this intuition in mind, we adapt metadynamics to the black-box reward setting of continuous GFlowNets.

Assumptions Assume that $\mathcal{X}$ is a manifold (locally homeomorphic to Euclidean space) and the reward density $r(x)$ is bounded and L1-integrable over $\mathcal{X}$ with at most finitely many discontinuities. Thus, the target density over terminal states, $\rho(x)\vcentcolon=r(x)/\int_{\mathcal{X}}r(x^{\prime})\,dx^{\prime}$, can be expressed as a Gibbs distribution: $\rho(x)=\exp(-\beta^{\prime}V(x))/\int_{\mathcal{X}}r(x^{\prime})\,dx^{\prime}$, where $V(x)=-\frac{1}{\beta^{\prime}}\ln r(x)$ is a potential with at most finitely many discontinuities and $\beta^{\prime}>0$ is a constant scalar. The maxima of $r(x)$ coincide with the minima of $V(x)$. Our goal is to explore $V(x)$ using a variant of metadynamics, thereby generating off-policy, high-reward terminal states that encourage the GFlowNet to eventually sample all the modes of the reward density.

Kernel density potential Metadynamics force computations require the gradient of the total potential, where $-\nabla V_{\text{total},t}=-\nabla(V+V_{\text{bias},t})$. Using the above assumptions, we have $\nabla V=-\nabla r(x)/(\beta^{\prime}r(x))$. However, $r(x)$ is often a computationally expensive black-box function, and its gradient, $\nabla r(x)$, is unknown. While finite differences can estimate $\nabla r(x)$ for smooth, low-dimensional reward distributions, this approach is impractical in high-dimensional spaces. We avoid finite difference calculations by computing a kernel density estimate (KDE) of $V$. In particular, we assume collective variables $z(x)=(z_{1}(x),\dots,z_{k}(x))$, and compute both the KDE potential and bias potentials in the CV space. Here, each $z_{i}$ is a one-dimensional coordinate, and $z\vcentcolon\mathcal{X}\rightarrow\mathcal{Z}$, where $\mathcal{Z}$ is $k$-dimensional. As the potentials are stored on a low-dimensional grid, gradient computations are guaranteed to be cheap relative to the cost of evaluating $r(x)$. We use $\hat{V}(z)$ to denote the KDE estimate in CV space.

To compute $\hat{V}(z)$, we maintain two separate KDEs: $\hat{N}(z)$ for the histogram of metadynamics states and $\hat{R}(z)$ for cumulative rewards. We update these KDE estimates on the fly at the same time the bias potential is updated. If $\mathcal{Z}\cong\mathbb{R}^{k}$, we use Gaussian kernels with update rules:(^2^22If $\mathcal{Z}\cong\mathbb{T}^{k}$ ($k$-torus), we use von Mises distributions instead of Gaussians.)

$$ $\hat{N}(z)_{t}=\hat{N}(z)_{t-1}+\exp\left(-\frac{1}{2}\sum_{i=1}^{k}\left| \frac{z_{i}-z_{t,i}}{\sigma_{i}}\right|^{2}\right),$ $$

$$ $\hat{R}(z)_{t}=\hat{R}(z)_{t-1}+r(x_{t})\exp\left(-\frac{1}{2}\sum_{i=1}^{k} \left|\frac{z_{i}-z_{t,i}}{\sigma_{i}}\right|^{2}\right),$ $$

where $\sigma=(\sigma_{1},\ldots,\sigma_{k})\in\mathbb{R}^{k}$ is the kernel width, $x_{t}$ is the latest metadynamics sample and $z_{t,i}$ is the corresponding $i^{th}$ CV coordinate of $x_{t}$. The KDE potential $\hat{V}(x)$ is then computed as:

$$ $\hat{V}(x)=-\frac{1}{\beta^{\prime}}\log\left(\frac{\hat{R}(x)}{\hat{N}(x)+ \epsilon}+\epsilon\right),$ $$

where $\epsilon>0$. We found empirically that $\epsilon$ ensured numerical stability by preventing division by zero and bounding the potential above by $\log\left(1/\epsilon\right)/\beta^{\prime}$. Taking the ratio of a reward and frequency KDE means that $\hat{V}$ rapidly and smoothly adjusts when new modes are discovered, in particular, we prove that $\hat{V}$ eventually discovers all reward modes in the CV space. More precisely,

###### Theorem 3.1 .

If the collective variable $z(x)$ is analytic with a bounded domain, then

$$ $\lim_{\epsilon\rightarrow 0}\left(\lim_{\sigma\rightarrow 0}\left(\lim_{t \rightarrow\infty}\hat{V}(z,t)\right)\right)=V,$ (1) $$

where $V=V(z^{\prime})\vcentcolon=\int_{\mathcal{X}}\delta(z^{\prime}-z(x))V(x)
\mathrm{d}x$ is the marginal potential in the CV space if $z(x)$ is not invertible. If $z(x)$ is invertible, $V$ is the original potential $V(x)$ in the original coordinates.

The proof is in Appendix C.

Implementation details We set the potential energy beta ($\beta^{\prime}$) equal to the Langevin dynamics beta ($\beta$). This allows a physical interpretation of $\beta$: it is inversely proportional to the (unbiased) transition rates between minima of the potential.(^3^33From the Kramer formula; $\text{transition rate}\propto\frac{1}{\beta}\exp(\beta\Delta V)$, where $\Delta V\propto\frac{1}{\beta^{\prime}}=\frac{1}{\beta}$.) We also set the kernel width equal to the width of the Gaussian bias. This is reasonable since it is the variability of $V(x)$ that determines sensible values for both these parameters.
The resulting exploration algorithm we call Adapted Metadynamics (AM), and is presented in Algorithm 1. Note that the algorithm can be extended to a batch of trajectories, where each metadynamics trajectory evolves independently, but with a shared $\hat{V}$ and $V_{\text{bias}}$ which receive updates from every trajectory in the batch. This is the version we use in our experiments - it accelerates exploration and reduces stochastic gradient noise during training.

Figure: Algorithm 1 Adapted Metadynamics

Training GFlowNets with Adaptive Metadynamics (MetaGFN) Each Adaptive Metadynamics sample $x_{i}\in\mathcal{X}$ is an off-policy terminal state sample. To train a GFlowNet, complete trajectories are required. We generate these by backward sampling from the terminal state, giving a trajectory $\tau=(s_{0},s_{1},\ldots,s_{n}=x_{i})$, where each state $s_{i-1}$ is sampled from the current backward policy distribution $\hat{p}_{B}(s_{i-1}|s_{i};\theta)$, for $i$ from $n$ to $1$. This approach means that the generated trajectory $\tau$ has reasonable credit according to the loss function, thereby providing a useful learning signal. However, since this requires a backward policy, this is compatible with DB, TB, and STB losses, but not FM loss. Given the superior credit assignment of the former losses, this is not a limitation Madan et al. ().

Additionally, we use a replay buffer. Due to the theoretical guarantee that Adaptive Metadynamics will eventually sample all collective variable space (Theorem 3.1), AM samples are ideal candidates for storing in a replay buffer. When storing these trajectories in the replay buffer, there are two obvious choices:

- 1.
Store the entire trajectory the first time it is generated;
- 2.
Store only the Adaptive Metadynamics sample and regenerate trajectories using the current backward policy when retrieving from the replay buffer.

We investigate both options in our experiments. We call the overall training algorithm MetaGFN, with pseudocode presented in Algorithm 3, Appendix D.

###### Theorem 3.1 .

## 4 Experiments

### 4.1 Line environment

Figure: Figure 1: Line Environment reward function, equation (2).
Refer to caption: x1.png

We consider a one-dimensional line environment, with state space $\mathcal{S}=\mathbb{R}\times\left\{t\in\mathbb{N},1\leq t\leq 3\right\}$, where $t$ indexes the position of a state in a trajectory. The source state is $s_{0}=(0,0)$ and trajectories terminate after exactly $3$ steps. The terminal states are therefore $\mathcal{X}=\mathbb{R}\times\left\{3\right\}\cong\mathbb{R}$. The reward density, plotted in Figure 1, consists of an asymmetric bimodal peak near the origin and an additional distant lone peak. It is given by the Gaussian mixture distribution:

$$ $\displaystyle r(x)=\begin{cases}\mathcal{N}(-2.0,1.0)+\mathcal{N}(-2.0,0.4)+\\ \quad\mathcal{N}(2.0,0.6)+\mathcal{N}(20.0,0.1);&-5\leq x\leq 23\\ 0;&\text{otherwise},\end{cases}$ (2) $$

where $\mathcal{N}(\mu,\sigma^{2})$ is a Gaussian density with mean $\mu$ and variance $\sigma^{2}$. The forward and backward probability transition kernels are a mixture of $3$ Gaussian distributions which, along with the flow $\hat{f}$, are parameterised by an MLP.

We compare the following exploration strategies: entirely on-policy (no exploration), noisy exploration, Thompson Sampling, and MetaGFN. For each strategy, we use a replay buffer and alternate between an exploration batch and a replay buffer batch. For MetaGFN, we use $\texttt{freqRB}=2$, $\texttt{freqMD}=10$ and always regenerate MetaGFN training trajectories using the current backward policy. As the environment is one-dimensional, the collective variable is simply $z(x)=x$. We evaluate performance by computing the L1 error between the known reward distribution and the empirical on-policy distribution during training (see Appendix E.1 for the full experimental details).

Figure: Figure 2: The L1 difference between on-policy and reward distribution during training in the line environment for different loss functions and exploration strategies. The mean is plotted with standard error over 10 repeats. DB - Detailed Balance loss, TB - Trajectory Balance loss, STB - Subtrajectory Balance loss.
Refer to caption: x2.png

The results (mean and standard deviation over $10$ random seeds) for each loss function and exploration strategy are shown in Figure 2. Among the three loss functions, TB loss has the lowest variance loss profiles, and MetaGFN consistently converges to a lower minimum error than all other exploration strategies. Indeed, MetaGFN was the only method that consistently sampled the distant reward peak at $x=20$, while other methods plateau in error after locking onto the central modes (Appendix E.2). Despite this, we observed that in the initial stages of training, all exploration strategies found occasional samples from the distant peak. The reason MetaGFN is the only method that converges is that Adaptive Metadynamics manages to consistently sample the distant peak, even if the on-policy starts to focus on the central modes. This keeps the replay buffer populated with samples from every reward peak during training, which eventually encourages the on-policy to sample from every mode. The small increase in the loss of MetaGFN around batch number $5\times 10^{3}$ happens because the on-policy distribution widens when Adaptive Metadynamics first discovers the distant peak. In Appendix E.2, we show further details of Adaptive Metadynamics in this environment and we compare different MetaGFN variants, with and without noise, and with and without trajectory regeneration. We confirm that the version of MetaGFN presented in Figure 2 (no added noise and always regenerate trajectories) is the most robust variant.

### 4.2 Grid environment

Figure: Figure 3: Grid Environment reward function.
Refer to caption: x3.png

We consider a two-dimensional environment, with state space $\mathcal{S}=\mathbb{R}^{2}\times\{t\in\mathbb{N},1\leq t\leq 3\}$. The source state is $s_{0}=(0,0,0)$ and trajectories terminate after exactly $3$ steps. Terminal states are $\mathcal{X}=\mathbb{R}^{2}\times\{3\}\cong\mathbb{R}^{2}$. The reward function is given by the sum of four symmetric Gaussians with means $\mu=(-7,-7),(-7,7),(7,7),(7,-7)$ and variances $\sigma^{2}=2$ (Figure 3). The forward and backward probability transition kernels are a mixture of $4$ bivariate Gaussian distributions with means and diagonal variance matrices, along with the flow $\hat{f}$, parameterised by an MLP. We consider the same exploration strategies and evaluation measures as for the Line Environment (see Appendix F for full experiment details).

Figure: Figure 4: The L1 difference between on-policy and reward distribution during training in the grid environment for different loss functions and exploration strategies. The mean is plotted with standard error over 10 repeats. DB - Detailed Balance loss, TB - Trajectory Balance loss, STB - Subtrajectory Balance loss.
Refer to caption: x4.png

The results (mean and standard deviation over $10$ random seeds) for each loss function and exploration strategy are shown in Figure 4. We see that for most loss functions and exploration strategies (except Thompson sampling with TB loss), the training curves converge to a low loss, indicating that all four modes of the grid environment are well-sampled. However, in all cases, MetaGFN converges faster than other exploration strategies. The fastest convergence occurs for MetaGFN with TB loss; after $10^{3}$ batches MetaGFN has reached a similar loss that noisy exploration reaches after $10^{4}$ batches and on-policy reaches after $\sim 3\times 10^{4}$ batches. Meanwhile, the loss curves have lower error indicating more stable training with MetaGFN in this environment.

### 4.3 Alanine dipeptide environment

Figure: (a)
Refer to caption: x5.png

One application of continuous GFlowNets is molecular conformation sampling Volokhova et al. (). Here, we train a GFlowNet to sample conformational states of alanine dipeptide (AD), a small biomolecule of $23$ atoms that plays a key role in modelling backbone dynamics of proteins Hermans (). The metastable states of AD can be distinguished in a two-dimensional CV space of $\phi$ and $\psi$, the two backbone dihedral angles. The resulting free energy surface for AD in explicit water, $V(\phi,\psi)$, obtained after extensive sampling long molecular dynamics simulation is shown in Figure 5(a). The metastable states (energy minima), in increasing energy, are $P_{||}$, $\alpha_{R}$, $C_{5}$, $\alpha^{\prime}$, $\alpha_{L}$ and $\alpha_{D}$.

The state space is $\mathcal{S}=\mathbb{T}^{2}\times\{t\in\mathbb{N},1\leq t\leq 3\}$. The source state is $s_{0}=P_{||}=(-1.2,2.68)$ and trajectories terminate after exactly $3$ steps. Terminal states are $\mathcal{X}=\mathbb{T}^{2}\times\{3\}\cong\mathbb{T}^{2}$. The reward density is given by the Boltzmann weight, $r(\phi,\psi)=\frac{1}{Z}\exp(-\beta V(\phi,\psi))$, where $Z$ is the normalisation constant. The forward and backward probability transition kernels are defined as a mixture of $3$ bivariate von Mises distributions, parameterised through an MLP. We consider the same exploration strategies and evaluation measures as for the Line Environment (see Appendix G for full experimental details).

Figure: Figure 6: The L1 difference between on-policy and reward distribution during training in the alanine dipeptide environment for different loss functions and exploration strategies. The mean is plotted with a standard error over 10 repeats. DB - Detailed Balance loss, TB - Trajectory Balance loss, STB - Subtrajectory Balance loss.
Refer to caption: x7.png

Figure: Figure 7: Learned on-policy distribution for TB on-policy and TB MetaGFN training runs. The colour bar shows the probability density. Red histograms show the marginal distribution along the angular coordinates. Black curves show the marginal distributions of the ground truth. In the best case, MetaGFN is able to learn the $\alpha_{L}$ mode. In the worst case, MetaGFN fails to converge. On-policy training, although more consistent, fails to learn to sample from the $\alpha_{L}$ mode.
Refer to caption: x8.png

The results (mean and standard deviation over $10$ random seeds) for each loss function and exploration strategy are shown in Figure 6. For each loss function, models trained with MetaGFN generally converge to a lower minimum error than all other exploration strategies. For TB loss, however, the average L1 error is marginally higher than on-policy training, but this conceals the fact that the best-case error is smaller. Thus, to better understand this result, we examine the best and worst training runs (as measured by L1 error) for TB on-policy and TB MetaGFN, shown in Figure 7. We see that the best run trained with metadynamics can sample from the rare $\alpha_{L}$ minima, unlike the on-policy run. In the worst run, MetaGFN fails to converge (although this is rare; only one of 10 runs failed). In Table 1, we quantify how often the different AD modes were correctly sampled over the different repeats (a mode is correctly sampled if the on-policy distribution also has a mode within the correct basin of attraction). The only mode not correctly sampled by any method is $\alpha_{D}$, which has a natural abundance approximately $10$ times less frequent than $\alpha_{L}$. We see that TB loss with MetaGFN is the only combination that can consistently sample the majority of modes, whilst noisy exploration and Thompson Sampling both perform worse than on-policy in this environment.

**Table 1: Number of correct samples of AD modes in trained GFlowNets over 10 independent repeats for DB, STB, and TB loss functions. OP - On-policy and MD - MetaGFN. The $\alpha_{D}$ mode wasn’t sampled in any model due to its low natural frequency.**
|  | DB | STB | TB |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
|  | OP | MD | OP | MD | OP | MD |
| $P_{||}$ | 1 | 7 | 6 | 5 | 10 | 8 |
| $\alpha_{R}$ | 6 | 9 | 7 | 10 | 10 | 9 |
| $C_{5}$ | 2 | 7 | 5 | 6 | 10 | 8 |
| $\alpha^{\prime}$ | 6 | 9 | 5 | 10 | 5 | 9 |
| $\alpha_{L}$ | 0 | 1 | 1 | 0 | 0 | 8 |

## 5 Limitations

For metadynamics to be an effective sampler, the CVs must be low-dimensional and bounded, properties that were satisfied in both our experimental environments. Therefore, it is necessary to either know such CVs in advance, assuming they exist or learn them automatically from data Sidky et al. (). An alternative approach would be to learn CVs adaptively by parameterising the CV function by a neural network and updating its parameters by back-propagating through the GFlowNet loss when training on MetaGFN trajectories. A final improvement could be to replace the metadynamics algorithm itself with a variant with smoother convergence properties, such as well-tempered metadynamics Barducci et al. () or on-the-fly probability enhanced sampling (OPES) Invernizzi (). We leave these extensions for future work.

## 6 Conclusions

While exploration strategies for discrete Generative Flow Networks (GFlowNets) have received extensive attention, the methodologies for continuous GFlowNets remain relatively underexplored. To address this gap, we illustrated how metadynamics, a widely used enhanced sampling technique in molecular dynamics, can be adapted as an effective exploration strategy for continuous GFlowNets.

In molecular dynamics, atomic forces can be computed as the gradient of the potential, whereas continuous GFlowNets tackle problems where the reward function is a black box and gradients are inaccessible. We demonstrated how the method could be adapted by updating a kernel density estimate of the reward function on-the-fly, and proved that this is guaranteed to explore the space in an appropriate limit. Our empirical investigations show that MetaGFN offers a computationally efficient means to explore new modes in environments where prior knowledge of collective variables exists. Importantly, this work advocates an approach wherein techniques derived from molecular modelling can be adapted for machine learning tasks. Looking ahead, we anticipate that this could be a fruitful area of cross-disciplinary research, where existing ideas from the enhanced sampling literature can find applications in a broad range of generative modelling and reinforcement learning tasks.

## Appendix A Loss functions

For a complete trajectory $\tau$, the detailed balanced loss (DB) is

$$ $L_{DB}(\tau)=\sum_{t=0}^{n-1}\left(\log\frac{\hat{f}(s_{t};\theta)\hat{p}_{F}( s_{t},s_{t+1};\theta)}{\hat{f}(s_{t+1};\theta)\hat{p}_{B}(s_{t+1},s_{t};\theta )}\right)^{2},$ $$

where $\hat{f}(s_{t+1};\theta)$ is replaced with $r(s_{n})$ if $s_{n}$ is terminal.

The subtrajectory balance loss (STB) is

$$ $L_{STB}(\tau)=\frac{\sum_{0\leq i<j\leq n}\lambda^{j-1}\mathcal{L}_{TB}(\tau_{ i:j})}{\sum_{0\leq i<j\leq n}\lambda^{j-i}},$ $$

$$ $\mathcal{L}_{STB}(\tau_{i:j})\vcentcolon=\left(\log\frac{\hat{f}(s_{i};\theta) \prod_{t=i}^{j-1}\hat{p}_{F}(s_{t+1}|s_{t};\theta)}{\hat{f}(s_{j};\theta)\prod _{t=i+1}^{j}\hat{p}_{B}(s_{t-1}|s_{t};\theta)}\right)^{2},$ $$

where $\hat{f}(s_{j};\theta)$ is replaced with $r(s_{j})$ if $s_{j}$ is terminal. In the above, $\lambda<0$ is a hyperparameter. The limit $\lambda\rightarrow 0^{+}$ leads to average detailed balance. The $\lambda\rightarrow\infty$ limit gives the trajectory balance objective. We use $\lambda=0.9$ in our experiments.

## Appendix B Langevin dynamics

Langevin dynamics (LD), is defined through the Stochastic Differential Equation (SDE):

$$ $\displaystyle\mathrm{d}x=M^{-1}p\mathrm{d}t$ (3) $\displaystyle\mathrm{d}p=F(x)\mathrm{d}t-\gamma p\mathrm{d}t+\sqrt{2\gamma \beta^{-1}}M^{1/2}\mathrm{d}W.$ (4) $$

In the above, $x,p\in\mathbb{R}^{D}$ are vectors of instantaneous position and momenta respectively, $F\vcentcolon\mathbb{R}^{D}\rightarrow\mathbb{R}^{D}$ is a force function, $W(t)$ is a vector of $D$ independent Wiener processes, $M\in\mathbb{R}^{D}\times\mathbb{R}^{D}$ is a constant diagonal mass matrix, and $\gamma,\beta>0$ are constant scalars which can be interpreted as a friction coefficient and inverse temperature respectively. In conventional Langevin dynamics, the force function is given by the gradient of the potential energy function, $F=-\nabla V$, where $V\vcentcolon\mathbb{R}^{D}\rightarrow\mathbb{R}$ and the dynamics are ergodic with respect to the Gibbs-Boltzmann density

$$ $\rho_{\beta}(x,p)\propto e^{-\beta H(x,p)},$ $$

where $H(x,p)=p^{T}M^{-1}p/2+V(x)$ is the Hamiltonian. Since the Hamiltonian is separable in position and momenta terms, the marginal Gibbs-Boltzmann density is position space is simply $\rho_{\beta}(x)\propto e^{-\beta V(x)}$.

## Appendix C Proofs

###### Lemma C.1 .

Let $(f_{n}(x))$ and $(g_{n}(x))$ be sequences of real functions where $\lim_{n\rightarrow\infty}f_{n}(x)=\infty$, $\lim_{n\rightarrow\infty}g_{n}(x)=\infty$ and $\lim_{n\rightarrow\infty}\frac{f_{n}(x)}{g_{n}(x)}=h(x)$. Then, for all $\epsilon>0$, we have $\lim_{n\rightarrow\infty}\frac{f_{n}(x)}{g_{n}(x)+\epsilon}=h(x)$.

###### Proof.

$$ $\lim_{n\rightarrow\infty}\frac{f_{n}(x)}{g_{n}(x)+\epsilon}=\lim_{n\rightarrow \infty}\frac{f_{n}(x)}{g_{n}(x)}\frac{1}{1+\epsilon/g_{n}(x)}$ $$

and the right-hand side is the product of two functions whose limit exists so, by the product rule of limits

$$ $\lim_{n\rightarrow\infty}\frac{f_{n}(x)}{g_{n}(x)}\lim_{n\rightarrow\infty} \frac{1}{1+\epsilon/g_{n}(x)}=h(x)\cdot 1=h(x),$ $$

so done.
∎

###### Lemma C.2 .

Let $(X_{i})$ be a sequence of continuous random variables that take values on a bounded domain $D\subset\mathbb{R}^{d}$ that asymptotically approaches the uniform random variable $U$ on $D$, i.e. $X_{i}\rightarrow U$ uniformly. Further, suppose

$$ $h(x)\vcentcolon=\frac{\sum_{i=1}^{\infty}f(x_{i})g(x,x_{i})}{\sum_{i=1}^{ \infty}g(x,x_{i})}$ $$

exists, where $x_{i}\in D$ is a sample from $X_{i}$ and $f(x)$ and $g(x,x^{\prime})$ are analytic functions on $D$ and $D\times D$ respectively. Then,

$$ $h(x)=\frac{\sum_{i=1}^{\infty}f(u_{i})g(x,u_{i})}{\sum_{i=1}^{\infty}g(x,u_{i} )},$ $$

where the $u_{i}$ are samples from $U$. We make no assumption of independence of samples.

###### Proof.

Fix a probability space $(\Omega,\mathcal{F},P)$ on which $(X_{i})$ and $U$ are defined. Recall that a continuous random variable $X$ that takes values on $D\subset\mathbb{R}^{d}$ is a measurable function $X:\Omega\rightarrow D$ where $(D,\mathcal{B})$ is a measure space and $\mathcal{B}$ is the Borel $\sigma$-algebra on $D$. Let $\omega\subset\Omega$ denote an arbitrary element of the sample space. The requirement that $X_{i}\rightarrow U$ uniformly can be written formally as:

$$ $\forall\epsilon>0,\exists N(\epsilon)\text{ s.t. }\forall i>N(\epsilon), \forall\omega\subset\Omega,|X_{i}(\omega)-U(\omega)|<\epsilon.$ $$

We prove the Lemma by showing that equality holds for all possible sequences of outcomes $\omega_{1},\omega_{2},\dots$. That is, we prove:

$$ $\frac{\sum_{i=1}^{\infty}f(X_{i}(\omega_{i}))g(x,X_{i}(\omega_{i}))}{\sum_{i=1 }^{\infty}g(x,X_{i}(\omega_{i}))}=\frac{\sum_{i=1}^{\infty}f(U(\omega_{i}))g(x ,U(\omega_{i})))}{\sum_{i=1}^{\infty}g(x,U(\omega_{i})))}.$ (5) $$

Since these are ratios of infinite series, to prove their equality it is sufficient to show that the numerator of the LHS is asymptotically equivalent to the numerator of the RHS and that the denominator of the LHS is asymptotically equivalent to the denominator of the RHS. Recall that two sequences of real functions $(a_{n})$ and $(b_{n})$ are asymptotically equivalent if $\lim_{n\rightarrow\infty}\frac{a_{n}(x)}{b_{n}(x)}=c$ where $c$ is a constant. First, we prove that this holds with

$$ $a_{n}\vcentcolon=\sum_{i=1}^{n}f(X_{i}(\omega_{i}))g(x,X_{i}(\omega_{i}))$ (6) $$

and

$$ $b_{n}\vcentcolon=\sum_{i=1}^{n}f(U(\omega_{i}))g(x,U(\omega_{i}))).$ (7) $$

We write

$$ $\frac{a_{n}}{b_{n}}=\frac{\sum_{i=1}^{N(\epsilon)}f(X_{i}(\omega_{i}))g(x,X_{i }(\omega_{i}))+\sum_{i=N(\epsilon)+1}^{n}f(X_{i}(\omega_{i}))g(x,X_{i}(\omega_ {i}))}{\sum_{i=1}^{N(\epsilon)}f(U(\omega_{i}))g(x,U(\omega_{i})))+\sum_{i=N( \epsilon)+1}^{n}f(U(\omega_{i}))g(x,U(\omega_{i})))}.$ $$

Dividing by $\sum_{i=N(\epsilon)+1}^{n}f(U(\omega_{i}))g(x,U(\omega_{i})))$ and taking the limit $n\rightarrow\infty$ we have

$$ $\lim_{n\rightarrow\infty}\frac{a_{n}}{b_{n}}=\lim_{n\rightarrow\infty}\frac{ \sum_{i=N(\epsilon)+1}^{n}f(X_{i}(\omega_{i}))g(x,X_{i}(\omega_{i}))}{\sum_{i= N(\epsilon)+1}^{n}f(U(\omega_{i}))g(x,U(\omega_{i})))}.$ $$

Since $f$ and $g$ are analytic and $i>N(\epsilon)$ for all terms in the sums we have, by Taylor expansion, $f(X_{i}(\omega_{i}))=f(U(\omega_{i}))+O(\epsilon)$ and $g(x,X_{i}(\omega_{i}))=g(x,U(\omega_{i}))+O(\epsilon)$, hence

$$ $\lim_{n\rightarrow\infty}\frac{a_{n}}{b_{n}}=\lim_{n\rightarrow\infty}\left(1+ \frac{nO(\epsilon)}{\sum_{i=N(\epsilon)+1}^{n}f(U(\omega_{i}))g(x,U(\omega_{i} )))}\right)=1+\lim_{n\rightarrow\infty}\frac{nO(\epsilon)}{O(n)}=1+O(\epsilon).$ $$

Finally, since $\epsilon$ can be made arbitrarily small by partitioning the sum at a $N(\epsilon)$ that is sufficiently large, we conclude that $\lim_{n\rightarrow\infty}\frac{a_{n}}{b_{n}}=1$, hence $(a_{n})$ and $(b_{n})$ as defined in (6) and (7) are asymptotically equivalent. By a similar argument, it can be shown that

$$ $c_{n}\vcentcolon=\sum_{i=1}^{n}g(x,X_{i}(\omega_{i}))$ $$

and

$$ $d_{n}\vcentcolon=\sum_{i=1}^{n}g(x,U(\omega_{i})))$ $$

are also asymptotically equivalent. This proves (5).

∎

Below, we present the proof of Theorem 3.1 that appears in the main text.

###### Proof.

For concreteness, throughout this proof we assume that the kernel function is a Gaussian. We explain at the appropriate stage in the proof, indicated by (*), how this assumption can be relaxed.

First we take the $t\rightarrow\infty$ limit. Since the log function is continuous, the limit and log can be interchanged and we have

$$ $\lim_{t\rightarrow\infty}\hat{V}(x,t)=-\frac{1}{\beta^{\prime}}\log\left(\lim_ {t\rightarrow\infty}\left(\frac{\hat{R}(x,t)}{\hat{N}(x,t)+\epsilon}\right)+ \epsilon\right).$ $$

Recall the uniform time discretisation $t_{n}=n\Delta t$ of metadynamics (Algorithm 1). Thus, we can write

$$ $\hat{R}(x,t_{n})=\sum_{i=1}^{n}r(x_{i})\exp{\left(-\sum_{i=1}^{d}\frac{(z_{i}( x)-z(x_{i}))^{2}}{2{\sigma}_{i}^{2}}\right)},$ (8) $$

$$ $\hat{N}(x,t_{n})=\sum_{i=1}^{n}\exp{\left(-\sum_{i=1}^{d}\frac{(z_{i}(x)-z(x_{ i}))^{2}}{2{\sigma}_{i}^{2}}\right)}.$ (9) $$

Since the domain is bounded, we know that for fixed $x$, both (8) and (9) have limit at infinity, i.e. $\lim_{t\rightarrow\infty}\hat{R}(x,t)=\infty$ and $\lim_{t\rightarrow\infty}\hat{N}(x,t)=\infty$. Hence, by Lemma C.1, we have

$$ $\lim_{t\rightarrow\infty}\frac{\hat{R}(x,t)}{\hat{N}(x,t)+\epsilon}=\lim_{t \rightarrow\infty}\frac{\hat{R}(x,t)}{\hat{N}(x,t)},$ $$

provided the limit on the RHS exists. Next, we show that this limit exists by computing it explicitly.
The limit can be written

$$ $\lim_{t\rightarrow\infty}\frac{\hat{R}(x,t)}{\hat{N}(x,t)}=\lim_{n\rightarrow \infty}\frac{\hat{R}(x,t_{n})}{\hat{N}(x,t_{n})}=\lim_{n\rightarrow\infty} \frac{\sum_{i=1}^{n}r(x_{i})\exp\left(-\sum_{i=1}^{d}\frac{(z_{i}-z(x_{i}))^{2 }}{2{\sigma}_{i}^{2}}\right)}{\sum_{i=1}^{n}\exp\left(-\sum_{i=1}^{d}\frac{(z_ {i}-z(x_{i}))^{2}}{2{\sigma}_{i}^{2}}\right)}.$ $$

Recall that metadynamics eventually leads to uniform sampling over the domain, independent of the potential. Hence, since $R$ and $z(x)$ are analytic, by Lemma C.2 we may replace the metadynamics samples $x_{i}$ with samples from a uniform distribution, denoted $u_{i}$:

$$ $\lim_{n\rightarrow\infty}\frac{\hat{R}(x,t_{n})}{\hat{N}(x,t_{n})}=\lim_{n \rightarrow\infty}\frac{\sum_{i=1}^{n}r(u_{i})\exp\left(-\sum_{i=1}^{d}\frac{( z_{i}-z(u_{i}))^{2}}{2{\sigma}_{i}^{2}}\right)}{\sum_{i=1}^{n}\exp\left(-\sum_ {i=1}^{d}\frac{(z_{i}-z(u_{i}))^{2}}{2{\sigma}_{i}^{2}}\right)}.$ $$

In the limit, the ratio of sums with uniform sampling becomes a ratio of integrals:

$$ $\lim_{n\rightarrow\infty}\frac{\hat{R}(x,t_{n})}{\hat{N}(x,t_{n})}=\frac{\int_ {D}r(x^{\prime})\exp\left(-\sum_{i=1}^{d}\frac{(z_{i}-z(x^{\prime}_{i}))^{2}}{ 2{\sigma}_{i}^{2}}\right)\mathrm{d}x^{\prime}}{\int_{D}\exp\left(-\sum_{i=1}^{ d}\frac{(z_{i}-z(x^{\prime}_{i}))^{2}}{2{\sigma}_{i}^{2}}\right)\mathrm{d}x^{ \prime}},$ $$

where $D\subset\mathbb{R}^{d}$ is the domain. The limit is therefore a (scaled) convolution of the reward function with a Gaussian in the collective variable space with width vector $\sigma$. Taking the limit $\sigma_{i}\rightarrow 0$ for all $i\in\left\{1,2,\dots,d\right\}$, the Gaussian convergences to a delta distribution in the collective variable space and we have

$$ $\lim_{\sigma\rightarrow 0}\lim_{n\rightarrow\infty}\frac{\hat{R}(x,t_{n})}{ \hat{N}(x,t_{n})}=\int_{D}r(x^{\prime})\delta(z-z(x^{\prime}))\mathrm{d}x^{ \prime}.$ $$

(*) This step also holds for any kernel that becomes distributionally equivalent to a Dirac delta function in the limit that its variance parameter goes to zero. In particular, it also holds for the von Mises distribution that we use in our alanine dipeptide experiment in $\mathbb{T}^{2}$.

Finally, we take the limit $\epsilon\rightarrow 0$ to obtain

$$ $\displaystyle\lim_{\epsilon\rightarrow 0}\lim_{\sigma\rightarrow 0}\lim_{t \rightarrow\infty}\hat{V}(x,t)$ $\displaystyle=-\frac{1}{\beta^{\prime}}\lim_{\epsilon\rightarrow 0}\log\left( \int_{D}r(x^{\prime})\delta(z-z(x^{\prime}))\mathrm{d}x^{\prime}+\epsilon\right)$ (10) $\displaystyle=-\frac{1}{\beta^{\prime}}\int_{D}\log\left(r(x^{\prime})\right) \delta(z-z(x^{\prime}))\mathrm{d}x^{\prime}$ (11) $\displaystyle=\int_{D}V(x^{\prime})\delta(z-z(x^{\prime}))\mathrm{d}x^{\prime} \vcentcolon=V(z),$ (12) $$

where we have used the definition $V(x^{\prime})=-\frac{1}{\beta^{\prime}}\log(r(x^{\prime}))$ and in the last step we used the definition of the marginal potential energy in the collective variable space. If $z(x)$ is invertible, then the delta function simplifies to a delta function in the original space and we obtain the original potential instead of the marginal potential.
∎

###### Lemma C.1 .

###### Proof.

###### Lemma C.2 .

###### Proof.

###### Proof.

## Appendix D Algorithms

Figure: Algorithm 2 Euler-Maruyama Langevin Dynamics Step

In the algorithm below, we present the variant of MetaGFN where we store Adaptive Metadynamics samples in the replay buffer and regenerate trajectories using the current backward policy when retrieving from the replay buffer. This is the variant we used in our experiments in the main text.

Figure: Algorithm 3 MetaGFN

## Appendix E Experiment details: line environment

### E.1 Experimental setup

Parameterisation We parameterise $\hat{p}_{F}$, $\hat{p}_{B}$ and the flow $\hat{f}$ through an MLP with 3 hidden layers, 256 hidden units per layer. We use the GELU activation function and dropout probability $0.2$ after each layer. This defines the torso of the MLP. Connecting from this common torso, the MLP has three single-layer, fully connected heads. The first two heads have output dimension $9$ and parameterise the $3$ means ($\mu$), standard deviations ($\sigma$) and weights ($w$) of the mixture of Gaussians for the forward and backward policies respectively. The third head has output dimension $1$ and parameterises the flow function $\hat{f}$. The mean and standard deviation outputs are passed through a sigmoid function and transformed so that they map to the ranges $\mu\in(-14,14)$ and $\sigma\in(0.1,1)$. The mixture weights are normalised with the softmax function. The exception to this parameterisation is the backward transition to the source state which is fixed to be the Dirac delta distribution centred on the source, i.e. $\hat{p}_{B}(s_{0}|s_{1};\theta)=\delta_{s_{0}}$. For the TB loss, we treat $\log Z_{\theta}$ as a separate learnable parameter.

Replay buffer The replay buffer has capacity for $10^{4}$ trajectories. Trajectories are stored in the replay buffer only if the terminal state’s reward exceeds $10^{-3}$. When drawing a replay buffer batch, trajectories are bias-sampled: $50\%$ randomly drawn from the upper $30\%$ of trajectories with the highest rewards, and the remaining $50\%$ randomly drawn from the lower $70\%$.

Figure: Figure 8: Exponential noise schedule.
Refer to caption: x9.png

Noisy exploration Noisy exploration is defined by adding an additional constant, $\bar{\sigma}$, to the standard deviations of the Gaussian distributions of the forward and backward policies. Specifically, the forward policy becomes $\hat{p}_{F}(s_{t},s_{t-1};\theta)=\sum_{i=1}^{3}w_{i}\mathcal{N}(\mu_{i},(
\sigma_{i}+\bar{\sigma})^{2})$, and similarly for the backward policy. We schedule the value of $\bar{\sigma}$ so that it decreases during training according to an exponential-flat schedule:

$$ $\bar{\sigma}=\begin{cases}\bar{\sigma}_{0}\left(e^{-2je/(B/2)}-e^{-2e}\right) \;\;&j<B/2\\ 0\;\;&j\geq B/2,\end{cases}$ (13) $$

where $j\in(1,\dots,B)$ is the batch number and $\bar{\sigma}_{0}=2$ is the initial noise, plotted in Figure 8.

Thompson Sampling We use $10$ heads with the bootstrapping probability parameter set to $0.3$.

MetaGFN We use $\Delta t=0.05$, $n=2$, $\beta=1$, $\gamma=2$, $w=0.15$, $\sigma=0.1$, $\epsilon=10^{-3}$. The domain of Adaptive Metadynamics is restricted to $[-5,23]$ and reflection conditions are imposed at the boundary. The bias and KDE potentials are stored on a uniform grid with grid spacing $0.01$. Initial metadynamics samples are drawn from a Gaussian distribution, mean 0 0 and variance $1$, and initial momenta from a Gaussian distribution, mean 0 0 and variance $0.5$.

Training parameters In all experiments, we use batch size $b=64$ and for $B=10^{5}$ batches. We use a learning rate with a linear schedule, starting at $10^{-3}$ and finishing at 0 0. For the TB loss, we train the $\log Z_{\theta}$ with a higher initial learning rate of $10^{-1}$ (also linearly scheduled). For the STB loss, we use $\lambda=0.9$, a value that has worked well in the discrete setting Madan et al. []. We use the Adam optimiser with gradient clipping. For all loss functions, we clip the minimum log-reward signal at $-10$. This enables the model to learn despite regions of near-zero reward between the modes of $r(x)$.

Evaluation The L1 error between the known reward distribution, $\rho(x)=r(x)/Z$, and the empirical on-policy distribution, denoted $\hat{\rho}(x)$, estimated by sampling $10^{4}$ on-policy trajectories and computing the empirical distribution over terminal states. Specifically, we compute

$$ $\text{error}=\frac{1}{2}\int_{-5}^{23}\left|\hat{\rho}(x)-\frac{r(x)}{Z}\right |\mathrm{d}x,$ (14) $$

where the integral is estimated by a discrete sum with grid spacing $0.01$. Note that this error is normalised such that for all valid probability distributions $\hat{\rho}(x)$, we have $0\leq\text{error}\leq 1$.

Compute resources Experiments are performed in PyTorch on a desktop with 32Gb of RAM and a 12-core 2.60GHz i7-10750H CPU. It takes approximately $1$ hour to train a continuous GFlowNet in this environment with $B=10^{5}$ batches. The additional computational expense of running Adaptive Metadynamics was negligible compared to the training time of the models.

Figure: Figure 9: Forward policy and replay buffer distributions after training for $10^{5}$ iterations with TB loss. MetaGFN is the only method that can consistently learn all three peaks.
Refer to caption: extracted/5805353/figures/TB_trajs_and_rb_2.png

### E.2 Results

On-policy distributions Figure 9 shows the forward policy and replay buffer distributions (with bias sampling) after training for $10^{5}$ iterations with TB loss. MetaGFN is the only method that can uniformly populate the replay buffer and consistently learn all three peaks.

Adaptive Metadynamics Figure 10(a) shows the L1 error between the density implied by the KDE potential and the true reward distribution during a typical training run. Figure 10(b) shows the resulting $\hat{V}$ and $V_{\text{bias}}$ at the end of the training. By (1), Adaptive Metadynamics has fully explored the central peaks. At (2), the third peak is discovered, prompting rapid adjustment of the KDE potential. By $2.5\times 10^{4}$ iterations, a steady state is reached and the algorithm is sampling the domain uniformly.

Figure: (a)
Refer to caption: x10.png

Comparing MetaGFN Variants We consider three MetaGFN variants. The first variant, always backwards sample, regenerates the entire trajectory using the current backward policy when pulling from the replay buffer. The second variant, reuse initial backwards sample, generates the trajectory when first added to the replay buffer and reuses the entire trajectory if subsequently sampled. The third variant, with noise, is to always backwards sample with noisy exploration as per equation (13). We plot the L1 policy errors in Figure 11. We observe that always backward sample is better than reuse initial backwards sample for all loss functions. For DB and TB losses, there is no evidence of any benefit of adding noise, whereas noise improves training for STB loss, performing very similarly to TB loss without noise.

Figure: Figure 11: Comparing MetaGFN variants.
Refer to caption: x12.png

## Appendix F Experiment details: grid environment

Parameterisation We parameterise $\hat{p}_{F}$, $\hat{p}_{B}$ and the flow $\hat{f}$ through an MLP with 3 hidden layers, 512 hidden units per layer, GELU activation function and dropout probability $0.2$, similar to the Line Environment. The first two heads have output dimension $24$ and parameterise the $8$ means, $12$ standard deviations and $4$ weights of the mixture of bivariate Gaussians. The third head has output dimension $1$ and parameterises the flow function $\hat{f}$. The means and standard deviations are mapped to the range $\mu\in(-15,15)$ and $\sigma\in(0.1,7)$ through sigmoid functions. Mixture weights are normalised with the softmax function.

Replay buffer Identical to the Line Environment replay buffer, except trajectories are only stored when the terminal state’s reward exceeds $10^{-4}$.

Noisy exploration We use the same noise profile as the Line Environment, equation (13). The noise $\bar{\sigma}$ is added equally to both dimensions of the standard deviation.

Thompson sampling We use $10$ heads with the bootstrap probability parameter set to $0.3$.

MetaGFN We use $\texttt{freqRB}=2$, $\texttt{freqMD}=10$, $\Delta t=0.35$, $n=3$, $\beta=1$, $\gamma=2$, $w=0.10$, $\sigma=2$. The bias and KDE potentials are stored on a uniform grid with grid spacing $0.075$. Initial samples are drawn from a Gaussian distribution, mean centred $(0,0)$, variance $\sigma^{2}=(1,1)$. Momenta are initialised to zero.

Training parameters The same as for the Line Environment, see Appendix E.1.

Evaluation The L1 error between the histogram of the terminal states of $10^{4}$ on-policy samples and the exact distribution is computed. $\text{error}=\frac{1}{2}\int_{-15}^{15}\int_{-15}^{15}\left|\hat{\rho}(x,y)-
\frac{r(x,y)}{Z}\right|\mathrm{d}x\mathrm{d}y$, estimated by a discrete sum with grid spacing $0.075$.

Compute resources Experiments are performed in PyTorch on a desktop with 32Gb of RAM and a 12-core 2.60GHz i7-10750H CPU. It takes approximately $10$ hours to train a continuous GFlowNet in this environment with $B=10^{5}$ batches. The additional computational expense of running Adaptive Metadynamics is less than $10\%$.

## Appendix G Experiment details: alanine dipeptide environment

Computing the Free Energy Surface To obtain a ground-truth free energy surface (FES) in $\phi$-$\psi$ space, we ran a 250ns NPT well-tempered metadynamics MD simulation of alanine dipeptide at temperature 300K ($\beta=0.4009$), pressure 1bar with the TIP3P explicit water model Jorgensen et al. []. We used the PLUMMED plugin Bonomi et al. [] for OpenMM Eastman et al. [] with the AMBER14 force field Salomon-Ferrer et al. [].

Parameterisation We parameterise $\hat{p}_{F}$, $\hat{p}_{B}$ and $\hat{f}$ through three heads of an MLP with 3 hidden layers with 512 hidden units per layer, with GeLU activations and dropout probability $0.2$, similar to the Line Environment. The first two heads have output dimensions of $15$, parameterising the $6$ means, $6$ concentrations, and $3$ weights of the mixture of von Mises policy. The third head has output dimension $1$ and parameterises the flow function $\hat{f}$. The means are mapped to the range $(-\pi,\pi)$ through $2\arctan(\cdot)$. Concentrations are parameterised in log space and passed through a sigmoid to map to the range $\ln(\kappa)\in(0,5)$. Mixture weights are normalised with the softmax function.

Replay buffer The replay buffer has capacity for $10^{4}$ trajectories. Trajectories are stored in the replay buffer only if the terminal state’s reward exceeds $10^{-10}$. When drawing a replay buffer batch, trajectories are bias-sampled: $50\%$ randomly drawn from the upper $30\%$ of trajectories with the highest rewards, and the remaining $50\%$ randomly drawn from the lower $70\%$.

Noisy exploration We use the same noise profile as the Line Environment, equation (13). The noise $\bar{\sigma}$ is now added to the concentration parameter $\kappa$. Concentration is related to standard deviation through $\sigma=\frac{1}{\kappa^{2}}$.

Thompson Sampling We use 10 heads with the bootstrap probability parameter set to 0.3.

MetaGFN We use $\texttt{freqRB}=2$, $\texttt{freqMD}=10$, $\Delta t=0.01$, $n=2$, $\beta=0.4009$, $\gamma=0.1$, $w=10^{-5}$, $\kappa=10$, $\epsilon=10^{-6}$. The bias and KDE potentials are stored on a uniform grid with grid spacing $0.1$. Initial samples are drawn from a Gaussian distribution, mean centred $P_{||}$, variance $\sigma^{2}=(0.1,0.1)$, and initial momenta from a Gaussian, mean $\mu=(0,0)$, variance $\sigma^{2}=(0.05,0.05)$.

Training parameters The same as for the Line Environment, see Appendix E.1.

Evaluation The L1 error of a histogram of on-policy samples, $\hat{\rho}(\phi,\psi)$, is computed via a two-dimensional generalisation of (14); $\text{error}=\frac{1}{2}\int_{-\pi}^{\pi}\int_{-\pi}^{\pi}\left|\hat{\rho}(
\phi,\psi)-\frac{r(\phi,\psi)}{Z}\right|\mathrm{d}\phi\mathrm{d}\psi$, estimated by a discrete sum with grid spacing $0.1$.

Compute resources Experiments are performed in PyTorch on a desktop with 32Gb of RAM and a 12-core 2.60GHz i7-10750H CPU. It takes approximately $10$ hours to train a continuous GFlowNet in this environment with $B=10^{5}$ batches. The additional computational expense of running Adaptive Metadynamics was less than $10\%$.

## Peer Reviews

confidence: 2
contribution: 3
initial_rating: 6
presentation: 3
questions: See the weaknesses above.
soundness: 3
strengths: - The theoretical results are sound and comprehensive.
- The research problem is fundamental and related to various subjects.
summary: This paper identifies that the exploration for continuous setting remains lacking in the context of GFlowNets. On the basis, it incorporates Adapted Metadynamics as an exploration strategy for continuous GFlowNets. Experiments demonstrate that the proposed method can accelerate convergence and provide more effective exploration.
weaknesses: - The research problem and research gap is not very clear in the introduction. Authors are encouraged to highlight the research gap clearly. Is there any prevailing works that conduct off-policy exploration in the continuous setting? I have found some related statements in the lines 60-61, but the narrative is not very clear in this paragraph such that it is difficult to identify the true research gap surely. 
- The research motivation is not very clear. As mentioned by authors, the exploration strategies in discrete setting can be adapted to the continuous setting. Authors should demonstrate the motivation of developing MetaGFN rather than adapting prevailing exploration strategies, by highlighting the unique advantage of it.
- The complexity and running cost should be analyzed or evaluated.

---

confidence: 2
contribution: 2
initial_rating: 5
presentation: 3
questions: The questions are the same as in the weaknesses section.
soundness: 3
strengths: The paper introduces a variant of metadynamics that enables explorations in black box rewards and continuous spaces. It proves that the method reduces to standard metadynamics in a limit and provides empirical evidence that MetaGFN outperforms existing GFlowNets exploration strategies. This paper is well-written and has clear structures.
summary: This paper investigates the exploration strategies for continous Generative Flow Networks (GFlowNets) by proposing a variant of metadynamics, termed Adapted Metadynamics. The proposed method, MetaGFN, applies to arbitrary black-box reward functions over continuous domains. The authors prove that Adapted Metadynamics is consistent and converges to standard metadynamics in a certain limit. They also empirically show that MetaGFN outperforms existing GFlowNet exploration strategies on continuous domains.
weaknesses: 1. The process for selecting the low-dimensional collective variables $z(x)=
(z_1(x),\cdots,z_d(x))$ is not clear. Could the authors give an example illustrating how to obtain these CVs?

2. If the CVs can only obtained from expert knowledge, does this limit the applicability of the method to certain domains?

3. The choice of hyperparameters of KDE such as Gaussian width $\sigma$ and Gaussian height $w$ is not fully explained. Could the authors give more details? 

4. Although the authors introduce adaptive metadynamics on pages 5-6, a more explicit breakdown of the differences and potential advantages of adaptive metadynamics over standard metadynamics would be helpful.

5. The experiments only reach a maximum dimension of 4 in the grid environment. Is this truly representative of high-dimensional cases? Expanding the experiments to higher dimensions would be more convincing.

6.  The terms "Adaptive Metadynamics" and "Adapted Metadynamics" are used interchangeably in the paper. If both terms refer to Algorithm 1, it would be helpful to choose one term consistently throughout to avoid potential confusion.

---

confidence: 4
contribution: 1
initial_rating: 3
presentation: 2
questions: - How does the method work for flow matching?
- What is the condition for terminating states in the hypergrid? In the work, I see $\mathcal{X} \approx R^d$, but to what extent does the approximation hold?
soundness: 3
strengths: - Connecting continuous GFlowNets and meta-dynamics is novel.
- Authors provide theoretical motivation for their approach.
- The proposed method works on the provided environments.
summary: The authors work on exploration for GFlowNets in the continuous setting. Specifically, they combine continuous GFlowNets with Metadynamics, a Langevin dynamics based exploration strategy. They validate their method on a few smaller scale tasks.
weaknesses: My biggest concern is that the authors fail to show their method's applicability in larger environments. The authors state this in their limitations, but then I feel the method loses its significance, especially since the novelty is rather limited. Even in the provided experiments, the results are not significantly better than the baselines. I would also like to see the runtime analysis of the baselines--this might make the work more appealing. Besides, while I understand the importance of theoretical nature of the writing, a intuitive explanation will greatly improve the quality of the work.

---

confidence: 3
contribution: 3
initial_rating: 5
presentation: 3
questions: 0) Some experimental details are missing, see Weaknesses.

1) Could the proposed approach be applied to diffusion sampling tasks, e.g. on environments from [2]? If yes, adding some to the experimental evaluation would further strengthen the paper.

2) [2] introduces an approach where Metropolis-adjusted Langevin algorithm is used to explore the space of terminal states, store the results in a replay buffer, and then use the backward policy to sample trajectories ending in points stored in the buffer. Thus it shares a lot of similarities with the proposed method. Do I understand correctly that it cannot be employed in your setup because MALA requires access to the reward gradient? I believe it is important to add a discussion about this to the paper, so the work is clearly positioned in comparison to previous litareture.

3) In the definition of Measurable pointed graph, line 122, is it enough to bound the number of steps required to be able to reach any measurable set to guarantee acyclicity of the environment? The construction in [1] explicitly states that for some $N$, the support of $\kappa^N\left(s_0, \cdot\right)$ should contain only the sink state.

References:

[2] Marcin Sendera, Minsu Kim, Sarthak Mittal, Pablo Lemos, Luca Scimeca, Jarrid Rector-Brooks, Alexandre Adam, Yoshua Bengio, Nikolay Malkin. Improved off-policy training of diffusion samplers. NeurIPS 2024
soundness: 3
strengths: This paper tackles a challenge that arises in GFlowNet training — mode exploration, which has received especially little attention in the literature in the case of continuous environments. Adapting metadynamics technique from molecular modelling, the paper falls into the important category of cross-disciplinary research.

The key strength of the paper in my opinion is thorough experimental evaluation in the presented environments. In addition to the proposed MetaGFN approach, paper presents the results for a number of baseline techniques, which were proposed in the previous works for discrete GFlowNets but in turn adapted by the authors to the continuous case. A faithful comparison is carried out, showing that MetaGFN has superior performance on average, but also clearly stating its shortcomings in some cases. I found Figure 5 really insightful.
summary: This paper adapts metadynamics technique from molecular modelling to improve mode exploration in continuous GFlowNets. The approach works in the setting of black-box reward distributions without access to reward gradients, employing kernel density estimates in a lower-dimensional collective variable space. The experimental evaluation is carried out on three continuous environments, showing that the proposed MetaGFN approach outperforms various existing GFlowNet exploration techniques.
weaknesses: I believe that the presentation of the proposed approach and the overall clarity of the paper can be greatly improved.

Without prior knowledge of metadynamics, it is challenging to understand the proposed approach from the text. Firstly, I suggest to move Section D of the Appendix to the main text, especially Algorithm 3, since it is crucial for understanding the overall structure of MetaGFN algorithm. Moreover, even though it is possible to understand the exact method from Algorithms 1, 2 and 3, I still have very little intuition about it. Before going into low-level details in Section 3, I would suggest adding a more high-level discussion explaining how the method works, some intuition behind it, and why it should improve exploration in continuous GFlowNets (Section 2.4 contains some, but it still doesn't give much high-level intuition). This would make the paper more accessible to a broader ML community.

In addition, some important details are unclear from the description of the experiments. Firstly, I failed to find in the text how collective variables are chosen for line and grid environments. The choice of collective variables is a crucial point in the algorithmic design of the proposed method, so emphasizing this is critical. Secondly, the clear descriptions of the choice of forward and backward kernels are missing. Especially little overall detail is given about grid environment. Is it the same as the one from [1]? It is possible that I missed some of these points while looking through appendix, but then it is one more reason to highlight them.

Next, from my understanding, the efficiency of the method directly depends on the choice of lower dimensional collective variable space. However, the dimensions of spaces of terminal states in all experiments are very low themselves (the maximum dimension is 4), so the big question is whether the proposed method can perform well in higher-dimensional tasks. Thus I suggest adding some higher-dimensional environment to the experiments. The method can still be interesting and viable if it can only perform well in lower dimensions, but then this should be clearly stated as a limitation, or experimentally demonstrated otherwise.

A minor detail, pdf works really slow when looking at Figure 4. I think reducing the density of the grids used to plot the training curves could help with it.

If all my concerns are addressed during rebuttal, I'm open to increasing my score.

References:

[1] Salem Lahlou, Tristan Deleu, Pablo Lemos, Dinghuai Zhang, Alexandra Volokhova, Alex Hernández-García, Léna Néhale Ezzine, Yoshua Bengio, Nikolay Malkin. A theory of continuous generative flow networks. ICML 2023

---

confidence: 5
contribution: 2
initial_rating: 3
presentation: 2
questions: 1. How does MetaGFN perform in more challenging exploration settings? This is crucial for practical applications but isn't addressed in the current experiments.
2. How does the method scale to higher-dimensional problems? The current experiments are limited to low-dimensional spaces.
soundness: 2
strengths: - The writing is clear and well-structured
- The methodology is explained in sufficient detail
- Addresses an important challenge in training GFlowNets
summary: This paper introduces MetaGFN, an exploration algorithm for continuous Generative Flow Networks (GFlowNets) that combines metadynamics with GFlowNets to improve exploration in continuous domains. The authors prove the consistency of their adapted metadynamics approach and conduct experiments to showcase the performance of the proposed MetaGFN method.
weaknesses: - Limited and unconvincing experimental evaluation:
  - The experimental evaluation relies exclusively on simple, toy environments that fail to capture the complexity and challenges of real-world applications, especially the line and Grid tasks with small scale. For example, the authors can consider the more complex and challenging molecule generation task and biological sequence design tasks from (Bengio et al., 2021) and (Jain et al., 2022) with high-dimensional and complex spaces. 
  - The authors have not demonstrated the method's effectiveness in scenarios where exploration is genuinely challenging or where reward signals are naturally rare
  - The results exhibit high variance (column 2, row 2 in column 3, rows 1-2 in column 4, rows 1-2 in column 5 in Fig. 4) and L1 loss values (all figures in Fig. 4), contradicting the paper's claims about robustness
- Insufficient empirical evidence for claims:
  - The paper claims that MetaGFN "is the most robust" (line 375) variant, yet this assertion is questionable given the high L1 loss values and large variances shown in the results (Fig. 4)
- Scalability concerns:
  - No evaluation in high-dimensional spaces, which is crucial for real-world applications
  - Missing discussion of potential limitations in high-dimensional settings
- Novelty concerns: 
  - The paper primarily combines two existing methods (metadynamics and GFlowNets), but the experimental results do not convincingly demonstrate advantages over simpler alternatives, and the practical utility of the method remains uncertain given the limited evaluation. Therefore, the contribution seems incremental without strong empirical support

Meta-review: This paper proposes MetaGFN, which adapts metadynamics for exploration in continuous GFlowNets through a novel approach using collective variables. While the reviewers acknowledged the paper's theoretical soundness and the potential value of improving exploration strategies for continuous GFlowNets, significant concerns were raised about the method's practical applicability and empirical validation. The primary limitations include the restriction to low-dimensional problems (maximum dimension of 4), the lack of convincing demonstrations in more challenging real-world scenarios beyond toy examples, and the high variance in experimental results that questions the claimed robustness of the method. Although the authors provided detailed responses and made efforts to improve the manuscript's clarity, particularly in explaining the intuition behind metadynamics and collective variables, the core concerns about dimensionality scaling and limited experimental validation remain unaddressed. The selection of collective variables also heavily relies on domain knowledge, which may limit the method's general applicability. 


Given these substantial limitations and the preliminary nature of the empirical results, I recommend rejection, encouraging the authors to strengthen the work by demonstrating effectiveness in higher-dimensional problems or more complex real-world applications.

Decision: Reject