Joint Bayesian Inference of Graphical Structure and Parameters with a Single Generative Flow Network

Tristan Deleu, Mizu Nishikawa-Toomey, Jithendaraa Subramanian, Nikolay Malkin, Laurent Charlin, Yoshua Bengio

Introduction

Bayesian Networks (BNs) serve as a fundamental framework for representing probabilistic dependencies among variables through Directed Acyclic Graphs (DAGs). Traditionally, the field has bifurcated the learning process into two distinct stages: structure learning (identifying the DAG) and parameter estimation. However, this separation often necessitates the "marginalization trap," where the marginal likelihood of a structure is only tractable under restrictive assumptions, such as linear relationships and Gaussian noise.

This paper introduces JSP-GFN (Joint Structure and Parameters GFlowNet), a novel approach that leverages Generative Flow Networks to perform joint Bayesian inference over both the graph structure and its associated parameters. By treating the construction of a BN as a unified generative process, JSP-GFN enables the modeling of complex, non-linear dependencies—such as those parameterized by neural networks—that have historically been computationally intractable.

Methodology

The core innovation of JSP-GFN lies in its ability to sample from the joint posterior distribution $p(G, \theta | \mathcal{D})$, where $G$ represents the graph structure and $\theta$ represents the parameters.

Two-Phase Generative Process

JSP-GFN constructs a Bayesian Network through a sequential decision-making process:

  1. Structure Generation: Starting from an empty graph, the model sequentially adds edges. This discrete phase continues until the model executes a specialized "stop" action.
  2. Parameter Sampling: Upon termination of the structure phase, the model transitions to a continuous space to sample the parameters $\theta$ for the specific DAG generated.

This transition is managed within a single GFlowNet framework, using a "stop" action as a bridge between discrete and continuous state spaces.

Learning Objectives and Scalability

To train the model efficiently, the authors utilize the Subtrajectory Balance (SubTB) objective. SubTB is adapted to handle the mixed sample space, allowing the GFlowNet to learn from partial construction trajectories. Furthermore, the authors provide a theoretical foundation for mini-batch training, proving that the model converges to the correct posterior even when trained on random subsets of data. This property is critical for scaling the method to high-dimensional datasets where full-batch processing is unfeasible.

Non-linear Flexibility

Unlike traditional methods that rely on closed-form marginal likelihoods, JSP-GFN's joint sampling approach allows for arbitrary local relationship models. The authors demonstrate this by using Multi-Layer Perceptrons (MLPs) to define the conditional probability distributions within the BN, effectively lifting the "complexity ceiling" imposed by linear-Gaussian assumptions. The authors also show that their learning objective for continuous parameters is mathematically related to score matching, a popular technique in generative modeling.

Experimental Evaluation

The performance of JSP-GFN was validated across a variety of synthetic and real-world benchmarks.

Fidelity and Generalization

On small-scale simulated graphs ($d=5$), where the exact posterior is analytically computable, JSP-GFN demonstrated exceptional fidelity, achieving a Pearson correlation of $r \approx 0.998$ with the ground truth. In non-linear scenarios, the model consistently outperformed traditional Markov Chain Monte Carlo (MCMC) and Variational Inference (VI) baselines, yielding lower Negative Log-Likelihood (NLL) on held-out test data.

Real-World Biological Networks

The model's scalability was tested on two prominent biological datasets:

  • Sachs Protein Signaling Network: A classic dataset ($d=11$) involving interventional and observational data.
  • Gene Regulatory Network: A high-dimensional dataset ($d=61$) where the joint space of structures and parameters is vast.

In the 61-node gene expression task, JSP-GFN outperformed MCMC-based methods, highlighting its capacity for amortized inference. Once the GFlowNet is trained, it can sample new (graph, parameter) pairs rapidly, bypassing the iterative costs associated with standard sampling techniques.

Discussion and Limitations

While JSP-GFN represents a significant advancement, several avenues for future research remain. Currently, the model assumes a unimodal distribution (Normal) for the parameter posterior. Given that non-linear models often exhibit highly multimodal landscapes, the authors suggest integrating more expressive density estimators, such as Normalizing Flows or Diffusion models, into the parameter sampling phase. Additionally, the model is currently constrained to Directed Acyclic Graphs, which precludes the representation of feedback loops common in biological systems.

Conclusion

JSP-GFN provides a robust framework for joint Bayesian inference, successfully bridging the gap between discrete structure learning and continuous parameter estimation. By avoiding the need for marginalization, it opens the door for deep learning components to be integrated into the rigorous framework of Bayesian Networks, providing a scalable solution for discovering complex causal and probabilistic relationships in data.

Summary updated

BibTeX
@inproceedings{deleu2023joint,
  author = {Tristan Deleu and Mizu Nishikawa-Toomey and Jithendaraa Subramanian and Nikolay Malkin and Laurent Charlin and Yoshua Bengio},
  title = {{Joint Bayesian Inference of Graphical Structure and Parameters with a Single Generative Flow Network}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=t7lnhhi7De},
}
Figure