Title: Streaming Bayes GFlowNets
Venue: NeurIPS 2024
Accepted: yes
Keywords: GFlowNets

Streaming VI
Abstract: Bayes' rule naturally allows for inference refinement in a streaming fashion, without the need to recompute posteriors from scratch whenever new data arrives. In principle, Bayesian streaming is straightforward: we update our prior with the available data and use the resulting posterior as a prior when processing the next data chunk. In practice, however, this recipe entails i) approximating an intractable posterior at each time step; and ii) encapsulating results appropriately to allow for posterior propagation. For continuous state spaces, variational inference (VI) is particularly convenient due to its scalability and the tractability of variational posteriors, For discrete state spaces, however, state-of-the-art VI results in analytically intractable approximations that are ill-suited for streaming settings. To enable streaming Bayesian inference over discrete parameter spaces, we propose streaming Bayes GFlowNets (abbreviated as SB-GFlowNets) by leveraging the recently proposed GFlowNets --- a powerful class of amortized samplers for discrete compositional objects. Notably, SB-GFlowNet approximates the initial posterior using a standard GFlowNet and subsequently updates it using a tailored procedure that requires only the newly observed data. Our case studies in linear preference learning and phylogenetic inference showcase the effectiveness of SB-GFlowNets in sampling from an unnormalized posterior in a streaming setting. As expected, we also observe that SB-GFlowNets is significantly faster than repeatedly training a GFlowNet from scratch to sample from the full posterior.

Streaming Bayes GFlowNets

Abstract

Bayes' rule naturally allows for inference refinement in a streaming fashion, without the need to recompute posteriors from scratch whenever new data arrives. In principle, Bayesian streaming is straightforward: we update our prior with the available data and use the resulting posterior as a prior when processing the next data chunk. In practice, however, this recipe entails i) approximating an intractable posterior at each time step; and ii) encapsulating results appropriately to allow for posterior propagation. For continuous state spaces, variational inference (VI) is particularly convenient due to its scalability and the tractability of variational posteriors. For discrete state spaces, however, state-of-the-art VI results in analytically intractable approximations that are ill-suited for streaming settings. To enable streaming Bayesian inference over discrete parameter spaces, we propose streaming Bayes GFlowNets (abbreviated as SB-GFlowNets) by leveraging the recently proposed GFlowNets - a powerful class of amortized samplers for discrete compositional objects. Notably, SB-GFlowNet approximates the initial posterior using a standard GFlowNet and subsequently updates it using a tailored procedure that requires only the newly observed data. Our case studies in linear preference learning and phylogenetic inference showcase the effectiveness of SB-GFlowNets in sampling from an unnormalized posterior in a streaming setting. As expected, we also observe that SB-GFlowNets is significantly faster than repeatedly training a GFlowNet from scratch to sample from the full posterior.

1 Introduction

One of the foundations of the Big Data revolution in the sciences and engineering is the use of streaming data that is continuously collected and meant to be processed as it arrives. Many of the large statistical models in use were first formulated for the batched i.i.d. data setting and updating such models in this setting is a challenge of its own, as it would naively require us to revisit all past data at each update to avoid forgetting. [19, 39] In this context, Bayesian inference appears as a natural starting point to learning in the streaming data setting due to its innate property of coherence [5], which allows learning can happen continuously, independently of how the data is chunked into packages or ordered. More specifically, given a prior distribution p ( θ ) and a data generating likelihood p ( y i | θ ) , the posterior distribution over a set of data p ( θ | y 1 , y 2 ) ∝ p ( y 2 | θ ) p ( y 1 | θ ) p ( θ ) , can be written as p ( y 2 | θ ) p ( θ | y 1 ) , where first we compute the posterior over y 1 and then used as a prior to compute the posterior over y 2 . As conveniently summarized by Lindley [33]: 'Today's posterior is tomorrow's prior".

Nonetheless, Bayesian inference is notoriously known for being hard to obtain closed-form solutions. The gold standard of approximate methods, Markov chain Monte Carlo (MCMC), requires that the prior and likelihood distributions probability density/mass functions can be evaluated, however,

as it can only obtain samples from posterior, using the previous posterior as the prior of the next time-step requires additional work [6]. Thus, variational inference (VI), another popular approximate Bayes method, appears as the best fit as its foundation lies in directly parameterizing the approximate posterior distribution instead of relying on empirical distributions of samples.

Importantly, many problems of interest are built upon a discrete set of parameters. In Bayesian phylogenetic inference (BPI), for example, we are concerned with topologies of phylogenetic trees describing the evolutionary genetic history of a population. This is a especially compelling application of streaming Bayes, allowing researchers to update posteriors over the phylogenetic trees as they decode new nucleobases in genetic sequences - without reprocessing previously decoded nucleobases. In practice, phylogenetic analyses might involve hundreds of thousands of nucleobases.

Nonetheless, popular methods for VI over discrete posteriors typically rely on gradient-based optimization (e.g., to maximize evidence lower bounds), requiring the modeling of discrete parameters as transformed versions of latent continuous ones [20, 25, 36]. For methods using VI, a discrete posterior distribution with support over a set of size N would require variational posteriors of dimension N , implying either the storage of large covariance matrices of order N 2 , in the case of continuous reparameterizations, or the use of massively simplifying assumptions such as mean-field, reducing the expressivity of the variational posterior. As an example of support size for discrete distributions, the number of graphs with N nodes grows asymptotically as √ 2 N ( N -1) / N ! [16].

In this work, we leverage Generative Flow Networks (GFlowNets) [2, 3, 30] to efficiently address the implementation of approximate Bayesian models defined on a discrete set of parameters within a streaming data setting. In summary, GFlowNets are a family of amortized VI methods for highdimensional discrete parameter spaces, that learn the policies of a finite-horizon Markov decision process (MDP) by minimizing a loss function enforcing a balance condition . The condition, in turn, provably ensures that the samples generated from the MDP are correctly distributed. Notably, despite their successful deployment in solving a wide range of problems ([11, 12, 22-24, 32, 34, 64]), previous approaches assumed that the target (posterior) distribution did not change in time. Hence, this is the first work handling the training of GFlowNets in dynamic environments.

More specifically, we propose two novel training schemes to enable GFlowNets on streaming settings. The first consists of directly enforcing a streaming balance condition, which induces a least-squares loss that can be optimized in an off-policy fashion, potentially avoiding issues such as mode collapse. Alternatively, we leverage the well-known relationship between GFlowNets and VI to develop an on-policy divergence-minimizing algorithm that often exhibits faster training convergence when the target distribution is not very sparse. We also analyze theoretically how local errors accumulate through posterior propagation, providing upper bounds on the approximation quality of models learned using both of our update schemes.

In summary, our main contributions are:

We propose a streaming balance condition and a corresponding provably correct algorithm enabling the training of GFlowNets in a streaming data setting (Algorithm 1), without the need to revisit past data;

We devise an alternative VI algorithm employing low-variance gradient estimators to train to update GFlowNets in streaming fashion (Section 3). ;

We theoretically analyze how inaccuracies of individual updates propagate to subsequent posterior approximations, bounding the approximation errors accumulated through repeated streaming updates of the model (Section 4);

We demonstrate the correctness and effectiveness of our method in a series of streaming tasks, such as Bayesian linear preference learning with integer-valued features (Section 5.2) and online Bayesian phylogenetic inference (Section 5.3).

2 Preliminaries

Notation and definitions. Let X be a set of compositional objects (e.g., trees with nine nodes) and S ⊇ X be an extension of X (e.g., forests with nine nodes). Define G = ( S , A ) as a directed acyclic graph (DAG) with nodes in S , adjacency matrix A , and the following properties: (i) G is weakly connected; (ii) there is an unique state s o ∈ S \ X without any incoming edges; and (iii) there are no edges leaving x for every x ∈ X . We call S the set of states , G the state graph , and

X the set of terminal states ; s o is called the initial state . A forward policy over G is a function p F ( v, w ): S × S → R + such that it defines a probability distribution over S with support on v 's children in G . A backward policy is a forward policy over G ⊺ = ( S , A ⊺ ) . To alleviate notation, we denote the set of trajectories that ends in x as { τ | τ ⇝ x } , and define a probability distribution in this set as p F ( τ ) = ∏ i p F ( s i , s i +1 ) and the probability of the backwards trajectory condition on the end point x as p B ( τ | x ) = ∏ i p B ( s i +1 , s i ) .

GFlowNets. We define a GFlowNet as a tuple G = ( G , p F , p B , Z ) specifying a state graph G , forward p F and backward p B policies, and an estimate Z of a normalizing constant. A GFlowNet induces a probability distribution over X through its forward policy, p ⊤ ( x ) := ∑ τ ⇝ x p F ( τ ) . When there is no risk of ambiguity, we will generally omit G from this notation. We also drop Z when training the GFlowNet with a criterion that does not require it. Following the common convention, we parameterize the forward network by a neural network, and the backward policy at each state is left fixed as a uniform distribution.

The task a GFlowNet is trained for is to match its induced distribution p ⊤ ( x ) with a target distribution π ( x ) ∝ ˜ π ( x ) , where ˜ π ( x ) is an unnormalized distribution. In practice, the agreement between p ⊤ and π can be enforced by a balance condition over trajectories, avoiding references to p ⊤ . For instance, we may enforce trajectory balance (TB) condition, Zp F ( τ ) = p B ( τ | x )˜ π ( x ) for all τ ⇝ x , to estimate the parameters of the GFlowNet by minimizing

where ξ is a base policy with full support on the space of complete trajectories, i.e., trajectories starting at s o and terminating at s f . Then, we can use the following unbiased estimate to compute the GFlowNet's marginal distribution over terminal states p ⊤ :

