Automating Inference of Binary Microlensing Events with Neural Density Estimation

Keming Zhang, Joshua S. Bloom, B. Scott Gaudi, François Lanusse, Casey Lam, Jessica LuarXiv 2020 · arXiv

Abstract

Inferring the physical parameters of binary microlensing events is a computationally intensive task characterized by complex, multi-modal likelihood surfaces. Traditional methods rely on manual grid searches and expert-in-the-loop Markov Chain Monte Carlo (MCMC) sampling, which do not scale to the thousands of events expected from upcoming missions like the Roman Space Telescope. This paper presents an automated framework using Neural Density Estimation (NDE) that achieves a $10^5$ speedup in posterior sampling. By combining a ResNet-GRU feature extractor with a Masked Autoregressive Flow (MAF), the model successfully captures intrinsic physical degeneracies, providing a scalable path for real-time microlensing analysis.

Introduction

Gravitational microlensing occurs when a foreground lens system passes in front of a distant source star, temporarily magnifying its light. When the lens is a binary system (e.g., a star-planet or binary star), the resulting light curves are highly sensitive to the system's geometry but are notoriously difficult to model.

The primary challenges are two-fold:

  1. Numerical Complexity: The forward models required to simulate magnification patterns are computationally expensive.
  2. Degeneracy and Local Minima: The parameter space is riddled with narrow local minima and "degeneracies"—where distinct physical configurations produce nearly identical observables.

Current analysis workflows require experts to perform exhaustive grid searches to find starting points for MCMC, a process that can take weeks per event. With the Roman Space Telescope set to discover thousands of events, a more automated approach is essential.

Methodology

To automate this process, the authors employ Conditional Neural Density Estimation (NDE). Instead of point estimates, the model learns to approximate the full Bayesian posterior distribution $p(\theta|x)$ conditioned on the observed light curve $x$.

Architecture

The model consists of two primary stages:

  • Feature Extraction: A hybrid ResNet-GRU network (18-layer 1D ResNet followed by a 2-layer Gated Recurrent Unit) processes the time-series brightness data to extract high-level features.
  • Density Estimation: A 20-block Masked Autoregressive Flow (MAF) transforms a base Gaussian mixture distribution (eight components) into the complex, multi-modal target posterior.

The network is trained to minimize the Kullback–Leibler (KL) divergence between the predicted and true posteriors.

Data and Simulation

The model was trained on $10^6$ simulated binary-lens-single-source (2L1S) events generated using MulensModel. The simulations were specifically tailored to the Roman Space Telescope Cycle-7 design, featuring a 15-minute cadence over a 72-day observation window. The model tracks seven fundamental parameters, including the Einstein ring crossing time ($t_E$), mass ratio ($q$), and binary separation ($s$), with realistic Gaussian noise applied to simulate photon-counting errors.

Results: Capturing Physical Degeneracies

A critical success of the NDE framework is its ability to resolve the "close-wide" degeneracy. In this scenario, two vastly different binary separations (one "close" and one "wide") result in nearly identical magnification patterns.

NDE posterior and light curve analysis showing the close-wide degeneracy.

As illustrated in the figure above, the NDE produces a bimodal posterior that correctly identifies both physical possibilities. This "amortized" inference shifts the computational burden to the training phase, allowing for near-instantaneous evaluation of new events once the model is deployed.

Performance and Scalability

The NDE approach offers significant advantages over traditional methods:

  • Speed: The model generates $10^5$ posterior samples per second on a single GPU, a massive improvement over the ~1 sample per second achieved by traditional forward models on a CPU.
  • Precision: Even at a Signal-to-Noise Ratio (SNR) of 20, the model provides tight constraints on physical parameters.
  • Automation: By eliminating the need for human-led grid searches, this framework enables the high-throughput analysis required for the Roman mission.

Conclusion and Future Work

Neural Density Estimation provides a robust, automated solution for the complex task of binary microlensing inference. While the model currently excels on simulated data, future work will focus on bridging the "sim-to-real gap" by accounting for systematic errors in real-world telescope data. Additionally, the authors suggest a hybrid approach—using NDE to "seed" traditional MCMC—to combine the speed of neural networks with the exactness of traditional Bayesian sampling.

Summary updated

Abstract

Automated inference of binary microlensing events with traditional sampling-based algorithms such as MCMC has been hampered by the slowness of the physical forward model and the pathological likelihood surface. Current analysis of such events requires both expert knowledge and large-scale grid searches to locate the approximate solution as a prerequisite to MCMC posterior sampling. As the next generation, space-based microlensing survey with the Roman Space Observatory is expected to yield thousands of binary microlensing events, a new scalable and automated approach is desired. Here, we present an automated inference method based on neural density estimation (NDE). We show that the NDE trained on simulated Roman data not only produces fast, accurate, and precise posteriors but also captures expected posterior degeneracies. A hybrid NDE-MCMC framework can further be applied to produce the exact posterior.
BibTeX
@misc{zhang2020automating,
  author = {Keming Zhang and Joshua S. Bloom and B. Scott Gaudi and François Lanusse and Casey Lam and Jessica Lu},
  title = {{Automating Inference of Binary Microlensing Events with Neural Density Estimation}},
  year = {2020},
  eprint = {2010.04156},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.04156},
}
Figure