Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Reproduction: BALLAST (ICML 2026)
|
| 2 |
+
|
| 3 |
+
Independent, from-scratch reproduction of
|
| 4 |
+
|
| 5 |
+
> **BALLAST: Bayesian Active Learning with Look-ahead Amendment for Sea-drifter
|
| 6 |
+
> Trajectories under Spatio-Temporal Vector Fields**
|
| 7 |
+
> Rui-Yang Zhang, Henry Moss, Lachlan Astfalck, Edward Cripps, David Leslie
|
| 8 |
+
> ICML 2026 · OpenReview `0xOj6kVMbb` · arXiv [2509.26005](https://arxiv.org/abs/2509.26005)
|
| 9 |
+
|
| 10 |
+
There is **no official code release** for this paper. Everything here was written
|
| 11 |
+
from the paper text (main text + appendices A–H).
|
| 12 |
+
|
| 13 |
+
## Layout
|
| 14 |
+
|
| 15 |
+
```
|
| 16 |
+
ballast/
|
| 17 |
+
kernels.py Helmholtz + Matern-3/2 kernels, analytic derivatives,
|
| 18 |
+
extended GP f = [f, d_t f]^T (paper Sec. 2.2, 4.1, B.2)
|
| 19 |
+
spde.py SPDE / state-space formulation, exact propagation (Sec. 4.1, App. F)
|
| 20 |
+
gp.py regression, posterior sampling, information-gain utilities,
|
| 21 |
+
rank-q Gram determinant updates (App. B.1, C.1, E.2)
|
| 22 |
+
trajectory.py Lagrangian advection + observation model (Sec. H.1)
|
| 23 |
+
policies.py UNIF, SOBOL, DIST-SEP, EIG, BALLAST-true, BALLAST-opt (Sec. H.3)
|
| 24 |
+
experiment.py active-learning campaign driver, iso-performance (Sec. 5.2)
|
| 25 |
+
tests/ correctness checks (see below)
|
| 26 |
+
run_job.py entry point: bench | synth | suntans | ablation | spde_cost
|
| 27 |
+
hf_entry.py Hugging Face Jobs wrapper
|
| 28 |
+
analyze.py raw JSON -> per-claim numbers
|
| 29 |
+
plot.py Plotly figures + raw CSV
|
| 30 |
+
fit_suntans.py put the SUNTANS field in the paper's units; fit the surrogate
|
| 31 |
+
data/
|
| 32 |
+
extract_suntans.py derive surface u,v from the SUNTANS harmonic atlas
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## Running
|
| 36 |
+
|
| 37 |
+
```bash
|
| 38 |
+
uv venv && uv pip install jax numpy scipy matplotlib plotly pandas pytest
|
| 39 |
+
.venv/bin/python -m pytest tests/ -q # 13 correctness tests
|
| 40 |
+
.venv/bin/python run_job.py bench # one full-scale campaign per policy
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
On a GPU via HF Jobs:
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
hf jobs uv run --flavor a100-large --timeout 2h -d \
|
| 47 |
+
-e BALLAST_ARGS="synth --seed-lo 0 --seed-hi 10 --out /tmp/o.json --bucket txus/ballast-repro-results" \
|
| 48 |
+
-s HF_TOKEN=$HF_TOKEN hf_entry.py
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
## Tests
|
| 52 |
+
|
| 53 |
+
`tests/` encodes what must be true for the reproduction to mean anything:
|
| 54 |
+
|
| 55 |
+
- `test_spde.py::test_posterior_sampling_is_exact_with_nongridded_observations` —
|
| 56 |
+
the Sec. 4.1 sampler is **exact**, compared analytically (not by Monte Carlo)
|
| 57 |
+
against a dense GP, with observations at non-gridded Lagrangian locations.
|
| 58 |
+
- `test_spde.py::test_prior_matches_dense_gp` — SPDE prior ≡ `k_tHelm` exactly.
|
| 59 |
+
- `test_kernels.py::test_matern32_second_derivative_at_zero` — the Sec. H.2
|
| 60 |
+
clipped-distance autodiff trap (`d^2_{tt'}k = 3` at `t=t'`, not 0).
|
| 61 |
+
- `test_padding.py` — the shape-padding used for performance is provably inert.
|
| 62 |
+
|
| 63 |
+
## Deviations from the paper, and why
|
| 64 |
+
|
| 65 |
+
1. **Observations are conditioned at the cell centre, not the drifter's exact
|
| 66 |
+
position.** The ground-truth field exists only on the grid and a drifter
|
| 67 |
+
measures "the velocity of the grid cell containing the location" (Sec. H.1),
|
| 68 |
+
so the measurement *is* a noisy observation of `f` at the cell centre.
|
| 69 |
+
Regressing it at the exact position is misspecified: for the Sec. 5.2 setup
|
| 70 |
+
the within-cell field variation has sd ≈ 0.29, about 3× the assumed
|
| 71 |
+
`sigma_obs = 0.1`. A GP told the noise is 0.1 then interpolates
|
| 72 |
+
discretisation error — the posterior mean overshoots to ~3× the true field
|
| 73 |
+
range and the field error *rises above the prior* as drifters are added.
|
| 74 |
+
Snapping removes the misspecification exactly.
|
| 75 |
+
|
| 76 |
+
2. **Utility uses `logdet(I + sigma^-2 K)`, per App. C.1, not the main text's
|
| 77 |
+
`logdet(I + sigma^2 K)`.** The main-text form is a sign-of-exponent typo;
|
| 78 |
+
with `sigma = 0.1` the two differ by 1e4 inside the logdet and rank
|
| 79 |
+
candidates differently.
|
| 80 |
+
|
| 81 |
+
3. **SUNTANS region and units are inferred** (Sec. 5.3 states neither). See
|
| 82 |
+
`fit_suntans.py` for the reasoning and the agreement it produces.
|
| 83 |
+
|
| 84 |
+
4. The paper's stated SUNTANS "true" stream-kernel values (`psi_ls=4`,
|
| 85 |
+
`psi_var=0.01`) lie **outside its own stated BALLAST-opt bounds**
|
| 86 |
+
(`[0.1,1]` and `[0.1,5]`, Sec. H.3). We use the stated values for
|
| 87 |
+
BALLAST-true and the stated bounds for BALLAST-opt.
|
| 88 |
+
|
| 89 |
+
## Artifacts
|
| 90 |
+
|
| 91 |
+
- Code + data: <https://huggingface.co/datasets/txus/ballast-repro>
|
| 92 |
+
- Raw results: <https://huggingface.co/datasets/txus/ballast-repro-results>
|
| 93 |
+
|
| 94 |
+
SUNTANS ground truth derives from the **Northern Australia Internal Tide
|
| 95 |
+
Climatology** (Rayson et al. 2021, CC BY, DOI
|
| 96 |
+
[10.26182/8jx9-m532](https://doi.org/10.26182/8jx9-m532)), read with the physics
|
| 97 |
+
of [`mrayson/iwatlas`](https://github.com/mrayson/iwatlas).
|