Nii-MALA: A Fast Metropolis-Adjusted Langevin Sampler with Radial Velocity Benchmarks
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.
Related
- Robust Bayesian non-linear pulsar timing and noise analysis using a sequential data-tempered ensemble sampler
- Analog Electronic Computation of Stellar Structure: Polytropic Benchmarks, Circuit Scaling, and Error-Controlled Verification
- Revisiting the Photometric Modulation Amplitudes of Kepler Planet Hosts: A Confounder-Adjusted Test of Stellar Spin-Orbit Alignment
- Preparing for the Gaia DR4 Epochalypse: Simulated Epoch Astrometry for Substellar Companion Orbit-Modeling Benchmarks
- Two Kepler red-giant eclipsing binaries as lower red-giant branch benchmarks for asteroseismic scaling relations. Dynamical masses and radii from JKTEBOP and PHOEBE-2 modeling
BibTeX
@misc{jiao2026niimala,
title = {{Nii-MALA: A Fast Metropolis-Adjusted Langevin Sampler with Radial Velocity Benchmarks}},
author = {Jian Jiao and Sheng Jin and Wenxin Jiang and Dong-Hong Wu},
howpublished = {arXiv},
year = {2026},
month = sep,
doi = {10.48550/arxiv.2609.15112},
eprint = {2609.15112},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2609.15112},
}
RIS
TY - UNPB
TI - Nii-MALA: A Fast Metropolis-Adjusted Langevin Sampler with Radial Velocity Benchmarks
AU - Jian Jiao
AU - Sheng Jin
AU - Wenxin Jiang
AU - Dong-Hong Wu
PY - 2026
DA - 2026/09/14
PB - arXiv
DO - 10.48550/arxiv.2609.15112
UR - https://arxiv.org/abs/2609.15112
AB - 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.
ER -