ERGO-ML: The assembly histories of HSC galaxy images via invertible neural networks, contrastive learning, and cosmological simulations
Lukas Eisert, Connor Bottrell, Annalisa Pillepich, Dylan Nelson, Rhythm Shimakawa, Marc Huertas-Company, Ralf S. Klessen
TL;DR
This work demonstrates that optical galaxy images contain measurable imprints of merger and assembly histories when combined with simulation-based inference. By mapping images to a 256-dimensional representation via NNCLR and conditioning a FrEIA-based cINN on this representation, the authors infer posteriors for ex-situ fractions, last major merger mass, and lookback time, validated against TNG ground truth and transferred to EAGLE mocks. The approach yields robust ex-situ fraction estimates (within ~10% for 80% of cases) and accurate merger masses at higher stellar masses, while lookback time remains challenging; applying to 750k real HSC galaxies reveals consistent trends with mass and morphology but systematically lower ex-situ fractions than in the simulations. Overall, the method establishes a feasible path to extract galaxy assembly histories from images, enabling direct comparisons between observations and multiple cosmological simulations, with clear avenues for improvement through richer contextual data and expanded multi-wavelength information.
Abstract
In this paper of ERGO-ML (Extracting Reality from Galaxy Observables with Machine Learning), we develop a model that infers the merger/assembly histories of galaxies directly from optical images. We apply the self-supervised contrastive learning framework NNCLR (Nearest-Neighbor Contrastive Learning of visual Representations) on realistic HSC mock images (g,r,i - bands) produced from galaxies simulated within the TNG50 and TNG100 flagship runs of the IllustrisTNG project. The resulting representation is then used as conditional input for a cINN (conditional Invertible Neural Network) to gain posteriors for merger/assembly statistics, particularly the lookback time and stellar mass of the last major merger and the fraction of ex-situ stars. Through validation against the ground truth available for simulated galaxies, we assess the performance of our model, achieving good accuracy in inferring the stellar ex-situ fraction ($\le \pm 10$ per cent for 80 per cent of the test sample) and the mass of the last major merger (within $\pm 0.5 \log \MSUN$ for stellar masses $>10^{9.5} \MSUN$ ). We successfully apply the TNG-trained model to simulated mocks from the EAGLE simulation, demonstrating that our model is applicable outside of the TNG domain. We use our simulation-based model to infer aspects of the history of observed galaxies, in particular for HSC images that are close to the domain of TNG ones. We recover the trend of increasing ex-situ stellar fraction with stellar mass and more spherical morphology, but we also identify a discrepancy between TNG and HSC: on average, observed galaxies generally exhibit lower ex-situ fractions. Despite challenges such as information loss (e.g. projection effects and surface brightness limits) and domain shifts (from simulations to observations), our results demonstrate the feasibility of extracting the merger past of galaxies from their optical images.
