# Motivation

Models of gravitational waves (GW) $h(\vec\lambda)$ are crucial for measuring the properties of merging black hole binaries from LIGO data. These properties can be described by the posterior distribution $p(\vec\lambda| d)$ which is computed in **Bayesian inference** using methods such as Markov-chain Monte Carlo or nested sampling. Models are also needed to build template banks of GWs for detection pipelines. These applications require tens of millions or more model evaluations and therefore it is critical that models be **computationally efficient** and also accurate. This motivates building surrogate models which greatly accelerate the original model while preserving accuracy.

# Impact

My surrogate models have been a cornerstone to provide timely analyses for detection and Bayesian inference of LIGO-Virgo data and have been used in **dozens of LVC Collaboration papers**.

*Classical and Quantum Gravity*.

# Techniques

I have used the following techniques to build several surrogate models:

**Decomposition of the complex waveform $h$ into simpler data pieces**, such as amplitude $|h|$ and unwrapped phase $\arg [h]$.- Representing waveform data pieces on
**sparse grids**(to achieve a set spline interpolation error) - Expansion of data pieces in
**orthonormal bases**$V$ with**singular value decomposition**(SVD) $\mathcal{T} = V \Sigma U^T$, where the matrix $\mathcal{T} = \left[\tau_1 | \dots |\tau_n\right] \in \mathbb{R}^{m \times n}$ contains training set waveforms in its columns. **Tensor product spline interpolation**of expansion coefficients $\mathcal{M} = V^T \mathcal{T}$. See github for my Cython TPI package.- To better deal with high dimensional spaces, support scattered data, and provide uncertainty estimates I have used
**Gaussian process regression**.

# Surrogate model

A surrogate model for GWs from aligned spin black hole binaries can then be expressed in the Fourier domain as

$$ \tilde h_m(\vec\lambda; f) := A_0(\vec\lambda) I_f[V_A \cdot I_\otimes [\mathcal{M}_A] (\vec\lambda) ] (f) \exp \left[ i I_f[V_A \cdot I_\otimes [\mathcal{M}_A] (\vec\lambda) ] (f) \right], $$ where $I_f [\cdot]$ denotes cubic spline interpolation in frequency and $A_0$ is an amplitude prefactor.

# Implementation

You can find my implementation for the latest aligned spin dominant mode model in LIGO’s LALSuite analysis package at github.

# Speedup

The plot below shows the ratio of evaluation time for the original model and the surrogate model which reaches several thousands.

# Accuracy

To assess model accuracy I compute mismatches between waveforms from the original model and the surrogate. The **mismatch** is related to the normalized noise-weighted inner product between two waveforms maximized over time and phase.

# Sparse grids

A sparse frequency grid can be constructed with the greedy algorithm shown below. It helps compress the waveform data before computing the SVD which has complexity $\mathcal{O}(m n^2)$ and can otherwise become rather expensive.