For a thorough review of GFlowNets, please refer to [3].

GFlowNets and VI. Malkin et al. [38] showed that the training of GFlowNets may be framed as a variational inference on the target p B ( τ ) ∝ ˜ π ( x ) p B ( τ | x ) with p F as the proposal distribution. Through the data processing inequality, they showed that the minimization of the Kullback-Leibler (KL) divergence between trajectory-level distributions p F and p B incurred in a marginal p ⊤ over X matching the target, namely, D KL [ p F || p B ] ≥ D KL [ p ⊤ || π ] . Then, they demonstrated the equivalence between the gradients of the on-policy TB loss and the KL divergence, and that the latter is a sound learning objective for GFlowNets. Here, we build upon this construction to design a KL divergence-based algorithm for updating GFlowNets in a streaming context.

Problem description. We assume that the data is drawn from a distribution f ( ·| x ) indexed by a parameter x ∈ X and we define π ( x ) as a prior distribution over X . Let ( D i ) i ≥ 1 be a sequence of continually collected independent data sets and π t ( x |D 1 , . . . , D t ) ∝ f ( D 1 , . . . , D t | x ) π ( x ) := ˜ π t ( x ) be the posterior conditioned on the first t data sets. Note that, due to coherence, we can also write ˜ π t ( x ) = f ( D t | x )˜ π t -1 ( x ) .

3 Streaming Bayes GFlowNets

In this section, we propose streaming Bayes GFlowNets (SB-GFlowNets) as an extension of GFlowNets to handle streaming data. In essence, an SB-GFlowNet G t +1 avoids evaluating ˜ π t +1 ( x ) , which would require revisiting all the previous data, by maintaining an SB-GFlowNet G t which targets previous posterior ˜ π t ( x ) , allowing the target distribution of G t +1 to be f ( D t +1 | x ) p ( t ) ⊺ ( x ) , where p ( t ) ⊺ ( x ) is the induced distribution of G t , thus avoiding the storage of previous data sets.

We propose two strategies for matching the target distribution, enforcing the streaming balance (SB) condition (Section 3.1) and applying KL streaming updates (Section 3.2). Importantly, both methods require only newly observed data D t +1 and the previously trained model, G t to update the posterior approximation, without revisiting past data batches D 1: t . These conditions are extensions of TB condition and KL criterion proposed for the batched data case, each with its own strengths and weaknesses. Subsequently, we provide both a theoretical analysis (Section 4) and experimental validation (Section 5) for SB-GFLowNets.

3.1 Streaming balance condition.

In streaming settings,training a GFlowNet to sample from ˜ π t +1 ∝ f ( D t , . . . , D 1 | x ) π ( x ) by naively enforcing the TB condition entails numerous evaluations of the complete likelihood. However, assuming we have previously trained a GFlowNet to sample from ˜ π t ( x ) , we propose a more convenient balance condition that does not refer explicitly to previously-seen data.

Definition 1 (Streaming balance condition) . Let G t = ( G , p ( t ) F , p ( t ) B , Z t ) be a GFlowNet trained to sample proportionally to the posterior ˜ π t ( x ) . The streaming balance (SB) condition for the GFlowNet G t +1 = ( G , p ( t +1) F , p ( t +1) B , Z t +1 ) , conditioned on G t , is defined as in which f ( D t +1 | x ) is the model's likelihood. When the backward policy does not depend on t , e.g., is fixed as an uniform policy, Equation 3 reduces to Z t +1 p ( t +1) F ( τ ) = Z t p ( t ) F ( τ ) f ( D t +1 | x ) .

Intuitively, if we consider the TB conditions for the GFlowNets G t and G t +1 :

we can re-arrange the identity for G t to obtain the unnormalized posterior a time t , i.e., ˜ π t = Z t p ( t ) F / p ( t ) B and, then, apply this to the TB condition of G t +1 yielding Equation 3.

Naturally, the SB condition gives rise to a loss function by considering the log-squared ratio between the left- and right-hand sides of Equation 3, namely:

for a distribution ξ of full-support over trajectories. Importantly, Proposition 1 ensures that this approach results in a model sampling proportionally to ˜ π t +1 ( x ) . In a concurrent work, Venkatraman et al. [54, Eq. (8)] proposed a similar learning objective, termed relative trajectory balance , to update diffusion models according to a novel and arbitrary likelihood function.

Proposition 1 (Soundness of L SB ) . Assume p ( t ) ⊤ ( x ) ∝ ˜ π t ( x ) . Then, if L SB ( G t +1 ; G t ) = 0 , then p ( t +1) ⊤ ( x ) samples objects from X proportionally to ˜ π t +1 ( x ) .

Algorithm 1 describes the training of a SB-GFlowNet by minimizing L SB .

3.2 Divergence-based updates of SB-GFlowNets.

In practice, estimating log Z t by learning is not straight-forward and, if not done properly, may severely damage the quality of the approximation. Divergence-based objectives provide ways to train GFlowNets without relying on estimates of log Z t . Indeed, as we show in our experimental results (Section 5), minimizing a divergence-based objective often leads to a better approximation than conventional approaches. However, unlike TB which allows the use of arbitrary base policies, these approaches normally require the use of p ⊺ ( x ) as the base policy which may lead to mode collapse depending on target distributions [6, 38].

So, as discussed in Section 2, recall that a GFlowNet may equivalently be interpreted as a hierarchical variational model using p F ( τ ) as an approximation to p B ( τ ) ∝ ˜ π ( x ) p B ( τ | x ) allowing GFlowNets to be trained by minimizing any divergence between p F and p B [38]. Based on this insight, we propose the following divergence-based training criterion for streaming GFlowNets:

Definition 2 (Divergence-based streaming update) . Let G t = ( G , p ( t ) F , p ( t ) B ) be a GFlowNet balanced sampling proportional to ˜ π t . For G t +1 = ( G , p ( t +1) F , p ( t +1) B ) and target distribution π t +1 , define the unnormalized distribution p ( τ ) ∝ p ( t ) F ( τ ) f ( D t +1 | x ) over trajectories. Then, if C = denotes equality up to an additive constant,

is called the KL's streaming criterion .

Note that when L KL vanishes, p ( t +1) F ( τ ) ∝ p ( t ) F ( τ ) f ( D t +1 | x ) for all τ ⇝ x and x ∈ X . Then,

Consequently, minimizing L KL is a sound objective for learning to sample from π t +1 when p ( t ) ⊤ ( x ) = π t ( x ) . In Section 4, we quantitatively relate the accuracy of p ( t +1) ⊤ with that of p ( t ) ⊤ when using either Equation (4) or Equation (5) as learning objectives for the SB-GFlowNet.

Low-variance gradient estimators for D KL . Score matching estimates of the divergence's gradients, ∇ θ D KL , are of high variance, negatively affecting the convergence speed of the trained model [42, 46, 58]. To circumvent this issue, we rely upon the REINFORCE leave-one-out (RLOO) gradient estimator [41], which employs a sample-dependent control variate to significantly reduce the noiseness of the estimated gradients. More specifically, define γ ( τ ) = log p ( t +1) F ( τ ) / p ( t ) F ( τ ) f ( D t +1 | x ) and let τ 1 , . . . , τ k be independently sampled trajectories from p ( t +1) F . Also, denote by θ the parameters of p ( t +1) F . In this context, the RLOO estimator for the gradient of KL's streaming criterion is

̸

which is an unbiased estimate for ∇ θ E τ ∼ p t +1 F [ γ ( τ )] . Importantly, RLOO is straightforwardly represented as a vector-Jacobian product. Thus, it can be swiftly computed in standard reverse-mode autodifferentiation packages [47], adding a negligible computational overhead to the algorithm.

4 Theoretical analysis

While posterior propagation is computationally convenient, preventing training from scratch repeatedly, we should also expect errors to propagate through updates. To better understand the behavior of SB-GFlowNets, we analyze how choosing sub-optimal SB-GFlowNet at time t influences our approximation's quality at time t + 1 . We quantify goodness-of-fit of SB-GFlowNets' sampling distribution wrt target both in terms of TV and of their expected distance in log space. Since the SB loss and KL updates incur different parameterizations, we analyze separately the cases in which SB-GFlowNets are trained using each loss.

Overall, we establish that the accuracy of a SB-GFlowNet's sampling distribution p ( t +1) ⊤ at time t +1 depends on how close the new forward policy p ( t +1) F is from being optimal, on the size of the new data chunk D t +1 , and on the goodness-of-fit of the previous estimate p ( t ) ⊤ . As expected, our analysis suggests that the negative effects of poorly learned p ( t ) ⊤ are negligible when the size of a data chunk is relatively large. Also, when the previous SB-GFlowNet G t is a poor approximation to the true posterior π t , we discuss the benefits of using an earlier and potentially more accurate checkpoint G s with s < t as a reference for training G t +1 .

4.1 Analysis for SB loss-based training

We first analyze how errors propagate when training SB-GFlowNets by directly enforcing the SB condition, i.e., minimizing Equation 4. To this effect, recall using the SB loss implies learning an estimate of the partition function Z t as well as the forward policy p ( t ) F at each time step t . In particular, Proposition 2 measures the consequences of an inaccurately learned p ( t ) F and of insufficiently minimizing the SB loss on the ( t +1) th approximation.

