Flexible Gravitational-Wave Parameter Estimation with Transformers

Annalena Kofler, Maximilian Dax, Stephen R. Green, Jonas Wildberger, Nihar Gupte, Jakob H. Macke, Jonathan Gair, Alessandra Buonanno, Bernhard SchölkopfarXiv 2025 · DOI

Introduction

Gravitational-wave (GW) astronomy relies on accurate parameter estimation (PE) to infer the properties of compact binary mergers, such as black hole masses, spins, and distances. While traditional Bayesian inference methods like Markov Chain Monte Carlo (MCMC) provide high accuracy, they are computationally expensive, often requiring days of processing for a single event. Neural Posterior Estimation (NPE) has emerged as a fast alternative, reducing inference time to seconds. However, standard NPE models are often "brittle," designed for fixed input configurations (e.g., a specific set of detectors and frequency ranges). In real-world scenarios where detectors may be offline or data is contaminated by noise glitches, these models fail, necessitating the training of dozens of specialized networks.

The Dingo-T1 Architecture

To address these limitations, we introduce Dingo-T1, a transformer-based architecture for flexible GW parameter estimation. Unlike previous convolutional or residual encoders, Dingo-T1 treats detector data as a sequence of discrete "tokens," allowing it to handle variable input sizes and missing data seamlessly.

The Dingo-T1 architecture: frequency-domain strain data is tokenized by detector and frequency band, processed by a Transformer encoder, and fed into a normalizing flow to produce the parameter posterior.

The pipeline consists of three main stages:

  1. Tokenization: Multibanded frequency-domain strain data from Hanford (H), Livingston (L), and Virgo (V) is partitioned into segments. A shared ResNet-based tokenizer processes these segments, incorporating metadata about the frequency range and detector origin.
  2. Transformer Encoder: The resulting tokens are fed into a Transformer encoder. Because Transformers are permutation-invariant and can process sequences of arbitrary length, the model naturally accommodates missing detectors or frequency bands by simply omitting the corresponding tokens.
  3. Normalizing Flow: The Transformer's output serves as a conditional context for a normalizing flow (using rational-quadratic splines). This flow transforms a simple base distribution into the complex, multi-dimensional posterior distribution of the GW parameters.

Robustness through Masking

A key innovation of Dingo-T1 is its training strategy. During training on a massive dataset of 25 million synthetic waveforms, the authors applied random "masking." This involved dropping entire detectors, specific frequency ranges, or narrow noise bands (notching). This approach forces the model to learn how to marginalize over missing information and exploit correlations across the remaining data, making it robust to the instrumental glitches and hardware dropouts common in real detector data.

Performance and Results

Dingo-T1 was evaluated on 48 real GW events from the LIGO-Virgo-KAGRA (LVK) third observing run (O3). The model successfully re-analyzed these events across 17 different detector and frequency configurations using a single pre-trained network.

Efficiency comparison: Dingo-T1 shows significantly higher importance sampling efficiency compared to baseline models across both simulated events and real O3 data.

The Transformer architecture not only provides flexibility but also improves learning capacity. As shown in Figure 2, Dingo-T1 achieved a median importance sampling efficiency of 4.2% on real events, a significant improvement over the 1.4% achieved by baseline convolutional models. This higher efficiency indicates that the predicted distributions are much closer to the true mathematical target. Furthermore, Dingo-T1 can perform complex tasks like "Inspiral-Merger-Ringdown" (IMR) consistency tests—which previously required nearly 100 separate models—within a single framework.

Conclusion

Dingo-T1 represents a significant step toward fully amortized, flexible gravitational-wave inference. By leveraging the sequence-processing power of Transformers, it overcomes the rigidity of previous deep learning approaches while maintaining high speed and improving accuracy. This flexibility is particularly promising for future missions like LISA, where complex data gaps are expected to be a routine challenge. Future work will focus on incorporating time-translation equivariance and expanding the model's resolution capabilities.

Summary updated

BibTeX
@misc{kofler2025flexible,
  author = {Annalena Kofler and Maximilian Dax and Stephen R. Green and Jonas Wildberger and Nihar Gupte and Jakob H. Macke and Jonathan Gair and Alessandra Buonanno and Bernhard Schölkopf},
  title = {{Flexible Gravitational-Wave Parameter Estimation with Transformers}},
  year = {2025},
  eprint = {2512.02968},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.02968},
}
Figure