[Paper Review] A Universal Marginalizer for Amortized Inference in Generative Models
This paper proposes a Universal Marginalizer (UM), a single neural network that approximates all conditional marginal distributions in a Bayesian network for arbitrary evidence sets. By combining ancestral sampling with a learnable masking mechanism and training on diverse observation patterns, the UM enables amortized inference and significantly improves importance sampling efficiency through hybrid proposals, reducing required samples by up to 8 times while maintaining high accuracy.
We consider the problem of inference in a causal generative model where the set of available observations differs between data instances. We show how combining samples drawn from the graphical model with an appropriate masking function makes it possible to train a single neural network to approximate all the corresponding conditional marginal distributions and thus amortize the cost of inference. We further demonstrate that the efficiency of importance sampling may be improved by basing proposals on the output of the neural network. We also outline how the same network can be used to generate samples from an approximate joint posterior via a chain decomposition of the graph.
Motivation & Objective
- To address the high computational cost of inference in complex causal generative models with varying evidence sets.
- To develop a single neural network that can approximate all conditional marginal distributions across arbitrary observations in a Bayesian network.
- To improve the efficiency of importance sampling by using the UM's output as a proposal distribution.
- To enable joint posterior sampling via chain decomposition of the graphical model using the UM.
- To demonstrate that a single UM can replace multiple specialized models, reducing inference overhead.
Proposed method
- Train a feed-forward neural network to predict marginal posteriors P(Xi|XO= xO) for all nodes Xi in a Bayesian network, given any subset of observed nodes XO.
- Use probabilistic masking during training, where each node is independently masked with uniform probability to simulate arbitrary observation patterns.
- Encode observed and unobserved nodes using 2-bit or 33-bit representations, including prior probabilities for unobserved nodes.
- Train the network using binary cross-entropy loss in a multi-label classification setting to predict node probabilities.
- Construct hybrid importance sampling proposals by blending ancestral sampling with UM-predicted marginals using a mixing parameter β.
- Use the UM output to guide sequential sampling in a topologically ordered chain decomposition, improving proposal quality.
Experimental results
Research questions
- RQ1Can a single neural network approximate all conditional marginal distributions in a Bayesian network for any subset of observed variables?
- RQ2Does using the UM's output as a proposal in importance sampling improve sampling efficiency compared to standard methods?
- RQ3How does the performance of the UM vary with different network architectures and input encodings?
- RQ4Can the UM be used to generate joint posterior samples via chain decomposition of the graphical model?
- RQ5What is the optimal mixing strategy between ancestral sampling and UM-based proposals for importance sampling?
Key findings
- The largest one-layer neural network (2048 units) achieved the best performance, with a mean absolute error of 0.0060 and maximum absolute error of 0.3223 using the 33-bit representation with priors.
- Hybrid importance sampling with β = 0.25 achieved 95% correlation between true and estimated marginals in 250,000 samples, outperforming standard IS (β = 0) which required 2 million samples to reach 92%.
- The hybrid proposal method achieved a 96% correlation with 2 million samples, demonstrating both higher accuracy and reduced computational cost.
- The 33-bit representation, which includes prior probabilities for unobserved nodes, slightly outperformed the 2-bit representation in both mean and maximum error metrics.
- The UM-based hybrid proposal reduced the number of required samples by up to 8-fold while maintaining or improving correlation and effective sample size (ESS).
- The method enables amortized inference across all possible evidence sets using a single model, eliminating the need for separate models per observation pattern.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.