diff --git a/docs/plan.md b/docs/plan.md index fff4291..ef53679 100644 --- a/docs/plan.md +++ b/docs/plan.md @@ -623,3 +623,8 @@ Trạng thái ngày 26/10/2026. "Có" nghĩa là toàn văn nằm trong [`refs/` - Lượt chạy nền đầu dừng lúc 03:57:33 sau 3 giờ 41 phút 46 giây: Windows từ chối thay file `progress.js` khi volume đã ghi 132/649 inline. Log lỗi giữ nguyên ở `logs/runs/20261028-001548_p3_all/`. Đây là lỗi cập nhật dashboard, không phải huấn luyện hoặc gate. - Phục hồi bằng `operations/resume_f3_volume.py`: chỉ thêm retry cho hai file dashboard khi bị khóa, gọi nguyên hàm suy luận đã khóa, không chạy lại registration/train hoặc script 04/09. Mã khoa học, protocol, checkpoint và G-C không đổi; kiểm tra SHA-256 khóa và byte của 132 inline cũ trước/sau. Lưu provenance ở `outputs/p3/volume_recovery.json`; trạng thái hoàn tất volume thực tế đọc trong [report.html](../report.html). - **P3 hoàn tất lúc 06:50:44 ngày 28/10.** Volume đủ 649 inline trong, shape 651×951×126 gồm viền NaN, mean và sigma, kèm 8 hình section. Adapter gặp lại đúng lỗi khóa dashboard một lần và retry thành công. Không đổi byte của 132 inline cũ; khóa code/dữ liệu/môi trường và G-C vẫn khớp. Kiểm tra artifact cuối ở `outputs/p3/completion_checks.json`; nhiệm vụ P3 hoàn thành, cổng khoa học G-C trượt. +17. **Đóng P3 và ghi chú cho paper (28/10/2026):** + - **Quyết định:** đóng P3, không chạy P3r. Mọi thay đổi thiết kế lúc này đều là lựa chọn sau khi đã thấy nhãn test. Chuyển sang P4 Volve. + - **Thứ tự thời gian của việc khóa (giờ máy Windows, +07):** pilot registration 00:07 và preflight baseline cổ điển 00:12, cả hai không tính metric trên giếng test; khóa SHA-256 lúc 00:14:50; smoke 00:15:05; main run 00:15:47. `protocol_f3.yaml` vào git lần đầu ở commit 9976abc (07:01, cùng với kết quả), và tag `protocol-f3` được gắn sau đó. Vì vậy bằng chứng khóa trước khi chạy là timestamp tự ghi trong `configs/protocol_f3.lock.json`, không phải lịch sử git. Paper (§6 và §6.4) ghi đúng như vậy. + - **Phân tích làm sau khi chạy (post hoc), chỉ mô tả, không đổi G-C:** (a) Mốc "không có nội dung băng" là RMS thành phần > 6 Hz của reference PHIE_DT calibrated, macro 1,224 p.u. Chỉ B4b (1,211) thấp hơn mốc này. (b) Trong cửa sổ 600–1100 ms, PHIE và PHIE_DT chênh RMS 3,2 p.u. ở F02-1 và < 0,02 p.u. ở ba giếng còn lại. (c) σ_post, pha và logZ tổng hợp từ `outputs/p3/registration/*.json`; thống kê volume từ `mean.npy`/`sigma.npy`. Nguồn từng con số ở `paper/README.md`. + - **Lỗi nhãn trong code khóa:** `plot_sections` đặt nhãn trục x của PNG section inline là "inline", thực ra là crossline. Không sửa code khóa. Hình trong paper (`paper/figures/f3_volume.pdf`) được tạo lại bằng `scripts/22_paper_figures.py --only f3_volume`. diff --git a/paper/.gitignore b/paper/.gitignore new file mode 100644 index 0000000..54bbd1a --- /dev/null +++ b/paper/.gitignore @@ -0,0 +1,8 @@ +*.aux +*.bbl +*.blg +*.log +*.out +*.toc +*.synctex.gz +main.pdf diff --git a/paper/README.md b/paper/README.md new file mode 100644 index 0000000..e1fda1d --- /dev/null +++ b/paper/README.md @@ -0,0 +1,38 @@ +# Manuscript draft + +Build (no latexmk on the server): + +``` +pdflatex main && bibtex main && pdflatex main && pdflatex main +``` + +Red text (`\todo`, `\todoblock`, `\figplaceholder`) marks parts that are not ready. +Search for them with `grep -n 'todo\|figplaceholder' sections/*.tex`. + +All figures in `figures/` are produced by `python scripts/22_paper_figures.py` (from the repo root, +with the `.venv`); it reads only the locked summaries listed below. + +## Where the numbers come from + +| Paper element | Source | +|---|---| +| Sec. 3, Table `tab:audit` (TD drift, label audit) | `outputs/td_qc.csv`, `outputs/tie_qc.csv`, `outputs/marker_vs_horizon.csv`, `docs/plan.md` | +| Sec. 4, Table `tab:h1`, Fig. `fig:h1` | `outputs/p2/summary/main/h1.csv`, `docs/theory.md` | +| Sec. 5 (prior fit on F3, LOAO, type-II σ_a) | `docs/plan.md` §12, `docs/theory.md` | +| Sec. 6.1, Table `tab:p2`, Fig. `fig:p2phase` | `outputs/p2/summary/main/{summary.md,methods.csv}` | +| Sec. 6.2 (diagnosis, deviation) | `docs/plan.md` §12 items 11–14 | +| Sec. 6.3, Tables `tab:h2a`, `tab:sigmaa`, `tab:h2b`; Figs. `fig:h2b`, `fig:p2rgrid` | `outputs/p2r/summary/{summary.md,verdict.json}` | +| Sec. 6.4, Table `tab:p1` | `outputs/p1/summary.md` | +| Sec. 6.4, Table `tab:f3gc` (G-C), macro band RMSE | `outputs/p3/summary/gate_gc.json`, `docs/plan.md` §12 item 16 | +| Sec. 6.4, Table `tab:f3gc` coverage, seed-by-seed spread | `outputs/p3/summary/{metrics.csv,selection.csv}` (rows with `seed` = ensemble and per seed) | +| Sec. 6.4, Tables `tab:f3all`, `tab:f3abl` | `outputs/p3/summary/macro.csv` (label `PHIE_DT`, σ_a = 7 ms); ablation descriptions from `configs/protocol_f3.yaml` and `ml_porosity/f3/{training,registration,runner}.py` | +| Sec. 6.4, `tab:f3all` last row ("No band content", post hoc) | RMS over each test well of the 6 Hz high-pass (`split_bands`) marker-calibrated `PHIE_DT` reference (via `F3Data`), macro over wells = 1.224 p.u.; computed after the run, scale only | +| Sec. 6.4, Table `tab:f3sens` | `metrics.csv` (`M2-Sa` vs `B3d-Sa`; σ_a arms vs `B3c-R` at the same σ_a; reference `wlt`; label `PHIE`), `band_sensitivity.csv` (f_c = 5, 8 Hz), `posterior_reference_sensitivity.csv` (5–95 % range over 64 reference warps) | +| Sec. 6.4 (posterior width, phase) | `outputs/p3/registration/*_sa{3.5,7,14}{,_noanchors}.json` (`diagnostics[].sigma_post_ms`, `phase_R`, `phase_info.logZ` summed over wells) | +| Sec. 6.4 (leave-one-anchor-out) | `outputs/p3/diagnostics/loao.csv` | +| Sec. 6.4 (volume statistics), Fig. `fig:f3vol` | `outputs/p3/volume/{metadata.json,mean.npy,sigma.npy}`; figure from `python scripts/22_paper_figures.py --only f3_volume` (inline 442 through F03-4) | +| Sec. 7 (F3 paragraph, σ_a, limitations) | same sources as Sec. 6.4 | +| Pass rules, thresholds | `configs/protocol_p2.yaml`, `configs/protocol_p2r.yaml`, `configs/protocol_f3.yaml` (locked; tag `protocol-f3`) | + +Do not copy numbers from `test 2/` (thesis archive) into the paper. +Wording must respect `docs/plan.md` §10 (forbidden claims). diff --git a/paper/figures/f3_volume.pdf b/paper/figures/f3_volume.pdf new file mode 100644 index 0000000..c6df458 Binary files /dev/null and b/paper/figures/f3_volume.pdf differ diff --git a/paper/figures/p2_h1.pdf b/paper/figures/p2_h1.pdf new file mode 100644 index 0000000..76c71a3 Binary files /dev/null and b/paper/figures/p2_h1.pdf differ diff --git a/paper/figures/p2_phase.pdf b/paper/figures/p2_phase.pdf new file mode 100644 index 0000000..eb83344 Binary files /dev/null and b/paper/figures/p2_phase.pdf differ diff --git a/paper/figures/p2r_grid.pdf b/paper/figures/p2r_grid.pdf new file mode 100644 index 0000000..94dac8e Binary files /dev/null and b/paper/figures/p2r_grid.pdf differ diff --git a/paper/figures/p2r_h2b.pdf b/paper/figures/p2r_h2b.pdf new file mode 100644 index 0000000..9dff36a Binary files /dev/null and b/paper/figures/p2r_h2b.pdf differ diff --git a/paper/figures/td_drift.pdf b/paper/figures/td_drift.pdf new file mode 100644 index 0000000..141c989 Binary files /dev/null and b/paper/figures/td_drift.pdf differ diff --git a/paper/main.tex b/paper/main.tex new file mode 100644 index 0000000..7d1434a --- /dev/null +++ b/paper/main.tex @@ -0,0 +1,82 @@ +% Draft manuscript. Build: pdflatex main && bibtex main && pdflatex main && pdflatex main +% Red text marks parts that are not ready (results pending, figures missing, checks to do). +% Every number in this draft comes from outputs/*/summary* or docs/plan.md; see paper/README.md. +\documentclass[11pt,a4paper]{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{} +\usepackage[margin=2.5cm]{geometry} +\usepackage{amsmath,amssymb,amsthm} +\usepackage{bm} +\usepackage{graphicx} +\usepackage{booktabs} +\usepackage{multirow} +\usepackage{array} +\usepackage{xcolor} +\usepackage{caption} +\usepackage[authoryear,round]{natbib} +\usepackage[colorlinks=true,linkcolor=blue!50!black,citecolor=blue!50!black,urlcolor=blue!50!black]{hyperref} +\usepackage{setspace} +\onehalfspacing + +\graphicspath{{figures/}} + +% --------------------------------------------------------------------------- +% Red notes for unfinished parts +\newcommand{\todo}[1]{\textcolor{red}{[TODO: #1]}} +\newcommand{\todoblock}[1]{% + \par\smallskip\noindent + \fcolorbox{red}{red!6}{\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule}{\color{red}\textbf{TODO.} #1}}% + \par\smallskip} +\newcommand{\figplaceholder}[1]{% + \fcolorbox{red}{red!6}{\parbox[c][4.5cm][c]{0.9\linewidth}{\centering\color{red}\textbf{Figure not ready.}\\[2pt] #1}}} + +% --------------------------------------------------------------------------- +% Notation +\newcommand{\E}{\mathbb{E}} +\newcommand{\Var}{\operatorname{Var}} +\newcommand{\Cov}{\operatorname{Cov}} +\newcommand{\sd}{\operatorname{sd}} +\newcommand{\PCC}{\operatorname{PCC}} +\newcommand{\RML}{\mathrm{RML}} +\newcommand{\N}{\mathcal{N}} +\newcommand{\dd}{\,\mathrm{d}} +\newcommand{\aaf}{\mathcal{A}} % anti-alias filter +\newcommand{\sigpost}{\sigma_{\mathrm{post}}} + +% Method names (repository codes); change here to rename everywhere +\newcommand{\mPM}{B3d-Sa} % labels at the SMC posterior-mean warp +\newcommand{\mRML}{M2-Sa} % RML on the SMC particle bank + +\theoremstyle{plain} +\newtheorem{proposition}{Proposition} +\newtheorem{lemma}{Lemma} +\newtheorem{corollary}{Corollary} +\theoremstyle{remark} +\newtheorem{remark}{Remark} + +\title{Registration-marginalized learning for sparse-well seismic porosity prediction} +\author{\todo{author list, affiliations, ORCID, corresponding author}} +\date{Draft, \today} + +\begin{document} +\maketitle + +\input{sections/00_abstract} +\input{sections/01_introduction} +\input{sections/02_related} +\input{sections/03_data} +\input{sections/04_theory} +\input{sections/05_method} +\input{sections/06_experiments} +\input{sections/07_discussion} +\input{sections/08_conclusion} + +\bibliographystyle{plainnat} +\bibliography{refs} + +\appendix +\input{sections/A_proofs} + +\end{document} diff --git a/paper/refs.bib b/paper/refs.bib new file mode 100644 index 0000000..44ff94f --- /dev/null +++ b/paper/refs.bib @@ -0,0 +1,537 @@ +% Selective ML-Porosity survey; cutoff 2026-10-23. +% F = relevant full-text sections inspected; A = original abstract/metadata only. +% These entries are bibliographic records, not evidence of reproduced experiments. + +@article{prabowo2025f3, + author = {Prabowo, Urip Nurwijayanto and Sudarmaji and Setyowiyoto, Jarot and Sismanto}, + title = {{Comparison of Porosity Prediction from Seismic Data in the F3 Block, Netherlands using Machine Learning}}, + journal = {Rudarsko-geološko-naftni zbornik}, + year = {2025}, + volume = {40}, + number = {2}, + pages = {15--26}, + doi = {10.17794/rgn.2025.2.2}, + url = {https://doi.org/10.17794/rgn.2025.2.2}, + annote = {P01; survey evidence level F; accessed 2026-10-23} +} + +@article{tao2025structural, + author = {Tao, Bo-Cheng and Zhou, Huai-Lai and Wu, Wen-Yue and Zhang, Gan and Liu, Bing and Liu, Xing-Ye}, + title = {{Porosity prediction based on improved structural modeling deep learning method guided by petrophysical information}}, + journal = {Petroleum Science}, + year = {2025}, + volume = {22}, + pages = {2325--2338}, + doi = {10.1016/j.petsci.2025.03.035}, + url = {https://doi.org/10.1016/j.petsci.2025.03.035}, + annote = {P02; survey evidence level F; accessed 2026-10-23} +} + +@article{xu2024sts, + author = {Xu, Minghui and Zhao, Luanxiao and Liu, Jingyu and Geng, Jianhua}, + title = {{Enhancing seismic porosity estimation through 3D sequence-to-sequence deep learning with data augmentation, spatial constraints, and geologic constraints}}, + journal = {Geophysics}, + year = {2024}, + volume = {89}, + number = {4}, + pages = {M93--M108}, + doi = {10.1190/geo2023-0614.1}, + url = {https://doi.org/10.1190/geo2023-0614.1}, + annote = {P03; survey evidence level A; full text added 2026-10-26 (refs/xu2024sts.pdf): labels matched to seismic with time-depth from well-to-seismic ties taken as given; carbonate reservoir, 48 wells} +} + +@article{chen2024multidimensional, + author = {Chen, Hongling and Wu, Baohai and Sacchi, Mauricio D. and Wang, Zhiqiang and Gao, Jinghuai}, + title = {{Multidimensional Petrophysical Seismic Inversion Based on Knowledge-Driven Semi-Supervised Deep Learning}}, + journal = {IEEE Transactions on Geoscience and Remote Sensing}, + year = {2024}, + volume = {62}, + pages = {1--15}, + doi = {10.1109/TGRS.2024.3460184}, + url = {https://doi.org/10.1109/TGRS.2024.3460184}, + annote = {P04; survey evidence level A; accessed 2026-10-23} +} + +@article{li2024bpinn, + author = {Li, Peng and Grana, Dario and Liu, Mingliang}, + title = {{Bayesian neural network and Bayesian physics-informed neural network via variational inference for seismic petrophysical inversion}}, + journal = {Geophysics}, + year = {2024}, + volume = {89}, + number = {6}, + pages = {M185--M196}, + doi = {10.1190/geo2023-0737.1}, + url = {https://doi.org/10.1190/geo2023-0737.1}, + annote = {P05; survey evidence level A; accessed 2026-10-23} +} + +@article{ntibahanana2024ensemble, + author = {Ntibahanana, M. and Jianguo, S. and Luemba, M. and Tondozi, K. and Imani, G. and Mohamed, B.}, + title = {{Ensemble of Neural Networks Utilizing Seismic Attributes for Rock‐Property Inversion With Uncertainty Estimation}}, + journal = {Earth and Space Science}, + year = {2024}, + volume = {11}, + number = {6}, + eid = {e2023EA003101}, + doi = {10.1029/2023EA003101}, + url = {https://doi.org/10.1029/2023EA003101}, + annote = {P06; survey evidence level F; accessed 2026-10-23} +} + +@article{di2023welltie, + author = {Di, Haibin and Abubakar, Aria}, + title = {{Automating seismic‐well tie via self‐supervised learning}}, + journal = {Geophysical Prospecting}, + year = {2023}, + volume = {71}, + number = {4}, + pages = {698--712}, + doi = {10.1111/1365-2478.13333}, + url = {https://doi.org/10.1111/1365-2478.13333}, + annote = {P07; survey evidence level F; accessed 2026-10-23} +} + +@article{li2025cascadedtie, + author = {Li, Mengcheng and Huang, Xuri and Cao, Weiping and Wo, Yukai and Xu, Minghua and Ren, Mengyu and Lu, Shunkang}, + title = {{Automatic seismic-well tie based on cascaded matching optimization method}}, + journal = {Frontiers in Earth Science}, + year = {2025}, + volume = {13}, + eid = {1547087}, + doi = {10.3389/feart.2025.1547087}, + url = {https://doi.org/10.3389/feart.2025.1547087}, + annote = {P08; survey evidence level F; accessed 2026-10-23} +} + +@article{dou2024seismae, + author = {Dou, Yimin and Li, Kewen}, + title = {{3D seismic mask auto encoder: Seismic inversion using transformer-based reconstruction representation learning}}, + journal = {Computers and Geotechnics}, + year = {2024}, + volume = {169}, + pages = {106194}, + eid = {106194}, + doi = {10.1016/j.compgeo.2024.106194}, + url = {https://doi.org/10.1016/j.compgeo.2024.106194}, + annote = {P09; survey evidence level A; accessed 2026-10-23} +} + +@article{li2026leakage, + author = {Li, Zhibin and Liu, Jingxian and Li, Xuece and He, Tongtong and Li, Kangning and Zhang, Yuanning and Pan, Zhongkui and Lei, Xiangjun and Wang, Shuheng and Zhang, Zhaojia}, + title = {{Leakage-aware full-section evaluation and label-efficient semi-supervised seismic facies segmentation for subsurface geological modeling}}, + journal = {Frontiers in Earth Science}, + year = {2026}, + volume = {14}, + eid = {1910345}, + doi = {10.3389/feart.2026.1910345}, + url = {https://doi.org/10.3389/feart.2026.1910345}, + annote = {P10; survey evidence level F; accessed 2026-10-23} +} + +@article{rezaei2026krigingrf, + author = {Rezaei, Mohammadali and La Croix, Andrew D. and Emami Niri, Mohammad and Asghari, Omid}, + title = {{Seismic Porosity Estimation Using Geologically-Informed Seismic Attributes and a Kriging-Enhanced Random Forest: Application to a Shallow-Marine Carbonate Reservoir}}, + journal = {Natural Resources Research}, + year = {2026}, + doi = {10.1007/s11053-026-10694-z}, + url = {https://doi.org/10.1007/s11053-026-10694-z}, + annote = {P11; survey evidence level F; accessed 2026-10-23} +} + +@article{sukar2026uncertainty, + author = {Sukar, Boshara and Côrte, Gustavo and MacBeth, Colin}, + title = {{Dynamic Reservoir Property Estimation With Uncertainty Quantification From 4D Seismic Data Using Bayesian Neural Networks}}, + journal = {Geophysical Prospecting}, + year = {2026}, + volume = {74}, + number = {6}, + eid = {e70228}, + doi = {10.1111/1365-2478.70228}, + url = {https://doi.org/10.1111/1365-2478.70228}, + annote = {P12; survey evidence level F; accessed 2026-10-23} +} + +@article{liu2023lowfrequency, + author = {Liu, Jingyu and Zhao, Luanxiao and Xu, Minghui and Zhao, Xiangyuan and You, Yuchun and Geng, Jianhua}, + title = {{Porosity prediction from prestack seismic data via deep learning: incorporating a low-frequency porosity model}}, + journal = {Journal of Geophysics and Engineering}, + year = {2023}, + volume = {20}, + number = {5}, + pages = {1016--1029}, + doi = {10.1093/jge/gxad063}, + url = {https://doi.org/10.1093/jge/gxad063}, + annote = {P13; survey evidence level A; accessed 2026-10-23} +} + +@article{corrales2024seis2rock, + author = {Corrales, M. and Hoteit, H. and Ravasi, M.}, + title = {{Seis2Rock: A Data-Driven Approach to Direct Petrophysical Inversion of Pre-Stack Seismic Data}}, + journal = {Earth and Space Science}, + year = {2024}, + volume = {11}, + number = {2}, + eid = {e2023EA003301}, + doi = {10.1029/2023EA003301}, + url = {https://doi.org/10.1029/2023EA003301}, + annote = {P14; survey evidence level F; accessed 2026-10-23} +} + +@misc{vashisth2022rwpinn, + author = {Vashisth, Divakar and Mukerji, Tapan}, + title = {{Direct Estimation of Porosity from Seismic Data using Rock and Wave Physics Informed Neural Networks (RW-PINN)}}, + year = {2022}, + eprint = {2210.00042}, + archivePrefix = {arXiv}, + primaryClass = {physics.geo-ph}, + url = {https://arxiv.org/abs/2210.00042}, + annote = {P15; survey uses this arXiv version as a background paper; relevant full-text sections inspected; accessed 2026-10-23} +} + +% --- Added 2026-10-26 from docs/plan.md section 11. Full text is in refs/ for every entry below. +% DOI, volume and pages from Crossref (journal articles) or the arXiv/PMLR record (ML papers). +% Not included (no full text, or no verifiable record): White & Simm 2003, +% Herrera & van der Baan 2014 (journal version), Munoz & Hale 2015, RING 2025, EAGE 2023 (skipped: not found or not obtainable). + +@article{buland2003bayesianwavelet, + author = {Buland, Arild and Omre, Henning}, + title = {{Bayesian wavelet estimation from seismic and well data}}, + journal = {Geophysics}, + year = {2003}, + volume = {68}, + number = {6}, + pages = {2000--2009}, + doi = {10.1190/1.1635053}, + url = {https://doi.org/10.1190/1.1635053}, + annote = {Full text read; marker mistie modeled as latent time shifts with a triangular prior, estimated jointly with the wavelet by MCMC; refs/buland2003bayesianwavelet.pdf} +} + +@article{gunning2006waveletextractor, + author = {Gunning, James and Glinsky, Michael E.}, + title = {{Wavelet extractor: A Bayesian well-tie and wavelet extraction program}}, + journal = {Computers \& Geosciences}, + year = {2006}, + volume = {32}, + pages = {681--695}, + doi = {10.1016/j.cageo.2005.10.001}, + url = {https://doi.org/10.1016/j.cageo.2005.10.001}, + annote = {Full text read (added 2026-10-26); MAP estimate of wavelet jointly with checkshot/marker times (Gaussian prior), registration shift and lateral positioning error per well, Laplace posterior, wavelet span by marginal likelihood; refs/gunning2006waveletextractor.pdf} +} + +@article{wu2017multiwelltie, + author = {Wu, Xinming and Caumon, Guillaume}, + title = {{Simultaneous multiple well-seismic ties using flattened synthetic and real seismograms}}, + journal = {Geophysics}, + year = {2017}, + volume = {82}, + number = {1}, + pages = {IM13--IM20}, + doi = {10.1190/geo2016-0295.1}, + url = {https://doi.org/10.1190/geo2016-0295.1}, + annote = {Full text read (HAL version, refs/wu2017multiwelltie.pdf); first published online 2016-11-09} +} + +@article{tschannen2022partialtie, + author = {Tschannen, Valentin and Ghanim, Ammar and Ettrich, Norman}, + title = {{Partial automation of the seismic to well tie with deep learning and Bayesian optimization}}, + journal = {Computers \& Geosciences}, + year = {2022}, + volume = {164}, + pages = {105120}, + doi = {10.1016/j.cageo.2022.105120}, + url = {https://doi.org/10.1016/j.cageo.2022.105120}, + annote = {Full text read; variational CNN for wavelet (phase uncertainty), Bayesian optimization of bulk shift within user bounds; refs/tschannen2022partialtie.pdf} +} + +@article{ali2025syntheticpseudowells, + author = {Ali, Muhammad and Changxingyue, He and Wei, Ning and Jiang, Ren and Zhu, Peimin and Hao, Zhang and Hussain, Wakeel and Ashraf, Umar}, + title = {{Optimizing seismic-based reservoir property prediction: a synthetic data-driven approach using convolutional neural networks and transfer learning with real data integration}}, + journal = {Artificial Intelligence Review}, + year = {2025}, + volume = {58}, + number = {1}, + eid = {31}, + doi = {10.1007/s10462-024-11030-8}, + url = {https://doi.org/10.1007/s10462-024-11030-8}, + annote = {Full text read; target is P-impedance from prestack gathers, not porosity; published online 2024-11-30; refs/ali2025syntheticpseudowells.pdf} +} + +@misc{herrera2012automatedtie, + author = {Herrera, Roberto Henry and van der Baan, Mirko}, + title = {{Automated seismic-to-well ties?}}, + year = {2012}, + eprint = {1209.0201}, + archivePrefix = {arXiv}, + primaryClass = {physics.geo-ph}, + url = {https://arxiv.org/abs/1209.0201}, + annote = {Early preprint of the DTW well-tie method; the Geophysics 2014 paper (79(3), V47--V54, 10.1190/GEO2013-0248.1) was not available, cite the version actually read} +} + +@inproceedings{cuturi2017softdtw, + author = {Cuturi, Marco and Blondel, Mathieu}, + title = {{Soft-DTW: a Differentiable Loss Function for Time-Series}}, + booktitle = {Proceedings of the 34th International Conference on Machine Learning}, + series = {Proceedings of Machine Learning Research}, + volume = {70}, + pages = {894--903}, + year = {2017}, + eprint = {1703.01541}, + archivePrefix = {arXiv}, + url = {https://proceedings.mlr.press/v70/cuturi17a.html}, + annote = {refs/cuturi2017softdtw.pdf} +} + +@inproceedings{leguen2019dilate, + author = {Le Guen, Vincent and Thome, Nicolas}, + title = {{Shape and Time Distortion Loss for Training Deep Time Series Forecasting Models}}, + booktitle = {Advances in Neural Information Processing Systems 32}, + year = {2019}, + eprint = {1909.09020}, + archivePrefix = {arXiv}, + url = {https://arxiv.org/abs/1909.09020}, + annote = {DILATE; refs/leguen2019dilate.pdf} +} + +@inproceedings{lakshminarayanan2017deepensembles, + author = {Lakshminarayanan, Balaji and Pritzel, Alexander and Blundell, Charles}, + title = {{Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles}}, + booktitle = {Advances in Neural Information Processing Systems 30}, + year = {2017}, + eprint = {1612.01474}, + archivePrefix = {arXiv}, + url = {https://arxiv.org/abs/1612.01474}, + annote = {refs/lakshminarayanan2017deepensembles.pdf} +} + +@inproceedings{kendall2017uncertainties, + author = {Kendall, Alex and Gal, Yarin}, + title = {{What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision?}}, + booktitle = {Advances in Neural Information Processing Systems 30}, + year = {2017}, + eprint = {1703.04977}, + archivePrefix = {arXiv}, + url = {https://arxiv.org/abs/1703.04977}, + annote = {refs/kendall2017uncertainties.pdf} +} + +@article{gneiting2007scoringrules, + author = {Gneiting, Tilmann and Raftery, Adrian E.}, + title = {{Strictly Proper Scoring Rules, Prediction, and Estimation}}, + journal = {Journal of the American Statistical Association}, + year = {2007}, + volume = {102}, + number = {477}, + pages = {359--378}, + doi = {10.1198/016214506000001437}, + url = {https://doi.org/10.1198/016214506000001437}, + annote = {Proper scoring rules and CRPS; refs/gneiting2007scoringrules.pdf} +} + +@inproceedings{murray2010ess, + author = {Murray, Iain and Adams, Ryan Prescott and MacKay, David J. C.}, + title = {{Elliptical slice sampling}}, + booktitle = {Proceedings of the 13th International Conference on Artificial Intelligence and Statistics}, + series = {Proceedings of Machine Learning Research}, + volume = {9}, + pages = {541--548}, + year = {2010}, + eprint = {1001.0175}, + archivePrefix = {arXiv}, + url = {https://proceedings.mlr.press/v9/murray10a.html}, + annote = {refs/murray2010ess.pdf} +} + +@article{ravasi2020pylops, + author = {Ravasi, Matteo and Vasconcelos, Ivan}, + title = {{PyLops---A linear-operator Python library for scalable algebra and optimization}}, + journal = {SoftwareX}, + year = {2020}, + volume = {11}, + pages = {100361}, + doi = {10.1016/j.softx.2019.100361}, + url = {https://doi.org/10.1016/j.softx.2019.100361}, + annote = {Local copy is the arXiv version (1907.12349); refs/ravasi2020pylops.pdf} +} + +@inproceedings{alfarraj2019semisupervised, + author = {Alfarraj, Motaz and AlRegib, Ghassan}, + title = {{Semi-supervised learning for acoustic impedance inversion}}, + booktitle = {SEG Technical Program Expanded Abstracts 2019}, + pages = {2298--2302}, + year = {2019}, + doi = {10.1190/segam2019-3215902.1}, + url = {https://doi.org/10.1190/segam2019-3215902.1}, + annote = {Local copy is the arXiv version (1905.13412); refs/alfarraj2019semisupervised.pdf} +} + +% --- Added 2026-10-28 for the manuscript (metadata from docs/theory.md, OpenAlex lookup of 2026-10-26). +% Pauli et al. 2011 and Ribatet et al. 2012 have not been read in full: verify before submission. + +@inproceedings{mensch2018diffdp, + author = {Mensch, Arthur and Blondel, Mathieu}, + title = {{Differentiable Dynamic Programming for Structured Prediction and Attention}}, + booktitle = {Proceedings of the 35th International Conference on Machine Learning}, + series = {Proceedings of Machine Learning Research}, + volume = {80}, + year = {2018}, + eprint = {1802.03676}, + archivePrefix = {arXiv}, + url = {https://arxiv.org/abs/1802.03676} +} + +@article{pauli2011composite, + author = {Pauli, Francesco and Racugno, Walter and Ventura, Laura}, + title = {{Bayesian composite marginal likelihoods}}, + journal = {Statistica Sinica}, + year = {2011}, + volume = {21}, + pages = {149--164}, + annote = {not read in full} +} + +@article{ribatet2012composite, + author = {Ribatet, Mathieu and Cooley, Daniel and Davison, Anthony C.}, + title = {{Bayesian inference from composite likelihoods, with an application to spatial extremes}}, + journal = {Statistica Sinica}, + year = {2012}, + volume = {22}, + pages = {813--845}, + eprint = {0911.5357}, + archivePrefix = {arXiv}, + annote = {not read in full} +} + +@article{sakoe1978dp, + author = {Sakoe, Hiroaki and Chiba, Seibi}, + title = {{Dynamic programming algorithm optimization for spoken word recognition}}, + journal = {IEEE Transactions on Acoustics, Speech, and Signal Processing}, + year = {1978}, + volume = {26}, + number = {1}, + pages = {43--49}, + doi = {10.1109/TASSP.1978.1163055} +} + +% --- Added 2026-10-28: SEG/EAGE expanded-abstract scan 2024--2026 (plan section 2.4, item 4). +% Metadata checked against Crossref on 2026-10-28; abstracts read via OpenAlex (EarthDoc and the +% SEG Library block automated access). No full text for any of these: cite as abstract-only. +% IMAGE 2025 proceedings were issued online 2026-02-10; the conference year is used. + +@inproceedings{lim2025awsm, + author = {Lim, Un Young and Van Wagoner, Tom and Cardona, Reynaldo}, + title = {{Automated Well-tie SysteM (AWSM) for seismic depth calibration and wavelet estimation using parallel tempering MCMC (PT-MCMC): A Midland Basin case study}}, + booktitle = {Fifth International Meeting for Applied Geoscience \& Energy Expanded Abstracts}, + publisher = {Society of Exploration Geophysicists}, + year = {2025}, + pages = {16--20}, + doi = {10.1190/image2025-4304877.1}, + url = {https://doi.org/10.1190/image2025-4304877.1}, + annote = {Abstract only (OpenAlex). Joint Bayesian inversion of time-depth transform parameters and wavelet(s) by PT-MCMC with uncertainty estimates; pre-stack wavelets for AVO/AVA. No learned property prediction mentioned} +} + +@inproceedings{lim2025bootnet, + author = {Lim, Un Young and Cardona, Reynaldo}, + title = {{Enhancing AVA inversion accuracy through deep neural network bootstrapping (BootNet): A novel approach for quantifying data uncertainty}}, + booktitle = {Fifth International Meeting for Applied Geoscience \& Energy Expanded Abstracts}, + publisher = {Society of Exploration Geophysicists}, + year = {2025}, + pages = {56--60}, + doi = {10.1190/image2025-4304887.1}, + url = {https://doi.org/10.1190/image2025-4304887.1}, + annote = {Abstract only (OpenAlex). Bootstrapped ensemble of DNNs trained on Zoeppritz synthetics; impedance, velocity ratio and density with an uncertainty map; Midland Basin} +} + +@inproceedings{quesada2024faultlabels, + author = {Quesada, Jorge and Prabhushankar, Mohit and AlRegib, Ghassan}, + title = {{Uncertainty-aware seismic fault annotations can reveal insights into label expertise and confidence}}, + booktitle = {Fourth International Meeting for Applied Geoscience \& Energy Expanded Abstracts}, + publisher = {Society of Exploration Geophysicists}, + year = {2024}, + url = {https://alregib.ece.gatech.edu/image-2024-papers/jorge-image-2024/}, + annote = {Abstract only (authors' lab page). DOI and pages not found in Crossref/OpenAlex on 2026-10-28: add before submission. 400 F3 images, 38 annotators (29 novices, 8 practitioners, 1 expert), three confidence levels} +} + +@inproceedings{huff2024anglestack, + author = {Huff, O. and Evensen, A. and Lie, J. E. and Bugge, A. J. and Sablon, R. and Thorkildsen, V.}, + title = {{Efficient angle stack conditioning using a convolutional neural network}}, + booktitle = {85th EAGE Annual Conference \& Exhibition}, + publisher = {European Association of Geoscientists \& Engineers}, + year = {2024}, + pages = {1--5}, + doi = {10.3997/2214-4609.202410580}, + url = {https://doi.org/10.3997/2214-4609.202410580}, + annote = {Abstract only (OpenAlex). 1-D CNN trained on synthetic angle stacks moveout-corrected with true vs perturbed velocities; North Sea field test} +} + +@inproceedings{thiebaud2024lfc, + author = {Thiebaud, J. and Aker, E. and Kj{\o}nsberg, H.}, + title = {{Consistent porosity prediction using a probabilistic litho-facies inversion}}, + booktitle = {85th EAGE Annual Conference \& Exhibition}, + publisher = {European Association of Geoscientists \& Engineers}, + year = {2024}, + pages = {1--5}, + doi = {10.3997/2214-4609.202410490}, + url = {https://doi.org/10.3997/2214-4609.202410490}, + annote = {Abstract only (OpenAlex). Bayesian inversion for posterior lithology-fluid classes and porosity distributions; northern North Sea} +} + +@inproceedings{rizzuti2024waveletflows, + author = {Rizzuti, G. and Vasconcelos, I.}, + title = {{Multiscale uncertainty quantification for post-stack seismic inversion with wavelet flows}}, + booktitle = {85th EAGE Annual Conference \& Exhibition}, + publisher = {European Association of Geoscientists \& Engineers}, + year = {2024}, + pages = {1--5}, + doi = {10.3997/2214-4609.202410525}, + url = {https://doi.org/10.3997/2214-4609.202410525}, + annote = {Abstract only (OpenAlex). Variational inference with a multiscale (wavelet-based) normalizing flow for the post-stack inversion posterior} +} + +@inproceedings{cordoba2025porosity, + author = {Cordoba, N. and Goyes, P. and Castro, L.}, + title = {{Reservoir porosity estimation from post-stack seismic using deep learning constrained by well-porosity: A near-field application}}, + booktitle = {86th EAGE Annual Conference \& Exhibition}, + publisher = {European Association of Geoscientists \& Engineers}, + year = {2025}, + pages = {1--5}, + doi = {10.3997/2214-4609.2025101450}, + url = {https://doi.org/10.3997/2214-4609.2025101450}, + annote = {Abstract only (OpenAlex). NN from post-stack seismic to porosity with a well-porosity loss term; seismic-noise sensitivity tests; Illinois Basin-Decatur Project. Abstract does not mention the well tie} +} + +@inproceedings{mirza2025labelquality, + author = {Mirza, S. and Gala, A. and Devarakota, P. and Shah, S.}, + title = {{Seismic and label quality assessment: A framework for improving AI models for seismic interpretation}}, + booktitle = {86th EAGE Annual Conference \& Exhibition}, + publisher = {European Association of Geoscientists \& Engineers}, + year = {2025}, + pages = {1--5}, + doi = {10.3997/2214-4609.2025101452}, + url = {https://doi.org/10.3997/2214-4609.2025101452}, + annote = {Abstract only (OpenAlex). Seismic image quality metrics plus variability of manual salt interpretations} +} + +@inproceedings{rizzuti2025uhr, + author = {Rizzuti, G. and Telling, R. and Vasconcelos, I.}, + title = {{Enabling deep-learning-based uncertainty quantification at scale for post-stack UHR seismic inversion}}, + booktitle = {86th EAGE Annual Conference \& Exhibition}, + publisher = {European Association of Geoscientists \& Engineers}, + year = {2025}, + pages = {1--5}, + doi = {10.3997/2214-4609.202510205}, + url = {https://doi.org/10.3997/2214-4609.202510205}, + annote = {Abstract only (OpenAlex). Variational Bayesian UHR post-stack inversion with normalizing flows; acoustic-impedance credible intervals; offshore wind site} +} + +@article{guillon2020gtmetrics, + author = {Guillon, S{\'e}bastien and Joncour, Fr{\'e}d{\'e}ric and Barrallon, Pierre-Emmanuel and Castani{\'e}, Laurent}, + title = {{Ground-truth uncertainty-aware metrics for machine learning applications on seismic image interpretation: Application to faults and horizon extraction}}, + journal = {The Leading Edge}, + year = {2020}, + volume = {39}, + number = {10}, + pages = {734--741}, + doi = {10.1190/tle39100734.1}, + url = {https://doi.org/10.1190/tle39100734.1}, + annote = {Abstract only (OpenAlex). Precision/recall/IoU with a tolerance distance between prediction and ground truth for thin faults and horizons} +} diff --git a/paper/sections/00_abstract.tex b/paper/sections/00_abstract.tex new file mode 100644 index 0000000..b3d90a3 --- /dev/null +++ b/paper/sections/00_abstract.tex @@ -0,0 +1,11 @@ +\begin{abstract} +Supervised prediction of reservoir properties from post-stack seismic data needs well logs in two-way time. Such labels exist only after a well tie, and the tie is uncertain. In the F3 block (Netherlands North Sea), sonic-integrated times at the four public wells differ from the time--depth markers by up to 14--66\,ms, and the difference changes by 10--46\,ms within a 500\,ms target window. These errors exceed the 17--20\,ms dominant period of the data. Standard workflows nevertheless collapse the tie to a single time--depth curve before training. + +We analyse what this does to a learned predictor. Under an independence assumption, the MSE-optimal predictor trained on misregistered labels is the correctly registered predictor convolved with the distribution of the timing error (Proposition~1). The seismic-band content is therefore attenuated by the characteristic function of that error. A controlled experiment with known Gaussian shifts matches this transfer function to within 1\% for $\sigma \le 16$\,ms. Without time anchors, the absolute timing of a shared network and its label alignment is not identified (Proposition~2). This explains why alignment losses such as soft-DTW and DILATE cannot recover the timing on their own. We then propose registration-marginalized learning (RML): labels are drawn from an anchor- and seismic-conditioned posterior over time--depth warps, and the network is trained with a tempered log-sum-exp loss over this bank. Point-tie training, shift-tolerant losses and soft-DTW are special cases of this loss. + +We test the approach on a synthetic benchmark built from F3 geometry, rock physics and time--depth statistics, under pre-registered pass rules. The first pre-registered comparison failed: an anchor-only posterior with 64 samples did not contract to the true warp, and its labels did not beat the best point tie. We report this failure as it stands. A second pre-registration replaced the registration step with a sequential Monte Carlo tie posterior. Labels at the posterior-mean warp then reduced seismic-band RMSE by 8--22\% relative to the best point tie at F3-like drift, in all three signal-to-noise regimes tested. RML on the particle bank improved further when the posterior was wide: 8 of 8 wide cells passed, and the gain grew with posterior width (Spearman $\rho=-0.85$). These gains require a correctly specified anchor-pick uncertainty: with the anchor uncertainty set at half or twice its true value, no cell passed. Predictive uncertainty from seed ensembles under-covered for every method. We therefore make no calibration claim. +On the four F3 wells, a third pre-registered test with nested leave-one-well-out validation failed. RML on the particle bank had lower seismic-band RMSE than the best point tie at one well of four, where three were required, and its 80\% and 90\% predictive intervals covered 52\% and 61\% of the samples. Varying the anchor uncertainty, the scoring reference or the label did not make the test pass. On these wells the differences between methods were smaller than the variation between training seeds. +\todo{Volve results (gate G-D) and the final one-sentence conclusion.} +\end{abstract} + +\noindent\textbf{Keywords:} well tie; time--depth uncertainty; porosity prediction; deep learning; label noise; uncertainty quantification; F3 Netherlands diff --git a/paper/sections/01_introduction.tex b/paper/sections/01_introduction.tex new file mode 100644 index 0000000..5deb252 --- /dev/null +++ b/paper/sections/01_introduction.tex @@ -0,0 +1,19 @@ +\section{Introduction} +\label{sec:intro} + +Deep networks are widely used to map seismic amplitudes to reservoir properties such as porosity. The common workflow has four steps: tie each well to the seismic, resample the depth logs to two-way time (TWT), train a regressor from seismic to the time-domain labels, and score blind wells against labels produced by the same tie \citep[e.g.][]{xu2024sts,prabowo2025f3,tao2025structural,liu2023lowfrequency}. In this workflow the well tie is a preprocessing step. Its output, a single time--depth curve per well, is treated as exact. + +The tie is not exact. It is an inverse problem with a posterior distribution, and Bayesian treatments of it have existed for two decades and are still being developed \citep{buland2003bayesianwavelet,gunning2006waveletextractor,lim2025awsm}. In those treatments the posterior is the end product: no learning step uses it. The size of the problem is easy to underestimate. At the four public wells of the F3 block, sonic-integrated TWT differs from the interpreted time--depth markers by up to 14--66\,ms, and the difference changes by up to 46\,ms inside a 500\,ms target window (Section~\ref{sec:data}). Two time--depth models distributed with the data disagree with the markers by up to 36\,ms. The dominant period of the seismic is 17--20\,ms. Label timing errors of one to several periods are therefore realistic, and they vary with depth, so a bulk lag cannot absorb them. + +This paper asks what such errors do to a learned predictor and how to train with the tie posterior rather than a point estimate. We make four contributions. +\begin{enumerate} + \item[C1] \textbf{Theory.} Under an independence assumption, the MSE-optimal predictor trained on misregistered labels equals the correctly registered predictor convolved with the distribution of the timing error (Proposition~\ref{prop:blur}). The seismic-band amplitude is multiplied by the characteristic function of the error, and a variance-matching loss rescales amplitude without restoring the lost coherence. Without time anchors, a shared network and its label alignment can drift together without changing the loss (Proposition~\ref{prop:ident}). Losses that learn the alignment from the network's own predictions, such as soft-DTW \citep{cuturi2017softdtw} and DILATE \citep{leguen2019dilate}, therefore cannot fix absolute timing. We verify Proposition~\ref{prop:blur} quantitatively in a controlled experiment. + \item[C2] \textbf{Method.} Registration-marginalized learning (RML) draws a bank of labels from an anchor- and seismic-conditioned posterior over monotone time--depth warps. It trains the network with a tempered log-sum-exp likelihood over the bank. Point-tie training, hard-min and soft-min shift losses and soft-DTW are special cases (Lemmas~\ref{lem:s1}--\ref{lem:sdtw}). + \item[C3] \textbf{Registration-aware evaluation.} We build a synthetic benchmark from F3 geometry, rock physics and time--depth statistics. On it we vary drift, seismic signal-to-noise ratio and anchor density, and we evaluate under pre-registered pass rules. We report both pre-registered comparisons: the first failed and the second passed, with the dependence on correctly specified anchor uncertainty made explicit. + \item[C4] \textbf{F3 audit.} We document properties of the public F3 well data that matter for any learning study on it. The porosity labels at three of the four wells are an exact linear function of the sonic log. The density logs at two wells are predicted rather than measured. The time--depth markers are horizon-tie picks, not independent check shots. +\end{enumerate} + +We also tested RML on the four F3 wells under a third pre-registered protocol with nested leave-one-well-out validation. This test failed. RML on the SMC bank had lower seismic-band RMSE than the selected point tie at one well of four, where three were required, and its predictive intervals were much too narrow. Varying the anchor uncertainty, the scoring reference or the label did not make the test pass. The synthetic gains are therefore not confirmed on F3. On these wells the networks predicted little of the seismic band, and the differences between methods were smaller than the variation between seeds, so the test could not separate them. +\todo{One or two sentences on the second field dataset (Volve, gate G-D), whichever direction it takes.} + +Section~\ref{sec:related} positions the work. Section~\ref{sec:data} describes the data and the audit. Section~\ref{sec:theory} gives the theory, and Section~\ref{sec:method} the method. Section~\ref{sec:experiments} reports the synthetic and field experiments. Section~\ref{sec:discussion} discusses scope and limitations. Proofs are in Appendix~\ref{app:proofs}. diff --git a/paper/sections/02_related.tex b/paper/sections/02_related.tex new file mode 100644 index 0000000..afdd287 --- /dev/null +++ b/paper/sections/02_related.tex @@ -0,0 +1,48 @@ +\section{Related work} +\label{sec:related} + +Three bodies of work meet in this problem. They have so far been developed separately. A fourth studies label uncertainty of a different kind. + +\paragraph{Well ties and their uncertainty.} +\citet{buland2003bayesianwavelet} model the mistie between seismic time and log time as latent marker shifts with a triangular prior. They estimate these shifts jointly with the wavelet by MCMC and report their posterior. \citet{gunning2006waveletextractor} estimate the wavelet jointly with check-shot and marker times (Gaussian priors, monotonicity enforced), a registration shift and a lateral positioning error per well. They obtain uncertainty from a Laplace approximation and choose the wavelet length by marginal likelihood. \citet{lim2025awsm} infer time--depth transform parameters and wavelets jointly with parallel-tempering MCMC and report uncertainty estimates for a Midland Basin case study. Neither prior over time shifts nor a posterior over the time--depth relation is therefore new. In these works, however, the posterior is the end product. \citet{lim2025awsm} pass the estimated wavelets on to AVO/AVA inversion; their abstract does not describe passing the time--depth uncertainty on to a later step. \citet{wu2017multiwelltie} tie several wells at once with smooth depth-variable shifts and give no tie uncertainty. \citet{herrera2012automatedtie} use dynamic time warping for the tie. Among learning-based methods, \citet{tschannen2022partialtie} estimate the wavelet with a variational network: their uncertainty is mainly in wavelet phase, and the bulk shift is found by Bayesian optimization within user-set bounds. \citet{di2023welltie} and \citet{li2025cascadedtie} automate the tie with self-supervised learning and cascaded matching. All these methods output a tie, sometimes with wavelet or shift uncertainty, and stop there. + +\paragraph{Learning reservoir properties from seismic with few wells.} +Recent studies predict porosity or impedance with convolutional, recurrent or transformer networks, sometimes with physics constraints or uncertainty estimates \citep{alfarraj2019semisupervised,vashisth2022rwpinn,liu2023lowfrequency,xu2024sts,chen2024multidimensional,li2024bpinn,ntibahanana2024ensemble,corrales2024seis2rock,dou2024seismae,tao2025structural,prabowo2025f3,cordoba2025porosity,rezaei2026krigingrf,sukar2026uncertainty}. In the studies we read in full, the labels are placed on the seismic time axis by a tie that is taken as given. \citet{xu2024sts} say so explicitly, and their augmentation shifts windows laterally, not in time. \citet{ali2025syntheticpseudowells} name the seismic-to-well tie discrepancy as a challenge and avoid it by training on synthetic pseudo-wells. Where uncertainty is estimated, it is the uncertainty of the network or of the data noise. It does not include the uncertainty of the label timing. \citet{cordoba2025porosity} report noise-sensitivity tests, but their abstract does not mention the tie or misregistered labels. Bayesian and variational inversions give posteriors or credible intervals for porosity or impedance \citep{thiebaud2024lfc,rizzuti2024waveletflows,rizzuti2025uhr}, and a bootstrapped network ensemble gives a spread of elastic-property predictions \citep{lim2025bootnet}. None of these abstracts names the well tie as a source of uncertainty. + +\paragraph{Losses that tolerate temporal misalignment.} +Soft-DTW \citep{cuturi2017softdtw} and DILATE \citep{leguen2019dilate} replace the pointwise loss with a smoothed minimum over monotone alignments. Shift-tolerant losses that take the minimum over a set of bulk lags are a simpler variant. These losses use no time anchors, no physical tie model and no prior over warps. Proposition~\ref{prop:ident} shows that, without anchors, the absolute timing they learn is not identified. Learned alignment has also been applied to seismic inputs. \citet{huff2024anglestack} train a CNN on synthetic angle stacks moveout-corrected with true and perturbed velocities and use it to align field angle stacks. There the misaligned quantities are the inputs, and the synthetic targets are aligned by construction. + +\paragraph{Label uncertainty in learned seismic interpretation.} +\citet{quesada2024faultlabels} collected fault labels on 400 F3 images from 38 annotators with different expertise and confidence. \citet{mirza2025labelquality} assess the variability of manual salt interpretations together with seismic image quality. \citet{guillon2020gtmetrics} add a tolerance distance to fault and horizon metrics, because thin boundaries cannot be placed exactly. In these works the label is an interpretation of the seismic image itself, the task is classification or segmentation, and the uncertainty is described by annotator disagreement or a spatial tolerance. In our problem the label values come from well logs, and their position on the seismic time axis is what is uncertain. A physical tie model conditioned on anchors gives a posterior for that position. + +\paragraph{Position of this work.} +Table~\ref{tab:positioning} summarizes the comparison. To our knowledge, in the reviewed literature no work feeds a tie posterior into the training of a seismic property predictor and evaluates the result under known registration error. The tie posterior itself builds directly on \citet{buland2003bayesianwavelet} and \citet{gunning2006waveletextractor}. + +\begin{table}[t] +\centering +\caption{Positioning. DL: learned property prediction; Tie: automated tie; Tie UQ: posterior or uncertainty of the tie; UQ$\to$train: tie uncertainty used in training; Reg.\ eval.: evaluation that accounts for registration error; seg.: segmentation of seismic images; tol.: spatial tolerance between prediction and label in the metric. \textsuperscript{a}Assessed from the abstract only.} +\label{tab:positioning} +\small +\begin{tabular}{>{\raggedright\arraybackslash}p{0.42\textwidth}ccccc} +\toprule +Work & DL & Tie & Tie UQ & UQ$\to$train & Reg.\ eval. \\ +\midrule +\citet{prabowo2025f3,tao2025structural,xu2024sts,liu2023lowfrequency,corrales2024seis2rock} & \checkmark & -- & -- & -- & -- \\ +\citet{cordoba2025porosity}\textsuperscript{a} & \checkmark & -- & -- & -- & -- \\ +\citet{li2024bpinn}\textsuperscript{a}, \citet{sukar2026uncertainty} & \checkmark & -- & -- & -- & -- \\ +\citet{rizzuti2024waveletflows,rizzuti2025uhr,lim2025bootnet}\textsuperscript{a} & \checkmark & -- & -- & -- & -- \\ +\citet{ali2025syntheticpseudowells} & \checkmark & -- & avoided & -- & -- \\ +\citet{di2023welltie}\textsuperscript{a}, \citet{li2025cascadedtie} & -- & \checkmark & -- & -- & -- \\ +\citet{tschannen2022partialtie} & -- & \checkmark & partial & -- & -- \\ +\citet{wu2017multiwelltie} & -- & \checkmark & -- & -- & -- \\ +\citet{buland2003bayesianwavelet,gunning2006waveletextractor} & -- & \checkmark & \checkmark & -- & -- \\ +\citet{lim2025awsm}\textsuperscript{a} & -- & \checkmark & \checkmark & -- & -- \\ +Soft-DTW, DILATE & generic & soft & -- & -- & -- \\ +\citet{quesada2024faultlabels}\textsuperscript{a}, \citet{mirza2025labelquality}\textsuperscript{a} & seg. & -- & -- & -- & -- \\ +\citet{guillon2020gtmetrics}\textsuperscript{a} & seg. & -- & -- & -- & tol. \\ +This work & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\ +\bottomrule +\end{tabular} +\end{table} + +\todoblock{(1) SEG and EAGE expanded abstracts 2024--2026 were scanned on 28/10/2026; the ten entries added then are abstract-only (\texttt{refs.bib}, block dated 2026-10-28). Still open: the IMAGE 2026 abstract by Palavicini Gurria et al.\ on well ties and seismic inversion as quantitative quality controls (in the official program, text not retrieved); the DOI and pages of \citet{quesada2024faultlabels}; rerun the novelty search on the submission day and revise ``to our knowledge'' if needed. (2) \citet{chen2024multidimensional}, \citet{li2024bpinn}, \citet{di2023welltie}, \citet{dou2024seismae} and the 28/10 SEG/EAGE entries were assessed from abstracts only; read the full texts or keep the footnote. (3) Decide whether to cite the Geophysics 2014 version of Herrera \& van der Baan (not obtained; the 2012 preprint is cited). (4) Check that the ``UQ$\to$train'' column is fair to \citet{sukar2026uncertainty} and \citet{li2024bpinn}.} diff --git a/paper/sections/03_data.tex b/paper/sections/03_data.tex new file mode 100644 index 0000000..20cb2df --- /dev/null +++ b/paper/sections/03_data.tex @@ -0,0 +1,63 @@ +\section{Data and audit} +\label{sec:data} + +\subsection{F3 block} +\label{sec:data:f3} + +We use the public F3 Demo 2023 release of the F3 block, Dutch sector of the North Sea \todo{dataset citation (dGB Earth Sciences / TNO); licence CC BY-SA 3.0, verify wording}. The post-stack volume covers inlines 100--750 and crosslines 300--1250 at 4\,ms sampling. Four vertical wells have sonic (DT), density (RHOB) and effective porosity (PHIE) logs: F02-1, F03-2, F03-4 and F06-1. The release also contains seven interpreted horizons and time--depth (TD) markers at each well. All learning experiments use the window 600--1100\,ms TWT (126 samples). Tie likelihoods and anchors use the extended window 400--1300\,ms. + +Within the target window, the amplitude spectrum around the wells and over the volume peaks near 60\,Hz with a mean frequency of 49\,Hz. The dominant period is therefore 17--20\,ms. The $-20$\,dB band of the volume spans 4--83\,Hz. + +We audited the well data before any modelling. Table~\ref{tab:audit} summarizes the findings, and the paragraphs below explain them. + +\begin{table}[t] +\centering +\caption{Audit of the F3 wells in the 600--1100\,ms window. $\Delta t_{\mathrm{DT}}$: TWT from integrated sonic minus TD-marker TWT, over the markers in the window (range, and change within the window). $\max|\Delta t_{\mathrm{wlt}}|$: largest deviation of the distributed OpendTect time--depth model from the markers. $K$: TD markers in the window. Label: relation of PHIE to the logs.} +\label{tab:audit} +\small +\setlength{\tabcolsep}{3pt} +\begin{tabular}{lcccccl} +\toprule +Well & IL/XL & $\Delta t_{\mathrm{DT}}$ (ms) & change (ms) & $\max|\Delta t_{\mathrm{wlt}}|$ (ms) & $K$ & Label \\ +\midrule +F02-1 & 362/336 & $+2 \to -44$ & 46 & 28.5 & 11 & from RHOB ($R^2=0.84$) \\ +F03-2 & 722/848 & $-3 \to -14$ & 11 & 10.2 & 9 & $-0.2018+0.0011\,\mathrm{DT}$ \\ +F03-4 & 442/1007 & $-42 \to -52$ & 10 & 9.2 & 9 & $-0.2018+0.0011\,\mathrm{DT}$ \\ +F06-1 & 244/387 & $-21 \to -66$ & 45 & 36.4 & 10 & $-0.2018+0.0011\,\mathrm{DT}$ \\ +\bottomrule +\end{tabular} +\end{table} + +\paragraph{Geometry.} +We located the wells by applying the survey's bin-to-coordinate transform to the wellhead coordinates. F02-1 and F06-1 are 3.2\,km apart, and the other pairs are 8--17\,km apart. The distance to the nearest training well therefore differs greatly between leave-one-well-out folds. + +\paragraph{Time--depth relation.} +Integrating the sonic from the first log sample, as is common in learning studies, gives TWT that differs from the TD markers in the window by up to 14--66\,ms, depending on the well. The difference changes with depth by 10--46\,ms (Table~\ref{tab:audit}, Fig.~\ref{fig:tddrift}). The sign is negative at depth, so sonic time is early, as expected from velocity dispersion. The two TD models distributed with the data also disagree. The OpendTect model deviates from the markers by up to 36.4\,ms. A second set of model files is offset from the check-shot tables by $+40.5$, $+40.2$, $+25.2$ and $-14.6$\,ms on average. The sign and size of this offset vary by well, and at F06-1 it changes sign with depth. A datum correction does not explain it. The ``check-shot'' tables have exactly the same depths as the markers. They are horizon-tie picks made on this seismic volume, not independent check-shot surveys. We therefore treat them as anchors with a pick uncertainty $\sigma_a$. The robust spread (MAD) of marker--horizon time differences over 18 pairs at the four wells is 6.9\,ms, and we use $\sigma_a = 7$\,ms. Each well has 9--11 anchors in the target window, 8 to about 148\,ms apart. + +\begin{figure}[t] +\centering +\includegraphics[width=\linewidth]{td_drift.pdf} +\caption{Offset of three time--depth sources from the TD markers at the four F3 wells: sonic integrated from a single shallow anchor (integrated DT), the distributed OpendTect time--depth model, and a second distributed model (DT model). The shaded band is the 600--1100\,ms target window.} +\label{fig:tddrift} +\end{figure} + +\paragraph{Labels.} +At F03-2, F03-4 and F06-1, PHIE is an exact linear function of the sonic log: $\mathrm{PHIE} = -0.2018 + 0.0011\,\mathrm{DT}$ (DT in $\mu$s/m, $R^2 = 1.00000$, maximum error $10^{-4}$). It is equally exactly $(2650 - \mathrm{RHOB})/1600$. The density at these wells is itself derived from sonic: a national well-log archive shows that the density at F03-4 and F06-1 is a predicted log, and the measured density at F03-2 starts below the target window. At F02-1, PHIE follows the measured density ($R^2 = 0.84$) but is not a deterministic function of it. To give all four wells the same label definition, we use $\mathrm{PHIE}_{\mathrm{DT}} = -0.2018 + 0.0011\,\mathrm{DT}$ at all wells and report the original PHIE as a sensitivity check. The F3 ``porosity'' target in this paper is therefore a linear transform of sonic slowness. We call it porosity only in this sense. Density porosity computed from measured density explains 27--59\% of the variance of this label at four wells with measured density in the window (F02-1, F03-4 and two archive wells outside the release). Choosing the label is therefore choosing what is learned. There is one benefit: the rock-physics chain $\phi \to \mathrm{DT} \to \mathrm{RHOB} \to$ acoustic impedance is known exactly, so the physical tie likelihood of Section~\ref{sec:method} is not an approximation on F3. + +\subsection{Synthetic benchmark (D2)} +\label{sec:data:d2} + +The synthetic benchmark makes the true registration known while keeping the F3 statistics. Five F3 horizons (Shallow, FS8, FS7, Truncation, MFS4) define the stratigraphic frame. Porosity is a trend ($\phi_0 = 0.32$, slope $-0.008$ per 100\,ms) plus unit offsets and a sum of two Ornstein--Uhlenbeck fields in stratigraphic coordinates (standard deviations 0.010 and 0.006, correlation lengths 10 and 2\,ms), clipped to $[0.05, 0.45]$. The F3 rock physics maps porosity to DT, RHOB and impedance. Seismic is the reflectivity convolved with a 128\,ms zero-phase statistical wavelet estimated from F3, plus noise at a prescribed signal-to-noise ratio (SNR). + +The true time--depth warp of each well is drawn from the warp prior of Section~\ref{sec:method:prior}, fitted to the F3 anchors, and scaled by a drift factor $c$ ($g \to c\,g$, $b \to c\,b$). $c = 1$ reproduces the F3 drift level, and $c = 0$ is perfect registration. Anchors are the true times at stratigraphic markers plus $\N(0, \sigma_a^2)$ noise with $\sigma_a = 7$\,ms. Each realization has a pool of 16 training wells, from which nested subsets of $N$ wells are drawn, and 8 test wells at least 1\,km from every other well. Labels are scored in the true time of the earth model. We use five observation regimes: +\begin{itemize} + \item R10, R0 and Rm5: SNR 10, 0 and $-5$\,dB, full anchor density; + \item R0h: SNR 0\,dB with half the anchors; + \item R10tb: SNR 10\,dB with only the top and bottom anchors. +\end{itemize} +Under the F3 warp prior, Rm5 gives the posterior width closest to F3 (Section~\ref{sec:exp:p2r}). + +\subsection{Second field dataset} +\label{sec:data:volve} + +\todoblock{Volve (Equinor; licence CC BY-NC-SA 4.0): wells, logs, target window, time--depth data, and the porosity definition (independent of sonic where possible). Gate G-D; pipeline 28/10, runs 29/10. If Volve is cut (plan \S6 cut order), remove this subsection and the corresponding claims.} diff --git a/paper/sections/04_theory.tex b/paper/sections/04_theory.tex new file mode 100644 index 0000000..16e519f --- /dev/null +++ b/paper/sections/04_theory.tex @@ -0,0 +1,107 @@ +\section{Theory: blur and identifiability} +\label{sec:theory} + +\paragraph{Notation.} +$t$ is seismic two-way time, $X$ the seismic input around a well, and $y(t)$ the label under correct registration. $\delta(t)$ is the registration error, and the observed label is $\tilde y(t) = y(t + \delta(t))$. The oracle predictor is $m(t) = \E[y(t)\mid X]$, the MSE-optimal predictor under correct labels. The Fourier transform is $\hat g(f) = \int g(t)\,e^{-i2\pi f t}\dd t$, and $T_\beta h(t) = h(t-\beta)$ is a time shift. $S_a$ is the power spectrum of $a$. The seismic band is $|f| \ge f_c$ with $f_c = 6$\,Hz, and $B$ is the corresponding high-pass operator, with $a_b = Ba$. In the experiments $B$ is a zero-phase fourth-order Butterworth filter. Its response is real and non-negative, so every result below holds with $S$ replaced by $|H_B|^2 S$. Spectral statements assume second-order stationarity in $t$, which is a working assumption for well logs. + +\subsection{Misregistered labels blur the optimal predictor} + +\begin{proposition}[Blur] +\label{prop:blur} +Assume (A1) that for every $t$, $\delta(t)$ is independent of $(X, y(\cdot))$ with distribution $p_t$, and (A2) that $\E[y(t)^2] < \infty$. Then the MSE-optimal predictor of the observed label is +\begin{equation} +\hat y^\star(t) = \E[\tilde y(t)\mid X] = \int p_t(d)\, m(t+d)\dd d . +\end{equation} +If $p_t \equiv p$, then $\hat y^\star$ is $m$ passed through a linear time-invariant filter with frequency response equal to the characteristic function of $\delta$, +\begin{equation} +P(f) = \E\big[e^{i2\pi f\delta}\big], \qquad \delta \sim \N(\mu_\delta, \sigma^2) \;\Rightarrow\; P(f) = e^{i2\pi f\mu_\delta}\, e^{-2\pi^2\sigma^2 f^2}. +\label{eq:transfer} +\end{equation} +\end{proposition} + +Only the marginal distribution of $\delta(t)$ at each $t$ enters $\hat y^\star$. Whether the error is a smooth drift or independent jitter does not change the population optimum, although it changes finite-sample learning. A non-zero mean $\mu_\delta$ adds a linear phase, that is, a common shift. This common shift is the direction that Proposition~\ref{prop:ident} shows to be unidentified. Assumption (A1) is a modelling assumption. On F3 the same sonic log produces both the label and the time axis, so $\delta$ and $y$ are not strictly independent. + +\begin{corollary}[Seismic-band bounds] +\label{cor:band} +Let $\langle h\rangle = \int_{|f|\ge f_c} h\, S_{m}\dd f \big/ \int_{|f|\ge f_c} S_{m}\dd f$. Then +\begin{equation} +\frac{\sd \hat y^\star_b}{\sd y_b} \le \sqrt{\langle |P|^2\rangle} \le \sup_{|f|\ge f_c}|P(f)|, +\qquad +\PCC_b(\hat y^\star) = \kappa(P)\,\PCC_b(m), \quad \kappa(P) = \frac{\langle \operatorname{Re} P\rangle}{\sqrt{\langle|P|^2\rangle}} \le 1 , +\end{equation} +with equality in $\kappa$ if and only if $P$ is a positive constant on the support of $S_{m_b}$. +\end{corollary} + +The coherence at each frequency is unchanged. Blur does not destroy information at the population level, but it reweights the band towards low frequencies. Undoing it would require multiplying by $e^{+2\pi^2\sigma^2 f^2}$, which amplifies estimation error wherever $|P| \approx 0$, and $\sigma$ is unknown in practice. Taking the F3 seismic amplitude spectrum as a proxy for the recoverable band, a Gaussian error with $\sigma = 8$\,ms keeps less than 7\% of the seismic-band variance. + +\begin{corollary}[Variance matching rescales amplitude only] +\label{cor:var} +Consider $J(h) = \E\|h - \tilde y\|^2 + \Psi(\E h, \Var h)$ over predictors $h$ that are functions of $X$, where $\Psi$ is any penalty on the mean and variance of the prediction (for example a penalty on the standard-deviation ratio). Every minimizer satisfies $h^\star - \E h^\star = a\,(\hat y^\star - \E\hat y^\star)$ for some $a \ge 0$. +\end{corollary} + +A variance-matching loss can therefore restore the overall standard-deviation ratio, but the in-band spectrum keeps the shape $|P|^2 S_m$. The prediction becomes larger but stays blurred. Baseline B2 (Section~\ref{sec:method:baselines}) combines a variance-matching term with a best-shift term and is affected in the same way. + +\paragraph{Verification (H1).} +We trained the backbone of Section~\ref{sec:method:train} with MSE on oracle synthetic labels shifted by $\delta_{wj} = \sigma z_{wj}$, $z \sim \N(0,1)$. The shift is fixed within each 64-sample window and independent of everything else, so (A1) holds by construction. We used $c = 0$, $N = 16$, eight realizations and five seeds. The cross-spectrum ratio +\begin{equation} +\hat H_\sigma(f) = \frac{\sum \operatorname{Re}[Y^*(f)\hat Y_\sigma(f)]}{\sum \operatorname{Re}[Y^*(f)\hat Y_0(f)]} +\end{equation} +estimates $P_\sigma(f)$; the sums run over test wells, realizations and seeds. The pre-registered statistic is $r(\sigma)$, the geometric mean of $\hat H_\sigma/P_\sigma$ over frequencies with $f \ge f_c$, $P_\sigma \ge 0.1$ and reference cross-power at least 10\% of its in-band maximum. The hypothesis is rejected if $r \notin [0.5, 2]$ for any $\sigma > 0$. Table~\ref{tab:h1} and Fig.~\ref{fig:h1} show the result: $r = 1.009$, 1.009 and 1.007 for $\sigma = 4$, 8 and 16\,ms, and $r = 1.093$ for $\sigma = 32$\,ms. Proposition~\ref{prop:blur} is not rejected. Two limitations apply. First, the frequency-selection rule keeps only 6.8--22.5\,Hz, where the MSE predictor has coherent power (72\% of the in-band cross-spectrum); the test says nothing above about 23\,Hz. Second, at 32\,ms the measured attenuation is 9\% weaker than predicted and the interval excludes 1. This is within the pre-registered tolerance, and we have not identified its cause. + +\begin{table}[t] +\centering +\caption{Test of Proposition~\ref{prop:blur} (H1). $r(\sigma)$: geometric mean of measured over theoretical transfer; 95\% bootstrap interval over realizations. Band metrics in p.u.\ on test wells.} +\label{tab:h1} +\small +\begin{tabular}{rcccccc} +\toprule +$\sigma$ (ms) & $r(\sigma)$ & 95\% CI & frequencies & band RMSE & band PCC & band sd ratio \\ +\midrule +0 & 1 & -- & 17 & 0.426 & 0.954 & 0.945 \\ +4 & 1.009 & [0.996, 1.019] & 17 & 0.587 & 0.908 & 0.817 \\ +8 & 1.009 & [0.990, 1.025] & 17 & 0.805 & 0.817 & 0.677 \\ +16 & 1.007 & [0.975, 1.038] & 15 & 1.042 & 0.670 & 0.475 \\ +32 & 1.093 & [1.046, 1.143] & 4 & 1.269 & 0.388 & 0.247 \\ +\bottomrule +\end{tabular} +\end{table} + +\begin{figure}[t] +\centering +\includegraphics[width=\linewidth]{p2_h1.pdf} +\caption{Test of Proposition~\ref{prop:blur}. (a) Estimated transfer $\hat H_\sigma(f)$ on the frequencies used (solid) and $e^{-2\pi^2\sigma^2 f^2}$ (dashed). The shaded band below 6\,Hz is outside the seismic band and is not used. (b) $r(\sigma)$ with 95\% intervals over realizations and the number of frequencies used; the shaded region is the pre-registered non-rejection interval $[0.5, 2]$. Setting: $c = 0$, $N = 16$, MSE loss.} +\label{fig:h1} +\end{figure} + +\paragraph{Implication for posterior labels.} +\label{sec:theory:post} +A tie posterior can be used in two ways: labels at the posterior-mean warp $\bar\tau(t)$, or a bank of labels drawn from posterior samples. Let $\delta = \bar\tau - \tau$ be the error of the mean warp. If the posterior is calibrated, $\Var\delta(t) \approx \sigpost(t)^2$. Treating (A1) as an approximation, Proposition~\ref{prop:blur} says that training on mean-warp labels blurs the optimum by $P(f) \approx e^{-2\pi^2\sigpost^2 f^2}$. No method can beat labels at the true warp, so the largest possible gain of a bank over the mean warp is the loss caused by this blur. We measure that loss directly as $B(\sigma) = \text{band RMSE}(\text{blur}_\sigma(\mu))/\text{band RMSE}(\mu)$, where $\mu$ is the prediction of the oracle-label model on a development realization. On the H1 predictions this quantity reproduces the measured penalty (1.33 against 1.38 at 4\,ms; 1.85 against 1.91 at 8\,ms). If a bank removed the blur completely, the bank-to-mean ratio would be about $1/B(\sigpost)$. This is a directional expectation, not a strict bound. The mean-warp error is not independent of $y$, because $\bar\tau$ is estimated from the same seismic that the network reads. A multimodal posterior (cycle skips) gives heavier-tailed errors than a Gaussian with the same width. A gain larger than $1/B$ therefore cannot be attributed to deblurring (Section~\ref{sec:exp:p2r}). + +\subsection{Without anchors, absolute timing is not identified} + +Consider $N$ training wells with seismic $X_w$, depth logs $\phi_w$ and warps $u_w = (b_w, g_w)$ (Section~\ref{sec:method:prior}). Let $y^{u}(t) = (\aaf\phi)(z_u(t))$ be the label under warp $u$, where $z_u$ inverts $t_u$ and $\aaf$ is an anti-alias filter. Let $e_b$ be the direction that adds the same $\beta$ to every $b_w$. The joint MAP objective over network parameters $\theta$ and warps $\mathbf{u}$ is +\begin{equation} +\Phi(\theta, \mathbf u) = \sum_w \Big[\mathcal L_w(\theta; y_w^{u_w}) + \log p(u_w) + \sum_k \log \N\big(t_{wk};\, t_{u_w}(z_{wk}),\, \sigma_a^2\big)\Big], +\end{equation} +with Gaussian log-likelihood $\mathcal L_w$ over windows and anchors $(z_{wk}, t_{wk})$. + +\begin{proposition}[Identifiability] +\label{prop:ident} +Assume (B) that the model class is closed under output shifts: for each $\theta$ and each admissible $\beta$ there is $\theta'$ with $\mu_{\theta'} = T_\beta \mu_\theta$ and $\sigma_{\theta'} = T_\beta\sigma_\theta$. Then, up to window-edge effects: +\begin{enumerate} + \item[(a)] without anchors, with a flat prior on $b$ and no seismic tie term, $\Phi(\theta', \mathbf u + \beta e_b) = \Phi(\theta, \mathbf u)$, so the objective has a ridge in $\beta$ shared by all wells; + \item[(b)] a prior $b_w \sim \N(0, \sigma_b^2)$ adds curvature $N/\sigma_b^2$ along the ridge; + \item[(c)] anchors with finite $\sigma_a$ add curvature $\sum_w K_w/\sigma_a^2$, where $K_w$ is the number of anchors at well $w$, so that + \begin{equation} + \sd(\beta) \approx \Big(\frac{\sum_w K_w}{\sigma_a^2} + \frac{N}{\sigma_b^2}\Big)^{-1/2} \approx \frac{\sigma_a}{\sqrt{\sum_w K_w}} . + \end{equation} +\end{enumerate} +\end{proposition} + +With 4 wells of 16 anchors at $\sigma_a = 7$\,ms, $\sd(\beta) \approx 0.9$\,ms. With only the prior $\sigma_b = 50$\,ms, $\sd(\beta) \approx 50/\sqrt N$, that is 35\,ms for $N = 2$ and 12.5\,ms for $N = 16$. A common shift $\beta$ multiplies the band-limited correlation at frequency $f$ by $\cos(2\pi f\beta)$, and $\cos(2\pi\cdot 20\,\mathrm{Hz}\cdot 12.5\,\mathrm{ms}) = 0$. Assumption (B) holds exactly for fully convolutional networks with a wide enough last layer and approximately for the CNN--GRU used here. + +\paragraph{The seismic tie term.} +Seismic is observed on a fixed time axis, so a tie likelihood that compares the seismic with a warped synthetic is not invariant to $\beta$. In principle it pins absolute time. In practice a small shift trades off against a constant wavelet phase rotation: the two coincide at $f_0 = \psi/(2\pi\beta)$ and differ by $2\pi(f - f_0)\beta$ elsewhere. For $\beta = 4$\,ms the largest phase difference over $\pm 30$\,Hz around $f_0$ is only about $43^\circ$. Information about $\beta$ thus comes from the bandwidth, not the centre frequency. + +\paragraph{Consequences.} +Shift-tolerant losses and soft-DTW choose the alignment that best fits the network's current prediction and use no anchors. Within the range of their shift bank or band they fall under case (a): network and alignment can drift together without penalty. A tie posterior conditioned on anchors does not have this ridge. Its absolute timing is set before training, with per-well common-shift uncertainty of about $\sigma_a/\sqrt{K_w}$. diff --git a/paper/sections/05_method.tex b/paper/sections/05_method.tex new file mode 100644 index 0000000..225baa6 --- /dev/null +++ b/paper/sections/05_method.tex @@ -0,0 +1,157 @@ +\section{Registration-marginalized learning} +\label{sec:method} + +RML has two stages. First, a posterior over the time--depth warp of each training well is computed from anchors and, optionally, from the seismic. No network is involved. Second, a network is trained on a bank of labels drawn from this posterior. At prediction time no warp is needed: the network maps seismic to a property trace on the seismic time axis. + +\subsection{Warp prior and anchors} +\label{sec:method:prior} + +For well $w$ with depth logs $\phi_w(z)$, $\mathrm{DT}_w(z)$ and $\rho_w(z)$, the time--depth map is +\begin{equation} +t_w(z; b_w, g_w) = t_{w,\mathrm{ref}} + b_w + 2\int_{z_{\mathrm{ref}}}^{z} \mathrm{DT}_w(u)\, e^{g_w(u)}\dd u . +\label{eq:warp} +\end{equation} +The log-slowness correction $g_w$ describes sonic--seismic drift from dispersion, tool effects or washouts. Because $e^{g} > 0$, the map is monotone by construction. $b_w \sim \N(0, \sigma_b^2)$ is a bulk offset. The prior on $g_w$ is a Gaussian process with constant mean $m_g$ and a Mat\'ern-3/2 kernel with scale $\sigma_g$ and length $\ell$. The hyperparameters $(m_g, \sigma_g, \ell)$ are fitted by type-II maximum likelihood on the anchors of the training wells only. $\sigma_a$ and $\sigma_b$ are fixed. Anchors are observed as $t_{wk} = t_w(z_{wk}) + \varepsilon_{wk}$ with $\varepsilon_{wk} \sim \N(0, \sigma_a^2)$. On F3, \eqref{eq:warp} has an important consequence: the same sonic log produces both the label and the time axis, so label and registration are coupled. + +Fitted to the F3 anchors, the prior has $m_g = 0.014$, $\sigma_g = 0.10$ and $\ell = 71$\,ms. The fitted bulk spread is $\sigma_b = 19$\,ms. In leave-one-anchor-out tests, 87\% of held-out anchors lie inside the 90\% predictive interval. The synthetic benchmark draws its true warps from this fitted prior (Section~\ref{sec:data:d2}). Type-II maximum likelihood for $\sigma_a$ on F3 gives 0.4\,ms. This value is not reliable, because it treats the markers as exact: they are picks on the same seismic. We therefore use the empirical spread $\sigma_a = 7$\,ms (Section~\ref{sec:data:f3}). On F3, $\sigma_a$ is not identifiable from the data at hand. + +\subsection{Physical tie likelihood} +\label{sec:method:tie} + +For a training well with seismic trace $\mathbf s_w$ at the well location, +\begin{equation} +p(\mathbf s_w \mid g_w, b_w, \psi) = \N\big(\mathbf s_w;\ \alpha_w \mathbf W_\psi\, \mathbf r_w(b_w, g_w),\ \sigma_n^2 \mathbf I\big), +\end{equation} +where $\mathbf r_w$ is the reflectivity computed from acoustic impedance $\rho_w/\mathrm{DT}_w$ along the warp and blocked to 4\,ms, and $\mathbf W_\psi$ convolves with a 128\,ms statistical wavelet rotated by a constant phase $\psi$. The amplitude $\alpha_w \ge 0$ and the noise level $\sigma_n$ are profiled out, which gives $\log p = -\tfrac n2 \log \mathrm{RSS}$ over the extended window. The residuals are autocorrelated, so this likelihood is overconfident. We temper it by $\gamma = 1/\kappa$, where $\kappa$ is the variance inflation implied by the residual autocorrelation at the best anchor-only sample. The phase $\psi$ is chosen on a $15^\circ$ grid by marginal likelihood on the training wells. Test wells never enter this step. + +\subsection{Two tie posteriors} +\label{sec:method:posterior} + +\paragraph{Anchor posterior with importance weights (P2).} +We draw $S = 64$ warps per well from the anchor-conditioned posterior. The proposal is a Laplace (Gauss--Newton) approximation, refined by elliptical slice sampling \citep{murray2010ess}. Physical weights $\pi_s \propto p(\mathbf s_w\mid u^{(s)})^{\gamma}$ use the largest $\gamma$ that keeps the effective sample size at least $S/4$. + +\paragraph{Sequential Monte Carlo posterior (P2r).} +Importance weights over 64 anchor-conditioned samples cannot move mass to warps that the anchor posterior rarely proposes. In development runs the weighted posterior did not contract to the true warp (Section~\ref{sec:exp:diag}). The second posterior therefore uses tempered sequential Monte Carlo. We introduced it only after the first pre-registered comparison had failed, so it is a deviation from the original protocol, and we report it as one (Section~\ref{sec:exp:diag}). It starts from $P = 1024$ anchor-posterior samples and targets $p(u\mid \text{anchors})\, p(\mathbf s_w\mid u, \psi)^{\gamma}$. The tempering exponent rises from 0 to $\gamma$ in adaptive steps that keep the effective sample size at least $P/2$. Each step uses systematic resampling followed by eight elliptical slice moves. Before the trial we registered a stability criterion: the 95th percentile over $t$ of the difference between mean warps of independent runs must not exceed 0.5\,ms. $P = 1024$ meets it at $c = 1$ on development data. At $c = 2$ the posterior is multimodal and the mean warp is unstable under every configuration we tried. We summarize posterior width by $\sigpost = w_{90}/3.29$, where $w_{90}$ is the 90\% interval width of $\tau(t)$ averaged over the main window and the training wells. No labels are used to compute it. + +\subsection{Labels for each warp} +\label{sec:method:labels} + +For each warp sample, +\begin{equation} +y_w^{(s)}(t_i) = (\aaf\phi_w)\big(z_w^{(s)}(t_i)\big), +\end{equation} +where $z_w^{(s)}$ is the inverse of $t_w(\cdot\,; u^{(s)})$, which exists because the warp is monotone, and $\aaf$ is an anti-alias filter applied before sampling at 4\,ms. Samples whose warp does not cover the main window receive zero weight. Every method in this paper, including the point-tie baselines and the oracle, builds labels with the same operator. Methods differ only in the warps they use. + +\subsection{Training objective} +\label{sec:method:rml} + +The network outputs a mean $\mu_\theta$ and a standard deviation $\sigma_\theta$ for every sample. For a window of $n$ samples and a bank of $S$ labels with weights $\pi_s > 0$, $\sum_s \pi_s = 1$, let +\begin{equation} +\ell_s = \sum_{i=1}^{n} \log\N\big(y_{s,i};\, \mu_i, \sigma_i^2\big), \qquad +\RML_\lambda = -\frac{1}{\lambda n}\log\sum_{s=1}^{S}\pi_s\, e^{\lambda \ell_s}, \qquad +\RML_\infty = -\frac1n\max_s \ell_s . +\label{eq:rml} +\end{equation} +The training loss is the mean of $\RML_\lambda$ over windows and wells. + +\paragraph{Choice of $\lambda$.} +With $\lambda = 1$, differences between bank members are $O(n)$ and the log-sum-exp puts almost all weight on one member. Residuals are also autocorrelated, so a window holds less information than $n$ independent observations. If two members differ by $\Delta = \sum_i d_i$, and $d_i$ is a product of two zero-mean Gaussian processes with common autocorrelation $\rho$, then $\Var\Delta \approx n \Var(d)\,\tau_c$ with $\tau_c = 1 + 2\sum_{k\ge1}\rho(k)^2$. Setting $\lambda = 1/\tau_c$ gives $\lambda\Delta$ the variance of a log-likelihood difference over $n/\tau_c$ independent observations. This is the simplest magnitude adjustment of a composite likelihood \citep{pauli2011composite,ribatet2012composite}. Residuals are not available before training, so we estimate $\rho$ from the pooled autocorrelation of the high-passed training labels, truncated at the first non-positive lag. This gives $\tau_c \approx 2.7$ samples and $\lambda \approx 0.37$, nearly constant across the grid. The choice is a heuristic. We fixed it before the experiments and make no claim about it. + +\paragraph{Special cases.} +The loss \eqref{eq:rml} contains the common alternatives. All five statements are exact and are checked numerically in the code's unit tests. Proofs are in Appendix~\ref{app:proofs}. + +\begin{lemma}[Point tie] +\label{lem:s1} +If $S = 1$, or all bank members coincide, then $\RML_\lambda = -\ell/n$, the Gaussian negative log-likelihood, for every $\lambda$. +\end{lemma} + +\begin{lemma}[Between hard-min and mixture mean] +\label{lem:sandwich} +Let $M(\lambda) = \lambda^{-1}\log \E_\pi e^{\lambda\ell}$. Then $\RML_\lambda = -M(\lambda)/n$ is non-increasing in $\lambda$, with +\begin{equation} +-\frac1n\max_s\ell_s \le \RML_\lambda \le -\frac1n\sum_s\pi_s\ell_s , +\end{equation} +and it tends to the right-hand side as $\lambda \to 0$ and to $\RML_\infty$ as $\lambda \to \infty$. For uniform $\pi$, $0 \le \RML_\lambda - \RML_\infty \le \log S/(\lambda n)$. +\end{lemma} + +As $\lambda \to 0$, the optimal mean is the $\pi$-weighted mean label, which is the blurred label of Proposition~\ref{prop:blur} with $p = \pi$. If $\sigma$ is learned as well, the optimal variance absorbs the spread of the bank. + +\begin{lemma}[Gradient] +\label{lem:grad} +$\nabla_\theta \RML_\lambda = -\frac1n\sum_s r_s \nabla_\theta \ell_s$ with responsibilities $r = \operatorname{softmax}(\log\pi + \lambda\ell)$. +\end{lemma} + +Each gradient step is therefore a generalized M-step whose weights are computed at the current $\theta$. + +\begin{lemma}[Shift-tolerant losses] +\label{lem:shift} +With a bank of the point-tie label shifted by every integer lag in $\pm K$ samples and uniform $\pi$, $\RML_\infty$ is the hard-min shift loss with learned variance, and $\RML_{1/\tau_c}$ is its soft-min version. +\end{lemma} + +\begin{lemma}[Soft-DTW] +\label{lem:sdtw} +Let $D_{ij} = -\log\N(y_j; \mu_i, \sigma_i^2)$, let $\mathcal P$ be the set of monotone alignment paths from $(0,0)$ to $(n-1,n-1)$ within a Sakoe--Chiba band, and let $\langle A, D\rangle_w$ be the path cost with symmetric step weights (diagonal steps counted twice; \citealp{sakoe1978dp}). For soft-DTW with these steps \citep{cuturi2017softdtw}, +\begin{equation} +\frac{\mathrm{sDTW}_\gamma(D)}{2n} = \RML_{\lambda = 2/\gamma}\Big[\text{bank} = \mathcal P,\ \pi \text{ uniform},\ \ell_A = -\tfrac12\langle A, D\rangle_w\Big] - \frac{\gamma}{2n}\log|\mathcal P| . +\end{equation} +\end{lemma} + +The last term does not depend on $\theta$. On the diagonal path, $\ell_A$ equals the Gaussian log-likelihood of the window. Soft-DTW is therefore RML over every monotone alignment in the band, with a uniform prior, no anchors and no physics, at $\lambda = 2/\gamma$; with $\gamma = 0.1$ this is $\lambda = 20$, much closer to the hard minimum than $\lambda \approx 0.37$. Symmetric steps give every path the same total weight $2n$. With standard steps, longer paths visit more cells and, since the negative log-likelihood can be negative, would be preferred. DILATE \citep{leguen2019dilate} adds a temporal-distortion term $\langle A^\star, \Omega\rangle$ with $A^\star = \nabla_D \mathrm{sDTW}_\gamma$ and $\Omega_{ij} = ((i-j)/n)^2$. Its gradient is a Hessian--vector product, which we compute by forward-mode differentiation of the backward pass \citep{mensch2018diffdp}. Our version differs from the original in two ways: the cost is the Gaussian negative log-likelihood, and the steps are symmetric. + +\subsection{Network and training} +\label{sec:method:train} + +All learned methods share one backbone and differ only in their labels and loss. The input is a $3\times3$ trace patch around the well (nine channels), z-scored per channel within each well. Three dilated 1-D convolutions (kernel 5, dilations 1, 2 and 4, 64 channels) feed a two-layer bidirectional GRU. A $1\times1$ head with a $1\times1$ skip connection outputs $\mu$ and $\sigma$ (softplus, $\sigma \ge 10^{-3}$). Dropout is 0.05. We train with Adam (learning rate $5\times10^{-3}$, gradient clipping at 5) on full batches of all training wells. Losses are computed on 64-sample windows starting at samples $0, 2, \dots, 62$ of the 126-sample main window. Labels are standardized by the mean and standard deviation of the anti-aliased log over the training wells. These statistics do not depend on the tie. The number of iterations is selected separately for each method from $\{125, 250, 500, 1000, 2000\}$ by total RMSE on the development realizations; on F3 it is selected by inner validation (Section~\ref{sec:exp:f3}). Every method has the same candidate set, and band metrics are not used for selection. Ensembles average five seeds (on F3, three inner models $\times$ five seeds), with $\mu = \overline{\mu_s}$ and $\sigma^2 = \overline{\sigma_s^2} + \Var_s \mu_s$. + +\subsection{Compared methods} +\label{sec:method:baselines} + +Table~\ref{tab:methods} lists the methods. In the language of Lemmas~\ref{lem:s1}--\ref{lem:sdtw}, the B3 family is RML with $S = 1$ at different point ties. B4 is RML with anchor-free banks, and M1, M2 and \mRML{} are RML with anchor-conditioned banks. + +\begin{table}[t] +\centering +\caption{Compared methods. All learned methods use the backbone of Section~\ref{sec:method:train}. Bank: labels entering \eqref{eq:rml}.} +\label{tab:methods} +\small +\begin{tabular}{lp{0.5\linewidth}l} +\toprule +ID & Labels / bank & Loss \\ +\midrule +\multicolumn{3}{l}{\emph{Field baselines (F3 only)}} \\ +B0a & depth--time trend fitted on training wells (no seismic) & -- \\ +B0b & ridge, random forest or gradient boosting on seismic attributes and TWT & -- \\ +B1 & model-based impedance inversion with a well-interpolated low-frequency model, then linear $\phi$--impedance & -- \\ +B2 & backbone with a composite loss$^{\dagger}$ & composite \\ +\midrule +\multicolumn{3}{l}{\emph{Point ties ($S = 1$)}} \\ +B3a & sonic integration from one shallow anchor & NLL \\ +B3b & marker-calibrated sonic through the anchors & NLL \\ +B3c & B3b plus local shifts from synthetic--seismic correlation & NLL \\ +B3c-R & B3c with the SMC-estimated wavelet phase & NLL \\ +B3d & weighted mean warp of the P2 anchor posterior & NLL \\ +\mPM & mean warp of the SMC posterior & NLL \\ +Oracle & true warp (synthetic only; a ceiling, not a competitor) & NLL \\ +\midrule +\multicolumn{3}{l}{\emph{Anchor-free alignment losses (labels B3b)}} \\ +B4a & B3b shifted by $\pm 8$ samples, uniform $\pi$ & $\RML_\infty$ \\ +B4b & as B4a & $\RML_{1/\tau_c}$ \\ +B4c & all monotone alignments in a $\pm8$ band & soft-DTW, $\gamma = 0.1$ \\ +B4d & as B4c & DILATE, $\alpha = 0.5$ \\ +\midrule +\multicolumn{3}{l}{\emph{Anchor-conditioned banks}} \\ +M1 & 64 anchor-posterior warps, uniform $\pi$ & $\RML_{1/\tau_c}$ \\ +M2 & as M1, tempered physical weights & $\RML_{1/\tau_c}$ \\ +\mRML & 64 SMC particles, uniform $\pi$ & $\RML_{1/\tau_c}$ \\ +\midrule +B5 & five-seed ensemble of B3b & NLL \\ +\bottomrule +\end{tabular} + +\smallskip +\footnotesize $^{\dagger}$Labels as B3b; deterministic output. Loss: Huber regression loss $+\,0.60$ correlation $+\,0.05$ first-difference $+\,0.10$ standardized-shape $+\,0.10$ variance-matching $+\,0.20$ best-shift MSE (minimum over shifts of $\pm 8$ samples). +\end{table} + +\subsection{Metrics} +\label{sec:method:metrics} + +Accuracy is reported in porosity units (p.u., porosity $\times 100$). We split every trace into a low band ($|f| < f_c$) and a seismic band ($|f| \ge f_c$, $f_c = 6$\,Hz). The split uses a zero-phase fourth-order Butterworth filter. On F3, energy below 5\,Hz is 0.2--0.5\% of the total. The primary metrics are RMSE and Pearson correlation in the seismic band (band RMSE, band PCC): registration errors act there, while the low band is dominated by the trend. We also report total RMSE and PCC and the band standard-deviation ratio. Calibration is described by the coverage of central intervals at 50, 80, 90 and 95\%, the calibration error (mean absolute deviation of coverage from nominal over these levels), the Gaussian negative log-likelihood and the CRPS. Warp accuracy (synthetic only) is the RMSE of $\tau(t)$ against the true warp over the main window, together with 90\% coverage. Statistics are computed per test well and then macro-averaged. Intervals are 95\% bootstrap intervals over realizations (2000 resamples). On F3 the time samples within a well are not independent and there are only four wells. Field results are therefore descriptive, and we compute no per-sample $p$-values. diff --git a/paper/sections/06_experiments.tex b/paper/sections/06_experiments.tex new file mode 100644 index 0000000..8d82503 --- /dev/null +++ b/paper/sections/06_experiments.tex @@ -0,0 +1,346 @@ +\section{Experiments} +\label{sec:experiments} + +We ran two pre-registered synthetic experiments, in order, and then a pre-registered field test on F3 (Section~\ref{sec:exp:f3}). Before each main run, the protocol (grid, methods, iteration budgets, pass rules) was locked by a SHA-256 hash, and the scripts refuse to run if the hash does not match. The two synthetic protocols were also committed and tagged in version control before their main runs; the F3 protocol was committed and tagged only after its run (Section~\ref{sec:exp:f3}). In the synthetic experiments, every design choice was made on two development realizations (900 and 901), which are never used for results. Test labels were never used to choose a shift, checkpoint or hyperparameter. In the synthetic experiments, a comparison \emph{improves} if the candidate's seismic-band RMSE is at most 0.90 times that of the best competitor, \emph{or} its band PCC is at least 0.05 higher. Here ``best'' means the competitor with the smallest mean band RMSE in that cell. A cell \emph{passes} if the comparison improves in at least 4 of 5 seeds (each averaged over realizations) and in more than half of the realizations (each averaged over seeds). All cells use eight test wells. + +\subsection{Experiment 1: anchor-posterior banks (gate G-B)} +\label{sec:exp:p2} + +\paragraph{Design.} +SNR 10\,dB with full anchors; drift $c \in \{0, 0.5, 1, 2\}$; $N \in \{2, 4, 8, 16\}$; realizations 0--7; five seeds. The candidate was M2. The competitors were all point ties (B3a--B3d) and all anchor-free alignment losses (B4a--B4d). The gate required M2 to pass in at least 3 of the 4 cells at $c = 1$. In addition, at $c = 0$ the ratio of M2 to the best competitor had to be at most 1.02, both averaged over $N$ and for each $N$. + +\paragraph{Result: the gate failed.} +No cell at $c = 1$ passed. The ratio of M2 to the best competitor (B3c in every cell) was 1.045, 1.025, 1.020 and 0.985 for $N = 2$, 4, 8 and 16, with band PCC differences between $-0.018$ and $+0.003$ (Fig.~\ref{fig:p2phase}). The zero-drift guard also failed: the macro ratio was 1.039, and the per-$N$ ratios against B3d were 1.015, 1.045, 1.051 and 1.056. Table~\ref{tab:p2} gives band RMSE for every method at $c = 1$. M2 was about as good as the best point tie and B3d, and it stayed 20--24\% above the oracle. We report this verdict as it stands; nothing in the second experiment changes it. + +\begin{figure}[t] +\centering +\includegraphics[width=\linewidth]{p2_phase.pdf} +\caption{Experiment 1 (gate G-B). (a) Band RMSE of M2 divided by that of the best competitor, and (b) band PCC difference, over drift factor $c$ and number of training wells $N$. Cells show the mean over 8 realizations $\times$ 5 seeds, the 95\% bootstrap interval over realizations, and, in (a), the best competitor and whether the cell passed the pre-registered rule. The outlined row ($c = 1$) is the F3-like drift level.} +\label{fig:p2phase} +\end{figure} + +\begin{table}[t] +\centering +\caption{Experiment 1 at F3-like drift ($c = 1$, SNR 10\,dB, full anchors): band RMSE and band PCC, mean over 8 realizations $\times$ 5 seeds.} +\label{tab:p2} +\small +\begin{tabular}{llcccc} +\toprule +& & \multicolumn{2}{c}{band RMSE (p.u.)} & \multicolumn{2}{c}{band PCC} \\ +\cmidrule(lr){3-4}\cmidrule(lr){5-6} +Family & Method & $N = 4$ & $N = 16$ & $N = 4$ & $N = 16$ \\ +\midrule +Point tie & B3a & 1.480 & 1.420 & 0.202 & 0.258 \\ + & B3b & 0.937 & 0.774 & 0.729 & 0.826 \\ + & B3c & \textbf{0.716} & 0.569 & \textbf{0.855} & 0.914 \\ + & B3d & 0.759 & 0.627 & 0.833 & 0.891 \\ +\midrule +Anchor-free & B4a (hard-min shift) & 1.304 & 1.184 & 0.429 & 0.526 \\ + & B4b (soft-min shift) & 1.289 & 1.103 & 0.436 & 0.583 \\ + & B4c (soft-DTW) & 0.978 & 0.743 & 0.704 & 0.838 \\ + & B4d (DILATE) & 0.967 & 0.731 & 0.714 & 0.844 \\ +\midrule +Anchor bank & M1 & 0.805 & 0.589 & 0.809 & 0.905 \\ + & M2 & 0.735 & \textbf{0.560} & 0.849 & \textbf{0.917} \\ +\midrule +Ceiling & Oracle & 0.612 & 0.451 & 0.897 & 0.948 \\ +\bottomrule +\end{tabular} +\end{table} + +\paragraph{Anchor-free alignment losses.} +At $N = 4$, all four anchor-free losses were worse than B3b, the point tie whose labels they start from. Hard-min and soft-min shift banks (B4a, B4b) were 38--53\% worse than B3b at both $N$. At $N = 16$, soft-DTW and DILATE were 4--6\% better than B3b, but still far behind B3c and M2. This is what Proposition~\ref{prop:ident} predicts. Within the shift range, the loss cannot tell a better alignment from a jointly shifted network and label, so the extra freedom fits noise rather than recovering timing. + +\paragraph{Anchors are necessary (H4).} +At $c = 1$, $N = 4$ we removed the anchors from M1 and M2 and kept only the warp prior ($\sigma_b = 50$\,ms) and, for M2, the tie likelihood. To favour the anchor-free variant, it was given the true (zero) wavelet phase. Warp RMSE rose from 3.15 to 31.1\,ms for M2 (ratio 9.9, 95\% CI [8.3, 11.4]) and from 3.71 to 33.0\,ms for M1. Band RMSE rose from 0.735 to 1.398 p.u.\ for M2 (ratio 1.90, CI [1.80, 2.04]) and from 0.805 to 1.594 for M1. The pre-registered hypothesis that anchors are necessary was not rejected. The size of the warp error is consistent with Proposition~\ref{prop:ident}: with $\sigma_b = 50$\,ms and $N = 4$, $\sd(\beta) \approx 25$\,ms. + +\paragraph{Calibration (H3).} +The pre-registered hypothesis that M2 ensembles are better calibrated than B5 (B3b ensembles) was rejected. Pooled over $N$ at $c = 1$, the calibration error was 0.278 for M2-ens against 0.230 for B5 (difference 0.048, 95\% CI [0.035, 0.061]). Every ensemble under-covered. + +\subsection{Diagnosis on development data and deviation} +\label{sec:exp:diag} + +Gate G-B prescribed a time-boxed diagnosis followed by a pivot. Using only the development realizations, we found that the failure lay in registration, not in the loss. The M2 posterior was 64 anchor-conditioned samples reweighted by tempered tie likelihoods. It did not contract to the true warp: at $c = 1$, its warp RMSE was 3.25\,ms with a 90\% interval width of 11.6\,ms. This is comparable to the correlation-based point tie B3c (3.85\,ms), which explains why M2 $\approx$ B3d $\approx$ B3c. The SMC posterior of Section~\ref{sec:method:posterior}, with the wavelet phase re-estimated from its evidence, reached a warp RMSE of 0.56\,ms with 97\% coverage of the 90\% interval, and labels at its mean warp were close to the oracle. Experiment 1 therefore could not test whether posterior labels help, because its posterior was not informative enough. + +\paragraph{Deviation.} +Re-running on new realizations was not among the options pre-registered for a G-B failure. The second experiment is a new pre-registration, designed \emph{after} seeing the first failure, using development realizations only, and run on realizations 8--15, which had not been generated when its protocol was locked. The verdict of Experiment 1 stands. Two potential stresses were not tested: the bulk-offset prior $\sigma_b$ was neither learned nor varied, and a rock-physics misspecification stress was cut for time. The anchor uncertainty $\sigma_a$ was varied and is reported below. + +\subsection{Experiment 2: SMC tie posterior} +\label{sec:exp:p2r} + +\paragraph{Design.} +Five observation regimes (Section~\ref{sec:data:d2}); $c \in \{0, 1, 2\}$; $N \in \{4, 16\}$; realizations 8--15; five seeds. Registration and SMC were run once per (realization, $c$, $N$). The protocol pre-registered three questions: +\begin{itemize} + \item \textbf{H2a.} Do labels at the SMC mean warp (\mPM) beat the best point tie (B3b, B3c, B3c-R)? This is decided per full-anchor regime (R10, R0, Rm5). A regime passes if both cells at $c = 1$ pass and the zero-drift guard holds. A secondary comparison adds B3d, the Experiment~1 posterior mean, to the competitors. + \item \textbf{H2b.} Does RML on the SMC bank (\mRML) beat \mPM{} when the posterior is wide ($\sigpost \ge 1.5$\,ms)? At $N = 16$ the protocol requires that (a) at least two thirds of wide cells pass; (b) the Spearman correlation between $\sigpost$ and the ratio \mRML/\mPM{} over all cells is negative; and (c) the mean ratio over narrow cells is at most 1.02. + \item \textbf{$\sigma_a$ scope.} H2a is repeated at R10, $c = 1$ with every method registered using $\sigma_a = 3.5$ or 14\,ms, while the data are generated with 7\,ms. +\end{itemize} +Cells at $c = 2$ are reported with an ``unstable posterior'' flag and are not used as primary evidence (Section~\ref{sec:method:posterior}). Calibration was not tested as a hypothesis. Development runs had shown that the seed ensembles under-cover more when trained on better labels, so the protocol made calibration descriptive only. + +\paragraph{H2a: posterior-mean labels beat the best point tie.} +All three full-anchor regimes passed (Table~\ref{tab:h2a}; Fig.~\ref{fig:p2rgrid} shows every method relative to the Oracle). At $c = 1$, \mPM{} reduced band RMSE relative to the best point tie by 14\% and 22\% at R10 ($N = 4$, 16), by 11\% at R0 and by 8\% at Rm5. At Rm5 the ratio stayed above 0.90 and the cells passed on band PCC ($+0.10$ and $+0.09$). Most of the gain is already present without drift. At $c = 0$ the macro ratios are 0.81, 0.85 and 0.88, against 0.78--0.92 at $c = 1$. Part of the advantage therefore comes from the seismic-conditioned, phase-estimated tie itself, not from correcting drift. When B3d is added as a competitor, H2a holds at R10 (2/2 cells; macro ratio at $c = 0$ is 0.94), holds in 1 of 2 cells at R0 and fails at Rm5 (0/2; ratios 0.98 and 0.97 against B3d). The claim that SMC labels beat the anchor posterior of Experiment~1 is therefore limited to high SNR. \mRML{} under the same rule passed all three regimes against point ties and R10 and R0 with B3d included. + +\begin{table}[t] +\centering +\caption{H2a at $c = 1$: band RMSE of \mPM{} divided by that of the best point tie (95\% bootstrap CI over realizations) and band PCC difference. Zero-drift macro: same ratio at $c = 0$, averaged over $N$ (guard $\le 1.02$). Last column: verdict with B3d added as a competitor.} +\label{tab:h2a} +\small +\begin{tabular}{lcccccc} +\toprule +& \multicolumn{2}{c}{$N = 4$} & \multicolumn{2}{c}{$N = 16$} & & \\ +\cmidrule(lr){2-3}\cmidrule(lr){4-5} +Regime & ratio & $\Delta$PCC & ratio & $\Delta$PCC & zero-drift & with B3d \\ +\midrule +R10 & 0.857 [0.805, 0.922] & +0.039 & 0.782 [0.748, 0.813] & +0.037 & 0.809 & 2/2 \\ +R0 & 0.888 [0.856, 0.926] & +0.078 & 0.888 [0.870, 0.909] & +0.060 & 0.851 & 1/2 \\ +Rm5 & 0.915 [0.883, 0.953] & +0.102 & 0.923 [0.908, 0.940] & +0.089 & 0.878 & 0/2 \\ +\bottomrule +\end{tabular} +\end{table} + +\paragraph{The gain requires a correct $\sigma_a$.} +With misspecified anchor uncertainty, no cell passed (Table~\ref{tab:sigmaa}). Over-trusting the anchors ($\sigma_a = 3.5$\,ms) made \mPM{} 14\% \emph{worse} than the best point tie at $N = 16$. Under-trusting them (14\,ms) left a 7\% gain at $N = 16$ that did not pass. The SMC posterior was miscalibrated in both directions. With 3.5\,ms the warp RMSE was 4.8\,ms against a $\sigpost$ of 2.5\,ms (90\% coverage 0.62). With 14\,ms it was 2.8\,ms against 0.9\,ms (coverage 0.52). With the correct 7\,ms it was 0.63\,ms (coverage 0.89). On F3 the markers are not independent check shots, and $\sigma_a$ cannot be identified from them. This is the main risk for transfer to the field. + +\begin{table}[t] +\centering +\caption{$\sigma_a$ arm (R10, $c = 1$; data generated with $\sigma_a = 7$\,ms; every method registered with $\sigma_a^{\mathrm{reg}}$). Ratio: band RMSE of \mPM{} divided by that of the best point tie. Warp RMSE and coverage: SMC posterior on the training wells, $N = 16$.} +\label{tab:sigmaa} +\small +\setlength{\tabcolsep}{4pt} +\begin{tabular}{ccccccc} +\toprule +$\sigma_a^{\mathrm{reg}}$ (ms) & ratio $N = 4$ & ratio $N = 16$ & cells pass & $\sigpost$ (ms) & warp RMSE (ms) & cov$_{90}$ \\ +\midrule +3.5 & 0.977 [0.908, 1.038] & 1.141 [1.094, 1.194] & 0/2 & 2.52 & 4.80 & 0.62 \\ +7 & 0.857 [0.805, 0.922] & 0.782 [0.748, 0.813] & 2/2 & 0.59 & 0.63 & 0.89 \\ +14 & 0.985 [0.897, 1.067] & 0.928 [0.867, 1.004] & 0/2 & 0.92 & 2.81 & 0.52 \\ +\bottomrule +\end{tabular} +\end{table} + +\paragraph{H2b: RML helps when the posterior is wide.} +At $N = 16$ all three tests passed (Table~\ref{tab:h2b}, Fig.~\ref{fig:h2b}a). All 8 wide cells passed, the ratio decreased with $\sigpost$ (Spearman $\rho = -0.85$, one-sided permutation $p < 0.001$), and the mean ratio over narrow cells was 0.996. The gains in wide cells ranged from 2\% (Rm5, $c = 1$) to 11\% (R10tb, $c = 1$). At $c = 2$ they reached 33\% (R10tb), but those cells are flagged unstable. At $N = 4$, which was reported but not used for the verdict, 6 of 8 wide cells passed ($\rho = -0.77$, narrow mean 1.001). + +The mechanism is not settled. In 7 of the 8 wide cells, the measured ratio is below $1/B(\sigpost)$ (Fig.~\ref{fig:h2b}b), the ratio that complete removal of Gaussian blur would give (Section~\ref{sec:theory:post}). At Rm5, $c = 1$, for example, the bound allows no gain (1.000), yet RML gained 2\%. Only in R10tb at $c = 2$ does the ratio (0.667) lie within the bound (0.634). Most of the gain therefore does not come from deblurring in the sense of Proposition~\ref{prop:blur}. We see two candidate explanations, which our experiments do not separate. One is label augmentation: the bank prevents the network from memorizing a single misregistered label. The other is that the posterior mean is biased when the posterior is multimodal. + +\begin{table}[t] +\centering +\caption{H2b at $N = 16$, wide cells ($\sigpost \ge 1.5$\,ms): band RMSE of \mRML{} divided by that of \mPM{} (95\% CI), the deblurring bound $1/B(\sigpost)$, and the SMC warp error on the training wells. $\dagger$: unstable posterior ($c = 2$).} +\label{tab:h2b} +\small +\begin{tabular}{lccccccc} +\toprule +Regime & $c$ & $\sigpost$ (ms) & ratio & 95\% CI & $1/B$ & warp RMSE (ms) & cov$_{90}$ \\ +\midrule +R0 & 1 & 1.53 & 0.967 & [0.956, 0.979] & 0.999 & 1.86 & 0.86 \\ +R0h & 1 & 1.72 & 0.970 & [0.953, 0.989] & 0.996 & 2.36 & 0.83 \\ +R10tb & 1 & 1.92 & 0.890 & [0.866, 0.915] & 0.964 & 4.78 & 0.53 \\ +Rm5 & 1 & 2.56 & 0.982 & [0.966, 0.995] & 1.000 & 2.91 & 0.86 \\ +R0 & 2$^\dagger$ & 2.79 & 0.952 & [0.940, 0.962] & 0.968 & 2.72 & 0.94 \\ +Rm5 & 2$^\dagger$ & 3.96 & 0.964 & [0.953, 0.977] & 0.980 & 3.92 & 0.91 \\ +R0h & 2$^\dagger$ & 4.18 & 0.904 & [0.889, 0.925] & 0.910 & 4.10 & 0.94 \\ +R10tb & 2$^\dagger$ & 11.49 & 0.667 & [0.615, 0.713] & 0.634 & 19.08 & 0.62 \\ +\bottomrule +\end{tabular} +\end{table} + +\begin{figure}[t] +\centering +\includegraphics[width=\linewidth]{p2r_h2b.pdf} +\caption{H2b. (a) Band RMSE of \mRML{} divided by that of \mPM{} against the posterior width $\sigpost$, for every regime $\times$ $c$ $\times$ $N$ cell (filled: $N = 16$; open: $N = 4$; marker shape: drift factor $c$). Bars are 95\% bootstrap intervals over realizations. The dashed line is the pre-registered 1.5\,ms threshold for wide cells. (b) The same ratio against the deblurring bound $1/B(\sigpost)$ computed from Oracle predictions (Section~\ref{sec:theory:post}). Cells below the diagonal gained more than removing a Gaussian blur could give. Cells at $c = 2$ have an unstable posterior and are not primary evidence.} +\label{fig:h2b} +\end{figure} + +\paragraph{Posterior quality.} +The SMC posterior was close to calibrated when the anchors were dense and $\sigma_a$ was correct. At $c = 1$, $N = 16$, the 90\% coverage was 0.89 at R10, 0.86 at R0 and 0.86 at Rm5. With only top and bottom anchors (R10tb) it was overconfident: warp RMSE 4.8\,ms against $\sigpost = 1.9$\,ms, with 90\% coverage 0.53. RML still gained the most in this regime. The bank covers part of the error even when its width understates it. + +\begin{figure}[t] +\centering +\includegraphics[width=\linewidth]{p2r_grid.pdf} +\caption{Experiment 2 overview. Band RMSE of each method divided by that of the Oracle (true warp), by anchor regime and drift factor $c$, for (a) $N = 4$ and (b) $N = 16$ training wells. Each entry is the mean over 8 realizations $\times$ 5 seeds. The colour scale is clipped at 2.0; R10tb at $c = 2$ reaches 3.15. \mPM{} is B3d-Sa and \mRML{} is M2-Sa.} +\label{fig:p2rgrid} +\end{figure} + +\paragraph{Predictive uncertainty (descriptive).} +Every five-seed ensemble under-covered. At R10, $c = 1$, $N = 16$, the 90\% coverage was 0.79 for B5, 0.58 for \mPM-ens, 0.58 for \mRML-ens and 0.48 for Oracle-ens, with calibration errors 0.114, 0.300, 0.291 and 0.379. Ensembles trained on better labels predicted smaller $\sigma$ and covered less. A seed ensemble of a heteroscedastic network does not carry the tie posterior to the test wells. We make no calibration claim. + +\subsection{F3 field data (gate G-C)} +\label{sec:exp:f3} + +\paragraph{Baselines.} +Table~\ref{tab:p1} gives leave-one-well-out results for the baselines on F3. The label is $\mathrm{PHIE}_{\mathrm{DT}}$, and the reference is the marker-calibrated sonic of the test well. The test well contributes nothing to training, tie, hyperparameters or checkpoint selection. A depth--time trend fitted on the training wells (B0a) has the lowest RMSE. No learned model beats it in total RMSE, and its seismic-band PCC is negative. Seismic-attribute ridge regression (B0b) has the highest band PCC (0.24). Among networks, labels from the marker-calibrated tie (B3b) beat single-anchor sonic integration (B3a). With four wells these numbers are descriptive. + +\begin{table}[t] +\centering +\caption{F3 leave-one-well-out baselines (label $\mathrm{PHIE}_{\mathrm{DT}}$, marker-calibrated reference, 600--1100\,ms). Macro over four wells; $\pm$: standard deviation over five seeds.} +\label{tab:p1} +\small +\begin{tabular}{lcccc} +\toprule +Method & RMSE (p.u.) & PCC & band PCC & skill vs B0a \\ +\midrule +B0a (trend) & \textbf{2.48} & 0.81 & $-0.13$ & 0.00 \\ +B0b ridge & 2.58 & \textbf{0.83} & \textbf{0.24} & $-0.09$ \\ +B0b random forest & $2.67 \pm 0.01$ & 0.79 & $-0.03$ & $-0.22$ \\ +B0b gradient boosting & 2.68 & 0.78 & 0.01 & $-0.20$ \\ +B1 (impedance inversion) & 3.60 & 0.44 & $-0.02$ & $-1.29$ \\ +B2 (composite loss) & $3.07 \pm 0.16$ & 0.52 & 0.15 & $-0.65$ \\ +B3a & $2.93 \pm 0.24$ & 0.62 & $-0.02$ & $-0.47$ \\ +B3b & $2.82 \pm 0.21$ & 0.68 & 0.15 & $-0.36$ \\ +\bottomrule +\end{tabular} +\end{table} + +\paragraph{Protocol and deviations.} +The field test was pre-registered in a third protocol. Its SHA-256 lock also covers the code, the input data and the software environment, and the scripts refuse to run if any of them changes. The lock file records that it was written one minute before the main run started (28 October 2026, 00:14 and 00:15 local time). The protocol was committed to version control and tagged only after the run, together with the results. The record that the lock preceded the run is therefore the time stamp inside the lock file, which is self-reported, not the version history. Before the lock we ran a timing pilot of the registration and a preflight of the classical baselines on F3. Neither computed a metric on a test well. No result on an F3 test well was used to design it. Two facts limit what the test can show. First, F3 is not an untouched field dataset. The same four wells gave the baselines of Table~\ref{tab:p1}, computed before the protocol was written, and they calibrated the synthetic benchmark (Section~\ref{sec:data:d2}). The field test is therefore a descriptive follow-up on wells we had already seen, not an independent replication. Second, the method under test comes from Experiment~2, whose protocol was itself designed after Experiment~1 had failed (Section~\ref{sec:exp:diag}). The field result therefore bears on the SMC variant only, and it leaves the verdict of Experiment~1 unchanged. + +\paragraph{Design.} +We used nested leave-one-well-out validation. Each well is held out once as the outer test well. Within the three remaining wells, each is held out once as an inner validation well, and models are trained on the other two. Registration uses only the two training wells of each model: the warp-prior hyperparameters, the wavelet phase and the SMC posterior ($\sigma_a = 7$\,ms, $P = 1024$, $S = 64$) are all estimated from them. For each outer fold, method and seed, the iteration budget is chosen from $\{125, 250, 500, 1000, 2000\}$ by total validation MSE averaged over the three inner wells, with ties going to the smaller budget. This replaces the selection on development realizations used in the synthetic experiments (Section~\ref{sec:method:train}). The prediction at the outer well is a Gaussian with the mean and variance of the equally weighted mixture of 15 members (three inner models $\times$ five seeds). Nothing is refitted on the outer well, and its labels enter no choice. The primary label is $\mathrm{PHIE}_{\mathrm{DT}}$, and the reference is the marker-calibrated sonic of the test well, as in Table~\ref{tab:p1}. + +Gate G-C required two conditions for \mRML{} in this configuration. (i) \emph{Direction}: lower band RMSE than the point tie chosen for that outer fold among B3b, B3c and B3c-R, by inner-validation MSE averaged over seeds, at no fewer than three of the four outer wells. Any reduction counts, so this rule is weaker than the 0.90 ratio of the synthetic experiments. (ii) \emph{Coverage}: macro coverage of the central 80\% and 90\% intervals within $\pm 0.05$ of nominal, that is, in $[0.75, 0.85]$ and $[0.85, 0.95]$. Coverage is the fraction of time samples in the window that fall inside the interval. These samples are strongly correlated, so coverage is a description, not a test. The protocol also states that better accuracy cannot compensate for failed coverage. Before the run we had recorded that the coverage condition would probably fail, because every ensemble had under-covered in the synthetic experiments. We kept the threshold. + +\paragraph{Result: the gate failed.} +Both conditions failed (Table~\ref{tab:f3gc}). Inner validation chose B3c-R as the competitor at all four outer wells. \mRML{} had lower band RMSE only at F03-4, by 1.9\%. At F02-1 and F03-2 it was 0.8\% and 0.02\% worse, and at F06-1 it was 7.0\% worse. Its macro band RMSE was 1.272\,p.u., against 1.256\,p.u.\ for B3c-R. Macro coverage was 0.524 for the 80\% intervals and 0.609 for the 90\% intervals, far below the lower limits of 0.75 and 0.85. At F03-2 and F03-4 the 80\% and 90\% intervals covered 0.75 and 0.80 of the samples, just below and well below nominal. At F02-1 and F06-1 they covered 0.22--0.38 and 0.33--0.50. At these two wells most of the error lay below 6\,Hz: the low-band RMSE was 4.31 and 3.64\,p.u., out of a total RMSE of 4.56 and 3.82\,p.u., while the mean predicted standard deviation was 1.05 and 1.27\,p.u. Seed by seed (three-member ensembles), \mRML{} beat B3c-R at one to three of the four wells. The macro band RMSE of each method varied between seeds by up to 0.13\,p.u.\ (\mRML: 1.28--1.41\,p.u.; B3c-R: 1.29--1.41\,p.u.), eight times the gap between the combined ensembles. The competitor was not changed after the test wells were scored, and the intervals were not widened. Under this protocol, training on the SMC bank gave no band-RMSE gain over the best point tie on F3, and its predictive intervals were much too narrow. We make no claim of improvement on field data and no claim of calibrated uncertainty. + +\begin{table}[t] +\centering +\caption{Gate G-C on F3 (label $\mathrm{PHIE}_{\mathrm{DT}}$, marker-calibrated reference, 600--1100\,ms, $\sigma_a = 7$\,ms, 15-member ensemble). Competitor: the point tie chosen by inner validation. Ratio: band RMSE of \mRML{} divided by that of the competitor; at F03-2 it is 1.0002. Coverage: fraction of the 126 time samples inside the central interval of \mRML; at F03-2 and F03-4 the same counts (94 and 101 samples) occur by coincidence.} +\label{tab:f3gc} +\small +\begin{tabular}{lccccc} +\toprule +Outer well & competitor & ratio & improved & cov$_{80}$ & cov$_{90}$ \\ +\midrule +F02-1 & B3c-R & 1.008 & no & 0.222 & 0.333 \\ +F03-2 & B3c-R & 1.000 & no & 0.746 & 0.802 \\ +F03-4 & B3c-R & 0.981 & yes & 0.746 & 0.802 \\ +F06-1 & B3c-R & 1.070 & no & 0.381 & 0.500 \\ +\midrule +Macro & & & 1/4 & 0.524 & 0.609 \\ +Required & & & $\ge 3/4$ & $[0.75, 0.85]$ & $[0.85, 0.95]$ \\ +\bottomrule +\end{tabular} +\end{table} + +\paragraph{Relation to Experiment~2.} +In the synthetic benchmark, \mRML{} beat the best point tie in all three full-anchor regimes, under a stricter rule (Section~\ref{sec:exp:p2r}). On F3 this direction held at one well of four. The field test does not show why, and we tested no explanation. Two features of F3 limit what it can detect. First, the synthetic gains required a correctly specified $\sigma_a$ (Table~\ref{tab:sigmaa}). On F3, $\sigma_a$ is not identified: 7\,ms comes from the marker--horizon spread (Section~\ref{sec:data:f3}), not from an independent measurement. Second, the reference is itself a point tie, the marker-calibrated sonic of B3b. Its registration error adds to the band RMSE of every method, which pulls ratios towards one, and it favours methods whose label errors resemble its own. Neither feature changes the verdict. + +\begin{table}[t] +\centering +\caption{F3 nested leave-one-well-out, all methods (label $\mathrm{PHIE}_{\mathrm{DT}}$, marker-calibrated reference, $\sigma_a = 7$\,ms, combined ensembles). Macro over four wells; RMSE in p.u. Coverage is descriptive. Last row: a prediction with no content above $f_c$, whose band RMSE equals the RMS of the band component of the reference; computed after the run, for scale only.} +\label{tab:f3all} +\small +\begin{tabular}{lcccccc} +\toprule +Method & band RMSE & band PCC & RMSE & PCC & cov$_{80}$ & cov$_{90}$ \\ +\midrule +B0a (trend) & 1.239 & $-0.13$ & \textbf{2.48} & 0.81 & -- & -- \\ +B0b ridge & 1.271 & \textbf{0.24} & 2.58 & \textbf{0.83} & -- & -- \\ +B0b random forest & 1.511 & $-0.03$ & 2.67 & 0.79 & -- & -- \\ +B0b gradient boosting & 1.537 & 0.01 & 2.68 & 0.78 & -- & -- \\ +B1 (impedance inversion) & 3.090 & $-0.02$ & 3.60 & 0.44 & -- & -- \\ +B2 (composite loss) & 1.252 & 0.19 & 3.09 & 0.53 & 0.38 & 0.44 \\ +\midrule +B3a & 1.348 & $-0.01$ & 3.13 & 0.44 & 0.47 & 0.57 \\ +B3b & 1.284 & 0.16 & 3.07 & 0.52 & 0.50 & 0.59 \\ +B3c & 1.282 & 0.20 & 3.14 & 0.45 & 0.48 & 0.58 \\ +B3c-R & 1.256 & 0.20 & 2.98 & 0.59 & 0.51 & 0.59 \\ +B3d & 1.266 & 0.16 & 3.05 & 0.52 & 0.51 & 0.60 \\ +\mPM & 1.275 & 0.15 & 3.00 & 0.57 & 0.47 & 0.57 \\ +\midrule +B4a & 1.232 & 0.18 & 3.24 & 0.39 & 0.49 & 0.58 \\ +B4b & \textbf{1.211} & 0.22 & 3.17 & 0.43 & 0.49 & 0.60 \\ +B4c & 1.237 & 0.22 & 3.12 & 0.57 & 0.42 & 0.52 \\ +B4d & 1.254 & 0.21 & 3.14 & 0.57 & 0.47 & 0.58 \\ +\midrule +M1 & 1.286 & 0.13 & 3.14 & 0.49 & 0.50 & 0.58 \\ +\mRML & 1.272 & 0.18 & 3.12 & 0.49 & \textbf{0.52} & \textbf{0.61} \\ +\midrule +No band content & 1.224 & -- & -- & -- & -- & -- \\ +\bottomrule +\end{tabular} +\end{table} + +\paragraph{All methods.} +Table~\ref{tab:f3all} lists every method under the nested design. B0a, B0b and B1 use the code of Table~\ref{tab:p1} and reproduce its values. The networks have higher total RMSE than in Table~\ref{tab:p1} (B3b: 3.07 against 2.82\,p.u.); here each model is trained on two wells rather than three, and its budget is chosen by inner validation. Only B4b had a lower macro band RMSE than a prediction with no seismic-band content (1.211 against 1.224\,p.u.). B0a, which has almost no band content, came within 1.3\% of that value, and every point tie, \mPM{} and \mRML{} lay above it. Band PCC did not exceed 0.22 for any network. On F3 the networks therefore predicted little of the seismic-band variation of the label, and G-C compared methods whose band errors were nearly the same size: without B3a, the 13 networks span 1.211--1.286\,p.u. The ranking also differs from the synthetic experiments. All four anchor-free losses, B4a--B4d, had lower macro band RMSE than every point tie, \mPM{} and \mRML, by up to 0.06\,p.u. Every probabilistic method under-covered. Macro coverage was 0.38--0.52 for the 80\% intervals and 0.44--0.61 for the 90\% intervals, and \mRML{} had the highest values of both. + +\paragraph{Same posterior, $\sigma_a$ and scoring reference.} +The protocol prescribes four further comparisons. None can replace a G-C condition, and none was used to choose a result. Table~\ref{tab:f3sens} gives the per-well ratios. In no row did the coverage condition hold. +(a) Against \mPM, which is trained on the mean of the same SMC posterior, \mRML{} had lower band RMSE at two wells (F02-1 and F03-4) and higher band RMSE at F03-2, by 9.3\%. Its macro band RMSE was 0.003\,p.u.\ lower. +(b) With $\sigma_a = 3.5$ or 14\,ms, B3c-R, \mPM{} and \mRML{} were registered and trained again, and \mRML{} was compared with B3c-R at the same $\sigma_a$. It had lower band RMSE at one and two of the four wells, and the wells that improved were not the same in the three arms. Macro coverage was 0.47--0.48 and 0.57--0.59. +(c) When the test well is scored against the OpendTect time--depth model instead of the marker-calibrated sonic, \mRML{} again improved only at F03-4. We also scored each method against 64 warps of the test well, drawn from an anchor-only posterior whose prior was fitted on the other three wells. The 5--95\% range of band RMSE over these references was 0.06--0.15\,p.u.\ wide for \mRML{} and for B3c-R, and the ranges of the two methods overlapped at F02-1, F03-2 and F03-4. At F06-1 they did not overlap (\mRML: 1.13--1.18\,p.u.; B3c-R: 1.04--1.11\,p.u.). +(d) Moving the band cutoff to 5 or 8\,Hz changed no ratio by more than 0.01. With the original PHIE label, \mRML{} improved at three wells, but coverage was lower (0.45 and 0.50). In the window the two labels differ by an RMS of 3.2\,p.u.\ at F02-1 and by less than 0.02\,p.u.\ at the other wells. F02-1 is a training well in three of the four outer folds, and the ratios at those three test wells moved by up to 0.13. This shows how much a ratio near one depends on the label of a single training well. The gate is defined on $\mathrm{PHIE}_{\mathrm{DT}}$, and this row does not change its result. + +\begin{table}[t] +\centering +\caption{F3 sensitivity of the G-C comparison (combined ensembles, descriptive). Ratio: band RMSE of \mRML{} divided by that of B3c-R, except in the second row (\mRML{} divided by \mPM). In the $\sigma_a$ rows both methods use the stated $\sigma_a$. Coverage is that of \mRML{} and does not depend on $f_c$ (--). At F03-2 with $f_c = 5$\,Hz the ratio is 1.00002.} +\label{tab:f3sens} +\small +\begin{tabular}{lccccccc} +\toprule +Variant & F02-1 & F03-2 & F03-4 & F06-1 & improved & cov$_{80}$ & cov$_{90}$ \\ +\midrule +Registered (Table~\ref{tab:f3gc}) & 1.008 & 1.000 & 0.981 & 1.070 & 1/4 & 0.52 & 0.61 \\ +\mRML{} / \mPM & 0.970 & 1.093 & 0.941 & 1.012 & 2/4 & -- & -- \\ +$\sigma_a = 3.5$\,ms & 1.010 & 0.939 & 1.003 & 1.034 & 1/4 & 0.48 & 0.59 \\ +$\sigma_a = 14$\,ms & 0.989 & 0.959 & 1.020 & 1.035 & 2/4 & 0.47 & 0.57 \\ +OpendTect reference & 1.022 & 1.018 & 0.974 & 1.071 & 1/4 & 0.50 & 0.60 \\ +$f_c = 5$\,Hz & 1.002 & 1.000 & 0.980 & 1.079 & 1/4 & -- & -- \\ +$f_c = 8$\,Hz & 1.014 & 0.997 & 0.979 & 1.060 & 2/4 & -- & -- \\ +PHIE label & 0.992 & 0.911 & 1.025 & 0.943 & 3/4 & 0.45 & 0.50 \\ +\bottomrule +\end{tabular} +\end{table} + +\paragraph{Posterior width and anchors.} +At $\sigma_a = 7$\,ms, $\sigpost$ of the SMC posterior ranged from 1.7 to 3.6\,ms over the 12 training wells of the six training pairs (median 2.8\,ms). Seven of the 12 values lay in the range of 2.5--3.4\,ms estimated before the run from all four wells. By the rule of Experiment~2 every pair is therefore wide ($\sigpost \ge 1.5$\,ms), the regime in which RML helped at $N = 16$. Each F3 model, however, is trained on two wells, and \mRML{} beat \mPM{} at two of the four outer wells (Table~\ref{tab:f3sens}). The width followed $\sigma_a$: it was 1.2--2.3\,ms at $\sigma_a = 3.5$\,ms and 1.8--6.2\,ms at 14\,ms. Without anchors it was 17--38\,ms at F02-1, F03-2 and F03-4, and 1.4--2.0\,ms at F06-1. The wavelet phase was poorly identified. The six phases estimated at $\sigma_a = 7$\,ms spread over an arc of 214$^\circ$. Over the phases evaluated for each pair, a window 90--120$^\circ$ wide, the summed log evidence of the two wells changed by only 1.0--5.0\,nats. + +Leave-one-anchor-out $z$-scores test the anchor prior on the outer wells. For each well, a linearized Gaussian process conditioned on the anchors alone, with hyperparameters fitted on the other three wells and pick noise $\sigma_a = 7$\,ms, predicts each anchor time from the remaining anchors of that well. Of 62 held-out anchors, 61 lay inside the 90\% interval. The mean $z^2$ was 0.21 (per well: 0.20, 0.01, 0.01 and 0.59), against an expected value of 1. The anchor prior is therefore too wide rather than too narrow, the same direction as the type-II estimate of $\sigma_a$ (0.4\,ms, Section~\ref{sec:method:prior}) and the opposite direction to the under-coverage of porosity. This check does not test the calibration of the SMC posterior, which also depends on the seismic likelihood and the wavelet phase. + +\paragraph{Ablations (descriptive).} +The protocol lists twelve variants of \mRML{} on $\mathrm{PHIE}_{\mathrm{DT}}$ (Table~\ref{tab:f3abl}). They were scored like every other method, but none enters G-C. M2-anchor-only trains on the 64 anchor-only warps of M1 with the same weights, so it reproduces M1 exactly. Nine of the other eleven variants had lower macro band RMSE than \mRML. The variants spanned 1.242--1.309\,p.u., about four times the gap of 0.016\,p.u.\ between \mRML{} and B3c-R. Bank size had no consistent effect: with 1, 8, 64 and 256 SMC labels, band RMSE was 1.273, 1.256, 1.272 and 1.257\,p.u. A convolutional backbone without the GRU lowered band RMSE by about 2\% for both \mRML{} (M2-TCN) and \mPM{} (B3d-Sa-TCN), so it did not change their order. Removing the anchors (M2-no-anchors) lowered band RMSE to 1.247\,p.u.\ but gave the highest total RMSE of the variants (3.23\,p.u.). M2-fixed-sigma was the only variant with coverage close to nominal (0.87 and 0.92), and this is not calibration. Its predicted standard deviation is fixed at the standard deviation of the training labels, which gave 2.9--4.3\,p.u.\ after mixing, against 1.0--2.1\,p.u.\ for \mRML. Its 80\% intervals covered every sample at F03-2 and F03-4 and 0.74 and 0.73 of the samples at F02-1 and F06-1. The macro value is an average of these, not evidence of correct width. M2-LFM adds the low-pass mean label of the training wells as an input channel. It had the lowest total RMSE of any network (2.62\,p.u., against 2.48\,p.u.\ for B0a) and the highest band RMSE of the variants (1.309\,p.u.). Its gain lies below $f_c$, where the gate does not score. + +\begin{table}[t] +\centering +\caption{Ablations of \mRML{} on F3 (label $\mathrm{PHIE}_{\mathrm{DT}}$, marker-calibrated reference, $\sigma_a = 7$\,ms, combined ensembles; descriptive). Macro over four wells; RMSE in p.u. M2-anchor-only is identical to M1 by construction.} +\label{tab:f3abl} +\small +\begin{tabular}{l>{\raggedright\arraybackslash}p{6.4cm}cccc} +\toprule +Variant & change from \mRML & band RMSE & RMSE & cov$_{80}$ & cov$_{90}$ \\ +\midrule +\mRML & registered method: 64 SMC labels, CNN--GRU backbone & 1.272 & 3.12 & 0.52 & 0.61 \\ +\midrule +M2-anchor-only & 64 anchor-only warps (= M1) & 1.286 & 3.14 & 0.50 & 0.58 \\ +M2-no-anchors & no anchor conditioning; prior hyperparameters at the pre-declared medians & 1.247 & 3.23 & 0.48 & 0.56 \\ +M2-bulk & sonic integration plus a constant shift, resampled by the seismic likelihood & 1.251 & 3.16 & 0.49 & 0.58 \\ +M2-lambda1 & $\lambda = 1$ instead of $1/\tau_c$ & 1.257 & 3.09 & 0.52 & 0.62 \\ +M2-S1 & 1 SMC label & 1.273 & 3.08 & 0.48 & 0.57 \\ +M2-S8 & 8 SMC labels & 1.256 & 3.11 & 0.48 & 0.59 \\ +M2-S256 & 256 SMC labels & 1.257 & 3.10 & 0.50 & 0.58 \\ +M2-fixed-sigma & $\sigma$ fixed at the training-label standard deviation & 1.242 & 3.08 & 0.87 & 0.92 \\ +M2-legacy-loss & composite loss of B2 on the bank mean added & 1.243 & 3.11 & 0.41 & 0.49 \\ +M2-TCN & four dilated convolutions, no GRU & 1.245 & 3.10 & 0.38 & 0.48 \\ +B3d-Sa-TCN & \mPM{} with the M2-TCN backbone & 1.250 & 3.13 & 0.40 & 0.49 \\ +M2-LFM & low-pass mean training label as an extra input & 1.309 & 2.62 & 0.40 & 0.50 \\ +\bottomrule +\end{tabular} +\end{table} + +\paragraph{Predicted volume (descriptive).} +A deployment ensemble of \mRML{} predicted all 649 interior inlines of the survey (Fig.~\ref{fig:f3vol}). It has 20 members: four three-well training sets $\times$ five seeds. The map shows sonic-derived porosity and its ensemble standard deviation. Away from the wells there is no ground truth, and three of the four training sets include any given well, so the prediction at a well is not blind. The same kind of ensemble under-covered at the outer wells, so its standard deviation is not a calibrated error bar. Over the $649 \times 949$ interior traces and the 600--1100\,ms window, the median of the predicted mean was 29.6\,p.u.\ (5--95\% of samples: 27.9--31.5\,p.u.). The median standard deviation was 1.3\,p.u.\ (5--95\%: 0.8--2.5\,p.u.). It was larger above 700\,ms (median 2.0\,p.u.) than below (1.2\,p.u.). Even the median standard deviation is less than half the total RMSE of \mRML{} at the outer wells (3.12\,p.u.). + +\begin{figure}[t] +\centering +\includegraphics[width=\linewidth]{f3_volume.pdf} +\caption{Descriptive prediction of sonic-derived porosity ($\mathrm{PHIE}_{\mathrm{DT}}$) on F3 inline 442, through F03-4 (dashed line): (a) mean and (b) standard deviation of the 20-member \mRML{} deployment ensemble. Colour limits: 1st--99th percentile of the section for (a), 0 to the 99th percentile for (b). Three of the four training sets include F03-4, so the prediction at the well is not blind. Intervals from this kind of ensemble under-covered at the outer wells (Table~\ref{tab:f3gc}).} +\label{fig:f3vol} +\end{figure} + +\paragraph{Execution.} +The run stopped once, after 132 of 649 volume inlines, when the operating system refused to replace a progress-display file. By then the gate had been computed. Only volume inference was resumed, with the locked code and models. Registration, training and scoring were not rerun, and the 132 inlines written before the stop were verified to be unchanged. + +\subsection{Second field dataset} +\label{sec:exp:volve} + +\todoblock{Volve results (gate G-D): same nested protocol, porosity from density--neutron (independent of sonic), comparison of \mPM{} and \mRML{} with the best point tie. If Volve is cut, delete this subsection and every reference to it.} diff --git a/paper/sections/07_discussion.tex b/paper/sections/07_discussion.tex new file mode 100644 index 0000000..4a1d6eb --- /dev/null +++ b/paper/sections/07_discussion.tex @@ -0,0 +1,31 @@ +\section{Discussion} +\label{sec:discussion} + +\paragraph{What the synthetic experiments show.} +The two experiments separate two questions that are easy to conflate. The first is whether the tie posterior is informative. The second is whether training on it helps. In Experiment~1 the posterior was not informative: 64 anchor-conditioned samples reweighted by tie likelihoods stayed as wide as the anchors allowed. Labels drawn from it were no better than a good correlation-based point tie. Once the posterior contracted (SMC, Experiment~2), labels at its mean beat every point tie in all three full-anchor regimes, and a bank of its samples gained further when the posterior was wide. Better registration of the training labels came first. Marginalizing over what remained then added a smaller, width-dependent gain. Neither result says that marginalization rescues a poor posterior. Experiment~1 is direct evidence that it does not. + +\paragraph{When to use a bank rather than the posterior mean.} +When the posterior is narrow ($\sigpost < 1.5$\,ms), RML and posterior-mean labels are equivalent within 1\% on average. RML costs little there, but it also brings no benefit. When the posterior is wide, because of low SNR, sparse anchors or strong drift, RML helped in every wide cell at $N = 16$. The size of the gain follows the posterior width. The largest gain came with sparse anchors (R10tb), where the posterior was also overconfident. The bank is cheap: 64 labels per window add little to training cost. A practical rule is therefore to train with the bank whenever the tie posterior is wider than about 1.5\,ms. On real data this width cannot be checked against a true warp. It depends on $\sigma_a$ (next paragraph). + +\paragraph{The anchor uncertainty is the main risk.} +Every positive result in Experiment~2 assumes that $\sigma_a$ is known. Halving or doubling it removed the H2a advantage in every cell, and it miscalibrated the posterior in both directions. On F3 the time--depth markers are horizon-tie picks on the same seismic. A type-II estimate treats them as exact (0.4\,ms), while the marker--horizon spread suggests 7\,ms. These two values place F3 at opposite ends of the $\sigpost$ axis: about 0.6\,ms (narrow, like R10) or 2.5--3.4\,ms (wide, close to Rm5). The synthetic results therefore do not predict the F3 outcome. Independent check shots, or anchors from a second source (for example, horizons picked on a different volume), would be needed to pin down $\sigma_a$. On F3 we kept the registered 7\,ms, at which $\sigpost$ was 1.7--3.6\,ms, and ran arms at 3.5 and 14\,ms (Table~\ref{tab:f3sens}). \mRML{} beat the selected point tie at one, one and two of the four wells, and coverage failed in all three arms. The field data did not discriminate between these values, and none of them made the result positive. + +\paragraph{Why the RML gain is not explained by the theory.} +Proposition~\ref{prop:blur} bounds what a bank can recover from a Gaussian-blurred posterior mean. In 7 of 8 wide cells, RML gained more than that bound allows. The extra gain is real in the sense that it passed the pre-registered rule, but its cause is open. Label augmentation, which regularizes a network trained on few wells, and bias of the posterior mean under multimodality are both plausible. Separating them needs an experiment in which the bank is replaced by random perturbations of matched size. We did not run it. + +\paragraph{Limitations.} +\begin{itemize} + \item \textbf{Labels on F3 are sonic.} At three of four wells, the F3 porosity label is an exact linear function of DT. Learning it from seismic is learning a sonic-derived quantity, and the label and the time axis share a source, which violates (A1). The second field dataset is meant to address this. \todo{Volve: porosity from density--neutron.} + \item \textbf{A trend is the strongest F3 baseline.} No learned model beat B0a in total RMSE on F3, either in the baseline run or under the nested design (Tables~\ref{tab:p1} and~\ref{tab:f3all}). Under the nested design only B4b had a lower band RMSE than a prediction with no seismic-band content, and no network had a band PCC above 0.22. With two or three training wells, the networks learned little of the seismic-band variation of the label. + \item \textbf{Strong drift.} At $c = 2$ the SMC posterior was multimodal and its mean was unstable between runs. These cells are reported but are not evidence. + \item \textbf{Untested stresses.} The bulk-offset prior $\sigma_b$ was not varied. Rock-physics misspecification between training and test areas was not tested. The anchor-free baselines B4a--B4d were not rerun in Experiment~2. + \item \textbf{Monte Carlo variability.} At low SNR the SMC run-to-run stability criterion failed in one of four development cells at $c = 1$, mainly through the phase estimate. This variability is small relative to $\sigpost$, but it was not removed. + \item \textbf{Uncertainty quantification.} Seed ensembles under-covered for every method, and more so for better labels. On F3 every probabilistic method under-covered as well (macro 80\% coverage 0.38--0.52). Propagating the tie posterior to predictive uncertainty at a new well needs a different mechanism, for example predicting in depth through the warp posterior. We did not attempt this. + \item \textbf{The tempering $\lambda$.} $\lambda = 1/\tau_c$ is a heuristic fixed in advance. We did not compare it with alternatives and make no claim about it. + \item \textbf{One backbone.} All learned methods share one CNN--GRU; only two F3 ablations used a second, purely convolutional backbone (Table~\ref{tab:f3abl}). Assumption (B) of Proposition~\ref{prop:ident} holds only approximately for it. +\end{itemize} + +\paragraph{The F3 field test.} +On the four F3 wells the direction found in Experiment~2 was not reproduced. \mRML{} beat the selected point tie at one well of four, and its intervals under-covered badly (Section~\ref{sec:exp:f3}). Three features of the F3 results bear on how to read this failure. We did not test any of them as an explanation. First, the posterior was wide by the rule of Experiment~2 ($\sigpost$ of 1.7--3.6\,ms), but each model was trained on two wells, and the networks predicted little of the seismic band: only B4b had a lower band RMSE than a prediction with no band content. Second, the difference being tested was small compared with other sources of variation. The macro gap between \mRML{} and B3c-R was 0.016\,p.u. Between seeds, the macro band RMSE of each method varied by up to 0.13\,p.u. The ablations of \mRML{} spanned 0.07\,p.u., and plausible alternative scoring references moved the band RMSE of a method by up to 0.15\,p.u. Third, $\sigma_a$ was not identified. The arms at 3.5 and 14\,ms did not change the outcome, and the leave-one-anchor-out check found the anchor prior at 7\,ms too wide (mean $z^2$ of 0.21), the same direction as the type-II estimate. Two contrasts with the synthetic experiments point the same way. Without anchors, band RMSE nearly doubled in the synthetic test of H4 but fell slightly on F3 (1.247 against 1.272\,p.u.). The shift-bank losses B4a and B4b, 38--53\% worse than B3b in Experiment~1, had lower band RMSE than every point tie on F3. Both contrasts would be expected if the F3 band score were insensitive to the timing of the labels, but we did not test this. A field test that can separate methods whose band errors differ by about 1\% needs more wells, a scoring reference that does not depend on the tie, or both. The predicted volume shows where the ensemble members disagree. Given the under-coverage at the outer wells, its standard deviation is not an error bar. + +\todoblock{Discussion of Volve results (gate G-D): whether the direction holds with a label that does not depend on sonic, and how this changes the reading of the F3 failure. Write this paragraph whatever the outcome, including a failure of G-D.} diff --git a/paper/sections/08_conclusion.tex b/paper/sections/08_conclusion.tex new file mode 100644 index 0000000..e1d79ff --- /dev/null +++ b/paper/sections/08_conclusion.tex @@ -0,0 +1,13 @@ +\section{Conclusions} +\label{sec:conclusion} + +A well tie is an uncertain estimate, yet learning workflows treat it as exact. Under an independence assumption, training with misregistered labels convolves the optimal predictor with the distribution of the timing error, and a variance-matching loss cannot undo this. A controlled experiment matched the predicted transfer function to within 1\% for errors up to 16\,ms. Without time anchors, a shared network and its label alignment can shift together without changing the loss, so alignment losses alone do not fix absolute timing. With anchors, the tie posterior can be used directly in training. On a synthetic benchmark calibrated to F3, our first pre-registered test of this idea failed because the posterior was not informative. In the second test, with a sequential Monte Carlo tie posterior, labels at its mean beat the best point tie by 8--22\% in seismic-band RMSE. RML on its samples improved further when the posterior was wide. Both gains required a correctly specified anchor uncertainty. + +On the four F3 wells, a pre-registered nested leave-one-well-out test failed. RML beat the selected point tie at one well of four, and its predictive intervals under-covered. With two training wells per model, the networks predicted little of the seismic band, and the differences between methods were smaller than the variation between seeds. The synthetic gains are therefore not confirmed on field data. +\todo{One or two sentences on Volve (gate G-D), in either direction, and the final take-home statement.} + +\paragraph{Data and code availability.} +The F3 Netherlands data are publicly available from dGB Earth Sciences under a CC BY-SA 3.0 licence. The Volve data are available from Equinor under a CC BY-NC-SA 4.0 licence. The code, locked protocols, synthetic generator configurations and the scripts that produce every table and figure are available at \todo{repository URL and archived DOI}. + +\paragraph{Acknowledgements.} +\todo{Acknowledgements and funding.} diff --git a/paper/sections/A_proofs.tex b/paper/sections/A_proofs.tex new file mode 100644 index 0000000..e6edddc --- /dev/null +++ b/paper/sections/A_proofs.tex @@ -0,0 +1,51 @@ +\section{Proofs} +\label{app:proofs} + +\subsection{Proposition~\ref{prop:blur}} +By (A1), $\E[y(t+\delta(t))\mid X, \delta(t) = d] = \E[y(t+d)\mid X] = m(t+d)$. Taking the expectation over $\delta(t) \sim p_t$, which is independent of $X$, and exchanging the order of integration (Fubini, using (A2)) gives $\hat y^\star(t) = \int p_t(d)\, m(t+d)\dd d$. If $p_t \equiv p$, the Fourier transform of $m(\cdot + d)$ is $e^{i2\pi f d}\hat m(f)$, so $\hat y^\star$ has transform $P(f)\hat m(f)$ with $P(f) = \E e^{i2\pi f\delta}$. For $\delta \sim \N(\mu_\delta, \sigma^2)$, $P$ is the Gaussian characteristic function evaluated at $2\pi f$. \hfill$\square$ + +If the marginal distribution changes slowly with $t$ (for example, drift that grows with depth), $\hat y^\star$ is a time-varying filter that is locally $P$ with $\sigma(t)$. + +\subsection{Corollary~\ref{cor:band}} +Let $e = y - m$. Since $\E[e(t)\mid X] = 0$ and $m(t')$ is a function of $X$, $\Cov(e(t), m(t')) = 0$ for all $t, t'$. Hence $S_{ym} = S_m$ and $S_y = S_m + S_e$. The band operator $B$ commutes with the filter $P$. Because $\delta$ is real, $P(-f) = P(f)^*$. Therefore +\begin{equation*} +\Var \hat y_b = \int_{|f|\ge f_c} |P|^2 S_m \dd f, \qquad \Cov(\hat y_b, y_b) = \int_{|f|\ge f_c} \operatorname{Re}P\, S_m \dd f . +\end{equation*} +With $\langle\cdot\rangle$ the average weighted by $S_{m_b}$, +\begin{equation*} +\frac{\sd\hat y_b}{\sd y_b} = \sqrt{\langle|P|^2\rangle}\,\frac{\sd m_b}{\sd y_b} \le \sqrt{\langle|P|^2\rangle} \le \sup_{|f|\ge f_c}|P(f)|, +\qquad +\PCC_b(\hat y^\star) = \frac{\langle\operatorname{Re}P\rangle}{\sqrt{\langle|P|^2\rangle}}\,\frac{\sd m_b}{\sd y_b}, +\end{equation*} +and $\PCC_b(m) = \sd m_b/\sd y_b \le 1$ because $\Cov(m_b, y_b) = \Var m_b$. By Cauchy--Schwarz, $\kappa(P) \le \langle|P|\rangle/\sqrt{\langle|P|^2\rangle} \le 1$, with equality if and only if $P$ is a positive constant on the support of $S_{m_b}$. At each frequency with $P(f) \ne 0$ the coherence is $|S_{\hat y y}|^2/(S_{\hat y}S_y) = S_m/S_y$, which does not depend on $P$. If $\mu_\delta \ne 0$, $\operatorname{Re}P = e^{-2\pi^2\sigma^2 f^2}\cos(2\pi f\mu_\delta)$, which lowers $\kappa$ further. \hfill$\square$ + +\subsection{Corollary~\ref{cor:var}} +Moments are averaged over $t$ in the window, and $h$ ranges over functions of $X$ with finite variance. Since $\hat y^\star = \E[\tilde y\mid X]$, $\E\|h - \tilde y\|^2 = \E\|h - \hat y^\star\|^2 + \E\|\hat y^\star - \tilde y\|^2$. Fix $\E h$ and $\Var h = v$. Then $\E\|h - \hat y^\star\|^2 = (\E h - \E\hat y^\star)^2 + v + \Var\hat y^\star - 2\Cov(h, \hat y^\star)$, which is smallest when the covariance is largest. By Cauchy--Schwarz, $\Cov(h, \hat y^\star) \le \sqrt{v\Var\hat y^\star}$, with equality if and only if $h - \E h = a(\hat y^\star - \E\hat y^\star)$ with $a = \sqrt{v/\Var\hat y^\star}$. Optimizing over $(\E h, v)$ then only selects $a$ and a constant. \hfill$\square$ + +For $a > 0$, $h^\star$ has the same PCC and band PCC as $\hat y^\star$, and its in-band spectrum is $a^2|P|^2 S_m$. The statement holds at the population level for a sufficiently rich model class. + +\subsection{Proposition~\ref{prop:ident}} +Since $t_{u + \beta e_b}(z) = t_u(z) + \beta$, we have $z_{u+\beta e_b}(t) = z_u(t - \beta)$ and hence $y^{u + \beta e_b} = T_\beta y^u$. By (B), $\mu_{\theta'} = T_\beta\mu_\theta$ and $\sigma_{\theta'} = T_\beta\sigma_\theta$. The Gaussian log-likelihood on a window $I$ is $\sum_{i\in I}\log\N(y(t_i - \beta); \mu(t_i-\beta), \sigma^2(t_i-\beta))$, which is the log-likelihood on the window $I - \beta$. Summed over windows that tile the trace, the two objectives differ only at edge samples. The log-sum-exp of RML preserves this invariance, because every bank member is shifted by the same amount. The prior on $g$ is unchanged, because $g$ is unchanged. This proves (a). Parts (b) and (c) follow by direct computation from $t_{u+\beta e_b}(z_{wk}) = t_{u_w}(z_{wk}) + \beta$. The prior adds $-\sum_w (b_w + \beta)^2/(2\sigma_b^2)$, with curvature $N/\sigma_b^2$. The anchors add $-\sum_{w,k}(t_{wk} - t_{u_w}(z_{wk}) - \beta)^2/(2\sigma_a^2)$, with curvature $\sum_w K_w/\sigma_a^2$. The expression for $\sd(\beta)$ is the inverse square root of the total curvature, that is, a quadratic approximation along the ridge. \hfill$\square$ + +\subsection{Lemmas~\ref{lem:s1}--\ref{lem:sdtw}} + +\paragraph{Lemma~\ref{lem:s1}.} If all $\ell_s = \ell$, then $\log\sum_s\pi_s e^{\lambda\ell} = \lambda\ell$. \hfill$\square$ + +\paragraph{Lemma~\ref{lem:sandwich}.} Let $\Lambda(\lambda) = \log\E_\pi e^{\lambda\ell} = \lambda M(\lambda)$, and let $r_\lambda \propto \pi e^{\lambda\ell}$ be the tilted distribution. Then $\Lambda' = \E_{r_\lambda}\ell$, and $\lambda\Lambda' - \Lambda = \E_{r_\lambda}[\lambda\ell - \Lambda] = \mathrm{KL}(r_\lambda\|\pi)$. Hence $M'(\lambda) = (\lambda\Lambda' - \Lambda)/\lambda^2 = \mathrm{KL}(r_\lambda\|\pi)/\lambda^2 \ge 0$. As $\lambda \to 0$, $\Lambda(\lambda) = \lambda\E_\pi\ell + O(\lambda^2)$. As $\lambda \to \infty$, $\Lambda(\lambda)/\lambda \to \max_s\ell_s$. Monotonicity gives the two inequalities. For uniform $\pi$, $\E_\pi e^{\lambda\ell} \ge e^{\lambda\max\ell}/S$, which gives the gap bound. The bound is attained in the limit where every $\ell_s$ except the largest tends to $-\infty$. \hfill$\square$ + +\paragraph{Lemma~\ref{lem:grad}.} Differentiating $-\frac{1}{\lambda n}\log\sum_s\pi_s e^{\lambda\ell_s}$ with respect to $\theta$ gives +\begin{equation*} +-\frac{1}{\lambda n}\sum_s \frac{\pi_s e^{\lambda\ell_s}}{\sum_{s'}\pi_{s'}e^{\lambda\ell_{s'}}}\,\lambda\nabla_\theta\ell_s . \tag*{$\square$} +\end{equation*} + +\paragraph{Lemma~\ref{lem:shift}.} With the stated bank and uniform $\pi$, $\RML_\infty = -\frac1n\max_k \ell_k$, where $\ell_k$ is the window log-likelihood of the label shifted by $k$ samples. This is the hard-min over shifts of the Gaussian negative log-likelihood. The finite-$\lambda$ case is the corresponding soft minimum. \hfill$\square$ + +\paragraph{Lemma~\ref{lem:sdtw}.} By definition, +\begin{equation*} +\mathrm{sDTW}_\gamma(D) = -\gamma\log\sum_{A\in\mathcal P}e^{-\langle A,D\rangle_w/\gamma}. +\end{equation*} +Substituting $\ell_A = -\frac12\langle A,D\rangle_w$, $\pi_A = |\mathcal P|^{-1}$ and $\lambda = 2/\gamma$ into \eqref{eq:rml} gives +\begin{equation*} +\RML_{2/\gamma} = -\frac{\gamma}{2n}\log\sum_{A}|\mathcal P|^{-1}e^{-\langle A,D\rangle_w/\gamma} = \frac{\mathrm{sDTW}_\gamma(D)}{2n} + \frac{\gamma}{2n}\log|\mathcal P| . +\end{equation*} +With symmetric steps, every path has total weight $2n$, and on the diagonal path $\langle A, D\rangle_w = 2\sum_i D_{ii}$, so $\ell_A = \sum_i\log\N(y_i;\mu_i,\sigma_i^2)$. \hfill$\square$ diff --git a/scripts/22_paper_figures.py b/scripts/22_paper_figures.py new file mode 100644 index 0000000..39114ed --- /dev/null +++ b/scripts/22_paper_figures.py @@ -0,0 +1,302 @@ +"""Journal-style figures for the manuscript (paper/figures/*.pdf), drawn from the locked summaries only. + + python scripts/22_paper_figures.py [--only td_drift,h1,p2_phase,h2b,p2r_grid,f3_volume] + +Reads: F3 wells (TD QC), outputs/p2/h1/, outputs/p2/summary/main/cells.csv, outputs/p2r/summary/{h2b,band_rmse}.csv, +outputs/p3/volume/{metadata.json,mean.npy,sigma.npy}, outputs/f3_wells.npz (well inline/crossline). +No titles or verdicts inside the figures (captions carry them); Computer Modern text to match the manuscript; +palette of ml_porosity.eval.figstyle (validated, colour-blind safe) on a white surface. +""" + +from __future__ import annotations + +import argparse +import importlib.util + +import matplotlib + +matplotlib.use("Agg") +import matplotlib as mpl +import matplotlib.pyplot as plt +import numpy as np +import pandas as pd +from matplotlib.colors import LinearSegmentedColormap, Normalize +from matplotlib.lines import Line2D +from matplotlib.patches import Rectangle + +from ml_porosity.eval import figstyle as fs +from ml_porosity.paths import REPO_ROOT, outputs_dir + +FIG = REPO_ROOT / "paper" / "figures" +WIDTH = 6.3 # in; \textwidth of the manuscript (A4, 2.5 cm margins) +WHITE = "#ffffff" +SEQ_BLUE = LinearSegmentedColormap.from_list("seq_blue", ["#f0f5fc", "#86b6ef", "#2a78d6", "#104281"]) +RAMP4 = ["#86b6ef", "#5598e7", "#256abf", "#104281"] # ordinal ramp for σ (as in scripts/13) +REGIMES = ["R10", "R0", "Rm5", "R0h", "R10tb"] +METHODS = [("B3b", "B3b"), ("B3c", "B3c"), ("B3c-R", "B3c-R"), ("B3d", "B3d"), ("B3d-Sa", "B3d-Sa"), ("M2-Sa", "M2-Sa")] + + +def load_script(name: str): + spec = importlib.util.spec_from_file_location("s" + name[:2], REPO_ROOT / "scripts" / name) + mod = importlib.util.module_from_spec(spec) + spec.loader.exec_module(mod) + return mod + + +def style() -> None: + fs.apply() + mpl.rcParams.update({ + "figure.facecolor": WHITE, "axes.facecolor": WHITE, "savefig.facecolor": WHITE, + "font.family": "serif", "font.serif": ["cmr10"], "mathtext.fontset": "cm", "axes.unicode_minus": False, + "axes.formatter.use_mathtext": True, "font.size": 8, "axes.labelsize": 8, "xtick.labelsize": 7.5, + "ytick.labelsize": 7.5, "legend.fontsize": 7.5, "axes.titlesize": 8.5, "axes.titlelocation": "left", + "pdf.fonttype": 42, "lines.linewidth": 1.4, + }) + + +def panel(ax, letter: str) -> None: + ax.set_title(f"({letter})", loc="left", fontsize=8.5, color=fs.INK, pad=4) + + +def text_on(rgba) -> str: + return fs.INK if 0.2126 * rgba[0] + 0.7152 * rgba[1] + 0.0722 * rgba[2] > 0.55 else WHITE + + +def save(fig, name: str) -> None: + FIG.mkdir(parents=True, exist_ok=True) + fig.savefig(FIG / f"{name}.pdf", bbox_inches="tight", pad_inches=0.02) + plt.close(fig) + print("wrote", FIG / f"{name}.pdf") + + +# ---------------------------------------------------------------- Fig. TD drift (Section 3) +def td_drift() -> None: + from ml_porosity.data.las_io import F3_WELLS, load_td_source, load_well + from ml_porosity.data.tdr import TDR, legacy_sonic_tdr, misfit_at_anchors + + src = [("legacy", "Integrated DT", fs.ORANGE, "o"), ("wlt", "OpendTect TD model", fs.BLUE, "s"), + ("dt_model", "DT model", fs.AQUA, "^")] + fig, axes = plt.subplots(1, len(F3_WELLS), figsize=(WIDTH, 2.9), sharey=True, sharex=True) + for ax, name in zip(axes, F3_WELLS): + w = load_well(name) + cs = w.checkshot + tdrs = {"legacy": legacy_sonic_tdr(w.md, w.curve("DT")), + "wlt": TDR.from_pairs(load_td_source(name, "wlt"), drop_flat=True), + "dt_model": TDR.from_pairs(load_td_source(name, "dt_model"))} + ax.axhspan(600, 1100, color=fs.GRID, alpha=0.55, lw=0, zorder=0) + ax.axvline(0, color=fs.AXIS, lw=0.8, zorder=1) + for key, lab, col, mk in src: + ax.plot(misfit_at_anchors(tdrs[key], cs.md, cs.twt_ms), cs.twt_ms, marker=mk, ms=3, lw=1.1, color=col, + label=lab, zorder=3) + ax.set_title(name, loc="center", fontsize=8, color=fs.INK) + ax.set_xlabel("offset from marker (ms)") + axes[0].set_ylabel("marker TWT (ms)") + axes[0].set_ylim(1300, 400) + fig.legend(*axes[0].get_legend_handles_labels(), loc="lower center", ncol=3, bbox_to_anchor=(0.5, -0.06)) + fig.tight_layout(rect=(0, 0.06, 1, 1), w_pad=0.6) + save(fig, "td_drift") + + +# ---------------------------------------------------------------- Fig. H1 (Section 4) +def h1() -> None: + s11, s12, s13 = load_script("11_run_d2.py"), load_script("12_h1_blur.py"), load_script("13_summarize_p2.py") + P = s11.load_protocol(check=True) + h = s13.h1_summary(P, s12) + f, tab = h["f"], h["table"] + fig, (ax, bx) = plt.subplots(1, 2, figsize=(WIDTH, 2.6), gridspec_kw={"width_ratios": [1.55, 1]}) + sig = [s for s in sorted(h["use"]) if s > 0] + for s, col in zip(sig, RAMP4): + th, H, u = np.array(h["theory"][s]), np.array(h["H"][s]), h["use"][s] + ax.plot(f, th, color=col, lw=0.9, ls="--") + ax.plot(f[u], H[u], color=col, lw=1.5, marker="o", ms=2.2) + left = s == max(sig) + i = int(u.sum()) // 2 if left else -1 + ax.annotate(rf"$\sigma = {s:g}$ ms", (f[u][i], H[u][i]), xytext=(7, 4) if left else (4, 0), textcoords="offset points", + va="center", ha="left", fontsize=7, color=fs.INK2, zorder=4, + bbox=dict(fc=WHITE, ec="none", pad=0.6, alpha=0.9)) + ax.axvspan(0, 6, color=fs.GRID, alpha=0.7, lw=0) + ax.set(xlim=(0, 60), ylim=(-0.1, 1.15), xlabel="frequency (Hz)", ylabel="transfer function") + ax.legend(handles=[Line2D([], [], color=fs.INK2, lw=1.5, marker="o", ms=2.2, label=r"estimated $\hat H_\sigma(f)$"), + Line2D([], [], color=fs.INK2, lw=0.9, ls="--", label=r"$e^{-2\pi^2\sigma^2 f^2}$")], + loc="upper right") + panel(ax, "a") + s = tab.index[tab.index > 0] + bx.axhspan(0.5, 2.0, color=fs.GRID, alpha=0.7, lw=0) + bx.axhline(1.0, color=fs.AXIS, lw=0.9) + bx.vlines(s, tab.loc[s, "r_lo"], tab.loc[s, "r_hi"], color=fs.BLUE, lw=1.4) + bx.plot(s, tab.loc[s, "r"], "o", color=fs.BLUE, ms=4.5) + for x, r, n in zip(s, tab.loc[s, "r"], tab.loc[s, "n_freq"]): + bx.annotate(f"{r:.3f}\n({n} freq.)", (x, r), xytext=(0, 7), textcoords="offset points", ha="center", + va="bottom", fontsize=6.5, color=fs.INK2) + bx.set_xscale("log", base=2) + bx.set_yscale("log", base=2) + bx.set_xticks(list(s), [f"{x:g}" for x in s]) + bx.set_yticks([0.5, 1, 2], ["0.5", "1", "2"]) + bx.minorticks_off() + bx.set(xlim=(3, 45), ylim=(0.4, 2.5), xlabel=r"$\sigma$ (ms)", ylabel=r"$r(\sigma)$") + panel(bx, "b") + fig.tight_layout(w_pad=1.5) + save(fig, "p2_h1") + + +# ---------------------------------------------------------------- Fig. Experiment 1 (Section 6.1) +def p2_phase() -> None: + cells = pd.read_csv(outputs_dir() / "p2" / "summary" / "main" / "cells.csv") + cs, Ns = sorted(cells.c.unique()), sorted(cells.n_train.unique()) + ix = cells.set_index(["c", "n_train"]) + fig, axes = plt.subplots(1, 2, figsize=(WIDTH, 0.75 + 0.62 * len(cs)), layout="constrained") + panels = [("ratio", fs.diverging_norm(0.8, 1.0, 1.2), fs.DIVERGING, "{:.3f}", "{:.2f}", [0.90, 1.0], "band RMSE ratio"), + ("dpcc", fs.diverging_norm(-0.1, 0.0, 0.1), fs.DIVERGING.reversed(), "{:+.3f}", "{:+.2f}", [0.0, 0.05], + "band PCC difference")] + for ax, (k, norm, cmap, fmt, fci, ticks, clabel), letter in zip(axes, panels, "ab"): + Z = ix[k].unstack("n_train").reindex(index=cs, columns=Ns).to_numpy() + im = ax.imshow(Z, cmap=cmap, norm=norm, origin="lower", aspect="auto") + for i, c in enumerate(cs): + for j, N in enumerate(Ns): + r = ix.loc[(c, N)] + col = text_on(cmap(norm(r[k]))) + ax.text(j, i + 0.2, fmt.format(r[k]), ha="center", va="center", fontsize=7.5, color=col) + ax.text(j, i - 0.12, f"[{fci.format(r[k + '_lo'])}, {fci.format(r[k + '_hi'])}]", ha="center", + va="center", fontsize=6, color=col) + if k == "ratio": + ax.text(j, i - 0.36, f"{r.best}, {'pass' if r.cell_pass else 'fail'}", ha="center", va="center", + fontsize=5.5, color=col) + ax.set_xticks(range(len(Ns)), [str(n) for n in Ns]) + ax.set_yticks(range(len(cs)), [f"{c:g}" for c in cs]) + ax.set(xlabel=r"training wells $N$", ylabel=r"drift factor $c$") + ax.grid(False) + for sp in ax.spines.values(): + sp.set_visible(False) + ax.tick_params(length=0) + if 1.0 in cs: + ax.add_patch(Rectangle((-0.5, cs.index(1.0) - 0.5), len(Ns), 1, fill=False, ec=fs.INK, lw=1.2)) + cb = fig.colorbar(im, ax=ax, shrink=0.9, extend="both", pad=0.02) + for t in ticks: + cb.ax.axhline(t, color=fs.INK, lw=0.9) + cb.set_label(clabel, color=fs.INK2) + cb.outline.set_visible(False) + panel(ax, letter) + save(fig, "p2_phase") + + +# ---------------------------------------------------------------- Fig. H2b (Section 6.3) +def h2b() -> None: + d = pd.read_csv(outputs_dir() / "p2r" / "summary" / "h2b.csv") + shapes = {0.0: "o", 1.0: "s", 2.0: "^"} + cols = {16: fs.BLUE, 4: fs.ORANGE} + fig, (ax, bx) = plt.subplots(1, 2, figsize=(WIDTH, 2.8)) + for (N, c), g in d.groupby(["n_train", "c"]): + kw = dict(marker=shapes[c], s=26, zorder=3) + kw |= dict(color=cols[N], lw=0) if N == 16 else dict(facecolor="none", edgecolor=cols[N], lw=1.0) + ax.errorbar(g.sigma_post_ms, g.ratio, yerr=[g.ratio - g.ratio_lo, g.ratio_hi - g.ratio], fmt="none", + ecolor=cols[N], elinewidth=0.7, alpha=0.6, zorder=2) + ax.scatter(g.sigma_post_ms, g.ratio, **kw) + bx.scatter(g["bound_1/B"], g.ratio, **kw) + ax.axvline(1.5, color=fs.INK2, lw=0.8, ls="--") + ax.text(1.55, 0.62, "1.5 ms", fontsize=7, color=fs.INK2) + ax.axhline(1.0, color=fs.AXIS, lw=0.9) + ax.set_xscale("log") + ax.set_xticks([0.3, 0.5, 1, 2, 5, 10], ["0.3", "0.5", "1", "2", "5", "10"]) + ax.minorticks_off() + ax.set(xlabel=r"posterior width $\sigma_{\mathrm{post}}$ (ms)", ylabel="band RMSE ratio, M2-Sa / B3d-Sa", + ylim=(0.6, 1.05)) + panel(ax, "a") + lo, hi = 0.6, 1.05 + bx.plot([lo, hi], [lo, hi], color=fs.AXIS, lw=0.9) + bx.text(0.74, 0.695, "ratio = bound", rotation=45, rotation_mode="anchor", fontsize=7, color=fs.INK2) + bx.set(xlim=(lo, hi), ylim=(lo, hi), aspect="equal", xlabel=r"deblurring bound $1/B(\sigma_{\mathrm{post}})$", + ylabel="band RMSE ratio, M2-Sa / B3d-Sa") + panel(bx, "b") + handles = [Line2D([], [], ls="", marker="o", color=fs.BLUE, mew=0, label=r"$N = 16$"), + Line2D([], [], ls="", marker="o", mfc="none", mec=fs.ORANGE, label=r"$N = 4$")] + handles += [Line2D([], [], ls="", marker=m, color=fs.INK2, mfc="none", label=rf"$c = {c:g}$") + for c, m in shapes.items()] + fig.legend(handles=handles, loc="lower center", ncol=5, bbox_to_anchor=(0.5, -0.04)) + fig.tight_layout(rect=(0, 0.06, 1, 1), w_pad=2.0) + save(fig, "p2r_h2b") + + +# ---------------------------------------------------------------- Fig. Experiment 2 overview (Section 6.3) +def p2r_grid() -> None: + d = pd.read_csv(outputs_dir() / "p2r" / "summary" / "band_rmse.csv") + d = d[d.setting.isin(REGIMES)] + cs = sorted(d.c.unique()) + cols = [(r, c) for r in REGIMES for c in cs] + vals = [] + for N in (4, 16): + t = d[d.n_train == N].set_index(["setting", "c"]) + vals.append(np.array([[t.loc[(r, c), m] / t.loc[(r, c), "Oracle"] for r, c in cols] for m, _ in METHODS])) + norm = Normalize(1.0, 2.0) # R10tb at c = 2 reaches 3.2; clipped so that 1.0-1.6 stays readable + fig, axes = plt.subplots(2, 1, figsize=(WIDTH, 4.3), layout="constrained") + for ax, V, N, letter in zip(axes, vals, (4, 16), "ab"): + im = ax.imshow(V, cmap=SEQ_BLUE, norm=norm, aspect="auto") + for i in range(V.shape[0]): + for j in range(V.shape[1]): + ax.text(j, i, f"{V[i, j]:.2f}", ha="center", va="center", fontsize=6, + color=text_on(SEQ_BLUE(norm(V[i, j])))) + ax.set_yticks(range(len(METHODS)), [lab for _, lab in METHODS]) + ax.set_xticks(range(len(cols)), [f"{c:g}" for _, c in cols]) + sec = ax.secondary_xaxis("top") + sec.set_xticks([len(cs) * k + (len(cs) - 1) / 2 for k in range(len(REGIMES))], REGIMES) + sec.tick_params(length=0, labelsize=7.5, labelcolor=fs.INK) + sec.spines["top"].set_visible(False) + for k in range(1, len(REGIMES)): + ax.axvline(len(cs) * k - 0.5, color=WHITE, lw=2.5) + ax.grid(False) + for sp in ax.spines.values(): + sp.set_visible(False) + ax.tick_params(length=0) + ax.set_xlabel(r"drift factor $c$") + ax.set_title(f"({letter}) $N = {N}$", loc="left", fontsize=8.5, color=fs.INK, pad=14) + cb = fig.colorbar(im, ax=axes, shrink=0.8, pad=0.01, extend="max") + cb.set_label("band RMSE / Oracle", color=fs.INK2) + cb.outline.set_visible(False) + save(fig, "p2r_grid") + + +# ---------------------------------------------------------------- Fig. F3 volume (Section 6.4) +def f3_volume(well: str = "F03-4") -> None: + import json + + root = outputs_dir() / "p3" / "volume" + meta = json.loads((root / "metadata.json").read_text(encoding="utf-8")) + il, xl, t = (np.asarray(meta[k], float) for k in ("ilines", "xlines", "times_ms")) + with np.load(outputs_dir() / "f3_wells.npz") as z: + w_il, w_xl = int(z[f"{well}/il"]), int(z[f"{well}/xl"]) + i = int(np.flatnonzero(il == w_il)[0]) + fields = [100 * np.asarray(np.load(root / f"{k}.npy", mmap_mode="r")[i]) for k in ("mean", "sigma")] # (xline, t), p.u. + dt = t[1] - t[0] + extent = [xl[0] - 0.5, xl[-1] + 0.5, t[-1] + dt / 2, t[0] - dt / 2] + fig, axes = plt.subplots(1, 2, figsize=(WIDTH, 2.5), sharey=True, layout="constrained") + specs = [("viridis", np.nanpercentile(fields[0], [1, 99]), "both", "mean (p.u.)"), + (SEQ_BLUE, (0.0, np.nanpercentile(fields[1], 99)), "max", "standard deviation (p.u.)")] + for ax, v, (cmap, (lo, hi), ext, lab), letter in zip(axes, fields, specs, "ab"): + cm = (mpl.colormaps[cmap] if isinstance(cmap, str) else cmap).with_extremes(bad=WHITE) + im = ax.imshow(v.T, cmap=cm, vmin=lo, vmax=hi, aspect="auto", interpolation="nearest", extent=extent) + ax.axvline(w_xl, color=fs.INK, lw=0.8, ls=(0, (4, 2))) + ax.text(w_xl, t[0] - dt, well, ha="center", va="bottom", fontsize=7, color=fs.INK) + ax.grid(False) + ax.set_xlabel(f"crossline (inline {w_il})") + panel(ax, letter) + cb = fig.colorbar(im, ax=ax, pad=0.01, extend=ext) + cb.set_label(lab, color=fs.INK2) + cb.outline.set_visible(False) + axes[0].set_ylabel("TWT (ms)") + save(fig, "f3_volume") + + +FIGURES = {"td_drift": td_drift, "h1": h1, "p2_phase": p2_phase, "h2b": h2b, "p2r_grid": p2r_grid, + "f3_volume": f3_volume} + + +def main() -> None: + ap = argparse.ArgumentParser() + ap.add_argument("--only", default="", help="comma-separated subset of " + ",".join(FIGURES)) + args = ap.parse_args() + style() + for k in (args.only.split(",") if args.only else FIGURES): + FIGURES[k]() + + +if __name__ == "__main__": + main()