Proposition 2. Let G t = ( G , p ( t ) F , p ( t ) B , Z t ) and G t +1 = ( G , p ( t +1) F , p ( t +1) B , Z t +1 ) be pair of GFlowNets. Let also π t +1 ( x ) ∝ π t ( x ) f ( D t +1 | x ) and recall that π : X → R + is our prior distribution. Defining Z ⋆ k := ∑ x π ( x ) ∏ k i =1 f ( D i | x ) for any k > 0 , and letting (ˆ p ( t +1) F , ˆ p ( t +1) B , ˆ Z t +1 ) be the optimal solution to Equation 4 satisfying the SB condition. Then,

As expected, Proposition 2 underlines the importance of starting with a good approximation from the t th stage and of properly solving the learning problem at the ( t +1) th stage in order to obtain an accurate approximation to π t +1 . In particular, this result reveals the detrimental effect of an inadequately estimated partition function on the quality of GFlowNet's streaming updates.

Complementary, Proposition 3 provides an upper bound the TV distance between p ( t +1) F and p ( t +1) B ( τ ) := p ( t +1) B ( τ | x ) π t +1 ( x ) . Besides corroborating the conclusions of Proposition 2, the explicit dependence of the TV upper bound on of D t +1 allows for analyzing it as a function of the newly observed data set's likelihood f ( D t +1 | x ) . In particular, consider the case in which |D t +1 | → ∞ . Then, since f ( D t +1 | x ) → 0 uniformly on x and, for many models, f ( D t +1 | ˆ x ) /f ( D t +1 | y ) →∞ for y / ∈ arg max x f ( D| x ) . Then, the accuracy of p ( t ) ⊤ becomes negligible to the overall approximation of the full posterior when the newly observed data set D t +1 is relatively large and the second term in Proposition 3 approximately vanishes.

Proposition 3. Let TV ( p, q ) := 1 2 ∑ x ∈X | p ( x ) -q ( x ) | be the TV distance between probability distributions p and q . Then, under the same setting of Proposition 2,

in which ˆ x ∈ arg max x ∈X f ( D t +1 | x ) is the maximum likelihood instance in X for D t +1 .

4.2 Analysis for KL streaming criterion-based training

We now turn to the case in which SB-GFlowNets are trained with KL streaming updates, sequentially minimizing Equation 5 - in which case we only learn the forward a backward policy networks. More specifically, Proposition 4 provides an upper bound on the TV distance between p ( t +1) ⊤ and π t +1 as a function of f ( D t +1 | x ) , p ( t ) ⊤ 's closeness to π t , and the learning objective.

Proposition 4. Recall that p ( τ ) ∝ p ( t ) F ( τ ) f ( D t +1 | x ) . Thus, under the notations of Proposition 2,

In spite of considering a different learning objective compared to Proposition 3, Proposition 4 reinforces the importance of properly optimizing the loss in each time step - due to its compounding impact on SB-GFlowNet's accuracy. Nonetheless, the quality of π t is roughly negligible when the observed data set f ( D t +1 |· ) dominates the shape of p ( t ) ⊤ ( · ) f ( D t +1 |· ) -and of π t ( · ) f ( D t +1 |· ) .

5 Experiments

We show that SB-GFlowNets can accurately learn the posterior distribution conditioned on the streaming data for one toy and two practically relevant applications. To start with, Section 5.1 illustrates the applicability of SB-GFlowNets in the context of set generation. Nextly, Section 5.2 showcases the correctness of SB-GFlowNets in the problem of Bayesian linear preference learning with integervalued features [8]. Then, Section 5.3 indicates the potential of SB-GFlowNets for carrying out online Bayesian inference over phylogenetic trees [13, 15, 59]. Finally, Section 5.4 touches on the problem of Bayesian structure learning with streaming data. To the best of our knowledge, SB-GFlowNets are the first method enabling variational inference over discrete parameter spaces within a streaming setting, as previous approaches either relied on intractable continuous relaxations [20, 25, 36] or scaled poorly in the size of the target's support [56]. We provide further implementation details regarding model configurations and experimental settings in Appendix C.

5.1 Set generation

Problem description. We first remark that, if R 1 , . . . , R k +1 are positive functions on X , the problem of streaming Bayesian inference may be generalized to the problem of sampling from

1

.

5

3

.

0

×

10

-

3

1

.

5

3

.

0

×

10

-

3

2

.

5

5

.

0

×

10

-

3

2

.

5

5

.

0

×

10

-

3

0

.

5

1

.

0

×

10

-

2

0

.

5

1

.

0

×

10

-

2

0

.

5

1

.

0

×

10

-

2

0

.

5

1

.

0

×

10

-

2

0

.

6

1

.

2

×

10

-

2

0

.

6

1

.

2

×

10

-

2

1

2

×

10

-

2

1

2

×

10

-

2

1

2

×

10

-

2

1

2

×

10

-

2

1

.

5

3

.

0

×

10

-

2

1

.

5

3

.

0

×

10

-

2

(

t

)

π

t

(

x

)

p

/latticetop

(

x

)

X proportionally to the product ∏ k +1 i =1 R i by having only access to R k +1 and to a GFlowNet approximating ∏ k i =1 R i . Indeed, in the context Bayesian inference, this correspondence is achieved by defining R i ( x ) := f ( D i | x ) for i > 1 and R 1 ( x ) = f ( D 1 | x ) π ( x ) . Thus, to demonstrate the effectiveness of SB-GFlowNets and highlight the benefits and pitfalls of each proposed training scheme, we consider the set generation task - a popular toy experiment in the GFlowNet literature [3, 44, 53]. In this task, X is the space of sets with S elements extracted from a fixed deposit I = { 1 , . . . , d } . Then, for i ∈ { 1 , . . . , K } , we define f i : I → R and let log R i ( x ) = ∑ e ∈ x f i ( e ) be the i th log-reward of a set x .

Experimental setup. We fix d = 24 and S = 18 . To define R i , we independently sample f i ( d ) from an uniform distribution on [ -5 , 5] . Correspondingly, we define R ( α ) i := R 1 / α i as the tempered reward, noting that R ( α ) i becomes increasingly sparse as α → 0 .

Results. Table 1 highlights the differences between our two training schemes in terms of the target's temperature. For relatively sparse targets (with α < 1 ), the benefits of off-policy sampling enacted by the minimization of the TB loss lead to a better performance relatively to

the KL-minimizing algorithm. Indeed, the on-policy exploration employed by the latter potentially hinders the model's capabilities of finding the sparsely distributed high-probability regions of the target, slowing down the training convergence and potentially leading to mode collapse [38]. Also, albeit one could implement an IS estimator for off-policy training under the KL criterion, our early experiments suggested that the increased gradient variance outweighed the gains from enhanced exploration. Ultimately, the choice of an appropriate learning objective for training GFlowNets will depend on the application. For training SB-GFlowNets, Figure 1 shows that both TB and KL minimization result in accurate approximations to the changing posterior.

±

5.2 Linear preference learning with integer-valued features

Problem description. Consider a collection of instances { y i } endowed with a transitive and complete preference relation ⪰ ; we assume that each y i ∈ { 1 , 0 } d is a binary feature vector. Naturally, the preference relation ⪰ is represented as a mapping u such that y ≻ y ′ if and only if u ( y ) > u ( y ′ ) ; uncovering u is the major goal of preference learning methods. Similarly to [8, 21], we here assume that u is a linear function, u ( y ) = x T y , for a integer-valued vector x and that we have access to a data set y = { ( y i 1 , y i 2 , p i ) } i denoting whether y i 1 is preferred to y i 2 ( p i = 1 ) or otherwise ( p i = 0 ) for a fixed individual. Subsequently, we define the probabilistic model

in which σ is the sigmoid function, and a prior distribution π ( x ) over x [18]; the intuition is that a larger difference between y i 1 and y i 2 's utilities makes the event in which y i 1 is preferred over y i 2 more likely. Our goal is to infer the individual's preferences based on the posterior π ( x | y ) for some unseen pair (˜ y 1 , ˜ y j ) , i.e., to estimate the predictive distribution p (˜ y | (˜ y 1 , ˜ y 2 ) , y ) .

Experimental setup. We assume x ∈ [[0 , 4]] d and d = 24 . At each iteration of the streaming process, we sample a novel subset of the 2 d -1 · (2 d -1) pairs of d -dimensional binary feature vectors and use them to update the GFlowNet. The prior on x is a factorized truncated Poisson with λ = 3 .

±

±

0

.

5

1

.

0

×

10

-

4

0

.

5

1

.

0

×

10

-

4

0

.

5

1

.

0

×

10

-

4

0

.

5

1

.

0

×

10

-

4

0

.

6

1

.

2

×

10

-

4

0

.

6

1

.

2

×

10

-

4

0

.

6

1

.

2

×

10

-

4

0

.

6

1

.

2

×

10

-

4

0

.

6

1

.

2

×

10

-

4

0

.

6

1

.

2

×

10

-

4

0

.

8

1

.

6

×

10

-

4

0

.

8

1

.

6

×

10

-

4

0

.

8

1

.

6

×

10

-

4

0

.

8

1

.

6

×

10

-

4

1

2

×

10

-

4

1

2

×

10

-

4

(

t

)

π

t

(

x

)

p

/latticetop

(

x

)

Results. Figure 2 shows SB-GFlowNet correctly samples form the posterior in a streaming setting. Note, in particular, that the GFlowNet maintains a high distributional accuracy throughout the streaming iterations. Correspondingly, the predictive log-likelihood of a fixed held out data set monotonically increases as a function of the amount of data consumed by the SB-GFlowNet, as shown in Figure 3; this behavior, also exhibited by the true posterior [55], emphasizes the similarity between the learned and targeted distributions.

5.3 Online Bayesian phylogenetic inference

