Template Bank: corrected frequency grid/weights and 1,000-row hidden test set for the detection-in-noise version
Browse files- template_bank/Aref_weights.npy +1 -1
- template_bank/README.md +81 -25
- template_bank/bank_wf_params_test.npy +2 -2
- template_bank/f_amp.npy +1 -1
template_bank/Aref_weights.npy
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 48128
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd0d46f9d2146897ff55c46d0763b3ec5065d5d1fb7f403f99acdbc3f9a0be18
|
| 3 |
size 48128
|
template_bank/README.md
CHANGED
|
@@ -1,38 +1,94 @@
|
|
| 1 |
-
# Template Bank Benchmark
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
|
| 8 |
-
- `Aref_weights.npy`: amplitude reference and overlap weights, shape `(2, 3000)`
|
| 9 |
-
- `bank_wf_params.npy`: public 4D parameter pool, shape `(8574, 4)`
|
| 10 |
-
- `bank_wf_params_test.npy`: hidden/local evaluation 4D parameter pool, shape `(1000, 4)`
|
| 11 |
-
- `calpha_grid_params.npy`: literature-reference parameter grid, shape `(9, 4)`
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
```text
|
| 16 |
-
|
| 17 |
```
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
-
##
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
-
datasets/template_bank/
|
| 28 |
-
```
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Template Bank Benchmark Dataset
|
| 2 |
|
| 3 |
+
Template banks are how gravitational-wave searches find signals in noisy data:
|
| 4 |
+
the data are filtered against a finite set of waveforms, and a detection
|
| 5 |
+
statistic computed from the filter outputs is compared with a threshold set by
|
| 6 |
+
the tolerated false-alarm rate. This benchmark asks an agent to design both
|
| 7 |
+
parts, the filters and the statistic, for binary-black-hole signals with
|
| 8 |
+
strong higher harmonics in stationary Gaussian noise.
|
| 9 |
|
| 10 |
+
> **Version note (2026-11).** This is the second version of the benchmark. The
|
| 11 |
+
> first, noiseless version scored how few waveforms were needed to reconstruct
|
| 12 |
+
> hidden signals with match >= 0.97. It saturated: a weighted POD (SVD) basis
|
| 13 |
+
> with orthogonal projection is essentially optimal there, and agents found it.
|
| 14 |
+
> With noise, every extra filter dimension also adds noise, so the statistic
|
| 15 |
+
> matters and there is no closed-form answer. Results under
|
| 16 |
+
> `llm_agents/results/*/template_bank/` dated before 2026-11 belong to the
|
| 17 |
+
> noiseless version and are not comparable.
|
| 18 |
|
| 19 |
+
## Task in one paragraph
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
Submit at most 32 filter waveforms `b_i` on the frequency grid below and a
|
| 22 |
+
function `detection_statistic(z)` of the complex filter outputs
|
| 23 |
+
`z_i = <d, b_i>`. The evaluator draws 2,000,000 noise-only trials and 10,000
|
| 24 |
+
signal trials `d = rho * h + n` (1,000 hidden targets x 10), with
|
| 25 |
+
`p(rho) ~ rho^-4` for `rho >= 5` (sources uniform in volume). The threshold is
|
| 26 |
+
set at false-alarm probability 1e-4 from the noise trials. The **loss** is
|
| 27 |
|
| 28 |
```text
|
| 29 |
+
loss = 1 - detection_fraction / oracle_detection_fraction = 1 - VT / VT_oracle
|
| 30 |
```
|
| 31 |
|
| 32 |
+
where the oracle is a single exactly known template (detection fraction 0.948).
|
| 33 |
+
Lower is better. The full agent-facing statement is
|
| 34 |
+
`llm_agents/agent_prompts/template_bank.md`.
|
| 35 |
|
| 36 |
+
## Conventions
|
| 37 |
|
| 38 |
+
- Inner product: `<a, b> = sum(a * conj(b) * weights)` with `weights` from
|
| 39 |
+
`Aref_weights.npy`. Waveforms are divided by `A_ref` and normalized to unit norm.
|
| 40 |
+
- Noise: circular complex Gaussian with `E|n_f|^2 = 2 / weights_f`, so the
|
| 41 |
+
filter outputs have covariance `E[z z^H] = 2 conj(G)`, `G` the Gram matrix of
|
| 42 |
+
the filters, and `|z|^2` is chi-squared with 2 degrees of freedom for one
|
| 43 |
+
unit-norm filter. The evaluator samples `z` directly from this distribution.
|
| 44 |
+
- Signals: IMRPhenomXHM, `h_plus` only, edge-on (`iota = pi/2`, where the
|
| 45 |
+
higher harmonics are strongest), aligned spins, random reference phase,
|
| 46 |
+
modes `(2,±2), (2,±1), (3,±3), (3,±2), (4,±4)`.
|
| 47 |
+
- Parameter rows: `[m1, m2, s1z, s2z]` (detector-frame solar masses,
|
| 48 |
+
dimensionless aligned spins).
|
| 49 |
|
| 50 |
+
## Files
|
|
|
|
|
|
|
| 51 |
|
| 52 |
+
Public (copied into every agent workspace):
|
| 53 |
|
| 54 |
+
| File | Content |
|
| 55 |
+
|---|---|
|
| 56 |
+
| `f_amp.npy` | frequency grid in Hz |
|
| 57 |
+
| `Aref_weights.npy` | `(2, n_freq)`: amplitude normalization `A_ref` and quadrature weights |
|
| 58 |
+
| `bank_wf_params.npy` | public parameter pool for the agent's own train/eval splits |
|
| 59 |
+
|
| 60 |
+
Evaluator-only (never give these to a running agent):
|
| 61 |
+
|
| 62 |
+
| File | Content |
|
| 63 |
+
|---|---|
|
| 64 |
+
| `bank_wf_params_test.npy` | 1,000 hidden target parameter rows |
|
| 65 |
+
| `calpha_grid_params.npy` / `.txt` | intrinsic points of the literature mode-filter bank (reference solution only) |
|
| 66 |
+
|
| 67 |
+
The current `f_amp.npy` and `Aref_weights.npy` are the corrected grid of
|
| 68 |
+
2026-11-13 (md5 `0b9ff31c…` and `21eaa5e0…`). Make sure the Hugging Face copy
|
| 69 |
+
matches before running agents.
|
| 70 |
+
|
| 71 |
+
## Code
|
| 72 |
+
|
| 73 |
+
- `gwbenchmarks/benchmarks/template_bank_core.py`: waveform generation, noise
|
| 74 |
+
model and `score_detection`, which implements the hidden scoring exactly.
|
| 75 |
+
- `llm_agents/make_template_bank_workspace.py`: builds an isolated agent workspace.
|
| 76 |
+
- `llm_agents/evaluate_template_bank.py`: hidden evaluator.
|
| 77 |
+
- `llm_agents/template_bank_reference_scores.json`: scores of reference solutions.
|
| 78 |
+
|
| 79 |
+
## Reference scores (hidden set)
|
| 80 |
+
|
| 81 |
+
| Solution | Rows | Detection fraction | 1 - VT/VT_oracle |
|
| 82 |
+
|---|---|---|---|
|
| 83 |
+
| Starter: farthest-first templates, max \|z\|² | 16 | 0.721 | 0.240 |
|
| 84 |
+
| Literature mode filters + marginalized likelihood ratio | 27 | 0.834 | 0.121 |
|
| 85 |
+
| POD basis + library-marginalized likelihood ratio | 16 | 0.857 | 0.097 |
|
| 86 |
+
| Oracle (exact template) | 1 | 0.948 | 0 |
|
| 87 |
+
|
| 88 |
+
Statistical uncertainty on a detection fraction is about 0.004.
|
| 89 |
+
|
| 90 |
+
## Regeneration
|
| 91 |
+
|
| 92 |
+
The parameter pools, the grid and the weights come from the benchmark design
|
| 93 |
+
notebook (not part of this repository). Record exact generation commands and checksums
|
| 94 |
+
here when the hosted dataset is finalized.
|
template_bank/bank_wf_params_test.npy
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7192bb5afc536b24bfb182d31e1950291250b1eb58d64e82d3e6ed74df62ca35
|
| 3 |
+
size 32128
|
template_bank/f_amp.npy
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 24128
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ddf563b348846a79981a2bb9d0f78be4cb2b49c4291e9a8ab26ccf4ef3b99ebf
|
| 3 |
size 24128
|