---
title: 'Bilby-Antiglitch: Joint Signal-Glitch Inference'
url: https://www.emergentmind.com/topics/bilby-antiglitch
type: topic
---

# Bilby-Antiglitch: Joint Signal-Glitch Inference

Searching arXiv for the specified Bilby-Antiglitch papers and closely related work.
Bilby-Antiglitch denotes a class of Bayesian gravitational-wave inference workflows that augment standard compact-binary-coalescence parameter estimation with an explicit model for short-duration non-Gaussian noise transients, or glitches, so that astrophysical signal parameters and glitch parameters are inferred simultaneously rather than sequentially. In the literature, the term is used both for a data-informed implementation in Bilby that imports a normalizing-flow prior over glitch morphologies trained on the Gravity Spy catalogue and performs joint inference of signal and glitch parameters [2505.00657], and for a later parametric signal-plus-noise framework that incorporates a quasi-physical AntiGlitch waveform model within Bilby to infer astrophysical source properties in non-Gaussian noise [2606.31304]. Across these formulations, the central objective is the same: replace post hoc glitch subtraction with a single posterior over signal and glitch degrees of freedom, thereby reducing bias, enabling Bayesian model selection, and restoring the assumptions required for robust residual analysis.

## 1. Historical placement and conceptual scope

Bilby-Antiglitch emerged against a background in which gravitational-wave data analysis had to contend with transient detector artifacts that violate the stationary Gaussian-noise assumption used in the standard Whittle likelihood. Traditional approaches described in the literature either subtract glitches in a pre-processing step, or include a glitch model from an agnostic wavelet basis such as BayesWave [2505.00657]. A distinct line of work introduced a quasi-physical waveform for four common short-transient glitch classes—blips, low-frequency blips, tomtes and koi fish—using only a few physically interpretable parameters: central frequency, bandwidth, phase, amplitude and time [2309.06594].

Within this context, Bilby-Antiglitch designates the incorporation of explicit glitch modeling into Bilby-based Bayesian inference. In Malz and Veitch, the framework is described as augmenting the standard parameter-estimation pipeline by importing a data-informed normalizing-flow prior over glitch morphologies and performing fully joint inference of signal and glitch parameters [2505.00657]. In Hoy et al., bilby-antiglitch is introduced as a parametric signal plus noise inference framework for short duration non-Gaussian noise transients, designed for general CBC analyses and equipped with a fixed-dimensional quasi-physical glitch model [2606.31304].

A common misconception is that all anti-glitch methods are equivalent to subtracting a single best-fit transient before astrophysical inference. The available work distinguishes joint inference from such post-subtraction practice. In the parametric framework, subtracting a median glitch realization and then re-running standard inference is explicitly contrasted with joint inference, which marginalizes over glitch uncertainty rather than conditioning on a single cleaned realization [2606.31304]. This suggests that the defining feature of Bilby-Antiglitch is not merely glitch removal, but probabilistic co-estimation of instrumental and astrophysical structure.

## 2. Bayesian formulation of joint signal–glitch inference

The shared probabilistic structure of Bilby-Antiglitch starts from a modified data model in which the strain is expressed as the sum of an astrophysical waveform, a glitch contribution and Gaussian detector noise. In the data-informed framework,
$$
d(t)=h(t;\theta_{GW}) + n(t) + g(t;\theta_{glitch}),
$$
with Gaussian noise $n$, and the joint posterior is
$$
p(\theta_{GW},\theta_{glitch}\mid d)
\;\propto\;
p(d\mid \theta_{GW},\theta_{glitch})\,
p(\theta_{GW})\,p(\theta_{glitch})\,.
$$
Under the usual frequency-domain Gaussian or Whittle likelihood,
$$
p(d\mid \theta_{GW},\theta_{glitch})
\;\propto\;
\exp\Bigl[-\tfrac12\sum_{f}\frac{\bigl|\tilde d(f)-\tilde h(f; \theta_{GW})
-\tilde g(f;\theta_{glitch})\bigr|^2}{S_n(f)}\Bigr]\,.
$$
Here $S_n(f)$ is the one-sided power spectral density and $h$ and $g$ are the Fourier transforms of the signal and glitch-model waveforms [2505.00657].

