Files
ML-Porosity/repro/README.md
lamlvh 1985fcfa02 Complete GP manuscript checks and verify revision artifacts
Move the comparator definitions and core evidence into the main text and
lead with effect sizes and intervals. Preserve the locked verdicts and
record the independent GP-D referee report.

Archive the saved GP results and regenerate 43 outputs in the clean
room. Add a source-backed numerical guard for the submission and
record the correction to anchor warp RMSE and the scope of the pooled
blind-well power estimates.

Co-Authored-By: Codex <noreply@openai.com>
2026-11-18 04:08:10 +00:00

18 KiB
Raw Permalink Blame History

Reproduction package

This directory documents how to reproduce the numbers, tables and figures of the manuscript Uncertain well ties in learned seismic property prediction: theory, a benchmark with known timing, and requirements for blind-well tests. The package has four parts:

part where what
code and locked protocols this git repository (archive: scripts/39_repro_package.py code --rev <commit>) ml_porosity/, scripts/, operations/, tests/, configs/ (six locked protocols with .sha256 and, from P3 on, .lock.json), paper/
derived data five tar.gz archives, hashed in MANIFEST.json saved derived inputs and results, split by data licence
benchmark package separate deposit, documented in ../benchmark/README.md 658 synthetic tasks with their true warps and labels (public, for controlled comparisons rather than blind evaluation), 46,320 reference runs, a scorer
clean-room check verify_report.md the summary, post hoc, table and figure stages rerun from the code and the archives only

Archive DOI: TODO (not deposited yet). Code licence: TODO (to be chosen by the authors).

1. Derived-data archives and licences

Each archive stores its members as outputs/<path>. Extract every archive in the repository root to restore the outputs/ tree that the scripts read, then check it:

for a in ML-Porosity_derived_*.tar.gz; do tar -xzf "$a"; done
.venv/bin/python scripts/39_repro_package.py check --root .     # sha256 of all 15,464 files against MANIFEST.json
archive files size (unpacked / packed) licence content
ML-Porosity_derived_f3_results.tar.gz 13,391 587.9 MB / 220.2 MB CC BY-SA 3.0 summaries, verdicts, post hoc tables, run-level metric tables, posterior summaries, and the small derived inputs (F3 well file, tie QC, wavelets, warp prior, D2 horizon cache)
ML-Porosity_derived_f3_predictions.tar.gz 1,950 2.13 GB / 2.11 GB CC BY-SA 3.0 saved test predictions of the registered runs (P1, P2, P2r, T2, protocol_bench, P3), and the P2r SMC particles of the S4 cells, which the protocol_bench lock hashes
ML-Porosity_derived_f3_volume.tar.gz 10 627 MB / 505 MB CC BY-SA 3.0 descriptive F3 porosity volume of the 20 P3 deployment models (649 interior inlines)
ML-Porosity_derived_volve.tar.gz 102 10.8 MB / 8.9 MB CC BY-NC-SA 4.0 Volve well data on seismic time, P4 summaries, post hoc tables, F3/Volve applicability tables and the mixed GP field tables and reports
ML-Porosity_derived_teapot.tar.gz 11 0.6 MB / 0.1 MB CC0 1.0 (to be verified) Teapot Dome inventory (headers and curve coverage) and pilot P-a (knots, picks); no porosity

MANIFEST.json lists, for each file, its archive, the script that produced it, its size and the sha256 of its exact bytes. The archives are deterministic: scripts/39_repro_package.py build writes the same bytes from the same outputs/ tree (sorted members, fixed mtime and owner, gzip mtime 0).

Files left out of the archives: training checkpoints, the large SMC particle files (except those of the S4 cells), smoke runs, superseded backups, outputs/p4x/ (dropped exploratory study, never used in the manuscript), the quick-look PNGs under outputs/figures/ and the benchmark package outputs/bench/package/ (deposited separately).

Licence notes for the authors (to settle before deposit):

  • F3. The F3 Demo 2023 data are distributed by dGB Earth Sciences (TerraNubis) under CC BY-SA 3.0. The synthetic D2 data use the F3 survey geometry, horizons, wavelet and warp prior, so their outputs are treated as F3-derived. The repository itself tracks 102 F3 well files under data/F3_Demo_2023/ (logs, checkshots, markers, the .survey file); they are redistributed under the same licence.
  • Volve. The licence files of the Volve release name CC BY-NC-SA 4.0. The data owners are Equinor, ExxonMobil, Bayerngas and the Norwegian Petroleum Directorate.
  • F3 and Volve combined. outputs/applicability/ tabulates statistics of both fields. It is placed in the Volve archive under the more restrictive licence. CC BY-SA 3.0 requires adaptations to carry a compatible share-alike licence, and CC BY-NC-SA 4.0 is not one, so the authors should confirm that these tables of summary statistics can be shared this way, or split them by field.
  • Teapot Dome. Recorded as CC0 in the project notes (Texas Data Repository, doi:10.18738/T8/21WDU8); verify on the repository page.
  • NLOG. outputs/d1/ (two small files of the D-1 label check, in the F3 archive) summarises NLOG well logs of the F3 wells. Check the NLOG terms of use.

