Skip to main content
QUICK REVIEW

[Paper Review] Bayesian Flow Networks

Alex Graves, Rupesh Kumar Srivastava|arXiv (Cornell University)|Aug 14, 2023
Topic ModelingComputer Science5 citations
TL;DR

Bayesian Flow Networks (BFNs) introduce a novel generative modeling framework that uses iterative Bayesian inference to update prior distributions, which are then passed through a neural network to produce interdependent output distributions. The method achieves state-of-the-art results on the text8 character-level language modeling task with 1.41 bits per character, outperforming all known discrete diffusion models while enabling differentiable, gradient-based sample guidance in discrete domains.

ABSTRACT

This paper introduces Bayesian Flow Networks (BFNs), a new class of generative model in which the parameters of a set of independent distributions are modified with Bayesian inference in the light of noisy data samples, then passed as input to a neural network that outputs a second, interdependent distribution. Starting from a simple prior and iteratively updating the two distributions yields a generative procedure similar to the reverse process of diffusion models; however it is conceptually simpler in that no forward process is required. Discrete and continuous-time loss functions are derived for continuous, discretised and discrete data, along with sample generation procedures. Notably, the network inputs for discrete data lie on the probability simplex, and are therefore natively differentiable, paving the way for gradient-based sample guidance and few-step generation in discrete domains such as language modelling. The loss function directly optimises data compression and places no restrictions on the network architecture. In our experiments BFNs achieve competitive log-likelihoods for image modelling on dynamically binarized MNIST and CIFAR-10, and outperform all known discrete diffusion models on the text8 character-level language modelling task.

Motivation & Objective

  • To develop a generative modeling framework that enables end-to-end differentiable training and gradient-based sample guidance in discrete data domains such as natural language.
  • To overcome the limitations of discrete diffusion models, which suffer from discontinuous noise transitions due to discrete data, by introducing a continuous, flow-like process.
  • To unify the principles of data compression and generative modeling by deriving loss functions that directly optimize compression efficiency.
  • To enable efficient, few-step generation in discrete sequences by leveraging continuous updates on the probability simplex.
  • To demonstrate competitive performance on both continuous (image) and discrete (text) data, with a focus on language modeling.

Proposed method

  • BFNs use a two-stage process: first, Bayesian inference updates a prior distribution based on noisy data samples, producing a posterior; second, the posterior parameters are passed through a neural network to generate a new, interdependent distribution.
  • The model employs continuous-time and discrete-time loss functions derived from variational inference principles, optimizing for data compression via the evidence lower bound (ELBO).
  • For discrete data, network inputs lie on the probability simplex, enabling full differentiability and gradient-based sample guidance, which is not feasible in standard discrete diffusion models.
  • The network architecture is flexible and not restricted; the paper uses a deep Transformer with 24 layers and GELU activations for language modeling experiments.
  • The method avoids a forward diffusion process, instead relying on iterative Bayesian updates that progressively refine the model’s belief about the data distribution.
  • Sample generation is performed by iteratively applying the network to update the posterior distribution, starting from a simple prior and refining it over steps.
Figure 1 : System Overview . The figure represents one step of the modelling process of a Bayesian Flow Network. The data in this example is a ternary symbol sequence, of which the first two variables (‘B’ and ‘A’) are shown. At each step the network emits the parameters of the output distribution b
Figure 1 : System Overview . The figure represents one step of the modelling process of a Bayesian Flow Network. The data in this example is a ternary symbol sequence, of which the first two variables (‘B’ and ‘A’) are shown. At each step the network emits the parameters of the output distribution b

Experimental results

Research questions

  • RQ1Can a continuous, differentiable flow process be designed for discrete data, enabling gradient-based sample guidance and few-step generation?
  • RQ2Does a Bayesian inference-based iterative refinement of distributions outperform existing discrete diffusion models in language modeling?
  • RQ3Can the same framework be applied to continuous, discretized, and discrete data with a unified loss function and training procedure?
  • RQ4Is the loss function derived from variational inference principles effective for both compression and generation in diverse data types?
  • RQ5Can the model achieve competitive log-likelihoods on image and text benchmarks without requiring a forward diffusion process?

Key findings

  • BFNs achieved a test bits per character (BPC) of 1.41 on the text8 dataset, outperforming all known discrete diffusion models reported in the literature.
  • The model reached 1.43 BPC in just 100 generation steps, indicating strong robustness and potential for few-step inference.
  • BFNs matched the performance of the best order-agnostic model (MAC) at 1.40 BPC, while significantly outperforming other discrete diffusion models, which ranged from 1.45 to 1.72 BPC.
  • The model achieved competitive log-likelihoods on dynamically binarized MNIST and CIFAR-10, demonstrating effectiveness on image data.
  • The use of probability simplex inputs enabled full differentiability, allowing for gradient-based sample guidance in discrete domains — a capability absent in prior discrete diffusion models.
  • The training setup used a 24-layer Transformer with 170M parameters, and the model showed signs of overfitting, suggesting that regularization could further improve results.
Figure 2 : Bayesian updates for continuous data . For univariate data $x=0.7$ , the initial input distribution parameters $\theta_{0}=\{\mu_{0}=0,\rho_{0}=1\}$ are updated to $\theta_{1}=\{\mu_{1},\rho_{1}\}$ , $\theta_{2}=\{\mu_{2},\rho_{2}\}$ , $\theta_{3}=\{\mu_{3},\rho_{3}\}$ by iterating Eqs. 4
Figure 2 : Bayesian updates for continuous data . For univariate data $x=0.7$ , the initial input distribution parameters $\theta_{0}=\{\mu_{0}=0,\rho_{0}=1\}$ are updated to $\theta_{1}=\{\mu_{1},\rho_{1}\}$ , $\theta_{2}=\{\mu_{2},\rho_{2}\}$ , $\theta_{3}=\{\mu_{3},\rho_{3}\}$ by iterating Eqs. 4

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.