# Hierarchical Inference With Bayesian Neural Networks: An Application to Strong Gravitational Lensing

arXiv: https://arxiv.org/abs/2010.13787 · HTML: https://mlsanity.com/paper/2010.13787/

## Key facts

- Cited by 10 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 26 Oct 2020.

## Built on by (most cited first, 10 of 10)

- [Sampling-Based Accuracy Testing of Posterior Estimators for General Inference](https://mlsanity.com/paper/2302.03026/) (2023)
- [A Bayesian neural network predicts the dissolution of compact planetary systems](https://mlsanity.com/paper/2101.04117/) (2021)
- [Hierarchical Neural Simulation-Based Inference Over Event Ensembles](https://mlsanity.com/paper/2306.12584/) (2023)
- [Machine Learning and Cosmology](https://mlsanity.com/paper/2203.08056/) (2022)
- [Inferring Black Hole Properties from Astronomical Multivariate Time Series with Bayesian Attentive Neural Processes](https://mlsanity.com/paper/2106.01450/) (2021)
- [Constraining cosmological parameters from N-body simulations with Variational Bayesian Neural Networks](https://mlsanity.com/paper/2301.03991/) (2023)
- [Hierarchical Inference of the Lensing Convergence from Photometric Catalogs with Bayesian Graph Neural Networks](https://mlsanity.com/paper/2211.07807/) (2022)
- [Pixelated Reconstruction of Foreground Density and Background Surface Brightness in Gravitational Lensing Systems using Recurrent Inference Machines](https://mlsanity.com/paper/2301.04168/) (2023)
- [Inferring Structural Parameters of Low-Surface-Brightness-Galaxies with Uncertainty Quantification using Bayesian Neural Networks](https://mlsanity.com/paper/2207.03471/) (2022)
- [Strong Gravitational Lensing Parameter Estimation with Vision Transformer](https://mlsanity.com/paper/2210.04143/) (2022)

## Abstract (arXiv)

In the past few years, approximate Bayesian Neural Networks (BNNs) have demonstrated the ability to produce statistically consistent posteriors on a wide range of inference problems at unprecedented speed and scale. However, any disconnect between training sets and the distribution of real-world objects can introduce bias when BNNs are applied to data. This is a common challenge in astrophysics and cosmology, where the unknown distribution of objects in our Universe is often the science goal. In this work, we incorporate BNNs with flexible posterior parameterizations into a hierarchical inference framework that allows for the reconstruction of population hyperparameters and removes the bias introduced by the training distribution. We focus on the challenge of producing posterior PDFs for strong gravitational lens mass model parameters given Hubble Space Telescope (HST) quality single-filter, lens-subtracted, synthetic imaging data. We show that the posterior PDFs are sufficiently accurate (i.e., statistically consistent with the truth) across a wide variety of power-law elliptical lens mass distributions. We then apply our approach to test data sets whose lens parameters are drawn from distributions that are drastically different from the training set. We show that our hierarchical inference framework mitigates the bias introduced by an unrepresentative training set's interim prior. Simultaneously, given a sufficiently broad training set, we can precisely reconstruct the population hyperparameters governing our test distributions. Our full pipeline, from training to hierarchical inference on thousands of lenses, can be run in a day. The framework presented here will allow us to efficiently exploit the full constraining power of future ground- and space-based surveys.
