Rename protocol_p3 to protocol_p2r; close P2

protocol_p3 (cee2ff0) was the rerun of P2 on new realizations, not the
plan's phase P3 (F3 field). Renamed to P2r before any of realizations 8-15
was generated: protocol, D2 config, dev runner and summary script, output
dir outputs/p2/diag/p2rdev, tag protocol-p3 -> protocol-p2r. Protocol
content changes only names plus two notes in p2_outcome: the deviation from
protocol_p2's if_fail rule (pivot) and what the diagnosis did not test
(sigma_b, rock-physics stress). Re-locked: sha256 eb887311...

Docs: plan §12 item 12 and report section closing P2 (locked verdict kept,
diagnosis, decision, deviation, untested items, link to phase P3 / G-C).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 06:48:52 +00:00
parent cee2ff0859
commit f95123174f
16 changed files with 96 additions and 64 deletions

200
configs/protocol_p2r.yaml Normal file
View File

@@ -0,0 +1,200 @@
# Protocol P2r (pre-registration; rerun of P2 on new realizations after gate G-B failed; not the plan's phase P3, F3 field). Locked by SHA-256 in
# configs/protocol_p2r.sha256 and git tag protocol-p2r BEFORE generating or running any of realizations 8–15.
# Every choice below is based on dev 900/901 (outputs/p2/diag, summary in outputs/p2/diag/p2rdev/summary.md) and F3
# (descriptive only); no test labels of realizations 0–7 or 8–15 are used for selection. Changes after locking: new version.
# STATUS: LOCKED 2026-10-27, before realizations 8–15 were generated.
version: 1
date: 2026-10-27
supersedes: {path: configs/protocol_p2.yaml, sha256: 0733620042c4ec1b7dce447eef3ec64f915db05acbebbe5b6c977ac42e71a470}
history: "first locked as configs/protocol_p3.yaml (commit cee2ff0, tag protocol-p3); renamed to P2r before any of
realizations 8–15 was generated, to avoid confusion with the plan's phase P3 (F3 field); only names and the p2_outcome
deviation/untested notes changed"
p2_outcome: # reported as is, not rewritten
G-B: "failed — 0/4 cells at c = 1 passed (band RMSE ratio M2/best 0.985–1.045); c = 0 guard failed (macro 1.039)"
H1: "not rejected (Prop 1 matches at σ = 4–32 ms)"
H3: "rejected — CE(M2-ens) 0.278 ≥ CE(B5) 0.230"
H4: "not rejected"
diagnosis_dev: >
(dev 900/901, SNR 10, full) the M2 posterior is only 64 anchor-conditioned samples with tempered physical weights:
it does not contract to the true warp (warp RMSE 3.25 ms, 90% width 11.6 ms at c = 1 — on par with B3c 3.85 ms), so M2 ≈ B3d ≈
B3c. Seismic-conditioned SMC tempering (phase re-estimated via log Z) gives warp RMSE 0.56 ms and 90% coverage
0.97; labels at the SMC mean warp are close to Oracle. P2 therefore could not test the RML hypothesis: the failure lies in registration.
deviation: >
protocol_p2 gates.G-B.if_fail prescribes a time-boxed diagnosis followed by a pivot (plan §9); the option to rerun on
new realizations was added to the plan only after G-B failed. P2r is therefore a new pre-registration designed after
seeing the P2 failure (on dev realizations only). The P2 verdict stands and is reported as is; P2r results are not
presented as a P2 result.
untested_in_diagnosis: >
σ_b was neither learned nor stressed; σ_a was stressed (3.5 / 14 ms) but learned only on F3 (type-II ML ≈ 0.4 ms,
treating TD markers as exact; not reliable); the rock-physics misspecification stress was cut (plan §6, cut order item 6).
inputs:
d2_config: {path: configs/d2_synth_p2r.yaml, sha256: 57b676f0fc569ebe44f6253426fe42a218fb06272323b949932e9f8d597ff0d3} # generator identical to configs/d2_synth.yaml; adds regimes
warp_prior: {path: outputs/p2/warp_prior_f3.json, sha256: 55cda573c06b3a7275bdb4ac5f169fb4e5af329e1d199acc3d4daffe15624d27,
fit: matern32}
wavelet: {path: outputs/wavelets.npz, key: statistical, sha256: b689ea12578e580d8c2305c8f7219be05ff6e339884fa30b694111e968c0fc64}
budgets: {path: outputs/p2/diag/train/budgets.json, sha256: 815c6f7abc3d961255feb79bbed57a3e326cbc24cec11bbd97f455f0356e28c5}
grid:
regimes: [R10, R0, Rm5, R0h, R10tb] # configs/d2_synth_p2r.yaml; full-anchor R10/R0/Rm5 for H2a, all five for H2b
drift_factors: [0, 1, 2]
realistic_drift: 1
n_train: [4, 16] # nested from the 16-well pool
realizations: [8, 9, 10, 11, 12, 13, 14, 15] # new; 0–7 already used for P2 (and the B(σ) exploration, see notes)
dev_realizations: [900, 901] # used to design P2r; never used for results
seeds: [0, 1, 2, 3, 4] # network seeds; registration and SMC use seed 0 (reg_seed) as in dev
test_wells: 8 # observed at the regime SNR (test seismic is noisy too)
sigma_a_arm: # secondary, reported; sets the scope of the H2a claim (hypotheses.H2a.sigma_a_scope)
regime: R10
sigma_a_reg_ms: [3.5, 14] # data generated with σ_a = 7 ms; every method registered with the same σ_a_reg
drift_factors: [1]
n_train: [4, 16]
registration:
base: "as in protocol_p2 (MAP-II, σ_a 7 ms, σ_b 50 ms, 128 ms statistical wavelet, anchor-based constant phase) — for B3b, B3c, B3d"
phase_R: "constant phase re-estimated from the SMC log Z on the train wells (smc_fit_phase, 15° grid)"
smc:
code: ml_porosity/registration/smc_torch.py (smc_tie_posterior), same algorithm as smc.py
start: "P anchor-posterior samples (Laplace/Gauss–Newton + elliptical slice) for each well"
target: "p(warp | anchor) · p(seis | warp, wavelet phase_R)^γ, γ = 1/κ (κ = residual-ACF inflation factor at the best anchor sample; g_acf)"
tempering: "γ increased adaptively keeping ESS ≥ P/2; systematic resampling; 8 elliptical-slice steps per level; inflation 2"
particles: 1024
runs_K: 1 # one run (phase + SMC) per (realization, c, N); SMC seeds as in dev
stability:
criterion: >
registered before the trial: p95 over t of |τ̄_k(t) − τ̄_l(t)| between independent runs k ≠ l (main window),
averaged over the train wells of a cell (rid, c, N), ≤ 0.5 ms; the per-well maximum is reported alongside
dev_result: >
(SNR 10, full, rid 900/901, N 4/16) P = 256, K = 1: c = 1 passes 2/4 cells (max 0.69 ms), c = 2 0/4 (max 2.9 ms),
phase_R differs by up to 10°/26° between runs. P = 256 pooled K = 2: c = 1 4/4 (max 0.43 ms), c = 2 0/4.
P = 1024, K = 1: c = 1 4/4 (max 0.29 ms; worst well 0.86 ms), c = 2 2/4 (max 0.95 ms), phase differs
≤ 3°/9°. Cost of P = 1024 ≈ 3.3 × P = 256 per run. SNR −5, full (F3-like), P = 1024, K = 1: c = 1 passes 3/4 cells
(0.42–0.45 ms; r900 N = 4: 0.95 ms with phase_R differing by 12.6°), c = 2 0/4 (0.59–0.73 ms); relative to
σ_post (2.8 / 3.8 ms) the run-to-run p95 is ≤ 0.34 σ_post.
choice: "P = 1024, K = 1: passes at c = 1 with margin; one phase estimate (no phase mixing across runs)"
limitation: >
at c = 2 the posterior is multimodal and the mean warp is unstable between runs under every configuration tried;
c = 2 results are reported with an "unstable posterior" flag and are not primary evidence for H2a.
At low SNR the 0.5 ms criterion also fails in 1/4 cells at c = 1 (phase estimate varies between runs); this Monte
Carlo variability is small relative to σ_post but is not removed; reported as a limitation, not corrected.
training:
backbone: as in protocol_p2 (CNNGRUHetero, Adam 5e-3, full batch, 64-sample window, per-well z-score)
device: cuda:1
budgets: {Oracle: 500, B3b: 125, B3c: 250, B3c-R: 500, B3d: 250, B3d-Sa: 250, M2-Sa: 250} # iterations; from dev
# (inputs.budgets, SNR 10, c = 1); B3b, B3c, B3d, Oracle as protocol_p2; not re-selected per regime
lambda: "λ = 1/τ_c as in protocol_p2"
bank_S: 64 # M2-S: 64 particles drawn without replacement from the P particles, uniform π
methods:
Oracle: {labels: true warp, note: "reference ceiling; not a competitor"}
B3b: as in protocol_p2
B3c: as in protocol_p2 (protocol_p2 wavelet phase)
B3c-R: "B3c with wavelet phase phase_R"
B3d: "weighted mean warp of the old M2 (protocol_p2)"
B3d-Sa: "labels at the mean warp of the SMC particles (g_acf)"
M2-Sa: "RML (soft-min, λ) on a bank of 64 SMC particles (g_acf), uniform π"
ensembles: "Oracle-ens, B5 (= B3b-ens), B3c-R-ens, B3d-Sa-ens, M2-Sa-ens: 5 network seeds, μ = mean μ_s, σ² = mean σ_s² + var μ_s"
cells: "cell = (regime, c, N); all cell statistics are averaged over realization × seed as in protocol_p2"
common:
improves_seed: "mean difference (over realizations) for seed s in the hypothesized direction"
cell_pass: ">= 4/5 seeds AND > 1/2 of realizations (per realization: mean over seeds) — same rule as G-B"
ci: "95% bootstrap CI over realizations (2000 resamples) for every ratio; reported regardless of direction"
hypotheses:
H2a:
statement: "Labels from the tie posterior (SMC mean warp) beat labels from the best point tie"
method: B3d-Sa # primary; M2-Sa reported additionally under the same rule, not as a substitute
competitors: [B3b, B3c, B3c-R] # point ties, as in the statement
best_competitor: "per cell: the competitor with the smallest mean band RMSE"
improves: "band_rmse(B3d-Sa) ≤ 0.90 · band_rmse(best) OR band_pcc(B3d-Sa) ≥ band_pcc(best) + 0.05 (protocol_p2 rule)"
regimes: [R10, R0, Rm5] # full anchors; one verdict per regime
regime_pass: "cell_pass at c = 1 for both N, AND zero_drift_guard of the same regime"
zero_drift_guard: "at c = 0 of the same regime: band_rmse(B3d-Sa) ≤ 1.02 · band_rmse(best), macro over N and for each N"
pass: >
H2a passes if R10 passes. The claim is scoped to the regimes that pass; Rm5 (the F3-like regime, notes.f3_placement)
is reported as a separate pre-registered verdict, and no claim is made for a regime that fails.
sigma_a_scope: >
the H2a rule applied to grid.sigma_a_arm (no c = 0 guard). If it fails for a σ_a_reg, the paper states that the
H2a result requires a correctly specified anchor uncertainty σ_a. Dev: fails for both 3.5 and 14 ms (notes.sigma_a_stress).
secondary_vs_B3d: >
same rule with competitors [B3b, B3c, B3c-R, B3d], where B3d is the protocol_p2 M2 mean warp (an anchor-conditioned
posterior mean with tempered physical weights, not a point tie). Reported per regime; a claim that SMC labels beat the
P2 anchor posterior is made only for regimes where this passes. Added after dev showed B3d is the strongest
competitor at SNR 0 and −5 dB.
dev_result: >
(900/901, 5 seeds; with 2 dev realizations cell_pass needs both) point-tie competitors, c = 1, N = 4 / 16:
R10 ratio 0.85 / 0.76 (pass / pass; c = 0 guard 0.85 / 0.77 with 2 seeds); R0 0.87 / 0.89, ΔPCC +0.11 / +0.07
(pass / 1 of 2 realizations); Rm5 0.94 / 0.95, ΔPCC +0.10 / +0.08 (pass / 1 of 2). Including B3d: R10 unchanged
(B3d is not best at c = 1); R0 0.91 / 0.90 and Rm5 0.98 / 0.95 against B3d (no cell passes). c = 2: R10 ratio
0.91 / 0.83 but improves in 1 of 2 realizations (unstable posterior, see registration.smc.stability).
H2b:
statement: >
RML on the posterior bank beats posterior-mean labels when the tie posterior is wide, the gain increases with
σ_post, and RML costs at most 2% band RMSE when the posterior is narrow
ratio: "band_rmse(M2-Sa) / band_rmse(B3d-Sa) per cell"
sigma_post: "from SMC particles of the train wells (notes.sigma_post); no labels used; mean over realizations"
wide: "σ_post ≥ 1.5 ms (Prop 1: 50 Hz transfer factor ≤ 0.90)"
primary_n: 16
tests:
a_wide_gain: "at N = 16, M2-Sa < B3d-Sa (cell_pass) in ≥ 2/3 of wide cells"
b_dose: "at N = 16, Spearman ρ(σ_post, ratio) over all cells (c ∈ {0, 1, 2} × regime) < 0; one-sided permutation p reported"
c_narrow_guard: "at N = 16, mean ratio over narrow cells (σ_post < 1.5 ms) ≤ 1.02 (no-harm guard; a gain there is not required)"
pass: "a AND b AND c"
secondary_n4: >
N = 4 reported only (no claim): on dev the gain is smaller and unstable (ratio < 1 in 16/19 wide cells;
SNR −5/full ratio 1.02).
mechanism_note: >
Do not attribute the gain to deblurring (Prop 1) unless the measured ratio lies within the bound 1/B(σ_post) (notes.blur_bound):
on dev at SNR −5 the 4% gain exceeds the bound of ≈ 0–2% (docs/theory.md §1.4).
H3:
status: "not tested as a hypothesis in P2r; reported descriptively (decided on dev before locking)"
reason: >
dev h3_smc (900/901, SNR 10, full, 5 seeds; CE as in protocol_p2) at c = 1 / 2, N = 16: CE(B5) 0.113 / 0.152,
CE(B3d-Sa-ens) 0.298 / 0.319, CE(M2-Sa-ens) 0.318 / 0.335, CE(Oracle-ens) 0.389 / 0.366 (N = 4: 0.31 / 0.29 vs
0.45 / 0.41 / 0.45 / 0.48). Every ensemble trained on better labels under-covers more than B5, and the ensemble
trained on the true warp is the worst calibrated. CE against B5 therefore rewards label noise that widens the
predicted σ, not propagation of tie uncertainty: a seed ensemble of the heteroscedastic network does not carry
the tie posterior to the test wells. Testing H3 as in protocol_p2 cannot inform the posterior-label question.
reported: "for each ensemble at c = 1 per regime and N: CE, coverage 50/80/90/95%, NLL, CRPS, mean σ, with bootstrap CI"
claim_forbidden: "no claim that posterior-label ensembles are calibrated or better calibrated than B5"
notes:
sigma_post: "σ_post = (90% width of τ(t) over the main window, mean over train wells) / 3.29; computed from particles, no labels used"
sigma_a_stress: >
(dev 900/901, SNR 10, full, estR, g_acf; data generated with σ_a = 7 ms) registering with the correct σ_a gives warp RMSE
0.56/1.63 ms and 90% coverage 0.97/0.93 at c = 1/2. With σ_a = 3.5 ms (anchors over-trusted): RMSE 5.9/5.7 ms, coverage
0.45/0.54. With σ_a = 14 ms: RMSE 3.1/3.4 ms, coverage 0.50/0.75, σ_post 1.1/1.8 ms (overconfident). The SMC posterior
is calibrated only when σ_a is correct, in both directions. All P2r D2 results use the correct σ_a and are therefore
optimistic about registration; on F3 σ_a is not known (TD markers are not independent checkshots). Training under
misspecified σ_a: dev train_sa (900/901, 5 seeds, every method registered with the same σ_a), B3d-Sa / best point tie
at c = 1, N = 4 / 16: σ_a = 3.5 ms 1.08 / 1.18, σ_a = 14 ms 1.04 / 0.96 (0/4 cells pass at c ∈ {1, 2} in both cases);
M2-Sa / best: 1.04 / 1.10 and 0.98 / 0.93. The H2a advantage on dev depends on a correctly specified σ_a.
blur_bound: >
B(σ) = band_rmse(Gaussian blur_σ of the Oracle prediction μ) / band_rmse(μ), per regime and N, from the Oracle
predictions of the main run (descriptive; used only for mechanism_note, never for selection). If B3d-Sa labels carry
N(0, σ_post²) timing errors and RML removed them fully, the best attainable M2-Sa/B3d-Sa ratio is ≈ 1/B(σ_post).
Dev: SNR 10, full, N = 16: B(1.5 / 2 / 3 ms) = 1.015 / 1.044 / 1.157; N = 4: 0.98 / 0.98 / 1.01. SNR −5, full:
B ≤ 1.003 up to 3 ms for both N (noisy inputs already smooth the prediction), yet M2-Sa/B3d-Sa = 0.96 at N = 16.
f3_placement: >
descriptive only (scripts/16, 4 F3 wells, P = 256, never used to choose γ, P, λ or budgets). Under the protocol
registration (σ_a = 7 ms): σ_post 2.5–3.4 ms (g_acf), κ 1.7–2.6, r_post 0.24–0.57, run-to-run p95 0.63–1.31 ms,
i.e. close to Rm5 (dev σ_post ≈ 3.0 ms at c = 1). With the type-II ML σ_a of scripts/09 (≈ 0.4 ms, treating TD
markers as exact): σ_post 0.56–0.64 ms, i.e. narrower than R10. Since the SMC posterior is calibrated only for the
correct σ_a (notes.sigma_a_stress) and σ_a is not identifiable on F3, F3's place on the σ_post axis is uncertain
between these two ends; no F3 claim is drawn from the D2 regime results.
wording: # plan §10 + prior literature
prior_art: >
Uncertainty in the time–depth tie is not new: Gunning & Glinsky (2006) cast the tie as MAP + a Laplace approximation of the
time–depth posterior; Buland & Omre (2003) sample marker shifts by MCMC. SMC tempering here is a tool, not a
contribution. The contribution under test: using the tie posterior as training labels (posterior mean or RML on a bank).
forbidden: ["first", "novel", "new posterior tie",
"F3 labels called porosity without stating they are linear in DT",
"calibration/conformal assuming i.i.d. time samples",
"generalizing to the field from synthetic results",
"TD markers as independent checkshots",
"geologically plausible without a metric",
"tuning on test labels", "claims about λ (λ = 1/τ_c kept fixed; no evidence that a variant is better)"]