Nii-MALA: A Fast Metropolis-Adjusted Langevin Sampler with Radial Velocity Benchmarks
Jian Jiao, Sheng Jin, Wenxin Jiang, Dong-Hong Wu
Key points
From the paper's conclusion- We introduce Nii-MALA, a high-performance C implementation of the Metropolis-Adjusted Langevin Algorithm, which leverages Message Passing Interface for parallelization and incorporates automatic differentiation backends for gradient evaluation.
Abstract
Markov chain Monte Carlo is widely used for model assessment and parameter fitting in astronomy and astrophysics, leading to numerous ready-to-use packages implementing various sampling techniques. For large-scale analyses involving many individual targets, computational efficiency becomes paramount, as it dictates the overall runtime. We introduce Nii-MALA, a high-performance C implementation of the Metropolis-Adjusted Langevin Algorithm, which leverages Message Passing Interface for parallelization and incorporates automatic differentiation backends for gradient evaluation. The code offers flexible control via a configuration file, allowing users to specify the proposal step sizes for all model parameters across parallel chains. We validate its effectiveness on 15- and 30-dimensional Gaussian distributions and a bimodal distribution, and further benchmark it against several other codes using radial velocity data from 51 Pegasi b. Our benchmarks confirm the efficiency of Langevin sampling over random-walk sampling in obtaining the effective sample size, particularly as the dimensionality of the target function increases. This algorithmic advantage can be effectively leveraged when paired with an efficient automatic differentiation library. However, for complex functions commonly encountered in astronomy---such as radial velocity orbital fitting---the derivative-dependent Langevin sampler shows lower efficiency than parallel tempering or alternative sampling approaches, as revealed by effective sample size analysis.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- EMPERORAstronomy and Astrophysics · 2025
- Enhancing the Interpretability of Radial Velocity Analysis Using Leave-one-out Cross-validationarXiv · 2026
- periapsis: A Comprehensive Orbital Fitting PackagearXiv · 2026
- Marginalized planet-to-star radius ratio posteriors for low-SNR transiting planets via dimensionality reductionarXiv · 2026
- Parallel adaptive reweighting importance sampling for Bayesian astrophysics.Reports on progress in physics. Physical Society (Great Britain) · 2026
- Astro2Method: Benchmarking LLMs on Machine Learning Method Selection in AstronomyarXiv · 2026