Over the next decade, surveys like the Rubin Observatory's Legacy Survey of Space and Time (LSST) and the Euclid Space Telescope will produce petabytes of imaging data at unprecedented depth. Extracting scientific information from these images, with well-calibrated uncertainties, is a central computational challenge facing modern cosmology. We have entered an era of systematics-limited cosmology, where our understanding of the Universe is constrained more by systematic uncertainties than by data scarcity. In LSST images, over 60% of imaged sources will visually overlap (blending), and traditional pipelines discard faint objects through conservative flux cuts, excluding high-redshift galaxies that provide the greatest constraining power for dark energy.
The BLISS project is an interdisciplinary collaboration between statisticians and physicists. BLISS (Bayesian Light Source Separator) is a Bayesian method for analyzing astronomical images from large cosmological surveys. BLISS provides:
- Accurate estimation of parameters in crowded fields with overlapping sources
- Calibrated uncertainties through fully Bayesian inference via neural posterior estimation (NPE)
- Scalability to petabyte-scale surveys containing billions of celestial objects
BLISS uses neural posterior estimation (NPE), a form of simulation-based inference in which a neural network maps telescope images directly to an approximate Bayesian posterior. Unlike traditional MCMC samplers, which require expensive per-pixel likelihood evaluations and are intractable at survey scale, NPE amortizes the cost of inference: once trained on simulated data, the network performs posterior inference near-instantaneously. Autoregressive tiling with checkerboard patterns aligns the variational distribution's conditional dependencies with the true posterior, improving calibration. By propagating uncertainty through principled posterior distributions, BLISS enables astronomers to extract scientific information from the full depth of survey data, rather than only its brightest fraction. BLISS systematically outperforms standard survey pipelines for light source detection, flux measurement, star/galaxy classification, and galaxy shape measurement.
Requirements: Python 3.12 or higher
BLISS is pip installable with the following command:
pip install bliss-toolkitThe required dependencies are listed in the [project] block of the pyproject.toml file.
- Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh- Install the fftw library (which is used by
galsim). With Ubuntu you can install it by running
sudo apt-get install libfftw3-dev- Install git-lfs if you haven't already installed it for another project:
git-lfs install- Now download the bliss repo and fetch some pre-trained models and test data from git-lfs:
git clone git@github.com:prob-ml/bliss.git- To create a virtual environment with the
blissdependencies satisfied, run
cd bliss
uv sync --all-extras- Activate the virtual environment:
source .venv/bin/activate- Verify that bliss is installed correctly by running the tests both on your CPU (default) and on your GPU:
pytest
pytest --gpu- Finally, if you are planning to contribute code to this repository, consider installing our pre-commit hooks so that your code commits will be checked locally for compliance with our coding conventions:
pre-commit installBLISS provides a command-line interface powered by Hydra for configuration management. The basic usage pattern is:
bliss mode={generate,train,predict} [config options]mode=generate- Generate synthetic training data from the forward modelmode=train- Train encoder networks on simulated or real datamode=predict- Run inference on astronomical images to produce catalogs
Configuration files are located in bliss/conf/ and can be composed and overridden via command line arguments.
The case_studies/ directory contains research applications of BLISS:
- weak_lensing/ - Tomographic shear (γ) and convergence (κ) mapping
- redshift/ - Photo-z estimation (BLISS-PZ) with multiple variational families
- galaxy_clustering/ - Galaxy cluster detection and membership prediction, validated on DES DR2
- dc2_cataloging/ - Full cataloging pipeline for DC2 simulation
- strong_lensing/ - Strong gravitational lens detection
- spatial_tiling/ - Spatially autoregressive tiling for astronomical cataloging
- psf_variation/ - Spatially varying PSFs for astronomical cataloging
Yicun Duan, Xinyue Li, Camille Avestruz, Jeffrey Regier, and LSST Dark Energy Science Collaboration. Neural posterior estimation for cataloging astronomical images from the Legacy Survey of Space and Time. The Astronomical Journal. 2026.
Jeffrey Regier. Neural posterior estimation with autoregressive tiling for detecting objects in astronomical images. Annals of Applied Statistics. 2026.
Ismael Mendoza, Derek Hansen, Runjing Liu, Zhe Zhao, Ziteng Pang, Axel Guinot, Camille Avestruz, Jeffrey Regier, and LSST Dark Energy Science Collaboration. Simulation-based inference for probabilistic galaxy detection and deblending. The Open Journal of Astrophysics. 2026.
Aakash Patel, Tianqing Zhang, Camille Avestruz, Jeffrey Regier, and LSST Dark Energy Science Collaboration. Neural posterior estimation for cataloging astronomical images with spatially varying backgrounds and point spread functions. The Astronomical Journal. 2025.
Runjing Liu, Jon D. McAuliffe, Jeffrey Regier, and LSST Dark Energy Science Collaboration. Variational inference for deblending crowded starfields. Journal of Machine Learning Research. 2023.
Mallory Wang, Ismael Mendoza, Cheng Wang, Camille Avestruz, and Jeffrey Regier. Statistical inference for coadded astronomical images. NeurIPS Workshop on Machine Learning and the Physical Sciences. 2022.
Yash Patel and Jeffrey Regier. Scalable Bayesian inference for detecting strong gravitational lensing systems. NeurIPS Workshop on Machine Learning and the Physical Sciences. 2022.
Derek Hansen, Ismael Mendoza, Runjing Liu, Ziteng Pang, Zhe Zhao, Camille Avestruz, and Jeffrey Regier. Scalable Bayesian inference for detection and deblending in astronomical images. ICML Workshop on Machine Learning for Astrophysics. 2022.