The later parametric formulation expresses the same idea as a hypothesis test. One adopts
$$
H_{S+G} : d = h(\theta)+g(\beta)+n,
$$
with full parameter vector $\lambda=\{\theta,\beta\}$ and posterior
$$
P(\lambda|d,H_{S+G}) = \mathcal{L}(d|\theta,\beta)\,\Pi(\theta,\beta)/Z,
$$
where the likelihood is
$$
\mathcal{L}(d|\theta,\beta)
= \exp[-\tfrac12\langle d-h(\theta)-g(\beta)\mid d-h(\theta)-g(\beta)\rangle]\,.
$$
The motivation is explicit: if a glitch is ignored, heavy-tailed short-duration transients break the Gaussian assumption and can lead to highly biased inference, with examples cited in connection with GW170817 and GW200129 [2606.31304].

The significance of this formalism is twofold. First, the deterministic model becomes $m(\theta,\beta)=h(\theta)+g(\beta)$ rather than $h(\theta)$ alone. Second, evidence is computed naturally by nested sampling, so Bayes factors between signal-plus-glitch and signal-only or glitch-versus-noise hypotheses become part of the same inference calculation [2606.31304]. This suggests that Bilby-Antiglitch functions simultaneously as a parameter-estimation framework and as a model-selection framework.

## 3. Glitch representations: data-informed normalizing flows and quasi-physical templates

One implementation of Bilby-Antiglitch uses a machine-learning-based parameterized glitch model built from known glitches in the Gravity Spy catalogue. Each whitened, SVD-compressed glitch amplitude vector $x\in\mathbb{R}^D$ with $D\approx12$ is represented by a diffeomorphism
$$
z = f_\theta(x),
$$
where $f_\theta:\mathbb{R}^D\to\mathbb{R}^D$ is built from a sequence of coupling layers and the latent prior is
$$
p_z(z)=\mathcal{N}(z;0,I).
$$
The data density is recovered through the standard change of variables,
$$
p_x(x) = p_z\bigl(f_\theta(x)\bigr)\;\Bigl|\det\!\bigl(\partial_x f_\theta(x)\bigr)\Bigr|,
$$
and training minimizes the negative log-likelihood
$$
\mathcal{L}(\theta) = -\frac{1}{N}\sum_{n=1}^N \Bigl[\ln p_z\bigl(f_\theta(x^{(n)})\bigr)
+ \ln\bigl|\det(\partial_x f_\theta(x^{(n)}))\bigr|\Bigr].
$$
The underlying training set consists of 1 s of strain around O1 Blip glitches, with 1785 examples; the data are whitened and band-pass filtered to 20–400 Hz, tapered with a Hann window, and compressed by SVD so that $D\simeq12$ components capture 97% of variance. The glitch time series is then reconstructed as
$$
g(t;T)=\sum_{i=1}^D T_i\,V_i(t),
$$
where the amplitudes $T_i$ are obtained by sampling $z\to x$ through $f_\theta^{-1}$ [2505.00657].

