---
layout: post
title: "Flexible Simulation Based Inference for Galaxy Photometric Fitting with Synthesizer"
date: 2025-11-13
categories: papers
---

<!-- BEGINNING OF GENERATED POST -->
A central challenge in modern astrophysics is extracting physical properties from the billions of galaxies being observed by next-generation surveys like JWST, Euclid, and the Roman Space Telescope. In our latest paper, [2511.10640](https://arxiv.org/abs/2511.10640), lead author Thomas Harvey and collaborators introduce `Synference`, a powerful new framework designed to meet this challenge head-on. This work directly tackles the computational bottleneck of traditional Bayesian inference, paving the way for rapid, robust analysis of unprecedentedly large datasets.
### The Scalability Problem in Galaxy SED Fitting
For decades, astronomers have relied on Bayesian techniques like Markov Chain Monte Carlo (MCMC) and nested sampling to fit spectral energy distributions (SEDs) and infer galaxy properties such as stellar mass, star formation history, and dust content. While powerful, these methods are computationally intensive. A single galaxy can take minutes to days to analyze with established codes like `BAGPIPES` ([1712.04452](https://arxiv.org/abs/1712.04452)) or `Prospector` ([10.21105/joss.03156](https://doi.org/10.21105/joss.03156)). Applying these tools to the billions of galaxies expected from upcoming surveys is simply intractable, creating a significant barrier to scientific discovery.
### A New Paradigm: Simulation-Based Inference
Our group is pioneering the use of Simulation-Based Inference (SBI) to overcome these limitations, a field that has rapidly advanced to the frontier of data-driven science ([1911.01429](https://arxiv.org/abs/1911.01429)). Instead of calculating a computationally expensive likelihood function for each observation, SBI methods train a neural network to learn the direct statistical mapping between observations (like galaxy photometry) and their underlying physical parameters.
The key advantage is **amortized inference**. Once the network is trained on a comprehensive set of simulations, it can generate full posterior distributions for new, real observations almost instantaneously. This one-time training cost is "amortized" across millions of subsequent inferences, making large-scale analysis feasible.
### Introducing `Synference`: A Flexible and Powerful SBI Framework
The paper introduces `Synference`, a new, flexible Python framework for galaxy SED fitting that encapsulates the power of SBI. It is designed to be both user-friendly and highly adaptable, with a modular workflow:
* **Flexible Forward-Modelling:** `Synference` leverages the `Synthesizer` package to generate vast libraries of realistic galaxy SEDs. This allows for bespoke physical models, incorporating a wide range of stellar population synthesis (SPS) models, star formation histories, dust attenuation laws, and more.
* **Best Practices in Training:** It integrates the `LtU-ILI` package to ensure robust model training and validation, including hyperparameter optimization and rigorous calibration checks.
* **Rapid, Amortized Inference:** Once trained, the resulting neural posterior estimator can be applied to massive observational catalogues to derive full Bayesian posteriors with exceptional speed.
### Demonstrating Unprecedented Performance
To showcase its capabilities, the team trained a neural posterior estimator on one million simulated galaxies, using a flexible 8-parameter physical model to infer galaxy properties from 14-band HST and JWST photometry. The validation results were outstanding:
* **High Accuracy:** The model demonstrates excellent parameter recovery, achieving a coefficient of determination (R²) greater than 0.99 for stellar mass.
* **Reliable Posteriors:** The inferred posteriors are well-calibrated and show strong agreement with results from traditional, computationally expensive nested sampling runs.
When applied to a real sample of 3,088 spectroscopically-confirmed galaxies from the JADES GOODS-South field, `Synference` processed the entire catalogue in approximately **3 minutes on a single CPU**. This represents an astonishing **~1700-fold speedup** over conventional methods, turning a weeks-long computation into a coffee break task.
### Pushing the Scientific Frontier
Beyond its speed, `Synference` unlocks new scientific possibilities. The framework can simultaneously infer photometric redshifts alongside physical parameters, providing a comprehensive characterization of galaxies without prior spectroscopic information. Furthermore, its efficiency makes it an ideal tool for rapid Bayesian model comparison. As a proof of concept, the authors demonstrate this by uncovering systematic stellar mass differences between results using the BPASS and FSPS stellar population synthesis models.
`Synference` stands as a powerful, scalable tool poised to maximize the scientific return of next-generation surveys. This work, led by Thomas Harvey and co-authored by our group member Christopher C. Lovell among others, exemplifies our commitment to developing innovative AI-driven methodologies to unravel the mysteries of the cosmos.
<!-- END OF GENERATED POST -->
<img src="/assets/group/images/chris_lovell.jpg" alt="Chris Lovell" style="width: auto; height: 25vw;">
Content generated by [gemini-2.5-pro](https://deepmind.google/technologies/gemini/) using [this prompt](/prompts/content/2025-11-13-2511.10640.txt).
Image generated by [imagen-4.0-generate-001](https://deepmind.google/technologies/gemini/) using [this prompt](/prompts/images/2025-11-13-2511.10640.txt).