arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.05163astro-ph.COastro-ph.IM
收藏

JAX-COSMO:一个端到端可微且GPU加速的宇宙学库

JAX-COSMO: An End-to-End Differentiable and GPU Accelerated Cosmology Library

Jean-Eric Campagne, François Lanusse, Joe Zuntz, Alexandre Boucaud, Santiago Casas, Minas Karamanis, David Kirkby, Denise Lanzieri, Yin Li, Austin Peel

AI总结:

本研究提出基于JAX的可微宇宙学库jax-cosmo,支持多硬件加速与自动微分,实现多种宇宙学计算的可微化,结合概率编程语言可高效执行先进贝叶斯推断,为宇宙学分析提供新工具。

摘要:

我们提出了jax-cosmo,这是一个用于宇宙学理论计算自动微分的库。它使用JAX库,后者已经构建了一个全新的编程生态系统,尤其在概率编程领域表现突出。除了批量加速、即时编译以及针对不同硬件类型(CPU、GPU、TPU)的代码自动优化功能外,JAX还提供了自动微分(autodiff)机制。得益于自动微分技术,jax-cosmo能够获取宇宙学似然函数相对于其任意参数的导数,从而支持一系列原本在宇宙学领域难以实现的强大贝叶斯推断算法,例如哈密顿蒙特卡洛(Hamiltonian Monte Carlo)和变分推断(Variational Inference)。\n在其初始版本中,jax-cosmo实现了背景演化、线性与非线性功率谱(采用halofit模型或Eisenstein and Hu转移函数),以及适用于星系和弱引力透镜探测的、基于Limber近似的角功率谱,所有这些计算都支持相对于宇宙学参数及其他输入量的微分操作。我们举例说明了自动微分如何为费希尔矩阵计算、或基于梯度技术的完整后验推断等常见任务带来颠覆性改变。具体而言,我们展示了如今费希尔矩阵计算速度快、结果精确,不再需要任何精细调优,且其本身也具备可微性。\n最后,我们以暗能量巡天第一年(Dark Energy Survey Year 1)的3x2pt分析作为基准,演示了jax-cosmo如何与概率编程语言结合,使用包括无回跳采样器(No U-Turn Sampler)、自动微分变分推断(Automatic Differentiation Variational Inference)以及神经输运哈密顿蒙特卡洛(Neural Transport HMC)在内的前沿算法执行后验推断。我们进一步证明,采用神经输运的归一化流(Normalizing Flows)是分析初期阶段模型验证的一种很有前景的方法。

英文摘要:

We present jax-cosmo, a library for automatically differentiable cosmological theory calculations. It uses the JAX library, which has created a new coding ecosystem, especially in probabilistic programming. As well as batch acceleration, just-in-time compilation, and automatic optimization of code for different hardware modalities (CPU, GPU, TPU), JAX exposes an automatic differentiation (autodiff) mechanism. Thanks to autodiff, jax-cosmo gives access to the derivatives of cosmological likelihoods with respect to any of their parameters, and thus enables a range of powerful Bayesian inference algorithms, otherwise impractical in cosmology, such as Hamiltonian Monte Carlo and Variational Inference. In its initial release, jax-cosmo implements background evolution, linear and non-linear power spectra (using halofit or the Eisenstein and Hu transfer function), as well as angular power spectra with the Limber approximation for galaxy and weak lensing probes, all differentiable with respect to the cosmological parameters and their other inputs. We illustrate how autodiff can be a game-changer for common tasks involving Fisher matrix computations, or full posterior inference with gradient-based techniques. In particular, we show how Fisher matrices are now fast, exact, no longer require any fine tuning, and are themselves differentiable. Finally, using a Dark Energy Survey Year 1 3x2pt analysis as a benchmark, we demonstrate how jax-cosmo can be combined with Probabilistic Programming Languages to perform posterior inference with state-of-the-art algorithms including a No U-Turn Sampler, Automatic Differentiation Variational Inference,and Neural Transport HMC. We further demonstrate that Normalizing Flows using Neural Transport are a promising methodology for model validation in the early stages of analysis.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