Problem description. Bayesian phylogenetic inference (BPI) [29, 60] aims to infer structural properties of evolutionary trees given molecular sequences such as DNA and RNA. Formally, let { S 1 , . . . , S N } be a collection of N DNAsequences of size M , S i ∈ { A,T,C,G } M , one for each biological species. We define a phylogeny as a tuple T = ( t, b ) comprising a rooted tree topology t and its non-negative branch lengths b . In this context, a rooted tree topology is a complete binary tree having N labeled leaves corresponding to the considered species and N -1 unlabeled internal nodes corresponding to their ancestors. To carry out Bayesian inference over the space of phylogenies, we adopt Jukes & Cantor's nucleotide substitution model (JC69; [26]) to define a observational model over the observed DNA sequences; to calculate the likelihood, we use Felsenstein's algorithm [15].

Crucially, despite the popularity of BPI methods, the development of new sequencing technologies has swiftly led to the enlargement of already sizeable sequence databases. In this scenario, maintaining an up-to-date estimate of the posterior became an increasingly difficult task due to the necessity of re-estimating the full posterior from scratch every time a new batch of data is collected. In the following, we show that GFlowNets, which have recently shown SOTA performance in BPI [64], can also accurately update the posterior on phylogenetic trees given additional sequences.

Experimental setup. We generate the data by simulating JC69's model for a collection of N = 7 species and a substitution rate of λ = 5 · 10 -1 (see [59], Chapter 1). At each iteration, we sample a new DNA subsequence of size 10 2 for each species and update SB-GFlowNet according to Algorithm 1. For Table 2, |D 1 | = 10 3 and |D 2 | = 10 2 . The prior is an uniform distibution over phylogenies.

0

3

6

t

-

8

-

6

-

4

-

log

p

(T

true

|

x

1:

t

)

0

3

6

t

4

8

E

T

∼

p

/latticetop

[

‖

π

(T)

-

p

/latticetop

(T)

‖

1

]

×

10

-

5

rior's increasing sparsity due to the expanding data sets [50], which makes it more difficult for the GFlowNet to learn a good approximation [11], instead of by an intrinsic limitation of SB-GFlowNets. An investigation of this phenomenon and of the conditions upon which re-train the SB-GFlowNet

Results. Figure 4 (left) shows that the learned posterior distribution gets increasingly concentrated on the true phylogenetic tree; this behavior, which is inherent to posteriors over phylogenies under uniform priors [50], emphasizes the similarity between the learned and targeted distributions for SB-GFlowNets. Figure 4 (right), on the other hand, also suggets that the model's accuracy decreases as a function of the number of streaming updates. Nonetheless, we believe that this is predominantly caused by the poste-

0

4

t

12

16

-

log

p

(

x

test

|

x

1:

t

)

0

4

t

32

40

E

β

(

t

)

∼

p

/latticetop

[

‖

β

(

t

)

-

β

‖

2

2

]

Number of leaves

±

-

±

±

based on an earlier checkpoint due to the accumulated unreliability of the streaming updates, as described by Proposition 4, is left application-dependent and is thereby left to future endeavors. Finally, Table 2 shows that SB-GFlowNets, which avoids evaluating the full posterior, more than halve the training time required by a standard GFlowNet, while achieving a similar performance in terms of the total variation ( TV ) distance between the learned and target distributions.

5.4 Bayesian structure learning

1

2

3

×

10

-

4

1

2

3

Exact posterior

×

10

-

4

t

= 1

2

4

×

10

-

4

2

.

5

5

.

0

×

10

-

4

t

= 2

2

.

5

5

.

0

×

10

-

4

2

.

5

5

.

0

×

10

-

4

t

= 3

2

.

5

5

.

0

×

10

-

4

2

.

5

5

.

0

×

10

-

4

t

= 4

2

.

5

5

.

0

7

.

5

×

10

-

4

2

.

5

5

.

0

7

.

5

×

10

-

4

t

= 5

0

.

5

1

.

0

×

10

-

3

0

.

5

1

.

0

×

10

-

3

t

= 6

Streaming DAG-GFlowNet

̸

Problem description. Let X ∈ R n × d be a data set distributed according to a linear Gaussian structural equation model (SEM), i.e., X = β X + ϵ , in which β ∈ R d × d is a (sparse) matrix and ϵ ∈ R n × d are nd i.i.d. samples from a normal distribution. We assume that the adjacency matrix induced by β , [ β = 0] ∈ { 1 , 0 } d × d , characterizes a directed acyclic graph on the dataset's variables. In this case, the linear Gaussian SEM represents a Bayesian network, and it is the goal of Bayesian structure learning algorithms to find such a network based on the observed X [11]. Although this problem has been studied beyond the constraints of linear models governed by Gaussian distributions [12], we focus on a simplified setting in this section. In particular, given a sequence { X t } t ≥ 1 of i.i.d. realizations of a linear Gaussian SEM, we define a belief distribution over Bayesian networks N = ( { 1 , . . . , d } , A ) on variables { 1 , . . . , d } and adjacency matrix A as

̸

in which ℓ ( β | X t ) is the log-likelihood of X t under the linear Gaussian SEM parameterized by β . SB-GFlowNets can naturally handle streaming inference for this model by casting each R t as a subposterior distribution - in the same fashion of the set generation task in Section 5.1.

Experimental setup. Likewise Deleu et al. [11, Figure 5], we evaluate SB-GFlowNets on models with d = 5 variables. Also, we sample a new 200 -sized data set from a fixed linear Gaussian SEM for each streaming update of the GFlowNet. To ensure that the generated samples are valid DAGs, we adopt Deleu et al. [11]'s DAG-GFlowNet.

Results. Our results corroborate the findings of Section 5.3. On the one hand, Figure 5 highlights that our SB-GFlowNet can accurately learn a distribution over DAGs across a range of streaming updates. On the other hand, Figure 5 shows that the probability mass assigned by the SB-GFlowNet to the true DAG responsible for the data-generating process increases as more samples are incorporated into the belief distribution. Hence, SB-GFlowNets abide by the desiradata of a streaming algorithm for Bayesian inference.

0

2

4

6

Streaming updates

0

.

10

0

.

15

0

.

20

0

.

25

Probability mass on the true DAG

6 Related works

Applications of GFlowNets. GFlowNets [2, 3, 30] were originally proposed as reinforcement learning algorithms to train a stochastic policy to sample states proportionally to a prescribed reward function, From this point on, GFlowNets were widely applied to problems as diverse as probabilistic modeling [23, 61], combinatorial optimization [62], Bayesian causal discovery [11, 12] and phylogenetic inference [64], symbolic regression [32], stochastic control [30], language modeling [22], and Bayesian deep learning [34]. Recently, there is an increasing literature concerned with the possibility of composing multiple pre-trained GFlowNets to fit them to specific applications [17] and to accelerate training convergence [31]. In this context, we show how the composition of two GFlowNets through the SB condition leads to an efficient learning algorithm for Bayesian inference under a streaming setting.

Streaming Variational Bayes. Streaming, Distributed, Asynchronous (SDA) Bayes [6] was originally presented as a general framework for implementing variational inference algorithms in a streaming setting. Similarly to our work, it was based upon the principle that, if the variational distribution q ( t ) ( x ) is a good approximation to the unnormalized posterior ˜ π t ( x ) , then q ( t +1) ( x ) may be optimized to approximate q ( t ) ( x ) f ( D t | x ) instead of f ( D t | x )˜ π t ( x ) . This framework was instantiated to accommodate, for example, the learning of Gaussian processes [7], of tensor factorization [14], of feature models [51] and, jointly with SMC, nonlinear state-space models [63]. Nonetheless, our work is the first one to enable the training of GFlowNets in a streaming setting and, due to the relationship between GFlowNets and variational inference algorithms presented by [38, 65], may be viewed as an instance of SDA-Bayes tailored to inferential problems on a combinatorial support. In the realm of approximate Bayesian inference, Akhound-Sadegh et al. [1], Berner et al. [4], Sendera et al. [52], Zhang and Matsen [60] propose advancements in diffusion-based sampling methods, which we believe could be extended to the context of approximate streaming Bayesian inference via the techniques presented in this work. On the other hand, Mittal et al. [40] introduces an neural network-based approach for approximate Bayesian inference that amortizes over exchangeable data sets to handle posterior inference in novel data. Also, Richter and Berner [48], Richter et al. [49] develop a low-variance gradient estimator for carrying out variational inference derived from the log-variance loss , which could be employed as an alternative to our KL-based objective for streaming updates of GFlowNets. On a broader scale, Cranmer et al. [9] reviews approximate Bayesian methodology under the lens of simulation-based inference.

7 Conclusions, limitations, and outlook

Conclusions. We proposed the first method for carrying out approximate Bayesian inference over discrete distributions within a streaming setting, called SB-GFlowNet. We proposed two training/update schemes for SB-GFlowNet, as well as a theoretical analysis accounting for the compounding effect of errors due to posterior propagation. Our experimental evaluation showcases SB-GFlowNet's effectiveness in accurately sampling from the target posterior - while still achieving a significant reduction in training time relative to standard GFlowNets.

Limitations. Proposition 2 and Proposition 4 suggest that an inappropriate approximation to π t may be propagated through time and lead to increasingly inaccurate models. This phenomenon, known as catasthropic forgetting in the online literature [19, 39], may eventually demand retraining of the current SB-GFlowNet based on an earlier checkpoint or on the full posterior. We also note that unlike traditional variational methods, where the expressiveness of the approximation family is explicitly chosen, the expressiveness implied by different parametrizations of GFlowNets is not clear. We believe this is a fruitful avenue for future investigation.

