Product Monte Carlo: Expectation Under a Product of Densities
Organizations: University of Texas at Austin, Department of Statistics and Data Sciences · Duke University, Department of Statistical Science
Abstract
Aggregating independently computed sub-sample inferences is a well-known challenge in large-scale Bayesian computation, federated learning, and opinion pooling. The core problem is to approximate a distribution whose density is proportional to a product of individual densities. We propose Product Monte Carlo (PMC), an algorithm for computing arbitrary expectations under a product of densities using only Monte Carlo draws from individual densities. We turn the intractable product expectation into a regression problem by expressing it through a family of computable conditional expectations. Besides the point estimate, our fully Bayesian regression formulation provides coherent uncertainty quantification and principled diagnostics. We establish theoretical guarantees on consistency and characterize convergence rates for the PMC estimator. Across simulated and real-data experiments varying the number, dimensionality, and heterogeneity of the component distributions, PMC achieves higher estimation accuracy, better-calibrated uncertainty coverage, and improved scalability at a lower computational cost than existing methods. In addition, PMC requires no density evaluation, making it applicable to simulation-based inference, as we demonstrate in an application with protein images.
Figures & tables
| Method | Distribution-free | Evaluation-free | UQ |
|---|---|---|---|
| Parametric approx. | |||
| Weighting | |||
| Fusion | |||
| PMC |
| Method | Estimation error | Merge (min) | Total (min) |
|---|---|---|---|
| Full MCMC | 0.0000 | – | 0.8152 |
| Subsample | – | – | 0.9796 |
| GBF | 0.0184 | 0.2047 | 1.1843 |
| PMC-OLS | 0.0110 | 0.0002 | 0.9799 |
| PMC-MLP | 0.0144 | 0.1069 | 1.0866 |
| PMC-GP | 0.0258 | 0.1009 | 1.0806 |
| Method | Estimation error | Merge (min) | Total (min) |
|---|---|---|---|
| Full MCMC | 0.0000 | – | 308.1124 |
| Subsample | – | – | 35.2890 |
| PMC-OLS | 0.0020 | 0.0122 | 35.3012 |
| PMC-MLP | 0.0001 | 0.1092 | 35.3982 |
| PMC-GP | 0.0001 | 6.7192 | 42.0082 |
Appendix figures & tables58 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Estimation error | Merge (min) | Total (min) |
|---|---|---|---|
| Oracle | 0.0000 | – | 0.9936 |
| Batch | – | – | 0.8302 |
| GBF | 0.0475 | 27.2566 | 28.0868 |
| PMC-OLS | 0.0676 | 0.0050 | 0.8352 |
| PMC-MLP | 0.0101 | 0.1152 | 0.9455 |
| PMC-GP | 0.0091 | 0.5056 | 1.3359 |
| Component | Specification |
|---|---|
| CPU | 2 AMD EPYC 7763 (128 physical cores, 256 threads, 255 online) |
| GPU | 4 NVIDIA RTX A4000 (16 GB memory each) |
| RAM | 881 GiB usable, shared across all users |
| OS | Ubuntu 20.04 LTS |
| Setting | Value |
|---|---|
| Methods | PMC-OLS, PMC-MLP, PMC-GP, GBF, and the Oracle |
| Targets | and |
| Sample sizes | , , , , , , , , , and, only for the univariate Gaussian location and scale experiment, |
| Realized sample size | draws per component |
| Replications | independent replications per experimental configuration |
| Number of components | , except in the experiments on the number of components |
| PMC-OLS | |
|---|---|
| Polynomial degree | 1 |
| PMC-MLP | |
| Hidden layers | 64, 64, 64 |
| Activation | ReLU |
| Ensemble size | 2 |
| Optimizer | Adam |
| Experiments | Setting | Common value | Value used |
|---|---|---|---|
| Multivariate Gaussian, dimension ( ) | Kernel | Matérn-3/2 | RBF |
| Fixed mean | |||
| Fixed lengthscale | 6 | 3 |
| Experiment | Method | Cell | Changed settings |
|---|---|---|---|
| Univariate Gaussian, location and scale | PMC-MLP | , , , square | learning rate , training steps 16,000 |
| PMC-MLP | , , , square | hidden layers 256, 256, 256, learning rate , batch size 4096 | |
| PMC-GP | , , , identity | fixed lengthscale 16 | |
| PMC-GP | , , , square | fixed lengthscale 20 | |
| Univariate Gaussian, number of components, homogeneous ( ) | PMC-GP | , , identity | kernel RBF, fixed lengthscale 16 |
| PMC-GP | , , square | kernel RBF, fixed lengthscale 16 |
| PMC-OLS | |
|---|---|
| Polynomial degree | 1 |
| PMC-MLP | |
| Hidden layers | 64, 64, 64 |
| Activation | ReLU |
| Discrepancy centering | mean |
| Optimizer | Adam |
| PMC-GP | |
|---|---|
| Kernel | Matérn-3/2 |
| Inducing points | 64 |
| Learn inducing locations | No |
| Learn kernel hyperparameters | Yes |
| Maximum updates | 40 |
| Minimum epochs | 20 |
| PMC-GP | |
| Kernel | RBF |
| Inducing points | 64 |
| Learn inducing locations | No |
| Learn kernel hyperparameters | Yes |
| Maximum updates | 1600 |
| Minimum epochs | 10 |
| Setting | Value |
|---|---|
| GBF | |
| Output particles | (Gaussian and Beta components); (Gaussian mixtures) |
| Coalescence time and time mesh | chosen by the SSH guidance of the DCFusion package, with a minimum conditional effective sample size of at initialization |
| Preconditioning | sample variance (univariate Gaussians) or sample covariance (bivariate and multivariate Gaussians) of each component |
| Resampling threshold | resample when the effective sample size falls below half of the number of particles |
| Resampling method | multinomial |
| Components | Oracle |
|---|---|
| Gaussian | fit the mean and covariance of each component from its draws and combine them analytically into the Gaussian product |
| Beta | fit the two shape parameters of each component by maximum likelihood, with location and scale fixed, and combine them analytically into the Beta product |
| Gaussian mixture | fit each component by EM with the true number of modes, a full covariance, random restarts, at most iterations, a tolerance of , and a variance floor of , and compute the product exactly |
| Setting | Respiratory | HIGGS | MAGIC |
|---|---|---|---|
| Data | |||
| Observations | |||
| Coefficients | |||
| Number of batches | |||
| Oracle and batch sampler (NUTS) | |||
| Prior scale | |||
| Setting | Respiratory | HIGGS | MAGIC |
|---|---|---|---|
| GBF | |||
| Run | Yes | No | Yes |
| Particles per level | – | ||
| Merge factors | – | ||
| Time mesh | – | ||
| Preconditioning | Yes | – | Yes |
| Setting | Value |
|---|---|
| All PMC methods | |
| Posterior draws per batch | |
| Sampling | independent pairing across batches |
| Consensus weights | equal ( ) |
| Discrepancy construction | consecutive differences |
| Targets | and |
| Setting | Value |
|---|---|
| Experiment | |
| Number of images | |
| Posterior draws per image | |
| Parameter | , with true value |
| Image-level prior on | |
| Prior given all images | |
| Setting | Value |
|---|---|
| PMC-OLS | |
| Polynomial degree | |
| PMC-MLP | |
| Hidden layers | |
| Activation | ReLU |
| Optimizer | Adam |