CausticFlow: how machine learning accelerates the analysis of binary gravitational lenses ✛ ✎ ✦

Original: "CausticFlow: An Efficient Machine Learning Framework Combining Neural Differential Equations and Normalizing Flows for Binary Microlensing Parameter Inference"
· Haibin Ren, Wei Zhu
arXiv:2607.04955 · 2026-07-06 · arXiv non-exclusive · independent analysis · 4 min
The neural network CausticFlow delivers parameters of binary lenses in seconds, replacing hours of computation and paving the way for systematic processing of large surveys.

Context

Gravitational microlensing is a powerful method for detecting dark and faint objects, from exoplanets to stellar remnants. It is based on the gravitational lensing effect predicted by Einstein and developed by Zwicky, where a massive body bends light from a background source. Binary lenses, including planetary ones, yield rich anomalies on photometric light curves, but their modeling hits computational complexity: traditional brute-force and MCMC sampling require thousands of trials. With growing data volumes from ground-based and space surveys (such as JWST and Hubble for follow-up measurements), a fast and reliable tool is critically needed.

Methods

CausticFlow combines Neural Controlled Differential Equations (Neural CDE) and normalizing flows. First, the raw data undergoes a log-signature transformation, compressing the irregular time series and making it suitable for Neural CDE processing, which evolves a hidden state along a continuous control path. This approach is robust to gaps and uneven sampling—typical of real light curves. Then the resulting vector representation is fed into the machine learning normalizing flow (Masked Autoregressive Flow with Rational Quadratic Splines). The flow transforms a simple Gaussian distribution into a complex posterior, capturing degenerate solutions. Training is performed on numerically simulated light curves with KMTNet-like noise, selected for significant deviation from a single lens. All computations are done in JAX, accelerating training and inference.

Results

On the test synthetic sample, maximum a posteriori (MAP) estimates give typical accuracy around 17% for mass ratio q and 3% for projected separation s. After polishing via Nelder–Mead and nonlinear least squares using just 10 starting points from the CausticFlow posterior, accuracy improves to less than 5% and 1% respectively, and the model χ² is recovered for ~80% of events. On 10 real KMTNet events, despite mismatches in the noise model, presence of parallax and orbital motion, and parameters outside the training range, the framework successfully recovers 7 events in 10 CPU minutes. Accuracy for q and s on real data was about 7% and 2%, approaching simulation results. Even with incomplete coverage (as in OGLE-2023-BLG-0079), the method finds degenerate solutions, and for KMT-2025-BLG-0922, where q≈1, lens parameters are determined correctly.

Implications

CausticFlow for the first time demonstrates the viability of a neural network approach for fast and systematic modeling of binary microlenses. It does not replace detailed MCMC but acts as a smart proposal generator for global optimization, drastically reducing the search space. This enables a shift from piecemeal analysis of interesting events to population studies of dark matter (via the mass function) and the distribution of cold planets. High speed opens the possibility to process alert streams from future telescopes in real time, while retaining geometric degeneracies in the posterior helps avoid systematic errors in interpretation.

Future development

The main path for improvement is to bring simulations closer to reality: introduce more realistic noise models (e.g., inject artificial signals into real data) and account for higher-order effects (parallax, orbital motion). A second goal is to extend applicability to low-mass planetary lenses (q<10⁻³), which remain a priority for the hunt for exoplanets. Third direction: integration with uncertainty quantification and active learning to automatically determine which events require deep MCMC. In the long term, CausticFlow could become part of the data processing pipeline for the Roman and ET missions, providing preliminary solutions in real time.

Impact

The technology will directly impact observational astrophysics: it will speed up cataloging of events for star formation and bulge populations, and allow rapid selection of candidates for follow-up spectroscopic and interferometric study. In adjacent fields, it will serve as an example of combining Neural CDE and normalizing flows for other irregular time series in astrophysics and beyond.

Next steps

The developers plan to train a version that includes parallax and orbital parameters, test on the full OGLE and KMTNet archives, and adapt the architecture for multi-filter data and terabyte-scale volumes of future surveys.

Key open problems

The work addresses the problem of cold planets: by measuring parameters of binary lenses en masse, one can recover the distribution of giant planets beyond the snow line. It is connected to the mystery of dark matter through the search for massive compact halo objects (MACHOs), as their lensing is analogous. Furthermore, amortized Bayesian inference methods bring us closer to solving the problem of automatic analysis of petabyte-scale data streams in astronomy.

The knowledge machine's view

This section is addressed to the author of the paper and their colleagues. Neighbouring works were found by meaning-based search across our archive, not by word overlap. We do not review: we show the field around the work.

What the work does

CausticFlow combines neural differential equations with normalizing flows to rapidly model binary gravitational microlensing. Trained on synthetic light curves, it achieves accuracy of about 7% for mass ratios and 2% for separations on real KMTNet events, recovering most of them within minutes of CPU time.

Where its strength is

The key strength is replacing exhaustive parameter searches with a smart proposal generator, cutting analysis time from weeks to minutes while maintaining accuracy comparable to traditional methods after light refinement.

Where it could go next

Worth trying

  • Test transferring the trained model to data from future surveys with different cadence and noise without retraining.
  • Use CausticFlow's posterior to initialize MCMC, assessing potential acceleration of full Bayesian analysis.
  • Train the model on a wider range of parameters, including parallax and orbital motion, to improve accuracy on real events.

Why this may matter

Fast modeling of binary lenses is critical for handling the massive data streams from current and future microlensing surveys, enabling prompt identification of the most interesting events for detailed study and statistical population analysis.

Neural CDE reads the light curve like a stream, unconcerned with sampling uniformity — much like a human understands a text with missing letters, grasping meaning from context. This allows CausticFlow to handle even events where a ground-based telescope captured only part of the outburst.

The technology recalls an idea from the 'Three-Body Problem' trilogy: tracking the faintest light distortions to detect hidden objects. CausticFlow does the same, but instead of alien civilizations, it searches for dim stellar remnants and rogue planets.

\theta_E = \sqrt{\kappa M_L \pi_{\text{rel}}}
θ_E — angular Einstein radius, M_L — lens mass, π_rel — relative lens-source parallax, κ = 4G/(c^2 au) ≈ 8.144 mas/M_⊙.
\hat{p}(\theta|D) = p_u(f^{-1}(\theta; c)) \left|\det\frac{\partial f^{-1}(\theta; c)}{\partial \theta}\right|
p_u — base Gaussian distribution, f^{-1} — inverse flow transformation with parameters conditioned on vector c, |det| — absolute value of the Jacobian determinant.

Key numbers

  • mass ratio accuracy q (MAP): ~17%
  • projected separation accuracy s (MAP): ~3%
  • model recovery on simulations after polishing: ~80%
  • success rate on real events: ~70%
  • GPU inference time (10⁵ samples): ~1 s
  • total processing time for a real event: ~10 min CPU
Scientists
Fritz ZwickyBohdan PaczyńskiJascha Sohl-Dickstein
Concepts
normalizing flows Contrastive Learning predictive learning neural networks Stochastic modeling computational fluid dynamics training pattern recognition confusion matrix metropolis hastings algorithm neural network microlensing reconstruction k means clustering probabilistic model frame regularization methods gaussian process random forest Poisson distribution parameter bootstrap reservoir computing