Outlook and future works As our proposal provides generic and efficient streaming variational inference solution for discrete parameters, we believe it will allow the use of streaming discrete Bayesian inference to more datasets and to less explored research domains. In this work, we proposed two training criteria based on the trajectory balance condition and the KL criterion, nonetheless, these are not the only training schemes for GFlowNets, we believe other proposed criteria such as detailed balance [3] or the sub-trajectory balance [35] could be adapted for the streaming setting as well. Additionally, due to the flexibility of GFlowNets in sampling unnormalized distributions, our proposal can be extended to different divergences and generalized likelihoods to improve the predictive quality of the learned posteriors [28]. Finally, the problem of updating a GFlowNet when the size of the generated object changes, e.g., when a new species is observed during BPI, remains open.

References

T. Akhound-Sadegh, J. Rector-Brooks, A. J. Bose, S. Mittal, P. Lemos, C.-H. Liu, M. Sendera, S. Ravanbakhsh, G. Gidel, Y. Bengio, N. Malkin, and A. Tong. Iterated denoising energy matching for sampling from Boltzmann densities. arXiv preprint arxiv:2402.06121 , 2024.

E. Bengio, M. Jain, M. Korablyov, D. Precup, and Y. Bengio. Flow network based generative models for non-iterative diverse candidate generation. In Advances in Neural Information Processing Systems (NeurIPS) , 2021.

Y. Bengio, S. Lahlou, T. Deleu, E. J. Hu, M. Tiwari, and E. Bengio. GFlowNet foundations. Journal of Machine Learning Research (JMLR) , 24(210), 2023.

J. Berner, L. Richter, and K. Ullrich. An optimal control perspective on diffusion-based generative modeling. arXiv preprint arxiv:2211.01364 , 2024.

P. G. Bissiri, C. Holmes, and S. Walker. A general framework for updating belief distributions. Journal of the Royal Statistical Society: Series B (Methodological) , 78(5), 2016.

T. Broderick, N. Boyd, A. Wibisono, A. C. Wilson, and M. I. Jordan. Streaming variational Bayes. In Advances in Neural Information Processing Systems (NeurIPS) , 2013.

T. D. Bui, C. Nguyen, and R. E. Turner. Streaming sparse Gaussian process approximations. Advances in Neural Information Processing Systems (NeurIPS) , 2017.

T. J. Cole. Algorithm AS 281: Scaling and rounding regression coefficients to integers. Applied Statistics , 42(1), 1993.

K. Cranmer, J. Brehmer, and G. Louppe. The frontier of simulation-based inference. Proceedings of the National Academy of Sciences , 117(48), 2020.

I. Csiszár and J. Körner. Information theory: coding theorems for discrete memoryless systems . Cambridge University Press, 2011.

T. Deleu, A. Góis, C. C. Emezue, M. Rankawat, S. Lacoste-Julien, S. Bauer, and Y. Bengio. Bayesian structure learning with generative flow networks. In Conference on Uncertainty in Artificial Intelligence (UAI) , 2022.

T. Deleu, M. Nishikawa-Toomey, J. Subramanian, N. Malkin, L. Charlin, and Y. Bengio. Joint Bayesian inference of graphical structure and parameters with a single generative flow network. In Advances in Neural Information Processing Systems (NeurIPS) , 2023.

V. Dinh, A. E. Darling, and F. A. Matsen, IV. Online Bayesian phylogenetic inference: Theoretical foundations via sequential Monte Carlo. Systematic Biology , 67(3), 2017.

S. Fang, Z. Wang, Z. Pan, J. Liu, and S. Zhe. Streaming Bayesian deep tensor factorization. In International Conference on Machine Learning (ICML) , 2021.

J. Felsenstein. Evolutionary trees from DNA sequences: A maximum likelihood approach. Journal of Molecular Evolution , 17, 1981.

P. Flajolet and R. Sedgewick. Analytic Combinatorics . Cambridge University Press, 1 edition, 2009.

T. Garipov, S. D. Peuter, G. Yang, V. Garg, S. Kaski, and T. S. Jaakkola. Compositional sculpting of iterative generative processes. In Advances in Neural Information Processing Systems (NeurIPS) , 2023.

J. González, Z. Dai, A. Damianou, and N. D. Lawrence. Preferential Bayesian optimization. In International Conference on Machine Learning (ICML) , 2017.

I. J. Goodfellow, M. Mirza, X. Da, A. C. Courville, and Y. Bengio. An empirical investigation of catastrophic forgeting in gradient-based neural networks. In International Conference on Learning Representations (ICLR) , 2014.

J. Han, F. Ding, X. Liu, L. Torresani, J. Peng, and Q. Liu. Stein variational inference for discrete distributions. In International Conference on Artificial Intelligence and Statistics (AISTATS) , 2020.

J. C. Hornberger, H. Habraken, and D. A. Bloch. Minimum data needed on patient preferences for accurate, efficient medical decision making. Medical Care , 33(3), 1995.

E. J. Hu, M. Jain, E. Elmoznino, Y. Kaddar, G. Lajoie, Y. Bengio, and N. Malkin. Amortizing intractable inference in large language models. arXiv preprint arxiv:2310.04363 , 2023.

E. J. Hu, N. Malkin, M. Jain, K. E. Everett, A. Graikos, and Y. Bengio. GFlowNet-EM for learning compositional latent variable models. In International Conference on Machine Learning (ICML) , 2023.

M. Jain, S. C. Raparthy, A. Hernandez-Garcia, J. Rector-Brooks, Y. Bengio, S. Miret, and E. Bengio. Multi-objective GFlowNets. In International Conference on Machine Learning (ICML) , 2023.

E. Jang, S. Gu, and B. Poole. Categorical reparameterization with Gumbel-softmax. In International Conference on Learning Representations (ICLR) , 2017.

T. H. Jukes and C. R. Cantor. Evolution of protein molecules. In Mammalian Protein Metabolism . Academic Press, 1969.

D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arxiv:1412.6980 , 2014.

J. Knoblauch, J. Jewson, and T. Damoulas. An optimization-centric view on Bayes' rule: Reviewing and generalizing variational inference. Journal of Machine Learning Research (JMLR) , 23(132), 2022.

O. Kviman, R. Molén, and J. Lagergren. Improved variational Bayesian phylogenetic inference using mixtures. arXiv preprint arxiv:2310.00941 , 2023.

S. Lahlou, T. Deleu, P. Lemos, D. Zhang, A. Volokhova, A. Hernández-García, L. N. Ezzine, Y. Bengio, and N. Malkin. A theory of continuous generative flow networks. In International Conference on Machine Learning (ICML) , 2023.

E. Lau, N. M. Vemgal, D. Precup, and E. Bengio. DGFN: Double generative flow networks. In NeurIPS 2023 Generative AI and Biology (GenBio) Workshop , 2023.

S. Li, I. Marinescu, and S. Musslick. Gfn-sr: Symbolic regression with generative flow networks. arXiv preprint arxiv:2312.00396 , 2023.

D. V. Lindley. Bayesian statistics: A review . SIAM, 1972.

D. Liu, M. Jain, B. F. P. Dossou, Q. Shen, S. Lahlou, A. Goyal, N. Malkin, C. C. Emezue, D. Zhang, N. Hassen, X. Ji, K. Kawaguchi, and Y. Bengio. GFlowOut: Dropout with generative flow networks. In International Conference on Machine Learning (ICML) , 2023.

K. Madan, J. Rector-Brooks, M. Korablyov, E. Bengio, M. Jain, A. C. Nica, T. Bosc, Y. Bengio, and N. Malkin. Learning GFlowNets from partial episodes for improved convergence and stability. In International Conference on Machine Learning (ICML) , 2022.

C. J. Maddison, A. Mnih, and Y. W. Teh. The concrete distribution: A continuous relaxation of discrete random variables. In International Conference on Learning Representations (ICLR) , 2017.

N. Malkin, M. Jain, E. Bengio, C. Sun, and Y. Bengio. Trajectory balance: Improved credit assignment in GFlowNets. In Advances in Neural Information Processing Systems (NeurIPS) , 2022.

N. Malkin, S. Lahlou, T. Deleu, X. Ji, E. Hu, K. Everett, D. Zhang, and Y. Bengio. GFlowNets and variational inference. International Conference on Learning Representations (ICLR) , 2023.

M. McCloskey and N. J. Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of Learning and Motivation , volume 24. Academic Press, 1989.

S. Mittal, N. L. Bracher, G. Lajoie, P. Jaini, and M. A. Brubaker. Exploring exchangeable dataset amortization for Bayesian posterior inference. In ICML 2023 Workshop on Structured Probabilistic Inference / Generative Modeling , 2023.

A. Mnih and D. Rezende. Variational inference for Monte Carlo objectives. In International Conference on Machine Learning (ICML) , 2016.

S. Mohamed, M. Rosca, M. Figurnov, and A. Mnih. Monte Carlo gradient estimation in machine learning. Journal of Machine Learning Research (JMLR) , 21(132), 2020.

M. Newman. Networks . Oxford University Press, 2018.

L. Pan, N. Malkin, D. Zhang, and Y. Bengio. Better training of GFlowNets with local credit and incomplete trajectories. In International Conference on Machine Learning (ICML) , 2023.

L. Pan, D. Zhang, M. Jain, L. Huang, and Y. Bengio. Stochastic generative flow networks. In Conference on Uncertainty in Artificial Intelligence (UAI) , 2023.

M. Papini, D. Binaghi, G. Canonaco, M. Pirotta, and M. Restelli. Stochastic variance-reduced policy gradient. In International Conference on Machine Learning (ICML) , 2018.

A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. Kopf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang, J. Bai, and S. Chintala. PyTorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems (NeurIPS) , 2019.

L. Richter and J. Berner. Improved sampling via learned diffusions. arXiv preprint arxiv:2307.01198 , 2023.

