Scalable Bayesian Inference for Finding Strong Gravitational Lenses

Yash Patel, Jeffrey Regier · DOI

Abstract

Finding strong gravitational lenses in astronomical images allows us to assess cosmological theories and understand the large-scale structure of the universe. Previous works on lens detection do not quantify uncertainties in lens parameter estimates or scale to modern surveys. We present a fully amortized Bayesian procedure for lens detection that overcomes these limitations. Unlike traditional variational inference, in which training minimizes the reverse Kullback-Leibler (KL) divergence, our method is trained with an expected forward KL divergence. Using synthetic GalSim images and real Sloan Digital Sky Survey (SDSS) images, we demonstrate that amortized inference trained with the forward KL produces well-calibrated uncertainties in both lens detection and parameter estimation.

Introduction

Strong gravitational lensing—where a massive foreground object bends the light of a distant galaxy into arcs or rings—is a critical tool for probing dark matter and the expansion of the universe. However, identifying these rare phenomena in massive datasets is a significant challenge. The upcoming Legacy Survey of Space and Time (LSST) is expected to image approximately 100,000 lenses, necessitating automated detection methods that are both fast and statistically rigorous.

Current approaches typically fall into two categories: deep learning detectors, which are fast but lack reliable uncertainty quantification, and traditional Bayesian methods, which offer rigor but are computationally prohibitive (often requiring over 24 hours per lens). This work bridges the gap by providing a scalable Bayesian framework that delivers the speed of deep learning with the statistical reliability of Bayesian inference.

Methodology

The proposed framework utilizes a fully amortized Bayesian procedure based on the Bayesian Light Source Separator (BLISS) generative model. BLISS treats an astronomical image as a collection of probabilistic sources, modeling the number of sources via a Poisson process and classifying each as a star, galaxy, or lensed galaxy pair. Lensed pairs are specifically modeled using a Singular Isothermal Ellipsoid (SIE) potential.

The core innovation is the use of Forward Amortized Variational Inference (FAVI). Unlike standard Variational Inference, which minimizes the "reverse KL divergence" and often leads to overconfident, under-dispersed results, FAVI minimizes the expected forward KL divergence. This "mass-covering" approach ensures that the resulting posterior approximations are better calibrated, accurately reflecting the model's uncertainty.

Comparison of noisy input images (left) and the model's reconstructed lens profiles (right), demonstrating effective deblending.

Experiments and Results

The model was trained on synthetic images generated with the GalSim toolkit, providing ground-truth data for rigorous calibration assessment. It was then validated on real-world data from the Sloan Digital Sky Survey (SDSS), targeting fields with confirmed gravitational lenses.

Speed and Scalability

By shifting heavy computation to a one-time training phase (approximately 5 hours on 8 GPUs), the inference cost becomes negligible. The model processed large SDSS images (1500 x 2000 pixels) in just 25 seconds, a massive improvement over traditional sampling methods that can take nearly 30 hours for a single lens.

Uncertainty Calibration

A key strength of the FAVI approach is its high-fidelity calibration. On synthetic data, the model's 90% Bayesian credible intervals showed excellent coverage. For instance, the Einstein radius ($\theta_E$) achieved a coverage of 94.39%, and lens center coordinates were approximately 92%, closely matching the ideal 90% target.

Calibration plots showing empirical coverage versus theoretical confidence levels for various lens parameters, confirming the reliability of the uncertainty estimates.

Real-World Performance

When applied to real SDSS data, the model successfully identified known lenses without triggering false positives on non-lens objects in the same field. This demonstrates the robustness of the integrated deblending approach, which naturally handles overlapping galaxies by attempting to reconstruct the entire scene.

Conclusion

This work presents a scalable, calibrated Bayesian framework for lens detection. While the current model focuses on strong lensing using SIE profiles, future work could extend this to weak lensing or incorporate more complex models to detect dark matter substructures. The shift to forward KL divergence proves essential for providing the reliable uncertainty estimates required for modern cosmological surveys.

Summary updated

BibTeX
@misc{patel2022scalable,
  author = {Yash Patel and Jeffrey Regier},
  title = {{Scalable Bayesian Inference for Finding Strong Gravitational Lenses}},
  year = {2022},
  eprint = {2211.10479},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.10479},
}
Figure