A second implementation uses the AntiGlitch model introduced by Bondarescu et al., a quasi-physical frequency-domain waveform for short transients. Defining discrete Fourier bins $f_k$, the un-normalized envelope is
$$
h_0(f_k)=\exp[-\tfrac12\,\gamma\,(\ln f_k-\ln f_0)^2],
$$
and the full model is
$$
h(f_k;A,f_0,\gamma,\phi_0,t_0)
=
A\,e^{i\phi_0}\,e^{-2\pi i f_k t_0}\,N^{-1}\,h_0(f_k),
$$
where $A$ is the amplitude, $f_0$ the central frequency, $\gamma$ the inverse-width parameter, $\phi_0$ a constant spectral phase, $t_0$ the central time, and $N$ a normalization chosen so that at $A=1$ the template has unit matched-filter SNR [2309.06594]. In the later bilby-antiglitch formulation, the same family is written as
$$
\mathcal{G}(f;\beta)=A\,\exp[i\varphi-2\pi i f t_0]\,h_0(f),
$$
with $\beta=\{A,\phi,t_0,f_0,\gamma\}$ and
$$
h_0(f)=\mathcal{N}^{-1}\,\exp\Bigl[-\tfrac{\gamma}{2}(\ln f-\ln f_0)^2\Bigr].
$$
The model is described as capturing the majority of blips, tomtes, koi-fish, and related short transients with minimal risk of overfitting real astrophysical content [2606.31304].

These two glitch representations encode different philosophies. The normalizing-flow prior is explicitly data-informed and tied to a training catalogue, whereas the AntiGlitch waveform is quasi-physical and low-dimensional. A plausible implication is that they occupy complementary points in the bias–flexibility trade-off: one leverages empirical morphology, the other interpretability and fixed dimensionality.

## 4. Implementation in Bilby

In the data-informed implementation, Bilby is extended through a custom Prior class and a modified Likelihood class. The Prior class loads the trained normalizing flow, draws $z\sim\mathcal{N}(0,I)$, and transforms via $x=f_\theta^{-1}(z)$ to provide the vector of SVD amplitudes $T$, together with two additional parameters: a time shift $\Delta t\sim\mathcal{N}(0,10\,\mathrm{ms})$ to align the model with the actual glitch time, and an overall amplitude scale $A$ with prior $\pi(A)\propto1/A$ on $[10^{-3},10^3]$. The Likelihood class reconstructs
$$
g(t;T,\Delta t,A)=A\sum_i T_i V_i(t-\Delta t),
$$
subtracts it from the data, and feeds the residual into the standard waveform likelihood. Sampling is performed with Bilby’s nested sampler Nessai without further modification to sampler settings beyond including the extra dimensions $(D+2)$ in the parameter space [2505.00657].

The parametric bilby-antiglitch framework extends standard Bilby by adding a joint likelihood $\mathcal{L}(d|\theta,\beta)$, the AntiGlitch waveform function as a glitch model, and interfaces to arbitrary nested or MCMC samplers for the enlarged parameter set. The authors used the dynesty nested sampler to explore $P(\theta,\beta|d)$, and emphasize that no transdimensional sampling is needed because AntiGlitch has a fixed dimensionality. The same framework is described as fully compatible with waveform families including IMRPhenomXPHM, NRSur7dq4 and SEOBNRv5PHM [2606.31304].

Bondarescu et al. provide a minimal Bilby workflow for AntiGlitch-only inference. The strain segment has length $T=0.125\,\mathrm{s}$ at sample rate $8192\,\mathrm{Hz}$, with the glitch near the center; the PSD is estimated from neighboring stretches such as 18 s of data with the glitch excised; and Bilby’s `run_sampler` may be used with `dynesty`, `nestle` or `emcee`, while `pymultinest` or `ultranest` are identified as options for real-time use [2309.06594].

| Implementation | Glitch parameterization | Bilby integration |
|---|---|---|
| Data-informed Bilby–AntiGlitch | Normalizing-flow prior over SVD amplitudes with $(D+2)$ dimensions | Custom Prior class, custom Likelihood class, Nessai [2505.00657] |
| Parametric bilby-antiglitch | Five-parameter AntiGlitch model per detector | Joint likelihood, arbitrary nested or MCMC samplers, dynesty used [2606.31304] |
| AntiGlitch-only workflow | Five-parameter log-normal frequency-domain template | Custom Gaussian likelihood, Bilby `run_sampler` with dynesty or alternatives [2309.06594] |

The main methodological distinction is that the data-informed method reconstructs glitch morphology from a learned prior over basis amplitudes, whereas the parametric method directly samples waveform parameters. Both, however, preserve the core Bilby architecture: priors, likelihood, and evidence-driven sampling over an enlarged state space.

