Abstract
Current and upcoming cosmological surveys will produce unprecedented amounts of high-dimensional data, which require complex high-fidelity forward simulations to accurately model both physical processes and systematic effects which describe the data generation process. However, validating whether our theoretical models accurately describe the observed datasets remains a fundamental challenge. An additional complexity to this task comes from choosing appropriate representations of the data which retain all the relevant cosmological information, while reducing the dimensionality of the original dataset. In this work we present a novel framework combining scale-dependent neural summary statistics with normalizing flows to detect model misspecification in cosmological simulations through Bayesian evidence estimation. By conditioning our neural network models for data compression and evidence estimation on the smoothing scale, we systematically identify where theoretical models break down in a data-driven manner. We demonstrate a first application to our approach using matter and gas density fields from three CAMELS simulation suites with different subgrid physics implementations.
Introduction
Modern cosmology relies heavily on comparing massive observational datasets against complex forward simulations. However, a fundamental challenge remains: how do we know if our simulations actually describe the real universe? Traditional goodness-of-fit tests, such as $\chi^2$, often fail in the high-dimensional spaces of modern survey data. This is a critical issue because if simulations contain incorrect physics—particularly on small scales where "baryonic" processes like supernovae and black hole feedback dominate—the inferred cosmological parameters will be biased. This paper frames model validation as an Out-of-Distribution (OOD) detection problem, aiming to identify not just if a model is wrong, but at what physical scale it begins to fail.
Methodology: The Scale-Dependent Framework
The authors propose a two-step framework that evaluates data across different physical resolutions by conditioning neural networks on a smoothing scale.
- Scale-Conditioned Compression: A convolutional neural network (ResNet-10-T) compresses high-dimensional 2D density maps into a 40-dimensional summary statistic. This network is explicitly conditioned on a Gaussian smoothing scale ($k_s$), allowing a single model to process data at various physical resolutions.
- Evidence Estimation via Normalizing Flows: Once compressed, a Masked Autoregressive Flow (MAF) estimates the probability density (Bayesian evidence) of these summary statistics, $\log p(t_s|k_s)$.
- Anomaly Detection: The estimated Bayesian evidence acts as an OOD score. If a new observation yields a low probability density under the trained flow model, it flags that the simulation's physics likely doesn't match the observation. By sweeping through the smoothing scale $k_s$, the framework identifies exactly where the models diverge.
Datasets and Experimental Setup
The study utilizes 2D maps from the CAMELS project, focusing on total matter density ($M_{tot}$) and gas density ($M_{gas}$) at redshift $z=0$.
Three different simulation suites with distinct subgrid physics models are used: Astrid, IllustrisTNG, and SIMBA. In the experimental setup, Astrid is treated as the "ground truth" baseline for training, while IllustrisTNG and SIMBA are treated as "mock observations" to test the OOD detection capabilities.
Key Insights and Results
- Scale Sensitivity: The framework demonstrates that different physics models often look identical on large scales (where gravity dominates) but become highly anomalous on small scales where baryonic feedback recipes differ.
- Gas as a Diagnostic: Gas density maps are vastly more sensitive to subgrid physics differences than total matter maps. For $M_{gas}$, both SIMBA and IllustrisTNG drop below a 20% percentile rank (indicating high anomaly) at small scales.
- Correlation with Parameter Bias: There is a clear quantitative link between OOD detectability and parameter bias. As the OOD score drops, the parameter bias (measured via a "miscalibration area" metric) spikes, confirming that the detector successfully flags data that would lead to incorrect physical inferences.
Conclusion and Future Work
While the framework is a powerful diagnostic, it is limited by physical degeneracies—situations where missing physics might mimic a shift in a cosmological parameter, potentially evading detection. Future work will extend this 2D proof-of-concept to 3D point clouds (galaxy catalogs) and explore self-supervised learning for generating summary statistics. This approach provides a crucial, data-driven "goodness-of-fit" metric to ensure we do not confidently predict incorrect parameters due to flawed simulations.
Summary updated