Deaglan J. Bartlett, Marco Chiarenza, Ludvig Doeser, Florent Leclercq
{"title":"COmoving Computer Acceleration (COCA): N-body simulations in an emulated frame of reference","authors":"Deaglan J. Bartlett, Marco Chiarenza, Ludvig Doeser, Florent Leclercq","doi":"10.1051/0004-6361/202452217","DOIUrl":null,"url":null,"abstract":"<i>Context.N<i/>-body simulations are computationally expensive and machine learning (ML) based emulation techniques have thus emerged as a way to increase their speed. Surrogate models are indeed fast, however, they are limited in terms of their trustworthiness due to potentially substantial emulation errors that current approaches are not equipped to correct.<i>Aims.<i/> To alleviate this problem, we have introduced COmoving Computer Acceleration (COCA), a hybrid framework interfacing ML algorithm with an <i>N<i/>-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. Thus, we are able to find a solution for the perturbation of particle trajectories around the ML solution. This approach is computationally cheaper than obtaining the full solution and it is guaranteed to converge to the truth as the number of force evaluations is increased.<i>Methods.<i/> Even though it is applicable to any ML algorithm and <i>N<i/>-body simulator, we assessed this approach in the particular case of particle-mesh (PM) cosmological simulations in a frame of reference predicted by a convolutional neural network. In such cases, the time dependence is encoded as an additional input parameter to the network.<i>Results.<i/> We find that COCA efficiently reduces emulation errors in particle trajectories, requiring far fewer force evaluations than running the corresponding simulation without ML. As a consequence, we were able to obtain accurate final density and velocity fields for a reduced computational budget. We demonstrate that this method exhibits 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.<i>Conclusions.<i/> Therefore, COCA makes <i>N<i/>-body simulations cheaper by skipping unnecessary force evaluations, while still solving the correct equations of motion and correcting for emulation errors made by ML.","PeriodicalId":8571,"journal":{"name":"Astronomy & Astrophysics","volume":"495 1","pages":""},"PeriodicalIF":5.4000,"publicationDate":"2025-02-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Astronomy & Astrophysics","FirstCategoryId":"101","ListUrlMain":"https://doi.org/10.1051/0004-6361/202452217","RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"ASTRONOMY & ASTROPHYSICS","Score":null,"Total":0}
引用次数: 0
摘要
N体模拟计算成本高昂,因此基于机器学习(ML)的仿真技术应运而生,成为提高模拟速度的一种方法。代用模型的速度确实很快,但由于目前的方法无法纠正潜在的大量仿真错误,因此在可信度方面受到限制。为了缓解这一问题,我们引入了 COmoving Computer Acceleration (COCA),这是一个将 ML 算法与 N-body 模拟器相结合的混合框架。正确的物理运动方程在仿真参照系中求解,因此任何仿真误差都能通过设计得到纠正。这样,我们就能找到围绕 ML 解法的粒子轨迹扰动解。这种方法的计算成本比获取完整解决方案更低,而且随着受力评估次数的增加,它还能保证收敛到真相。尽管这种方法适用于任何 ML 算法和 N-body 模拟器,我们还是在卷积神经网络预测的参照系中对粒子网格(PM)宇宙学模拟的特殊情况下评估了这种方法。在这种情况下,时间依赖性被编码为网络的附加输入参数。我们发现,COCA 能有效减少粒子轨迹的模拟误差,所需的力评估次数远远少于不使用 ML 的相应模拟。因此,我们能够以较少的计算预算获得精确的最终密度场和速度场。我们证明了这种方法在应用于训练数据范围之外的示例时表现出的鲁棒性。与使用相同训练资源直接模拟拉格朗日位移场相比,COCA 能够纠正模拟误差,从而获得更准确的预测结果。因此,COCA 通过跳过不必要的力评估,同时仍然求解正确的运动方程并纠正 ML 模拟错误,从而降低了 N 体模拟的成本。
COmoving Computer Acceleration (COCA): N-body simulations in an emulated frame of reference
Context.N-body simulations are computationally expensive and machine learning (ML) based emulation techniques have thus emerged as a way to increase their speed. Surrogate models are indeed fast, however, they are limited in terms of their trustworthiness due to potentially substantial emulation errors that current approaches are not equipped to correct.Aims. To alleviate this problem, we have introduced COmoving Computer Acceleration (COCA), a hybrid framework interfacing ML algorithm 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. Thus, we are able to find a solution for the perturbation of particle trajectories around the ML solution. This approach is computationally cheaper than obtaining the full solution and it is guaranteed to converge to the truth as the number of force evaluations is increased.Methods. Even though it is applicable to any ML algorithm and N-body simulator, we assessed this approach in the particular case of particle-mesh (PM) cosmological simulations in a frame of reference predicted by a convolutional neural network. In such cases, the time dependence is encoded as an additional input parameter to the network.Results. We find that COCA efficiently reduces emulation errors in particle trajectories, requiring far fewer force evaluations than running the corresponding simulation without ML. As a consequence, we were able to obtain accurate final density and velocity fields for a reduced computational budget. We demonstrate that this method exhibits 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.Conclusions. Therefore, 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.
期刊介绍:
Astronomy & Astrophysics is an international Journal that publishes papers on all aspects of astronomy and astrophysics (theoretical, observational, and instrumental) independently of the techniques used to obtain the results.