L. Richter, A. Boustati, N. Nüsken, F. Ruiz, and O. D. Akyildiz. Vargrad: a low-variance gradient estimator for variational inference. Advances in Neural Information Processing Systems (NeurIPS) , 33, 2020.

A. RoyChoudhury, A. Willis, and J. Bunge. Consistency of a phylogenetic tree maximum likelihood estimator. Journal of Statistical Planning and Inference , 161, 2015.

R. Schaeffer, Y. Du, G. K. Liu, and I. Fiete. Streaming inference for infinite feature models. In International Conference on Machine Learning (ICML) , 2022.

M. Sendera, M. Kim, S. Mittal, P. Lemos, L. Scimeca, J. Rector-Brooks, A. Adam, Y. Bengio, and N. Malkin. On diffusion models for amortized inference: Benchmarking and improving stochastic control and sampling. arXiv preprint arxiv:2307.01198 , 2024.

M. W. Shen, E. Bengio, E. Hajiramezanali, A. Loukas, K. Cho, and T. Biancalani. Towards understanding and improving GFlowNet training. In International Conference on Machine Learning (ICML) , 2023.

S. Venkatraman, M. Jain, L. Scimeca, M. Kim, M. Sendera, M. Hasan, L. Rowe, S. Mittal, P. Lemos, E. Bengio, A. Adam, J. Rector-Brooks, Y. Bengio, G. Berseth, and N. Malkin. Amortizing intractable inference in diffusion models for vision, language, and control, 2024. URL https://arxiv.org/abs/2405.20971 .

A. M. Walker. On the asymptotic behaviour of posterior distributions. Journal of the Royal Statistical Society: Series B (Methodological) , 31(1), 1969.

M. T. Wojnowicz, S. Aeron, E. L. Miller, and M. Hughes. Easy variational inference for categorical models via an independent binary approximation. In International Conference on Machine Learning (ICML) , 2022.

K. Xu, W. Hu, J. Leskovec, and S. Jegelka. How powerful are graph neural networks? International Conference on Learning Representations (ICLR) , 2019.

P. Xu, F. Gao, and Q. Gu. An improved convergence analysis of stochastic variance-reduced policy gradient. In Conference on Uncertainty in Artificial Intelligence (UAI) , 2020.

Z. Yang. Molecular Evolution: A Statistical Approach . Oxford University Press, 2014.

C. Zhang and F. A. Matsen, IV. Variational Bayesian phylogenetic inference. In International Conference on Learning Representations (ICLR) , 2019.

D. Zhang, N. Malkin, Z. Liu, A. Volokhova, A. Courville, and Y. Bengio. Generative flow networks for discrete probabilistic modeling. In International Conference on Machine Learning (ICML) , 2022.

D. Zhang, H. Dai, N. Malkin, A. Courville, Y. Bengio, and L. Pan. Let the flows tell: Solving graph combinatorial optimization problems with GFlowNets. In Advances in Neural Information Processing Systems (NeurIPS) , 2023.

Y. Zhao, J. Nassar, I. Jordan, M. Bugallo, and I. M. Park. Streaming variational Monte Carlo. IEEE Transactions on Pattern Analysis and Machine Intelligence , 45(1), 2023.

M. Y. Zhou, Z. Yan, E. Layne, N. Malkin, D. Zhang, M. Jain, M. Blanchette, and Y. Bengio. PhyloGFN: Phylogenetic inference with generative flow networks. In International Conference on Learning Representations (ICLR) , 2024.

H. Zimmermann, F. Lindsten, J.-W. van de Meent, and C. A. Naesseth. A variational perspective on generative flow networks, 2022. URL https://arxiv.org/abs/2210.07992 .

Algorithm 1 Training a SB-GFlowNet by minimizing L SB

Require: ( D t ) T ≥ t ≥ 1 streaming data sets, f ( ·| x ) a likelihood model parametrized by x , π ( x ) a prior distribution over

end for

A Training of SB-GFlowNets

Algorithm 1 outlines the training of a SB-GFlowNet by minimizing the SB loss. As we described in the text, the first GFlowNet is trained conventionally by approximately minimizing either the TB loss or the KL divergence between the forward and backward policies. Then, the subsequent models are trained by the approximate minimization of either the SB loss or streaming balance criterion. Notably, the problem of streaming update may be framed as the learning of GFlowNets with stochastic rewards [45], which are not determistically associated to the terminal states.

B Proofs

B.1 Proof of Proposition 1

We are assuming that p ( t ) ⊤ ∝ π t and that E τ ∼ ξ [ L SB ( τ )] = 0 for a distribution ξ of full support. Thus, L SB ( τ ) = 0 for all τ . As a consequence,

By assumption, ( p ( t ) F , p ( t ) B , Z t ) satisfy the trajectory balance condition with respect to π t , therefore, Z t · p ( t ) F ( τ ) = p ( t ) B ( τ | x ) π t ( x ) . Thus,

Finally, by summing over τ ⇝ x :

B.2 Proof of Proposition 2

Firstly, we note that δ ξ LS ( p, q ) is a metric. Thus, by the triangle inequality,

The first term of the right-hand-side of the preceding equation corresponds to the estimation error associated to the GFlowNet's learning problem. For the second term, note that ˆ p ( t +1) ⊤ ( x ) = Z t ˆ Z t +1 p ( t ) ⊤ ( x ) f ( D t +1 | x ) by assumption ( ˆ p ( t +1) ⊤ satisfies the SB condition). Thus,

The result follows by a further application of the triangle inequality to δ π t +1 LS ( p ( t +1) ,⋆ ⊤ , π t +1 ) , namely,

Proposition 2 is obtained by plugging Equation 15 into Equation 14.

B.3 Proof of Proposition 3

This result, which follows from reasoning similar to the one in Proposition 2 above, aims to show the dependence of the model's performance on the newly observed dataset. In this sense, notice that

The result follows by plugging Equation 17 into Equation 16.

B.4 Proof of Proposition 4

This result follows from the successive application of the triangle, Pinsker's [10] and Jensen's inequality applied to the KL divergence. More specifically, first note that the optimal distribution under the KL streaming criterion satisfies ˆ p ( t +1) ⊤ ∝ p ( t ) ⊤ f ( D t +1 | x ) . Then, by the triangle inequality,

For the first term, note that

since ˆ p ( t +1) F ∝ p by definition; recall that p ( τ ) = p ( t ) F ( τ ) f ( D t +1 | x ) . Here, the first inequality follows from Pinsker's inequality and the second one, from the data-processing inequality. For the second term, note that

with a corresponding representation of π t +1 as a function of π t and f ( D t +1 | x ) . The result follows by pluggin Equation 20 and Equation 19 into Equation 18.

C Experimental details

We provide below details for reproducing our experiments for each considered generative task. To approximately solve the optimization problem outlined in Algorithm 1, we employed the Adam optimizer [27] with a learning rate of 10 -3 for the p F 's parameters and 10 -1 for log Z t , following recommendations from [37]. Also, we linearly decreased the learning rate during training. Experiments were run in a cluster equipped with A100 and V100 GPUs, using a single GPU per run.

C.1 Set generation

Experimental setup. We fixed d = 24 and S = 18 . To parameterize the forward policy, we implemented an two-layer neural network with a 128-dimensional latent embedding. For the streaming updates, we fixed α = 1 and randomly sampled the objects' utilities at each novel iteration. We trained the model by minimizing the KL streaming criterion.

GFlowNet's design. To generate a set x ∈ X , we iteratively add elements randomly sampled from I to an initially empty x until x has size S ; see Figure 7. The forward policy is parameterized as a two-layer neural network and the backward policy is fixed as an uniform distribution.

C.2 Linear preference learning with integer-valued features

Experimental setup. We assume that x ∈ [[0 , 4]] d and d = 24 and that the data was simulated from the observational model. At each streaming round, a novel and independent data set was simulated and the model was trained by minimizing the SB loss. To parameterize the forward policy, we implemented an MLP with 2 64-dimensional layers receiving the padded parameter x as an input and returning a probability distribution over [[0 , 4]] .

GFlowNet's design. The generative process implemented by the GFlowNet consists of, starting at an initially empty state x o , iteratively sampling a value from [[0 , 10]] and appending this value to the current state until its length reaches d . To parameterize the forward policy, we use an MLP with two 64-dimensional layers that receives the padded state as a fixed-size input.

C.3 Online Bayesian phylogenetic inference

Experimental setup. We assume the observational data follow the J&C69 mutation model with an instantaneous mutation rate of λ = 5 · 10 -3 . The data was synthetically generated from the corresponding observational model conditioned on a randomly sampled tree with 7 leaves, and this process was repeated at each streaming round. To illustrate the computational gains enacted by the implementation of SB-GFlowNets in Table 2, we considered updating a GFlowNet trained on an initially large data set according to the newly observed and relatively small biological sequences, which is a common challenge faced by practitioners. Then, by avoiding the additional log-likelihood evaluations, we achieved significantly faster inference.

GFlowNet's design. A state consists of a forest of complete binary trees. Initially, all leaves are roots of their own singleton trees and, at each iteration of the generative process, we select two trees and join their roots to a newly added unlabelled node. This procedure is finished when all leaves are connected; see [64, Figure 1] for an illustration of this generative process. To parameterize p F , we use a graph isomorphism network (GIN; [57]); the backward policy is fixed as uniform.

C.4 Bayesian structure learning

Experimental setup. We sample each component of the error terms ϵ from a zero-centered Gaussian distribution with standard deviation σ = 5 · 10 -2 . Also, we select a random Bayesian network from a directed configuration model [43] and draw the components β from a corresponding standard Gaussian distribution to define the true data-generating process. To parameterize the policy network, we use an MLP with 2 128-dimensional layers receiving the DAG's flattened adjacency matrix as input.

