TY - JOUR
T1 - Field-level Comparison and Robustness Analysis of Cosmological N-body Simulations
AU - Bayer, Adrian E.
AU - Villaescusa-Navarro, Francisco
AU - Sharief, Sammy
AU - Teyssier, Romain
AU - Garrison, Lehman H.
AU - Perreault-Levasseur, Laurence
AU - Bryan, Greg L.
AU - Gatti, Marco
AU - Visbal, Eli
N1 - Publisher Copyright:
© 2025. The Author(s). Published by the American Astronomical Society.
PY - 2025/8/20
Y1 - 2025/8/20
N2 - We present the first field-level comparison of cosmological N-body simulations, considering various widely used codes: Abacus, CUBEP3M, Enzo, Gadget, Gizmo, PKDGrav, and Ramses. Unlike previous comparisons focused on summary statistics, we conduct a comprehensive field-level analysis: evaluating statistical similarity, quantifying implications for cosmological parameter inference, and identifying the regimes in which simulations are consistent. We begin with a traditional comparison using the power spectrum, cross-correlation coefficient, and visual inspection of the matter field. We follow this with a statistical out-of-distribution (OOD) analysis to quantify distributional differences between simulations, revealing insights not captured by the traditional metrics. We then perform field-level simulation-based inference using convolutional neural networks (CNNs), training on one simulation and testing on others, including a full hydrodynamic simulation for comparison. We identify several causes of OOD behavior and biased inference, finding that resolution effects, such as those arising from adaptive mesh refinement (AMR), have a significant impact. Models trained on non-AMR simulations fail catastrophically when evaluated on AMR simulations, introducing larger biases than those from hydrodynamic effects. Differences in resolution, even when using the same N-body code, likewise lead to biased inference. We attribute these failures to a CNN’s sensitivity to small-scale fluctuations, in particular in voids and filaments, and demonstrate that appropriate smoothing brings the simulations into statistical agreement. Our findings motivate the need for careful data filtering and the use of field-level OOD metrics, such as PQMass, to ensure robust inference.
AB - We present the first field-level comparison of cosmological N-body simulations, considering various widely used codes: Abacus, CUBEP3M, Enzo, Gadget, Gizmo, PKDGrav, and Ramses. Unlike previous comparisons focused on summary statistics, we conduct a comprehensive field-level analysis: evaluating statistical similarity, quantifying implications for cosmological parameter inference, and identifying the regimes in which simulations are consistent. We begin with a traditional comparison using the power spectrum, cross-correlation coefficient, and visual inspection of the matter field. We follow this with a statistical out-of-distribution (OOD) analysis to quantify distributional differences between simulations, revealing insights not captured by the traditional metrics. We then perform field-level simulation-based inference using convolutional neural networks (CNNs), training on one simulation and testing on others, including a full hydrodynamic simulation for comparison. We identify several causes of OOD behavior and biased inference, finding that resolution effects, such as those arising from adaptive mesh refinement (AMR), have a significant impact. Models trained on non-AMR simulations fail catastrophically when evaluated on AMR simulations, introducing larger biases than those from hydrodynamic effects. Differences in resolution, even when using the same N-body code, likewise lead to biased inference. We attribute these failures to a CNN’s sensitivity to small-scale fluctuations, in particular in voids and filaments, and demonstrate that appropriate smoothing brings the simulations into statistical agreement. Our findings motivate the need for careful data filtering and the use of field-level OOD metrics, such as PQMass, to ensure robust inference.
UR - https://www.scopus.com/pages/publications/105013483871
UR - https://www.scopus.com/inward/citedby.url?scp=105013483871&partnerID=8YFLogxK
U2 - 10.3847/1538-4357/adef4e
DO - 10.3847/1538-4357/adef4e
M3 - Article
AN - SCOPUS:105013483871
SN - 0004-637X
VL - 989
JO - Astrophysical Journal
JF - Astrophysical Journal
IS - 2
M1 - 207
ER -