Flinch: A Differentiable Framework for Field-Level Inference of Cosmological parameters from curved sky data
Andrea Crespi, Marco Bonici, Arthur Loureiro, Jaime Ruiz-Zapatero, Ivan Sladoljev, Zack Li, Adrian Bayer, Marius Millea, Uroš Seljak
TL;DR
Flinch.jl tackles field-level cosmological inference on the sphere by delivering a fully differentiable, end-to-end framework that propagates map-level gradients to cosmological parameters via a differentiable $C_\ell(\boldsymbol{\theta})$ emulator. It combines a hierarchical spherical model with AD-enabled spherical harmonic transforms and gradient-based samplers (HMC/NUTS/MCLMC) to reconstruct maps and infer parameters directly from pixel data, bypassing intermediate likelihoods over summary statistics. In simulations with masked CMB temperature maps, Flinch.jl yields up to ~40% tighter constraints than pseudo-$C_\ell$ approaches, with MCLMC providing orders-of-magnitude gains in sampling efficiency. The work lays the groundwork for scalable, spin-field extensions and application to upcoming CMB and LSS surveys, enabling truly end-to-end, information-rich cosmological analyses.
Abstract
We present Flinch, a fully differentiable and high-performance framework for field-level inference on angular maps, developed to improve the flexibility and scalability of current methodologies. Flinch is integrated with differentiable cosmology tools, allowing gradients to propagate from individual map pixels directly to the underlying cosmological parameters. This architecture allows cosmological inference to be carried out directly from the map itself, bypassing the need to specify a likelihood for intermediate summary statistics. Using simulated, masked CMB temperature maps, we validate our pipeline by reconstructing both maps and angular power spectra, and we perform cosmological parameter inference with competitive precision. In comparison with the standard pseudo-$C_\ell$ approach, Flinch delivers substantially tighter constraints, with error bars reduced by up to 40%. Among the gradient-based samplers routinely employed in field-level analyses, we further show that MicroCanonical Langevin Monte Carlo provides orders-of-magnitude improvements in sampling efficiency over currently employed Hamiltonian Monte Carlo samplers, greatly reducing computational expense.