GFlowNet's design. We adopt Deleu et al. [11]'s DAG-GFlowNet. In a nutshell, the generative process starts at an edgeless graph and each transition either adds an edge to the current state or triggers a stop. To ensure the acyclicity of the generated samples, we follow [11, Appendix C] and iteratively update a binary vector m ∈ { 1 , 0 } d × d indicating which edges in the adjacency matrix can be safely added to the current state without forming cycles.

D On the permutation invariance of SB-GFlowNets

0

.

02

0

.

04

0

.

06

0

.

01

0

.

02

0

.

03

0

.

04

0

.

05

0

.

06

D

2

then

D

1

First GFN did not converge during training

0

.

02

0

.

04

0

.

06

0

.

01

0

.

02

0

.

03

0

.

04

0

.

05

0

.

06

First GFN converged during training

D

1

then

D

2

(a) Phylogenetic inference.

0

.

1

0

.

2

0

.

3

0

.

4

0

.

05

0

.

10

0

.

15

0

.

20

0

.

25

0

.

30

0

.

35

0

.

40

R

2

then

R

1

First GFN did not converge during training

0

.

1

0

.

2

0

.

3

0

.

4

0

.

05

0

.

10

0

.

15

0

.

20

0

.

25

0

.

30

0

.

35

0

.

40

First GFN converged during training

R

1

then

R

2

(b) Set generation.

Exchangeability is a natural property of each case study we presented in the main text. We thus ask: are SB-GFlowNets permutation invariant? Clearly, the distribution learned by a SB-GFlowNet does not depend on the order in which the data sets are observed when the SB condition is satisfied at each streaming update; this is a direct consequence of Proposition 1. On the other hand, permutation invariance is not guaranteed when the learning objectives are only imperfectly minimized; see Figure 8 for an extreme example. To the best of our knowledge, however, this sensibility to data ordering is a property of every approximate streaming Bayesian inference method, e.g., [6, 13].

NeurIPS Paper Checklist

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer: [Yes]

Justification: Our claims are supported by proofs in Appendix B and experiments in Section 5.

Guidelines:

The answer NA means that the abstract and introduction do not include the claims made in the paper.

The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.

The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.

It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes]

Justification: The middle paragraph in Section 7 discusses limitations.

Guidelines:

The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.

The authors are encouraged to create a separate "Limitations" section in their paper.

The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.

The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.

The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.

The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.

If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.

While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.

3. Theory Assumptions and Proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [Yes]

Justification: Assumptions are clearly stated in the statements, and Appendix B.

Guidelines:

The answer NA means that the paper does not include theoretical results.

All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced.

All assumptions should be clearly stated or referenced in the statement of any theorems.

The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.

Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.

Theorems and Lemmas that the proof relies upon should be properly referenced.

4. Experimental Result Reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: Details are provided in Appendix C.

Guidelines:

The answer NA means that the paper does not include experiments.

If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.

If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.

Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.

While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example

(a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.

(b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.

(c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce

the model (e.g., with an open-source dataset or instructions for how to construct the dataset).

(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.

5. Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [Yes]

Justification: Provided in a zip file.

Guidelines:

The answer NA means that paper does not include experiments requiring code.

Please see the NeurIPS code and data submission guidelines ( https://nips.cc/ public/guides/CodeSubmissionPolicy ) for more details.

While we encourage the release of code and data, we understand that this might not be possible, so 'No' is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).

The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines ( https: //nips.cc/public/guides/CodeSubmissionPolicy ) for more details.

The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.

The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.

At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).

Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.

6. Experimental Setting/Details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: [Yes]

Justification: Provided in Appendix C.

Guidelines:

The answer NA means that the paper does not include experiments.

The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.

The full details can be provided either with the code, in appendix, or as supplemental material.

7. Experiment Statistical Significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [Yes]

Justification: In general, plots count on error bars and tables count on standard deviation.

Guidelines:

The answer NA means that the paper does not include experiments.

The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.

The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).

The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)

The assumptions made should be given (e.g., Normally distributed errors).

It should be clear whether the error bar is the standard deviation or the standard error of the mean.

It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.

For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).

If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.

8. Experiments Compute Resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [Yes]

Justification: First paragraph of Appendix C.

Guidelines:

The answer NA means that the paper does not include experiments.

The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.

The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.

The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper).

9. Code Of Ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

Justification: Our submission follows the NeurIPS ethical guidelines.

Guidelines:

The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.

If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics.

The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).

10. Broader Impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [Yes]

Justification: We provide a perspective on broader impacts in Section 7, but do not foresee any direct negative societal impact.

Guidelines:

The answer NA means that there is no societal impact of the work performed.

If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact.

Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.

The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.

The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.

If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).

11. Safeguards

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Answer: [NA]

Justification: We do not foresee any direct risk stemming from our work.

Guidelines:

The answer NA means that the paper poses no such risks.

Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.

Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.

We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.

12. Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer: [NA]

Justification: All code was made by the authors

Guidelines:

The answer NA means that the paper does not use existing assets.

The authors should cite the original paper that produced the code package or dataset.

The authors should state which version of the asset is used and, if possible, include a URL.

The name of the license (e.g., CC-BY 4.0) should be included for each asset.

For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.

If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.

For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.

If this information is not available online, the authors are encouraged to reach out to the asset's creators.

13. New Assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [NA]

Justification: No new assets.

Guidelines:

The answer NA means that the paper does not release new assets.

Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.

The paper should discuss whether and how consent was obtained from people whose asset is used.

At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.

14. Crowdsourcing and Research with Human Subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [NA]

Justification: No experiments with human subjects.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.

According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.

15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [NA]

Justification: No experiments with human subjects.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.

We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.

