stat.MLSep 30, 2026

BayesNDE: Bayesian Generative Modeling for Neural Density Estimation

Authors: Chenglin Li, Qiao Liu

Organizations: Department of Biostatistics, Yale University New Haven, Connecticut, USA

Abstract

Density estimation is a fundamental problem in statistics and machine learning. In this work, we introduce BayesNDE, a neural density estimator based on Bayesian generative modeling. BayesNDE learns a Bayesian generative model and evaluates its density without requiring invertible networks or Jacobian-determinant computation. For each observation, it infers a sample-specific latent posterior to construct an adaptive proposal that focuses computation on regions contributing most to its density. Bridge sampling then combines samples from this proposal with separate posterior samples to estimate the density. Experiments on nonlinear and multimodal synthetic datasets show improved estimation of density values and better recovery of the density structure compared to the state-of-the-art neural density estimators. Applications to real-world datasets further demonstrate improved anomaly detection. Together, these results highlight BayesNDE as a flexible and effective neural density estimator, demonstrating how posterior inference can turn generative models into tools for density estimation. The code and tutorials are available at https://github.com/liuq-lab/BayesNDE.

Figures & tables

Appendix figures & tables6 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. In-Context Density Estimation for Tabular Data

    Aug 10, 2026Patryk Marszałek, Jacek Tabor, Marek ŚmiejaDensity Ratio EstimationOut-Of-Distribution Detection

  2. Adaptive Kernel Density Estimation with Pre-training

    May 13, 2026Ruitong Zhang, Ke DengDensity Ratio EstimationKernel Method

  3. Constant-Target Energy Matching: A Unified Framework for Continuous and Discrete Density Estimation

    May 9, 2026Zhijun Zeng, Yixuan Jiang, Pipi Hu +1Density Ratio EstimationEnergy Resources