Differentiable Stochastic Halo Occupation Distribution with Galaxy Intrinsic Alignments
Sneh Pandya, Jonathan Blazek
TL;DR
diffHOD-IA delivers a fully differentiable implementation of the halo occupation distribution with intrinsic alignments, enabling end-to-end gradient-based inference for both HOD and IA parameters. By integrating differentiable sampling (including Dimroth–Watson misalignment) and differentiable estimators for IA and clustering statistics, it supports gradient-driven optimization and HMC-based inference directly at the catalog level. The approach is validated against the halotools-IA reference on Bolshoi-Planck, showing excellent agreement in one- and two-point statistics and accurate gradient recovery via autodiff. Applications demonstrate successful recovery of IA parameters from mock data and substantial speedups for Bayesian inference compared to non-differentiable pipelines or emulator-based methods. The framework, implemented in JAX, is poised for integration into differentiable cosmological pipelines and extension to broader IA statistics and higher-order analyses.
Abstract
We present diffHOD-IA, a fully differentiable implementation of a halo occupation distribution (HOD) model that incorporates galaxy intrinsic alignments (IA). Motivated by the diffHOD framework, we create a new implementation that extends differentiable galaxy population modeling to include orientation-dependent statistics crucial for weak gravitational lensing analyses. Our implementation combines this HOD formulation with an IA model, enabling end-to-end automatic differentiation from HOD and IA parameters through to the galaxy field. We additionally extend this framework to differentiably model two-point correlation functions, including galaxy clustering and IA statistics. We validate diffHOD-IA against the reference halotools-IA implementation using the Bolshoi-Planck simulation, demonstrating excellent agreement across both one-point and two-point statistics. We verify the accuracy of gradients computed via automatic differentiation by comparison with finite-difference estimates for both HOD and IA parameters. We present science use cases leveraging gradients in the simulations to recover the IA parameters of a galaxy field representative of the TNG300 simulation. Finally, we apply diffHOD-IA in a Hamiltonian Monte Carlo analysis and compare its performance with halotools-IA and a neural-network-based emulator, IAEmu. Unlike emulator-based approaches, diffHOD-IA provides differentiability at the catalog level, enabling integration into field-level inference pipelines and extension to arbitrary summary statistics for next-generation weak-lensing analyses. Our code is publicly available.