For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nGenerative flow nets are extended to streaming inference by using the prediction of the previous network as the prior for the current one. Two training methods are proposed: streaming balance which uses squared difference of target and learned log posteriors, and VI which uses KL divergence. Analytic results for both methods bound the error in terms of updating error and error from the previous step. Three experiments show the method can accurately track the true posterior across updating steps.\n\nSTRENGTHS:\nThe methods are elegant and sound and the experiment results are strong. This is an important alternative to streaming VI that I'm excited to try out myself.\n\nWEAKNESSES:\nNot a major weakness, but the extension to the streaming case (this paper's main contribution) is fairly straightforward. It was clear from the beginning that the predicted distribution from the previous step would provide the prior for the next, with the obvious adaptations of the balance and VI objectives.\n\nBoth $p_B$ terms in the streaming balance condition (3) appear to be unnecessary. Prop 1 will hold without them. We just need a joint distribution over $(x,\\tau)$ (equivalently, a distribution over $\\tau$) with the desired marginal on $x$, and $f(\\mathcal{D}_{t+1}|x) p^t_F(\\tau)$ already has that property. Compare to the definition of the target distribution $p(\\tau)$ in (5).\n\nSec 3.2 just gives the objective and doesn’t explain how $p_F$ and $Z$ are learned (likewise with the argmax lines in Algo 1). Is it just SGD on $\\mathcal{L}_{SB}$?\n\nThe main text says nothing about how to construct the graph ($\\mathcal{S}$ and $\\boldsymbol{A}$). Details are given in the appendix -- in all cases the allowable paths build the desired objects from simpler ones -- but a sentence in the main text would help.\n\nQUESTIONS:\n(2): why do we need to sample from $p_B$ and importance weight, rather than sampling directly from $p_F$?\n\n(5),170,178: $\\pi_{t+1}$ should be $f(\\mathcal{D}_{t+1}|x)$, yes? The derivations all look correct if so.\n\n181: what is $\\delta$?\n\n$Z_{(t+1)}$ at 205 and $\\hat{Z}_{t+1}$ are the same?\n\nMore of a suggestion: could the method be extended to cases where the target objects grow at each time step? For example, phylogenetic trees would grow as new species are observed. It seems like a natural application of flow nets since you can expand the graph by appending a new terminal layer.\n\nLIMITATIONS:\nThe set generation task is degenerate because the objective is additive. A model only needs to track the posterior on individual $x$s.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2024-07-12"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe authors provide a framework that allows training of GFlowNet models with streaming data by checkpointing a previously trained GFlowNet model and proposing the streaming balance condition. The problem as well as the approach is well motivated and theoretically sound and this work would be a valuable contribution to the research community. The authors conduct experiments on synthetic tasks and phylogenetic inference, and show improved scalability. Additionally, there is some theory that describes and bounds the approximation error based on errors on the checkpointed GFlowNet model and current estimation problem. Overall, I think the work is quite interesting but it would be nice to consider another experiment since currently most of the experiments are based on synthetic data.\n\nSTRENGTHS:\n- The authors provide useful theoretical contributions that bound the approximation errors into two terms: error from solving the current distribution matching problem and error coming from suboptimal solution to the previous distribution matching problem.\n- The problem of training sampling methods that can incorporate streaming data is quite important and relevant to the field, especially for Bayesian Inference methodologies.\n- The authors do provide a good set of experiments, and show the benefits of their proposed approach over the standard training of GFlowNets.\n\nWEAKNESSES:\n- I found Definition 2 to be quite confusing to read and it is still not clear to me how the equivalence holds. Could the authors clarify what the KL divergence is between, why is it valid and how does it circumvent the problem of parameterizing a partition function?\n- The original setup proposed by the authors follows from a trivial extension of the GFlowNets framework which begs to question the novelty of the work.\n- It is unclear how their formulation solves the problem of permutation invariance / iid treatment of observations. In particular, given two sets $D_1$ and $D_2$, we know that the posterior distribution $p(x | D_1, D_2)$ can be equivalently written as\n$$\np(x | D_1, D_2) = \\frac{p(D_1, D_2 | x) p(x)}{p(D_1, D_2)} = \\frac{p(D_1 | x) p(D_2 | x) p(x)}{p(D_1, D_2)} = \\frac{p(D_1 | x) p(x|D_2)}{p(D_1 | D_2)} = \\frac{p(D_2 | x) p(x|D_1)}{p(D_2 | D_1)}\n$$\nThen, in particular, how is it maintained that given any split of the data $D$ into $D_1$ and $D_2$, the final GFN trained leads to the same solution. If the GFN learns the right solution, then it will follow simply, but it would be nice if the model could satisfy this permutation invariance inherently. Could the authors provide some ablations and control experiments to show to what extent is this constraint satisfied over $t$?\n- The authors should add an experiment on discovering causal graphs conditioned on observational samples, which would strengthen their paper considerably.\n- The authors should consider the following related work, which are either connected to GFlowNets, sampling from an unnormalized density, or modeling Bayesian posterior inference:\n\nCranmer, Kyle, Johann Brehmer, and Gilles Louppe. \"The frontier of simulation-based inference.\" Proceedings of the National Academy of Sciences 117.48 (2020): 30055-30062.\n\nMittal, Sarthak, et al. \"Exploring Exchangeable Dataset Amortization for Bayesian Posterior Inference.\" ICML 2023 Workshop on Structured Probabilistic Inference {\\&} Generative Modeling. 2023.\n\nZhang, Qinsheng, and Yongxin Chen. \"Path integral sampler: a stochastic control approach for sampling.\" arXiv preprint arXiv:2111.15141 (2021).\n\nRichter, Lorenz, et al. \"VarGrad: a low-variance gradient estimator for variational inference.\" Advances in Neural Information Processing Systems 33 (2020): 13481-13492.\n\nSendera, Marcin, et al. \"On diffusion models for amortized inference: Benchmarking and improving stochastic control and sampling.\" arXiv preprint arXiv:2402.05098 (2024).\n\nBerner, Julius, Lorenz Richter, and Karen Ullrich. \"An optimal control perspective on diffusion-based generative modeling.\" arXiv preprint arXiv:2211.01364 (2022).\n\nAkhound-Sadegh, Tara, et al. \"Iterated denoising energy matching for sampling from Boltzmann densities.\" arXiv preprint arXiv:2402.06121 (2024).\n\nRichter, Lorenz, Julius Berner, and Guan-Horng Liu. \"Improved sampling via learned diffusions.\" arXiv preprint arXiv:2307.01198 (2023).\n\nQUESTIONS:\n- It is not clear what do the authors mean by $\\mathbf{A}$ in their notation at the start of Section 2.\n- The authors seem to have a typo in the equation under Line 142, essentially the right hand equation should have $p_F^{t+1}$.\n- Can the authors provide a visualization of the Set generation task? If I understand correctly, the authors first sample $d$ points randomly and the corresponding $f_i(j)$ randomly as well where $i = 1, ..., K+1$ and $j = 1, ..., d$. Then they define $R_i$ over each set, and a tempered version of $R_i$ with temperature $\\alpha$. Is that it?\n\nLIMITATIONS:\nThe authors have adequately talked about the limitations and impacts of their work.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-12"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper introduces Streaming Bayes GFlowNets (SB-GFlowNets), which enables streaming Bayesian inference over discrete parameter spaces, relying on the expressive power of GFlowNets as amortized samplers over discrete compositional objects. The process is akin to Bayesian streaming, where the posterior updates with each new data stream and the posterior from the batch before acts as a prior for the current batch. The authors use a GFlowNet to fit the initial posterior and update it training only on new data stream batches. To do so, the authors propose two different solutions: enforcing a streaming balance condition at each streaming step, or relying on direct divergence-based updates (letting go of the estimation of the normalizing constant). For the latter, the authors show how to obtain low-variance estimators for the gradient of the proposed KL divergence loss. Finally, the authors provide a theoretical performance analysis of their two proposed variants along with a diverse set of experiments to showcase the performance in each case, and show the gain in training time in the streaming setting compared to retraining for all the data at once at each step.\n\nSTRENGTHS:\n- The authors provide a complete study of all the important components within their work (experiments, runtime comparison to full retraining and practical performance enhancement etc). \n- The idea is interesting across many applications where data streams are processed continuously. \n- The paper is overall well written and easy to follow.\n\nWEAKNESSES:\n- I'm not sure where equation (9) comes from. Equating \\$\\mathcal{L}\\_{SB}(\\tau)\\$ to 0 would result in\n\\\\[\np\\_F^{(t+1)}(\\tau) = \\frac{Z\\_t}{Z\\_{t+1}} \\cdot \\frac{p\\_B^{(t+1)}(\\tau \\vert x)}{p\\_B^{(t)}(\\tau \\vert x)} \\cdot p\\_F^{(t)}(\\tau) \\cdot f(\\mathcal{D}\\_{t+1} \\vert x)\n\\\\]\nEven by assuming \\$(p\\_F^t, p\\_B^t, Z\\_t)\\$ satisfy TB \\$(\\mathcal{L}\\_{TB} \\rightarrow 0)\\$, I'm not sure how that would directly yield equation (10). The proofs for proposition 2 also seem to start from (9). Can you elaborate on that? \n\n- To what extent is the assumption that new data is independent of past data under the posterior predictive? This question is especially important in cases where you try to sample from the marginal likelihood over some object (for instance for structure learning), where you lose that independence under the posterior given only the structure (and not parameters for example). I suspect this might be the reason for performance degradation across streaming steps in the Bayesian phylogenetic inference case, given that Felsenstein's algorithm assigns a marginal likelihood. \n\n**Minor Comments** \n- Line 30, $\\{y_i\\}_{i=1}^2$ should be defined/introduced better.\n- Line 134, space after comma. \n- In line 142, in the second TB condition, it should be $p_F^{(t+1)}(\\tau)$ instead of $p_F^{(t)}(\\tau)$.\n- $p_F^{(t+1)}$ should be evaluated at $\\tau$ in equation (10).\n\nQUESTIONS:\nSee weaknesses.\n\nLIMITATIONS:\n- The authors adequately addressed limitations throughout the paper (for instance posterior error propagation etc) and through a separate section in the conclusion.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-12"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper introduces Streaming Bayes GFlowNets, a method for performing approximate Bayesian inference over discrete parameter spaces in streaming data settings.\n\nSB-GFlowNets allow efficient updating of posterior approximations as new data arrives. The method reduces training time compared to retraining GFlowNets from scratch and maintains comparable accuracy. \n\nIn conclusion, SB-GFlowNets enable streaming variational inference for discrete parameters, opening up new applications of Bayesian methods to large-scale streaming data problems.\n\nSTRENGTHS:\n- SB-GFlowNets significantly reduce training time compared to retraining GFlowNets from scratch for each new data batch. This is particularly valuable for large-scale streaming data problems.\n- The paper provides a theoretical analysis of how errors propagate through posterior updates\n- The method is demonstrated to work well on various tasks (set generation, Bayesian linear preference learning, and online phylogenetic inference)\n\nWEAKNESSES:\n- As mentioned in the paper's limitations section, inappropriate approximations to earlier posteriors may propagate through time, potentially leading to increasingly inaccurate models. This is a form of catastrophic forgetting\n- Due to the error accumulation issue, there may sometimes need to retrain the model from an earlier checkpoint or using the full posterior\n- As the paper mentioned, for very sparse target distributions, the performance can degrade, particularly when using the KL-based training scheme\n\nQUESTIONS:\n- Do you think the accumulative error issue can be solved by cache previous gradient (borrowing tricks from continual learning)?\n- It would be great if you can just compare with some continual learning method as baselines.\n- In sparse target distributions, if not using KL-based training scheme, what are the possible schemes?\n\nLIMITATIONS:\nThe authors have adequately addressed the limitations", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-13"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper introduces a method for Bayesian inference in streaming data scenarios, particularly for discrete parameter spaces, called Streaming Bayes GFlowNets (SB-GFlowNets). The main contributions are:\n\n* Bayesian Streaming Inference: SB-GFlowNets enable the continuous updating of posterior distributions as new data arrives, without needing to recompute from scratch.\n\n* Addressing Intractability: The method addresses the challenge of approximating intractable posteriors in discrete state spaces, which is a limitation of existing variational inference (VI) techniques.\n\n* GFlowNet Utilization: SB-GFlowNets leverage GFlowNets, a class of amortized samplers, to approximate the initial posterior and update it incrementally with new data.\n\n* Case Studies: The effectiveness of SB-GFlowNets is demonstrated in linear preference learning and phylogenetic inference, showing its ability to sample from unnormalized posteriors efficiently in a streaming context.\n\n* Performance: The method is significantly faster compared to repeatedly training a GFlowNet from scratch for the full posterior.\n\nSTRENGTHS:\nTwo technically novel training algorithms for streaming inference on GFlowNets based on modified balance condition and VI with a control variate. Presentation was reasonably clear and the experimental results were convincing. Removes limitation of GFLowNets, an increasingly important family of models, to only batched training.\n\nWEAKNESSES:\nA weakness of the paper is that it may not sufficiently highlight the significance of streaming inference compared to batch inference. This may be apparent to Bayesian practitioners but not so to a general ML audience. Are there more compelling applications of streaming inference?\n\nQUESTIONS:\nSentence in lines 58-59 trails off.\n\nLIMITATIONS:\nYes, limitations have been addressed.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2024-07-15"}