Fast Inference on Astronomical Time Series with Trans-Dimensional Flow Matching Posterior Estimation
Fast Inference on Astronomical Time Series with Trans-Dimensional Flow Matching Posterior Estimation
Nina van der Meulen, Tin Hadži Veljković, Daniela Huppenkothen, Benjamin Kurt Miller, Christoph Weniger
AbstractThe analysis of time series plays an important part in the study of (fast) transient events, including gamma-ray bursts, magnetar bursts, fast radio bursts, and solar flares. A common approach is to decompose the time series into pulses and study the pulse characteristics, such as location and amplitude, in order to constrain physical models of the source and its environment. However, estimating both the number and characteristics of these pulses presents a trans-dimensional inference problem that traditional sampling methods such as Markov Chain Monte Carlo (MCMC) and Nested Sampling struggle to solve efficiently. Simulation-based inference methods, often incorporating machine learning techniques, provide an alternative approach when traditional approaches are insufficient. Here, we introduce trans-dimensional Flow Matching Posterior Estimation (t-FMPE) implemented on a transformer architecture capable of efficient, amortized trans-dimensional inference on uniformly sampled univariate time series data. In this initial study, we apply the method to three test cases: simulated time series with known ground-truth parameters, observational data of Fast Radio Bursts and observations of X-ray bursts from magnetars. We show that t-FMPE achieves qualitative agreement with MCMC reference posteriors, successfully reproducing parameter correlations, as quantified through classifier two-sample tests. The trained network performs inference several orders of magnitude faster than MCMC and nested sampling, reaching sampling rates of 100 posterior samples per second for an 80-dimensional parameter space. The results demonstrate potential of t-FMPE for large-scale analysis of time series datasets when traditional sampling methods become infeasible, and also enable inferring unbiased posteriors in the presence of observational biases such as dead time.