## 5. Empirical performance and bias mitigation

The data-informed Bilby–AntiGlitch framework was evaluated on glitch-only, signal-only, and joint signal-plus-glitch tasks. For glitch-versus-noise separation on approximately 800 real glitches in O1/O3, nearly all $\log \mathrm{BF}_{g/n}>0$, with false-dismissal $\lesssim0.1\%$. Applied to Gaussian or real detector noise at glitch-free times, more than 98% of $\log \mathrm{BF}_{g/n}<0$, corresponding to false-alarm rate $\lesssim2\%$. In signal-only robustness tests, injected BBH signals in glitch-free data strongly preferred the signal-only model over glitch-plus-signal. For injected signals at $d_L=750\,\mathrm{Mpc}$ overlapping real glitches, the “signal+glitch vs signal-only” $\log \mathrm{BF}_{g+s/s}>0$ in $\gtrsim80\%$ of tests, and when the signal was placed before or after the glitch, the joint model remained preferred in almost all cases [2505.00657].

Bias reduction was quantified using the “standard accuracy”
$$
\Sigma_x=\frac{|x_{\rm MAP}-x_{\rm true}|}{\sigma_x},
$$
where $\sigma_x$ is the posterior standard deviation. Over 25 O3 test glitches, the mean $\Sigma_x$ for chirp mass, mass ratio, inclination, distance, and related parameters dropped from approximately 5–15 in glitch-contaminated analyses to $\lesssim1$ after glitch removal. Time-series and Q-scan plots showed nearly complete removal of Blip glitches, with residual spectrograms free of excess power [2505.00657].

The quasi-physical AntiGlitch model was tested on a month of O3 data, May 2019, with up to 500 glitches of each class per detector. The template typically recovered 80–90% of the Omicron SNR for blips and tomtes, and about 75% for low-frequency blips. Removal efficiency exceeded 90% for blips, tomtes and low-frequency blips, while koi fish achieved only about 50% removal owing to richer morphology. The same study found that tomtes had typical maximum match $\mathcal{M}\sim0.8-0.9$ to IMRPhenomXAS high-mass BBH waveforms, peaking at $M_{\rm tot}\sim160-200\,M_\odot$ with negative aligned spin, making them the most dangerous among the four glitch classes for high-mass searches [2309.06594].

In the later bilby-antiglitch verification study, a GW150914-like binary with $(m_1,m_2)=(30,28)\,M_\odot$, $\chi_1=\chi_2=0.2$, and $\rho_{\rm signal}=30$ was injected into Gaussian noise plus a blip glitch with $\rho_{\rm glitch}=70$ located 0.2 s before merger. Signal-only Bilby produced highly biased masses and spins, whereas bilby-antiglitch recovered the true parameters within the 90% credible regions. Reported quantitative results included $\rho_{\rm signal}=30.8\pm0.1$, $\rho_{\rm glitch}=69.86^{+0.01}_{-0.05}$, $\log_{10}$ Bayes factor for $S+G$ versus noise of 1244, and CPU cost of approximately 500 CPU h for bilby-antiglitch versus approximately 940 CPU h for bilby alone [2606.31304].

Taken together, these studies support a narrow but consistent claim: joint signal–glitch inference can materially reduce parameter bias while maintaining or improving inferential stability in non-Gaussian data. They do not imply universal superiority for all glitch morphologies, because performance depends on the adequacy of the glitch model.

## 6. Applications to astrophysical events and relation to other anti-glitch methodologies

The parametric bilby-antiglitch framework was applied to real events. For GW250114_082203, described as the loudest GW so far with $\rho\approx80$, no significant short-duration glitch was found in Hanford or Livingston. bilby-antiglitch yielded $m_2/m_1=0.95^{+0.05}_{-0.09}$ and $\mathcal{M}=31.2^{+0.4}_{-0.6}\,M_\odot$, consistent with LVK, while slight low-frequency excursions in Livingston were captured by AntiGlitch with negligible astrophysical bias. The CPU cost was approximately $1.5\times$ the signal-only run, which was described as expected in the absence of a strong glitch [2606.31304].

