Deep learning methods for obtaining photometric redshift estimations from images

Ben Henghes, Jeyan Thiyagalingam, Connor Pettitt, Tony Hey, O. Lahav

Abstract

Knowing the redshift of galaxies is one of the first requirements of many cosmological experiments, and as it's impossible to perform spectroscopy for every galaxy being observed, photometric redshift (photo-z) estimations are still of particular interest. Here, we investigate different deep learning methods for obtaining photo-z estimates directly from images, comparing these with traditional machine learning algorithms which make use of magnitudes retrieved through photometry. As well as testing a convolutional neural network (CNN) and inception-module CNN, we introduce a novel mixed-input model which allows for both images and magnitude data to be used in the same model as a way of further improving the estimated redshifts. The mixed-input inception CNN achieved a mean squared error (MSE)=0.009, which was a significant improvement (30%) over the traditional Random Forest (RF), and the model performed even better at lower redshifts achieving a MSE=0.0007 (a 50% improvement over the RF) in the range of z < 0.3.

Introduction

In cosmology, the redshift ($z$) of a galaxy—the shift of its light toward longer wavelengths due to the expansion of the universe—is a fundamental metric for mapping the large-scale structure of the cosmos. While spectroscopic measurements provide high precision, they are resource-intensive. Modern surveys like the Vera C. Rubin Observatory’s Legacy Survey of Space and Time (LSST) will detect billions of galaxies, making spectroscopy for every object impossible.

Photometric redshift (photo-$z$) estimation offers a scalable alternative by using broad-band filter data. Traditionally, this relies on "feature engineering," where scientists extract magnitudes (brightness) and feed them into algorithms like Random Forests. This study investigates whether deep learning can extract more nuanced information—such as galaxy morphology—directly from raw pixel data to improve these estimates.

Methodology and Architecture

The research compares three primary approaches: traditional machine learning (Random Forest and Extremely Randomised Trees), pure deep learning (standard CNNs and Inception-module CNNs), and a novel mixed-input model.

The Inception-module CNN is particularly noteworthy. Unlike standard CNNs that use a single filter size per layer, the Inception architecture uses parallel filters of different sizes to capture features at multiple spatial scales simultaneously.

The Inception module architecture uses parallel convolutional layers to capture multi-scale features.

The "mixed-input" approach further enhances this by combining the CNN's image-processing capabilities with a Multi-Layer Perceptron (MLP) that processes traditional magnitude data. By concatenating these outputs, the model leverages both raw visual context and pre-calculated brightness statistics.

Dataset

The study utilized a sample of 1 million galaxies from the Sloan Digital Sky Survey (SDSS) Data Release 12. Each entry included:

  • Images: 5-filter ($ugriz$) images cropped to $32 \times 32$ pixels.
  • Photometry: Corresponding 5 magnitude values.
  • Ground Truth: Spectroscopic redshifts ($z < 1$).

Results and Discussion

The Mixed-input Inception CNN significantly outperformed traditional methods. It achieved an overall Mean Squared Error (MSE) of 0.009, representing a 30% improvement over the Random Forest baseline (MSE = 0.0125).

Performance of the Mixed-input CNN showing predicted vs. true redshift.

The performance gain was even more pronounced at lower redshifts ($z < 0.3$), where the model achieved an MSE of 0.0007—a 50% improvement over traditional ML. At these distances, galaxies appear larger and more detailed, allowing the CNN to extract high-quality morphological features that simple magnitude counts ignore. Additionally, the catastrophic outlier fraction dropped from ~4.7% to ~3.0%.

Conclusion

Deep learning, particularly mixed-input architectures, offers a powerful path forward for photometric redshift estimation. By combining raw image data with traditional photometric features, these models capture morphological nuances that improve accuracy and reduce outliers. While training is computationally intensive, the inference speed of these models makes them highly scalable for the next generation of massive cosmological surveys.

Summary updated

BibTeX
@inproceedings{henghes2022deep,
  author = {Ben Henghes and Jeyan Thiyagalingam and Connor Pettitt and Tony Hey and O. Lahav},
  title = {{Deep learning methods for obtaining photometric redshift estimations from images}},
  booktitle = {Monthly},
  year = {2022},
  doi = {10.1093/mnras/stac480},
}
Figure