TL;DR
JSP-GFN is a novel framework that uses a single Generative Flow Network (GFlowNet) to perform joint Bayesian inference over both the structure (DAG) and the parameters of a Bayesian Network. By sampling these components in a unified two-phase process, it enables the use of flexible, non-linear models (like neural networks) while accurately quantifying epistemic uncertainty in both structure and parameters.
What Problem Does This Paper Address?
Learning the structure of Bayesian Networks—represented as Directed Acyclic Graphs (DAGs)—is a fundamental challenge in causal discovery and probabilistic modeling. Most existing methods focus on the marginal posterior $P(G|D)$, which requires calculating the marginal likelihood $P(D|G)$. Unfortunately, this is only computationally tractable for a very limited set of models, such as linear Gaussian systems.
When we move to more complex, non-linear relationships, marginalization becomes intractable. Furthermore, standard structure learning often ignores parameter uncertainty, which can lead to overconfident and incorrect predictions, especially with limited data. This paper tackles the harder problem of joint inference: approximating the posterior distribution $P(G, \theta | D)$ over both the graph structure $G$ and the parameters $\theta$ of the conditional probability distributions.
Methods
The authors introduce JSP-GFN (Joint Structure and Parameters GFlowNet), which leverages recent advances in extending GFlowNets to continuous sample spaces.
- Two-Phase Generation Process: Unlike previous hybrid approaches, JSP-GFN uses a single generative policy. As illustrated in Figure 1, it first constructs a DAG $G$ sequentially, adding one edge at a time. Once the model decides to stop adding edges, it enters a second phase where it samples the continuous parameters $\theta$ conditioned on that specific graph structure.
- Subtrajectory Balance (SubTB): To train the model, the authors derive new SubTB conditions specifically for this mixed discrete-continuous state space. These conditions ensure that the marginal probability of sampling a pair $(G, \theta)$ is proportional to the joint reward $R(G, \theta) = P(D|\theta, G)P(\theta|G)P(G)$.
- Differential SubTB and Score Matching: For differentiable rewards, they show that the SubTB conditions can be expressed in a differential form. This creates a theoretical link to score matching, a well-known technique in density estimation, helping the GFlowNet learn the continuous parameter distribution effectively.
- Scalable Mini-batching: The authors prove that the GFlowNet can be trained using mini-batches of observations, making the approach scalable to large datasets where evaluating the full likelihood at every step would be impossible.
- Architecture: The model uses a common backbone consisting of a Graph Neural Network (GraphNet) and self-attention blocks to encode the graph structure and predict transitions.
Datasets
The authors evaluated JSP-GFN on a mix of synthetic and real-world benchmarks:
- Simulated Small Graphs ($d=5$): Used for rigorous comparison against the exact posterior, which is only computable for very small systems.
- Simulated Large Graphs ($d=20$): Tested on both linear Gaussian models and non-linear models where conditional distributions are parameterized by 2-layer MLPs (Multi-Layer Perceptrons).
- Protein Signaling Networks (Flow Cytometry): A real-world dataset with $d=11$ variables and $N=4,200$ observations, including interventional data.
- Gene Regulatory Networks (Gene Expression): A larger real-world dataset with $d=61$ variables and $N=2,628$ observations.
Key Insights and Ideas
- Unlocking Non-Linearity: By performing joint inference, the need for closed-form marginal likelihoods is removed. This allows Bayesian Networks to use highly flexible local models, such as neural networks, which were previously difficult to use in a fully Bayesian structure learning context.
- Unified Generative Policy: JSP-GFN avoids the complexity of combining different inference frameworks (like MCMC and Variational Bayes). A single GFlowNet handles the entire hierarchical sampling process.
- Handling Variable Dimensionality: The two-phase approach elegantly manages the fact that the number of parameters $\theta$ changes depending on how many edges are in the graph $G$.
- Theoretical Convergence: The authors provide a theorem showing that if the SubTB conditions are satisfied, the GFlowNet is guaranteed to represent the true joint posterior.
Key Results
- High Fidelity to Exact Posterior: On small graphs, JSP-GFN's edge features (the marginal probability of an edge existing) showed a near-perfect correlation ($r \approx 0.998$) with the exact posterior, significantly outperforming other variational and MCMC methods.
- Superior Predictive Performance: In simulated experiments with $d=20$, JSP-GFN achieved lower negative log-likelihood (NLL) on held-out data than MCMC baselines and other state-of-the-art variational methods like DiBS and BCD Nets.
- Real-World Scalability: The method successfully scaled to the 61-node gene regulatory network, where it outperformed MCMC in terms of interventional NLL, demonstrating its utility for complex biological discovery tasks.
Limitations and Future Work
- Unimodal Parameter Posteriors: The current implementation uses diagonal Gaussian distributions for the parameters $P(\theta|G)$. While common, this assumes the parameter posterior is unimodal. In highly non-linear models, the posterior can be multimodal.
- Expressive Parameter Distributions: The authors suggest that future work could replace the simple Gaussian parameter sampler with more expressive models like Normalizing Flows or Diffusion Processes to capture complex parameter dependencies.
- Acyclicity Assumption: The model assumes the underlying structure is a DAG. While standard, this might not hold for systems with feedback loops (e.g., some biological pathways). The authors note the framework could be adapted to cyclic graphs by relaxing the action masking.
Summary updated