2. Environment

used for Python key packages install file
P2r, P4, T2, P6, the clean-room check (Linux, NVIDIA H200, CUDA 13.0) 3.13.15 torch 2.14.0+cu130, numpy 2.5.4, scipy 1.18.1, pandas 3.0.6, pylops 2.5.0, numba 0.67.0 requirements-linux.txt
P3 F3 (Windows, NVIDIA RTX 3060 12 GB) 3.12.16 torch 2.11.0+cu128, pandas 3.1.0, pylops 2.8.0, numba 0.68.0 ../requirements-windows-rtx3060.txt
P0–P2 (Linux) 3.13.15 as the first row, but numpy 2.5.3 ../requirements-lock.txt

The environment block of configs/protocol_{volve,bench}.lock.json records the first row and that of configs/protocol_f3.lock.json the second; the locked stages refuse to run when the installed versions differ.

python3.13 -m venv .venv
.venv/bin/pip install --extra-index-url https://download.pytorch.org/whl/cu130 -r repro/requirements-linux.txt
.venv/bin/pip install --no-deps -e .

The figure comparison of the clean-room check needs Ghostscript (gs; 10.02.1 was used). Set the thread variables explicitly when running by hand: OMP_NUM_THREADS=2 MKL_NUM_THREADS=2 OPENBLAS_NUM_THREADS=2, and CUDA_VISIBLE_DEVICES= for CPU-only stages.

3. Raw data

