# COmoving Computer Acceleration (COCA): N-body simulations in an emulated frame of reference

arXiv: https://arxiv.org/abs/2409.02154 · HTML: https://mlsanity.com/paper/2409.02154/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 19 of its 73 references that are in the map.
- First posted on arXiv 3 Sep 2024.

## Builds on (most cited first, 19 of 19)

- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [U-Net: Convolutional Networks for Biomedical Image Segmentation](https://mlsanity.com/paper/1505.04597/) (2015)
- [Analyzing and Improving the Image Quality of StyleGAN](https://mlsanity.com/paper/1912.04958/) (2019)
- [V-Net: Fully Convolutional Neural Networks for Volumetric Medical Image Segmentation](https://mlsanity.com/paper/1606.04797/) (2016)
- [Learning to Predict the Cosmological Structure Formation](https://mlsanity.com/paper/1811.06533/) (2018)
- [Exhaustive Symbolic Regression](https://mlsanity.com/paper/2211.11461/) (2022)
- [AI-assisted super-resolution cosmological simulations](https://mlsanity.com/paper/2010.06608/) (2020)
- [Field Level Neural Network Emulator for Cosmological N-body Simulations](https://mlsanity.com/paper/2206.04594/) (2022)
- [Cosmological N-body simulations: a challenge for scalable generative models](https://mlsanity.com/paper/1908.05519/) (2019)
- [LtU-ILI: An All-in-One Framework for Implicit Inference in Astrophysics and Cosmology](https://mlsanity.com/paper/2402.05137/) (2024)
- [Learning effective physical laws for generating cosmological hydrodynamics with Lagrangian Deep Learning](https://mlsanity.com/paper/2010.02926/) (2020)
- [Fast and Accurate Non-Linear Predictions of Universes with Deep Learning](https://mlsanity.com/paper/2012.00240/) (2020)
- [Hybrid Physical-Neural ODEs for Fast N-body Simulations](https://mlsanity.com/paper/2207.05509/) (2022)
- [Learning neutrino effects in Cosmology with Convolutional Neural Networks](https://mlsanity.com/paper/1910.04255/) (2019)
- [Simple lessons from complex learning: what a neural network model learns about cosmic structure formation](https://mlsanity.com/paper/2206.04573/) (2022)
- [Simulation-based inference of Bayesian hierarchical models while checking for model misspecification](https://mlsanity.com/paper/2209.11057/) (2022)
- [Fast emulation of cosmological density fields based on dimensionality reduction and supervised machine-learning](https://mlsanity.com/paper/2304.06099/) (2023)

## Built on by (most cited first, 3 of 3)

- [Bridging Simulators with Conditional Optimal Transport](https://mlsanity.com/paper/2510.24631/) (2025)
- [Learning the Universe: Learning to Optimize Cosmic Initial Conditions with Non-Differentiable Structure Formation Models](https://mlsanity.com/paper/2502.13243/) (2025)
- [Emulating Cosmic Structure Formation with a Lagrangian Neural Cellular Automaton](https://mlsanity.com/paper/2607.27320/) (2026)

## Abstract (arXiv)

N-body simulations are computationally expensive, so machine-learning (ML)-based emulation techniques have emerged as a way to increase their speed. Although fast, surrogate models have limited trustworthiness due to potentially substantial emulation errors that current approaches cannot correct for. To alleviate this problem, we introduce COmoving Computer Acceleration (COCA), a hybrid framework interfacing ML with an N-body simulator. The correct physical equations of motion are solved in an emulated frame of reference, so that any emulation error is corrected by design. This approach corresponds to solving for the perturbation of particle trajectories around the machine-learnt solution, which is computationally cheaper than obtaining the full solution, yet is guaranteed to converge to the truth as one increases the number of force evaluations. Although applicable to any ML algorithm and N-body simulator, this approach is assessed in the particular case of particle-mesh cosmological simulations in a frame of reference predicted by a convolutional neural network, where the time dependence is encoded as an additional input parameter to the network. COCA efficiently reduces emulation errors in particle trajectories, requiring far fewer force evaluations than running the corresponding simulation without ML. We obtain accurate final density and velocity fields for a reduced computational budget. We demonstrate that this method shows robustness when applied to examples outside the range of the training data. When compared to the direct emulation of the Lagrangian displacement field using the same training resources, COCA's ability to correct emulation errors results in more accurate predictions. COCA makes N-body simulations cheaper by skipping unnecessary force evaluations, while still solving the correct equations of motion and correcting for emulation errors made by ML.
