# P4 Volve (plan D3, gate G-D): designed 28/10/2026 after P3 (G-C failed) and before any Volve PHIF metric, # prediction or training run. DRAFT until `scripts/24_run_volve.py lock` on the run machine; after the lock this file # is never edited (a change needs protocol_volve v2 with a recorded deviation). version: 1 date: '2026-10-28' prior_observation: >- Before this file, Volve had only descriptive QC of DT, RHOB, picks, checkshots and seismic (plan §12 item 18). The main window was chosen once from the label positions of all six wells, not their values. The design follows protocol_f3 after its G-C failure was known: a post-P3 design for a second field, not a pre-registration made before any field result. data: wells: [F-1, F-1 A, F-1 B, F-11 A, F-11 T2, F-12] label: PHIF dataset: outputs/volve/volve_wells.npz source_config: configs/d3_volve.yaml window_ms: [2400, 2900] ext_window_ms: [2000, 3200] min_label_samples: 8 references: [calibrated, anchors, NIVSP, OPTIMIZED] primary_reference: calibrated note: >- PHIF is the CPI effective porosity, density-driven and not a function of DT (plan D3). It is used only where DT is valid (16–37 samples of 4 ms per well). DT enters the time placement: vertical sonic integrated over TVD, calibrated to the markers. NIVSP and OPTIMIZED exist only at F-11 T2. missing_labels: >- Never extrapolate labels. Each bank member keeps the samples where its own tie places the label run (member support); a member with fewer than min_label_samples samples in a training well is an error. A scoring reference with fewer than min_label_samples samples is listed, not scored. split: schemes: [lowo, slot] outer: >- lowo: every other well trains. slot: every well outside the slot group of the test well trains (d3_volve.yaml p4.slot_groups: {F-1, F-1 A, F-1 B}, {F-11 A, F-11 T2}, {F-12}). inner: >- Leave one outer training well out, under both schemes. Under slot an inner validation well can share a slot with inner training wells (deviation inner_lowo_under_slot). inputs: >- Training wells: calibrated reference path. Validation well v: blind key T_in. Outer test well u: blind key T_out. A blind key K places the well path in time by the mean TVDSS–TWT relation of the wells K only; a held-out well never supplies its picks, DT or logs to its own input. seeds: [0, 1, 2, 3, 4] selection: >- Per scheme, outer fold, σ_a arm, method and seed: lowest mean original-scale validation MSE over the inner wells, on their labelled samples of the primary reference; ties choose the earliest budget. final: >- Ensemble the inner models at the selected budget on the outer test input, then the five seeds (moment-matched Gaussian mixture). No refit on the outer test well. cache: >- One trajectory per distinct inner training set, method, seed and σ_a arm (22 sets: 15 of four wells, 4 of three, 3 of two). It predicts every input a fold can ask of it and is reused by every fold that trains on that set; the other wells supply seismic only. registration: kernel: matern32 sigma_a_ms: 7.0 sigma_b_ms: 50.0 hyperprior: {sigma_g: [0.05, 1.0], ell_ms: [150.0, 1.0]} hyper_starts: 4 S: 64 particles: 1024 g_max: 1.0 wavelet_ms: 128 tau_range_ms: [1800, 3400] fine_dt_ms: 0.5 log_fine_dt_ms: 0.25 log_cutoff_frac: 0.8 warp_dtau_ms: 4.0 smc_seed: 0 phase_step: 15.0 phase_half_width: 3 phase_max_extra: 6 smc_moves: 8 sigma_a_sensitivity_ms: [3.5, 14.0] sensitivity_methods: [B3c-R, B3d-Sa, M2-Sa] sigma_a_note: >- 7 ms is inherited from P2r and protocol_f3, not estimated on Volve. Both misspecification arms are reported if run, never used to choose a test result. training_only: >- Hyperparameters, statistical wavelet, phase and SMC posterior of a set use its training wells only. τ is the vertical-sonic time through the first anchor in the DT range; anchors are markers in the DT range inside the ext window. training: d_channels: 64 p_dropout: 0.05 lr: 0.005 grad_clip: 5.0 budgets: [125, 250, 500, 1000, 2000] window_samples: 126 window_step: 2 loss: >- ml_porosity.volve.losses.masked_bank_loss with one window, the whole main window (126 samples), and the label support of each member; member log-likelihoods are compared at the mean member count, normalised by it, then averaged over wells. Equal to the F3 bank loss with a 126-sample window when every sample is labelled. λ = 1/τ_c from the pooled ACF of the high-passed B3b label runs of the training set. methods: main: [B3b, B3c, B3c-R, B3d-Sa, M2-Sa] definitions: >- B3b: sonic TDR stretched through the anchors. B3c: B3b plus smoothed local NCC shifts with the phase fitted on anchor-prior samples. B3c-R: the same with the SMC-refined phase. B3d-Sa: posterior-mean tie. M2-Sa: RML on S = 64 posterior label draws. posterior_mean_definition: >- B3d-Sa averages the forward maps t(τ) over retained particles and then inverts that mean, as in protocol_f3. metrics: primary: rmse f_c_hz: 6.0 desc_band_min_samples: 16 best_shift_max_samples: 16 levels: [50, 80, 90, 95] units: 'porosity units (fraction multiplied by 100)' reporting: >- Per well first, then the unweighted mean over wells, per scheme; seed and combined ensembles separate. Every available reference is reported; the primary reference is never replaced by a better-scoring one. No p-values on correlated time samples. Best-shift is a separate diagnostic table. gate: name: G-D candidate: M2-Sa point_competitors: [B3b, B3c, B3c-R] same_posterior_method: B3d-Sa competitor_selection: >- Per scheme and outer fold: lowest inner-validation MSE averaged over seeds, primary σ_a arm; never outer-test metrics. report: >- Per scheme, primary reference and σ_a arm, combined ensemble: the wells where M2-Sa RMSE is below the selected competitor, macro RMSE of both, M2-Sa versus B3d-Sa, macro coverage80 and coverage90 of M2-Sa, and every well. claim_rules: min_improved_wells: 5 coverage_80: [0.75, 0.85] coverage_90: [0.85, 0.95] wording: >- "Consistent improvement" only if at least 5 of 6 wells improve under both schemes (G-C's 3 of 4, scaled and rounded up); "calibrated" only if both macro coverages lie in their bands under both schemes. Otherwise the result is reported as it is (mixed, no improvement, under- or over-coverage). Neither wording overrides the G-C failure on F3. note: >- G-D is descriptive: report results in either direction and scope claims by them (plan §6). No threshold here changes the plan. out_of_scope: >- B0–B2, B3a, B3d, B4, B5, M1 and the F3 ablations (plan §6 scope cut 5), LOAO, the posterior-GP scoring reference, the calibration-assisted setting and volume prediction. deviations: likelihood_window: >- AI exists only over the logged interval, so the tie likelihood of a well (phase grid, SMC, γ) uses the ext samples from its first to its last calibrated AI sample; F3 used the whole ext window. B3c and B3c-R keep the full-window local shifts (windows without synthetic energy are dropped). particle_validity: >- A particle must invert over the main window only; F3 also required label support over the full window, which 16–37-sample labels cannot meet. member_support: >- Each member trains on its own label support. The first draft intersected the supports of all members and methods; the CPU smoke (16 particles, S = 8, training wells only, no PHIF metric) cut F-11 A from 15–17 to 7 samples, below min_label_samples, and the intersection shrinks further with S = 64 draws and wider σ_a. The intersection length is kept as a diagnostic (registration.csv, common_samples). masked_loss: >- Masked bank loss with a single 126-sample window instead of the F3 64-sample windows at step 2 (training.loss). Label runs (16–37 samples) are shorter than an F3 window, so sliding windows would only cut a run at arbitrary offsets and pick the RML member per offset; one window compares members over the whole run. segment_lambda: >- λ from label runs of any length (pooled lagged products) instead of the F3 full-window ACF; identical for runs longer than the maximum lag. primary_metric: >- RMSE on labelled samples replaces the F3 band RMSE: label runs are shorter than one period at f_c = 6 Hz, so the F3 band split is undefined; band_* (runs of at least 16 samples) is descriptive. inner_lowo_under_slot: >- Inner validation under slot is leave-one-well-out, not slot-blind (three slots leave too few groups); inner validation can be optimistic there. tau_range: '[1800, 3400] ms: the F3 margins of 200 ms around the ext window.' main_window: 'Chosen from the label positions of all six wells (not values), once, before any training.' lateral_path: >- The 3×3 patch follows the deviated path placed in time by each TDR, so the blind TDR also moves the path laterally (up to 76 m, F-1 A under slot). Recorded, not corrected. scope: 'See out_of_scope; plan §6 scope cut 5 (Volve: best B3, B3d-S and M2 only).' runtime: device: cuda:1 workers: 8 cpu_threads_per_worker: 2 machine: >- Linux GPU server (shared; cuda:1 chosen by free memory) via scripts/run_p4.sh, decided 29/10/2026 after the benchmark stage (training wells only, no PHIF metric) instead of the Windows RTX 3060 workstation planned on 28/10; scripts/run_p4.ps1 stays the Windows driver. The lock binds code, inputs and environment. Worker count and scheduling do not change results: every job seeds from its own settings. order: >- lock; register, train and summarize the primary arm; then register and train --arms sensitivity and summarize --arms all. An arm not finished before writing is reported as not run. resume: >- A completed job is reused only if protocol, code, inputs, training wells, method, seed and σ_a fingerprints and the artifact checksums match.