For GW200129_065458, a candidate for strong spin precession overlapped by 45 MHz modulator noise, bilby-antiglitch reanalysis with NRSur7dq4 confirmed the high tilt angle of the primary spin, approximately $90^\circ$, with similar significance as Hannam et al. (2022), and in tension with Payne et al. (2022). The stated conclusion was that the precession measurement is robust to short-duration glitch contamination [2606.31304].

A further theme in the literature is the interaction between glitch modeling and waveform systematics. GPBilby replaces the standard time-domain Gaussian-noise likelihood with a joint likelihood that models the astrophysical signal together with a Gaussian-process transient noise contribution. In case studies of GW231123, GW191109 and GW230630_070659, the GP component was shown to identify residual coherent structure attributable either to glitches or to waveform mismatch, depending on the waveform family used [2604.02018]. For GW191109, despite explicit glitch modeling in both LIGO detectors, the inferred astrophysical parameters remained fully consistent within $\lesssim1\sigma$ with deglitched Whittle analyses and GWTC-3 results, and support for $\chi_{\rm eff}<0$ endured [2604.02018].

This comparison is methodologically important. bilby-antiglitch, as described by Hoy et al., emphasizes a fixed-dimension quasi-physical glitch model and direct Bayes factors between “signal+glitch” and “signal only” [2606.31304]. GPBilby instead marginalizes over a flexible Gaussian-process noise term, and its authors stress that the same likelihood can absorb coherent residual structure arising from imperfect waveform models [2604.02018]. This suggests that “anti-glitch” inference in Bilby has become a broader research area encompassing both parametric and nonparametric noise models.

## 7. Limitations, misconceptions, and prospective extensions

The principal limitation of the data-informed Bilby–AntiGlitch approach is explicitly stated: the normalizing-flow prior is only as good as its training set. The reported implementation was trained on O1 Blips, and applying it to other classes such as Tomte produced a higher false-alarm and false-dismissal rate, approximately 20%, although even a mismatched model could reduce signal bias if morphologies were similar. Changes in glitch morphology across observing runs O2, O3 and O4 were identified as motivations for retraining or for constructing a multi-class flow [2505.00657].

The parametric approach has a different limitation profile. Its five-parameter form successfully captures the majority of several short-transient glitch families, but Bondarescu et al. reported only about 50% removal for koi fish because of richer morphology [2309.06594]. The later framework therefore presents modularity as an explicit design goal: users can swap in Gaussian-process or wavelet glitch models as they become available, and future extensions are framed in terms of implementing additional parametric glitch families such as scattering and thunder [2606.31304].

Several extensions are listed directly in the literature. For the normalizing-flow framework, proposed directions include multi-class conditional flows with glitch-type conditioning, joint PSD estimation alongside glitch inference, automatic glitch class identification via a classifier to select the appropriate flow, and application to high-profile glitch-contaminated events such as GW191109, GW200129 and GW170817 [2505.00657]. For the parametric framework, the outlook emphasizes portability to future detectors including Cosmic Explorer, Einstein Telescope and LISA [2606.31304].

A recurring misconception is that successful anti-glitch inference proves astrophysical origin. The GPBilby case study of GW230630_070659 explicitly cautions that absence of GP power does not prove an astrophysical origin; it only shows that, within a BBH template family, no further coherent residuals are detected at the level of the model [2604.02018]. By analogy, Bilby-Antiglitch does not eliminate the need for waveform scrutiny, detector characterization, or alternative noise hypotheses. Its contribution is narrower and more technical: it embeds glitch uncertainty inside the inference problem itself, rather than treating it as an external correction.

Source: https://www.emergentmind.com/topics/bilby-antiglitch