Only the stages that read seismic or field logs need raw data. Place them as follows and check them against the recorded sha256 (data_manifest/*.json):

dataset source place under check
F3 Demo 2023 dGB Earth Sciences, https://terranubis.com/datainfo/F3-Demo-2023 data/F3_Demo_2023/F3_Demo_2023/ (or set ML_POROSITY_F3_ROOT) scripts/00_data_manifest.py --check --dataset f3
Volve Equinor, https://www.equinor.com/energy/volve-data-sharing (well data and the ST10010 post-stack cube) data/Volve/ scripts/00_data_manifest.py --check --dataset volve
NLOG well logs https://www.nlog.nl data/NLOG/ scripts/00_data_manifest.py --check --dataset nlog
Teapot Dome Texas Data Repository, doi:10.18738/T8/21WDU8 (RMOTC, U.S. Department of Energy) data/Teapot/raw/rmotc/ none (inventory only)

The protocol locks also hash their inputs, so a stage refuses to run on files that differ from the ones used.

4. Pipeline

Commands are run from the repository root. Run times are the wall times of the original runs (logs/index.csv). Each registered phase is fixed by a protocol that was locked before its test data were generated or scored; the locked code is that of the commit or tag in the table.

phase (manuscript) protocol, lock commit / tag command wall time, hardware raw data
P0 audit (Sec. 3) — scripts/run_p0.sh (also rewrites outputs/f3_wells.npz, so skip it when the F3 archive is used) under a minute, CPU F3 SEG-Y
P1 field baselines (App. B) configs/protocol.yaml, tag protocol-v2 scripts/05_lowo.py --only B0a,B0b,B1, scripts/05_lowo.py --only B2,B3a,B3b --workers 12, scripts/06_summarize_p1.py (the steps of scripts/run_p1.sh after 01 and 04) 15 min, one GPU none beyond the F3 archive
P2 first synthetic test (Sec. 6.1) configs/protocol_p2.yaml, cee2ff0 scripts/run_p2.sh 1 h 29 min (main grid, 6 workers on one H200) none beyond the F3 archive
P2r rerun (Sec. 6.3) configs/protocol_p2r.yaml, tag protocol-p2r scripts/run_p2r_dev.sh, then scripts/run_p2r_main.sh dev 2 h 23 min; main 42 min to 1 h 38 min per regime on two H200 none beyond the F3 archive
T2 mechanism, exploratory (Sec. 6.4) declared in docs/research/t2-mechanism.md scripts/32_t2_mechanism.py training 18–25 min (GPU), particle tests 7 min (CPU) none
Benchmark, protocol_bench (Sec. 6.5) configs/protocol_bench.yaml, 381b5ff (no tag) scripts/run_bench.sh posterior train per study, then summarize; scripts/36_bench_verdicts.py; scripts/37_bench_package.py generate, tables 11.5 h in all (29/10 14:43 to 30/10 02:16 UTC), with S1, S2 and S3+S4+S8 running at once on two H200 (up to 36 workers); e.g. S2 training 3 h 8 min, S3+S4+S8 training 8 h 51 min none
T3 detectability, T4 coverage, H2b bound (Sec. 6.3, 6.6) post hoc scripts/27_t3_power.py, scripts/30_t4_coverage.py, scripts/31_p2r_posthoc.py minutes, CPU none
P3 F3 field test (Sec. 6.7, App. B) configs/protocol_f3.yaml, tag protocol-f3 scripts/run_p3.ps1 (Windows) 3 h 42 min on one RTX 3060 F3 SEG-Y
P4 Volve field test (Sec. 6.7, App. B) configs/protocol_volve.yaml, tag protocol-volve scripts/run_p4.sh registration 3–5 min, training 47–53 min per σ_a arm on one H200 Volve
Applicability, Teapot (Sec. 6.7) declared in docs/research/applicability-teapot.md scripts/25_p4_posthoc.py, scripts/26_applicability.py, python -P scripts/28_teapot_inventory.py, python -P scripts/29_teapot_pilot.py minutes, CPU Teapot for 28/29
Review analyses, exploratory (Sec. 6.4, 6.5, App. C) declared in docs/research/referee-r4-analyses.md scripts/42_referee_r4.py --stage all (not in the archives or a verify stage) about 4 min (CPU) outputs/p2r, outputs/bench
Interval check, exploratory (Sec. 6, App. C) declared in docs/research/referee-r5-ci.md scripts/43_referee_r5_ci.py (not in the archives or a verify stage) 10 s (CPU) outputs/p2r, outputs/bench
Figures — scripts/22_paper_figures.py, scripts/38_bench_figures.py about 2 min, CPU none
Paper — cd paper && pdflatex main && bibtex main && pdflatex main && pdflatex main seconds —

../README.md (in Vietnamese) describes every script, its options and its outputs. Stages that train resume by skipping finished cells, so a stopped driver is restarted with the same command.

Do not rerun scripts/01_build_wells.py, scripts/04_wavelet_tie.py or scripts/09_fit_warp_prior_f3.py to reproduce the manuscript: they wrote the well file, the tie files and the warp prior that the later protocols hash (all in the F3 archive), and scripts/run_p1.sh and scripts/run_p0.sh rerun the first two. The synthetic phases (P2, P2r, T2, protocol_bench) need no raw data: the D2 generator reads the tracked .survey file, the horizon cache, the wavelet and the warp prior of the F3 archive, and tests/test_d2_misspec.py checks its fields against fingerprints recorded before the benchmark was built.

P3 and P4 from their tags. The code-hash checks of protocol_f3 and protocol_volve cover ml_porosity/ and scripts/, so every later file added to these folders makes the current tree fail them, by design. Rerun these phases from a checkout of their tag (git checkout protocol-f3, git checkout protocol-volve) with the matching environment. The P3 run stopped at 132/649 volume inlines on a Windows file lock; operations/resume_f3_volume.py resumed only the inference (audit in outputs/p3/volume_recovery.json and completion_checks.json).

5. What reruns without raw data

scripts/39_repro_package.py verify copies the code (the tracked and untracked non-ignored files, without logs/, refs/, code_thesis/, outputs_thesis/ and .agents/) into an empty folder, extracts the five archives there, deletes the paper figures and the benchmark reference tables, and runs the verification stages with that folder first on the Python path. No SEG-Y, Volve or Teapot raw data are present; the tracked F3 well files are. An audit hook logs every file each stage opens, and a read of the original repository counts as a failure. Each rewritten file is then compared with the original: by bytes, then by value (csv, json, npz, md), and the figures pixel by pixel after rasterising with Ghostscript.

CUDA_VISIBLE_DEVICES= OMP_NUM_THREADS=2 MKL_NUM_THREADS=2 OPENBLAS_NUM_THREADS=2 \
    .venv/bin/python scripts/39_repro_package.py verify [--only STEP …] [--keep]
stage command reproduces
p1_summary scripts/06_summarize_p1.py P1 tables (App. B)
p2_summary scripts/13_summarize_p2.py --mode main gate G-B, H1, H3, H4 of P2
p2r_summary scripts/18_summarize_p2r.py H2a, H2b, σ_a arm, H3, H4 of P2r
p2r_posthoc scripts/31_p2r_posthoc.py the classical and Berkson bounds of tab:h2b
t4_coverage scripts/30_t4_coverage.py ensemble dispersion ξ and coverage (T4)
t3_power scripts/27_t3_power.py detectability and the crossings of Sec. 6.6
bench_summarize scripts/34_run_bench.py summarize protocol_bench summary, as implemented
bench_verdicts scripts/36_bench_verdicts.py the 11 verdicts as worded
bench_tables scripts/37_bench_package.py tables benchmark/reference/{cells.csv,main_table.md}
figures_main scripts/22_paper_figures.py the manuscript figures except those of Experiment 3
figures_bench scripts/38_bench_figures.py bench_s1.pdf, bench_s8.pdf
s8_flipband scripts/38_bench_figures.py --flipband the cos/cos² table of the S8 discussion (stdout)

Result of the original 12-stage run, 2026-11-09 (08:33–08:54 UTC, 21 min on CPU; working tree at 8d5befb with the figure relabelling not yet committed), in verify_report.md: all twelve stages exit 0, and no stage reads a file outside the clean room. Of the 66 files they rewrite, 63 are identical in bytes (the eight manuscript figures: identical pixels at 110 dpi) and 3 are equal in value: two gzip tables with zero difference, and outputs/bench/summary/verdict.json, which differs only in the clean-room path it records. The 8 new files are quick-look PNGs and the copy of the reference tables inside the benchmark package; neither is archived (the package is a separate deposit). In the same clean room, pytest tests/test_d2_misspec.py passes 15/15 with none skipped, so the D2 generator reproduces the P2r fingerprints from the tracked F3 files and the archived inputs alone.

The clean-room stages run on CPU and start from the saved artifacts in the archives. The training commands and their original hardware are listed in Section 4.

6. Deviations to report with the results

  • P2r was designed after P2 failed gate G-B, on new realizations (8–15) under a new protocol. It is a deviation, not a confirmatory replication of P2.
  • protocol_bench verdicts (D-13). The locked scripts/34_run_bench.py summarize differs from the locked statements in three places: S1-H1 needs exactly two N values but S1 has four, so it returns null; S2-H1 has no top-level pass; S3-H1 adds the disclosed Ctl-GP control to the competitor set. scripts/36_bench_verdicts.py (outside the lock; checks the lock first) applies the statements as worded. Both readings are reported: outputs/bench/summary/verdict.json (as run) and verdict_final.{json,md} (as worded; the paper reads each study separately and does not count verdicts).
  • Post hoc analyses outside every lock: scripts/25, 26, 27, 30, 31, 38 --flipband. They change no registered verdict.
  • P3 volume recovery (Section 4): inference only, registered code and completed rows kept.

7. Building the package

.venv/bin/python scripts/39_repro_package.py build [--dry-run]   # archives → outputs/repro/, manifest → repro/MANIFEST.json
.venv/bin/python scripts/39_repro_package.py verify               # clean room → repro/verify_report.md
.venv/bin/python scripts/39_repro_package.py code --rev HEAD      # git archive of a committed revision

build selects files by the first matching rule of RULES in the script; files without a rule stay out. code refuses when the tracked files differ from the requested revision. Nothing is uploaded: the deposit (archives, code snapshot, benchmark package) needs the authors' account, author list and licence decisions.

8. Geophysical Prospecting revision

The five archives now include 3,384 files under outputs/gp_review/: saved cell-level results, run and posterior summaries, and tables for the exploratory analyses A1–A9 and experiments E1, E2, E4, E5 and E6. The F3 results archive also contains the replication cell metrics and the correlated sign-test table used by the aggregation. The field table and combined reports cover F3 and Volve and are stored in the Volve archive. Their combined-data licence still needs author approval before deposit.

The following targeted check verifies all 15,464 extracted files against the manifest and reruns the GP aggregation from the archived cells. It writes a report inside the clean room.

CUDA_VISIBLE_DEVICES= OMP_NUM_THREADS=2 MKL_NUM_THREADS=2 OPENBLAS_NUM_THREADS=2 \
    .venv/bin/python scripts/39_repro_package.py verify --work outputs/repro/gp_verify \
    --only gp_review_a_tables gp_review_e456_summary gp_review_e2_summary \
    gp_review_e1_summary gp_review_field_table gp_review_misspec_table
Stage Recomputed from archived inputs
gp_review_a_tables 14 numeric tables and decision records from A1–A9. A1 uses the competitor rows available at its original aggregation.
gp_review_e456_summary 15 outputs of the point-tie optimization, mean-label and equal-budget studies
gp_review_e2_summary Five outputs of the practitioner tie comparison
gp_review_e1_summary Seven outputs of the anchor-error study
gp_review_field_table, gp_review_misspec_table Two LaTeX table bodies for the GP manuscript

Verification on 18 November 2026 regenerated all 43 files byte for byte. The six stages exited successfully, with zero reads of the original repository or files outside the package within the clean-room outputs. Particle and prediction NPZ files from gp_review/ are excluded. This check covers aggregation from the saved cells. Registrations and training are documented in docs/research/gp-review-experiments.md and docs/research/gp-review-analyses.md. The combined editorial reports preserve the original notes and manuscript line references from that run. The GP anchor-error table is checked against the regenerated E1 summary by the manuscript's numerical guard.