GPry-fusion · §D4 profiling checkpoint · measured

Where the wall-clock actually goes

The decision to interface GPry rather than rewrite it rested on two numbers nobody had measured: how the surrogate loop splits between GP fit and acquisition, and what a real case-(2) EOB waveform actually costs per call. Both are now measured — on a Quadro T2000, warmup- and compile-excluded, across a total-mass sweep from stellar-mass BBH down to BNS — alongside the recovered posteriors from every run.

70–77%of the GPry loop is acquisition (the nested sampler) — the port target. GP fit is 5–26%, growing with eval count.
13–800 msreal EOB per call across stellar-mass BBH — not the assumed 0.5–10 min. Comparable to the JAX PhenomD kernel.
~1.9 sthe per-call cost threshold where the waveform finally overtakes the GPry overhead.
1.5→3.8×Route A GPU speedup, growing from M80 to M20 — longer FD signals are wider, and width is the GPU's lever.

Real EOB waveform cost Rec 2

Six production time-domain EOB models timed at the injection's intrinsic configuration, with the sampling rate set from each waveform's own highest frequency content — the (4,4)-mode ringdown — not a fixed 2048 Hz. Higher-mode models capped at (l,m)≤(4,4). pyseobnr supplies SEOBNRv5.

Log-log plot of EOB waveform generation time per call versus total mass for six models plus the eccentric SEOBNRv5EHM, with the GPry per-eval overhead band shaded

Per-call cost vs total mass. Grey band = GPry overhead per eval (1.4–2.6 s). Curves enter it only at low mass; fs rises 2048→32768 Hz as M drops.

modelM=80M=20M=10M=4crosses GPry at
TEOBResumS13 ms21 ms77 ms1.2 sM≈3 (BNS)
SEOBNRv5HM36 ms52 ms100 ms1.6 sM≈3–4
SEOBNRv5PHM62 ms127 ms287 ms3.9 sM≈4–5
SEOBNRv4_opt17 ms35 ms67 ms0.4 snone in range
SEOBNRv4234 ms790 ms2.3 s22.6 sM≈10
SEOBNRv4HM390 ms1.8 s7.6 s65 sM≈10–20

PE cost scaling with total mass 3 routes

End-to-end parameter-estimation cost across the matched-SNR≈15 mass sweep, 4-D intrinsic (M, q, χ₁ₔ, χ₂ₔ). Route A gradient shown for the converged full runs (8350 steps: M80/60/40/20); Route B GPry surrogate for all masses. Wall time is execution only — JIT/XLA compile excluded on both backends.

Four-panel figure: PE wall time versus mass for three routes; GPU speedup versus mass; Route B waveform versus GPry decomposition; and GPry per-eval cost against truth-eval count

(a) cost per run · (b) Route A GPU speedup · (c) Route B waveform vs GPry overhead (includes JAX acquisition) · (d) GPry per-eval cost against truth-eval count (bars).

Recovered posteriors — every run validation

All intrinsic posteriors from every run on the sweep: eight total masses (rows) × the four intrinsic parameters (columns), each route overlaid against the injected truth (dashed). Peak-normalized 1-D marginals.

Grid of one-dimensional posterior marginals: eight rows for total masses M80 down to M10, four columns for chirp mass, mass ratio, and the two aligned spins, with Route A CPU, Route A GPU, and Route B overlaid against the injected truth

Rows M80→M10; columns M, q, χ₁ₔ, χ₂ₔ. Dashed A curves (M70/M50/M30) are short 1.4k-step benchmarks; M10 is Route B only.

Per-mass corner plots 2-D posteriors

The full 2-D structure the 1-D marginals above compress away: one corner per total mass, with every run at that mass overlaid (Route A CPU/GPU + Route B) against the injected truth. Filled 50% / 90% credible contours on a shared range. The χ₁ₔ–χ₂ₔ panel at M20 shows the spin story directly: Route A (blue/green) and Route B (red) sit on the same anti-correlation ridge but at opposite ends, with only Route B over the truth.

What it changes for D4 Rec 1 + 2

The GPry split, measured at two eval counts, is N-dependent: acquisition is 77% at N=136 (M80) and 70% at N=560 (M20) — always the dominant cost — while the GP fit's O(N³) Cholesky grows from 5% to 26%. So the acquisition nested sampler is the port to do first (it is vmap/BlackJAX-friendly on a cached factorization, where the poor-consumer-GPU-fp64 objection does not apply); the GP-fit port only matters at the high-dimensional end.

A cost threshold, not a case-(1)/case-(2) dichotomy

The port trigger is a waveform cost of ~1.9 s/call. Both cheap JAX FD models and standard aligned-spin EOB across the entire stellar-mass BBH range sit below it, so a JAX/BlackJAX acquisition nested sampler is a broadly worthwhile partial port — it cuts real PE wall-clock for BBH with any of these waveform families. The waveform-dominated regime the design assumed is real, but relocated to BNS / very-low-mass and the slow higher-mode variants, where the surrogate's value is exactly its original one: minimizing expensive calls.

→ Phase 2.5: JAX acquisition provides massive speedups to the surrogate, removing the overhead and pushing the performance closer to the raw waveform limit.