Amortized Bayesian Mixture Models

Simon Kucharský, Paul-Christian Bürkner · OpenReview

TL;DR

This paper introduces a novel deep learning framework for Amortized Bayesian Inference (ABI) specifically tailored for mixture models. By factorizing the posterior into parameter and mixture membership components, their method enables fast and scalable Bayesian inference for complex mixture models, even when likelihoods are intractable, significantly outperforming traditional MCMC methods in terms of speed.

What Problem Does This Paper Address?

Estimating Bayesian mixture models is notoriously challenging. Traditional methods like MCMC struggle with:

  • Computational Cost: High-dimensional posteriors and label switching (where the model is invariant to permutations of component labels) make inference slow and difficult.
  • Intractable Likelihoods: Many real-world models lack analytically tractable likelihood functions, rendering standard Bayesian inference impossible.
  • Scalability: These methods often fail to scale to large datasets or complex models.

Amortized Bayesian Inference (ABI) offers a promising solution by using neural networks to learn posterior distributions from simulated data, enabling fast inference. However, existing ABI methods haven't been fully adapted to handle the joint inference of both model parameters and the discrete mixture indicators inherent in mixture models. This paper bridges that gap.

Methods

The core innovation lies in a novel ABI framework that factorizes the posterior distribution of mixture models into two parts:

  1. Parameter Posterior: This is handled by a standard ABI approach using neural networks (specifically, normalizing flows are used as an example) to learn the distribution of the model parameters ($\theta$).
  2. Mixture Membership Distribution: This is tackled by a separate classification network that predicts the probability of each data point belonging to a specific mixture component, conditioned on the data and the estimated parameters.

This factorization allows for:

  • Joint Inference: Estimating both parameters and mixture memberships simultaneously.
  • Flexibility: Accommodating both independent and dependent mixture models, enabling filtering and smoothing for time-series data.
  • Amortization: Once trained, the neural networks provide rapid inference, amortizing the computational cost of training over many inference tasks.

The framework utilizes Deep Set architectures for handling exchangeable data and LSTM layers for sequential data, allowing it to adapt to different data structures.

Datasets

The paper uses:

  • Synthetic datasets: Generated from various Gaussian mixture models and a Gaussian hidden Markov model to demonstrate the framework's capabilities in controlled environments.
  • Real-world dataset: From a study on human decision-making (Dutilh et al., 2011) to showcase the model's applicability to empirical data.

No new benchmark datasets were introduced; instead, existing datasets were used to compare against established methods.

Key Insights and Ideas

  • Factorization is Key: Decomposing the mixture model posterior into parameter and indicator distributions is crucial for adapting ABI. This allows leveraging specialized neural network architectures for each component.
  • Classification Networks for Discrete Latents: Using dedicated classification networks for mixture indicators is a natural and effective way to handle discrete latent variables within an ABI framework.
  • Speed Advantage is Significant: The ABI approach offers a dramatic speedup (orders of magnitude) for inference compared to traditional MCMC, making complex Bayesian models more accessible for real-time applications or large-scale validation.
  • Parameter Constraints Handled: The framework effectively handles parameter constraints (e.g., mixture proportions summing to one) by transforming them to an unconstrained space for network training and then back for interpretation.
  • Identifiability Matters: The paper acknowledges the importance of addressing label switching, using techniques like order constraints and weakly informed priors to ensure model identifiability.

Key Results

  • Speed: The ABI implementation achieved inference speeds orders of magnitude faster than MCMC (Stan) for the tested models. For instance, fitting 500 datasets took about a day with Stan versus seconds with BayesFlow.
  • Accuracy: The ABI framework demonstrated comparable accuracy to MCMC in parameter recovery and posterior estimation, as evidenced by simulation-based calibration (SBC) and pairwise scatter plots.
  • Calibration: The framework showed good calibration of posterior approximations and classification probabilities, with confidence intervals often overlapping between ABI and MCMC.
  • Model Fit: For most participants in the real-world case study, the ABI posterior was well-calibrated, and even when slightly biased, could potentially be corrected with importance sampling.

Limitations and Future Work

  • Training Overhead: While inference is fast, the initial training of neural networks can be computationally intensive and require significant hyperparameter tuning.
  • Prior Sensitivity: ABI can be sensitive to prior specifications; overly flat priors can hinder training, while overly narrow ones can lead to failure.
  • Network Architecture: The performance and faithfulness of the ABI approximation are highly dependent on the chosen neural network architecture and hyperparameters.
  • Model Misspecification: While the framework shows promise, identifying and correcting model misspecification remains an active area of research. The paper suggests using techniques like Maximum Mean Discrepancy (MMD) for this purpose.
  • Broader Applicability: The authors believe the framework has broader potential for other complex Bayesian models, especially those where MCMC samplers struggle with isolated parameter regions. Future work could explore more advanced network architectures and optimization strategies.

Summary updated

Abstract

Finite mixtures are a broad class of models useful in scenarios where observed data is generated by multiple distinct processes but without explicit information about the responsible process for each data point. Estimating Bayesian mixture models is computationally challenging due to issues such as high-dimensional posterior inference and label switching. Furthermore, traditional methods such as MCMC are applicable only if the likelihoods for each mixture component are analytically tractable. Amortized Bayesian Inference (ABI) is a simulation-based framework for estimating Bayesian models using generative neural networks. This allows the fitting of models without explicit likelihoods, and provides fast inference. ABI is therefore an attractive framework for estimating mixture models. This paper introduces a novel extension of ABI tailored to mixture models. We factorize the posterior into a distribution of the parameters and a distribution of (categorical) mixture indicators, which allows us to use a combination of generative neural networks for parameter inference, and classification networks for mixture membership identification. The proposed framework accommodates both independent and dependent mixture models, enabling filtering and smoothing. We validate and demonstrate our approach through synthetic and real-world datasets.
BibTeX
@article{kucharsky2026amortized,
  author = {Simon Kucharský and Paul-Christian Bürkner},
  title = {{Amortized Bayesian Mixture Models}},
  journal = {Stat. Comput.},
  year = {2026},
  doi = {10.1007/s11222-026-10911-y},
}
Figure