P2 diagnosis on dev, P3 dev experiments, lock protocol_p3

- P2: SMC tie posterior (numpy + torch), RML/soft-DTW losses, bank training,
  D2 synthetic generator, scripts 09-13, protocol_p2 (locked) and its outcome
  (G-B failed; H1 not rejected, H3 rejected, H4 not rejected).
- Diagnosis on dev realizations 900/901 only (scripts 14-17, run_p3_dev.sh):
  posterior screen, SMC stability (P = 1024, K = 1), sigma_a misspecification
  stress and training, H3 with the SMC posterior, F3 placement on sigma_post.
- protocol_p3: H2 split into H2a (posterior-mean labels vs point ties) and
  H2b (RML vs posterior mean as a function of sigma_post); H3 descriptive only;
  sigma_a arm; new D2 config d2_synth_p3.yaml; main grid on realizations 8-15.
  Locked by configs/protocol_p3.sha256 and tag protocol-p3.
- runlog: per-run logs and runtime index (logs/index.csv).
- Docs: plan §12 items 10-11, theory, technical overview, report; wording
  aligned with Gunning & Glinsky (2006): the tie posterior is not claimed as new.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 06:03:33 +00:00
parent a76e61398a
commit cee2ff0859
84 changed files with 8793 additions and 460 deletions

50
configs/d2_synth_p3.yaml Normal file
View File

@@ -0,0 +1,50 @@
# D2 for protocol_p3: GENERATOR IDENTICAL to configs/d2_synth.yaml (protocol_p2, sha256 68e8f844…). This file differs only in
# comments and the `regimes` block at the end; every key read by ml_porosity/data/synth_d2.py keeps its value, so the same
# realization yields the same data. Do not edit configs/d2_synth.yaml (locked in protocol_p2).
horizons: [Shallow, FS8, FS7, Truncation, MFS4] # 5 horizons covering ≥ 95% of the survey (Top-Foresets 74%, FS6 49%)
horizon_cache: outputs/d2/horizon_grid.npz
min_gap_ms: 8 # drop bins where two consecutive horizons are < 8 ms apart or out of order
sub_unit_ms: 60 # nominal sub-unit thickness (unit boundaries = markers/anchors)
model_t_ms: [-300, 2400] # earth-model domain in true time; wide enough that t(τ) of the 100–1650 ms log stays inside at drift ×2
log_tau_ms: [100, 1650] # log domain in sonic time τ
fine_dt_ms: 0.5
warp_dtau_ms: 4.0 # grid of g
dt_ms: 4
ext_window_ms: [400, 1300] # seismic + anchors (as in F3)
main_window_ms: [600, 1100] # input/labels/scoring (as in F3)
patch_radius: 1
wells:
n_test: 8
n_train_pool: 16 # N_train ∈ {2, 4, 8, 16}, nested draws from the pool
min_dist_test_m: 1000 # test wells ≥ 1 km from every other well (spatial block split)
min_dist_train_m: 500
property:
phi0: 0.32
phi0_sd: 0.01
slope_per_100ms: -0.008
unit_offset_sd: 0.02
unit_lateral_sd: 0.01
grf: # sum of OU processes in stratigraphic coordinates
- {sd: 0.010, ell_ms: 10.0}
- {sd: 0.006, ell_ms: 2.0}
clip: [0.05, 0.45]
wavelet: statistical # outputs/wavelets.npz (zero phase, 128 ms) from scripts/04
snr_db: 10 # generator default; protocol_p3 takes SNR from the regimes below
drift:
prior_json: outputs/p2/warp_prior_f3.json # Matérn-3/2 fit on F3 anchors (scripts/09)
factors: [0, 0.5, 1, 2]
anchors:
density: full
sigma_a_ms: 7.0 # robust σ (MAD) of marker–horizon differences at the 4 F3 wells (18 pairs): 6.9 ms
regimes: # protocol_p3: observation regimes (seismic SNR at train + test wells, anchor density at train wells)
R10: {snr_db: 10, anchor_density: full} # P2 default; narrow posterior (dev σ_post ≈ 0.85 ms at c = 1)
R0: {snr_db: 0, anchor_density: full} # dev σ_post ≈ 1.9 ms at c = 1
Rm5: {snr_db: -5, anchor_density: full} # close to F3 under the protocol prior (dev σ_post ≈ 3.0 ms, F3 2.5–3.4 ms)
R0h: {snr_db: 0, anchor_density: half} # sparse anchors: dev σ_post ≈ 1.8 / 4.5 ms at c = 1 / 2
R10tb: {snr_db: 10, anchor_density: topbottom} # top–bottom anchors only: dev σ_post ≈ 2.6 / 11 ms (multimodal, overconfident posterior)