Complete P4 Volve; pivot the manuscript to theory + benchmark

P4 (Volve field case). Add the deviated-well and Volve well builders
(ml_porosity/data/deviated.py, volve_wells.py), the ml_porosity/volve/
pipeline, scripts 23-25, the run_p4 drivers and tests. The protocol
configs/protocol_volve.yaml was locked at 2026-10-29T01:17:42Z before the
run (.sha256, .lock.json) and is committed here after the run. Gate G-D
failed: M2-Sa beats the selected B3 at 2/6 wells (lowo) and 3/6 (slot),
coverage90 is about 0.47, and no method has blind-well skill (R2 < 0).
A post hoc constant at the training-well mean beats every network, so
G-D had no power. The dropped P4x exploratory run is kept as a record
only (exploratory/, docs/research/p4-exploratory.md).

Applicability and Teapot Dome (exploratory, pre-declared). Scripts 26-29
and docs/research/applicability-*.md: F3 and Volve fail C1 and pass C2;
T3 power needs 5-18 blind wells with an exact reference; Teapot T0 and
pilot P-a failed, so Teapot is stopped. Raw Teapot data stay gitignored.

Manuscript (Pivot 1, level A). Reframe paper/ as a theory and synthetic
benchmark paper: Propositions 3-6, Corollaries 3-4, T4 coverage
(script 30) and the post hoc H2b bound check (script 31), with F3/Volve
moved to Appendix B. Correct two earlier claims: the Berkson and
classical bounds differ by 1.5-4.6x at the f^4-weighted band, and the
bank gain exceeds the registered classical bound (7/8 wide cells at
N = 16) but only 3/8 under the post hoc Berkson bound.

Docs. Sync plan, AGENTS.md, README, report.html, theory and technical
overview. The length pass for the venue is dropped by the user
(plan section 12 item 25); the length risk stays recorded as R9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 12:18:22 +00:00
parent 7da6b077b6
commit 0cfe202a8b
61 changed files with 7162 additions and 881 deletions

View File

@@ -1,4 +1,4 @@
\section{Theory: blur and identifiability}
\section{Theory}
\label{sec:theory}
\paragraph{Notation.}
@@ -19,7 +19,7 @@ P(f) = \E\big[e^{i2\pi f\delta}\big], \qquad \delta \sim \N(\mu_\delta, \sigma^2
\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.
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) says that the error is independent of the truth: the observed label at $t$ is the true label at $t + \delta(t)$, with $\delta$ independent of everything else. This is the classical structure of errors-in-variables models \citep{fuller1987measurement,carroll2006measurement}, applied to the time index rather than to the value of the label. It 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. Section~\ref{sec:theory:post} shows that a tie estimated from the well data can have the opposite structure, with the opposite effect.
\begin{corollary}[Seismic-band bounds]
\label{cor:band}
@@ -73,10 +73,6 @@ $\sigma$ (ms) & $r(\sigma)$ & 95\% CI & frequencies & band RMSE & band PCC & ban
\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
@@ -105,3 +101,133 @@ Seismic is observed on a fixed time axis, so a tie likelihood that compares the
\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}$.
\subsection{Labels from a tie: blur or sharpening}
\label{sec:theory:post}
Proposition~\ref{prop:blur} treats the registration error as independent of everything else. A tie estimated from the data at a training well need not have this property. Let $D$ denote all data at the well (seismic, logs and anchors), and let the network input $X$ be a function of $D$. Let $u^\star$ be the true warp, so that $y = y^{u^\star}$, and let $\hat u = \hat u(D)$ be a point tie with label $\tilde y = y^{\hat u}$. The misregistration can be written in either direction,
\begin{equation}
\tilde y(t) = y\big(t + \delta(t)\big),\ \ \delta(t) = t_{u^\star}\big(z_{\hat u}(t)\big) - t;
\qquad
y(t) = \tilde y\big(t + \varepsilon(t)\big),\ \ \varepsilon(t) = t_{\hat u}\big(z_{u^\star}(t)\big) - t .
\label{eq:twoerrors}
\end{equation}
Let $\tilde m(t) = \E[\tilde y(t)\mid X]$ be the optimal predictor of the point label ($\hat y^\star$ in Proposition~\ref{prop:blur}), and let $Q(f) = \E[e^{i2\pi f\varepsilon}]$.
\begin{proposition}[Two error structures]
\label{prop:tie}
Assume (A2) for $y$ and $\tilde y$.
\begin{enumerate}
\item[(a)] \emph{Classical error.} If $\delta(t)$ is independent of $y(\cdot)$ given $X$, with conditional distribution $p_t(\cdot\mid X)$, then
\begin{gather*}
\tilde m(t) = \int p_t(d\mid X)\, m(t+d)\dd d, \\
\Var\big(\tilde y(t)\mid X\big) = \int p_t(d\mid X)\Var\big(y(t+d)\mid X\big)\dd d + \Var_{p_t}\!\big[m(t+d)\big].
\end{gather*}
\item[(b)] \emph{Berkson error.} If $\varepsilon(t)$ is independent of $D$ given $X$, with conditional distribution $q_t(\cdot\mid X)$, then
\begin{gather*}
m(t) = \int q_t(e\mid X)\, \tilde m(t+e)\dd e, \\
\Var\big(y(t)\mid X\big) = \int q_t(e\mid X)\Var\big(\tilde y(t+e)\mid X\big)\dd e + \Var_{q_t}\!\big[\tilde m(t+e)\big].
\end{gather*}
\end{enumerate}
If $p_t$ and $q_t$ do not depend on $t$, then, averaged over the window and up to edge terms, the point label has the larger conditional variance under (a) and the smaller under (b). If they depend on neither $t$ nor $X$, then $\tilde m$ is $m$ filtered by $P$ under (a), and $m$ is $\tilde m$ filtered by $Q$ under (b). For zero-mean Gaussian errors with variance $\sigma^2$, the transfer from $m$ to $\tilde m$ is $e^{-2\pi^2\sigma^2 f^2}$ under (a) and $e^{+2\pi^2\sigma^2 f^2}$ under (b).
\end{proposition}
Structure (a) is the classical structure of measurement-error models, in which the error is independent of the true value. Structure (b) is the Berkson structure, in which the error is independent of the assigned value \citep{berkson1950two,carroll2006measurement}. Here the error lies in the time index of the label, and the two structures bias the learned predictor in opposite directions. Under (a) the point label blurs the optimal predictor and widens the learned variance. Under (b) it sharpens the predictor and narrows the variance. Structure (b) is the natural idealization for a tie computed as a posterior mean, $\hat u = \E[u^\star\mid D]$. Then $\E[u^\star - \hat u\mid D] = 0$ by construction, and in a linear-Gaussian model $u^\star - \hat u$ is independent of $D$. For the bulk offset $b$ in \eqref{eq:warp}, the time error equals the posterior error of $b$ and inherits this property; for the drift it does so approximately, when the posterior is narrow. A tie fitted in another way, for example by maximizing a synthetic--seismic correlation, can have either structure or neither. On synthetic data the two can be told apart: for the bulk offset, classical error means $\Cov(\hat b - b^\star, b^\star) = 0$, and Berkson error means $\Cov(b^\star - \hat b, \hat b) = 0$.
A bank of labels removes the dependence on a single tie when it represents the posterior correctly.
\begin{proposition}[Calibrated bank]
\label{prop:bank}
Call a bank $\{(u_s, \pi_s)\}$ calibrated if, for every integrable $G$, $\sum_s \pi_s G(u_s, D) = \E[G(u^\star, D)\mid D]$. For a calibrated bank:
\begin{enumerate}
\item[(a)] the mean label $\bar y = \sum_s \pi_s y^{u_s}$ satisfies $\bar y(t) = \E[y(t)\mid D]$ and $\E[\bar y(t)\mid X] = m(t)$;
\item[(b)] for every network $(\mu_\theta, \sigma_\theta)$ that depends on the data only through $X$, $\E\big[\sum_s \pi_s \ell_s\big] = \E[\ell^\star]$, where $\ell^\star$ is the window log-likelihood \eqref{eq:rml} of the label at the true warp.
\end{enumerate}
Hence the $\lambda \to 0$ limit of RML (Lemma~\ref{lem:sandwich}) has the population minimizer of training on the true labels, $\mu = m$ and $\sigma^2 = \Var(y\mid X)$, and MSE on the mean label has the population minimizer $\mu = m$.
\end{proposition}
Calibration is an idealization; it holds for an exact posterior sample as $S \to \infty$. Under it, marginalizing over the posterior removes the population bias of both structures. The mean warp does not share this property. \mPM{} trains on the label at the mean warp $\bar u$, not on the mean label. Expanding $y^{u}$ around $\bar u = \sum_s\pi_s u_s$,
\begin{equation*}
\bar y - y^{\bar u} = \tfrac12 \sum_s \pi_s\, (u_s - \bar u)^\top \nabla_u^2 y^{\bar u}\, (u_s - \bar u) + O\big(\|u_s - \bar u\|^3\big),
\end{equation*}
so the two labels agree to first order in the posterior spread. If the time error of the mean warp has structure (b), the population optimum of \mPM{} is sharpened by $1/Q$, while that of the mean label is exact.
\begin{corollary}[Two modes]
\label{cor:twomode}
Let the error ($\delta$ under (a), $\varepsilon$ under (b)) be constant over the window and equal to $\pm\Delta/2$ with probability $\frac12$ each, independently of $X$. Then $P(f) = Q(f) = \cos(\pi f\Delta)$, and under either structure the transfer from $m$ to $\tilde m$ is negative for $1/(2\Delta) < |f| < 3/(2\Delta)$: there the point label trains the network towards the wrong sign. A Gaussian error with the same variance $\Delta^2/4$ has $P(f) = e^{-\pi^2\Delta^2f^2/2} > 0$ at every frequency. The mean label of a calibrated bank has transfer 1. Under (a), a bank of the point label shifted by $\pm\Delta/2$ with equal weights has transfer $\cos^2(\pi f\Delta) \ge 0$.
\end{corollary}
The phase reversal is a property of multimodal errors that a Gaussian summary hides. If the two modes are one dominant period apart, $\Delta = 1/f_0$, the reversed band is $f_0/2 < |f| < 3f_0/2$. The F3 seismic, from which the D2 wavelet is estimated, peaks near 60\,Hz (Section~\ref{sec:data:f3}), which gives 30--90\,Hz. Cycle skipping produces errors of this kind, and at $c = 2$ the SMC posterior is multimodal (Section~\ref{sec:method:posterior}). In this example, a bank centred on the point label removes the reversal only by attenuating the band further.
\begin{remark}[$\lambda > 0$]
\label{rem:lambda}
Proposition~\ref{prop:bank} concerns the limit $\lambda \to 0$. Expanding the cumulant generating function in \eqref{eq:rml},
\begin{equation*}
\RML_\lambda = -\frac1n\Big[\sum_s \pi_s\ell_s + \frac\lambda2 \Var_\pi(\ell) + O(\lambda^2)\Big].
\end{equation*}
The second term rewards predictors that fit some bank members much better than others. For $\lambda > 0$ the responsibilities of Lemma~\ref{lem:grad} shift weight towards the members that agree with the current network, which amounts to an implicit re-registration, and the population minimizer is in general no longer $(m, \Var(y\mid X))$.
\end{remark}
\paragraph{How much can a bank gain?}
Because $\E[y - m\mid X] = 0$, every predictor $h$ that depends on the data only through $X$ satisfies
\begin{equation*}
\E|B(h - y)|^2 = \E|B(m - y)|^2 + \E|B(h - m)|^2 ,
\end{equation*}
so in population no method beats the oracle in band MSE. If a point-label method converges to $\tilde m$ and a bank method to $m$, the ratio of their band RMSEs is
\begin{equation}
\rho^\star = \Big(1 + \frac{\E|B(\tilde m - m)|^2}{\E|B(m - y)|^2}\Big)^{-1/2},
\label{eq:rhostar}
\end{equation}
and no method can improve on the point label by more than this factor. With errors that do not depend on $t$ or $X$, $\E|B(\tilde m - m)|^2 = \int_{|f|\ge f_c}|1 - P|^2 S_m\dd f$ under (a) and $\int_{|f|\ge f_c}|1 - Q|^2|Q|^{-2}S_m\dd f$ under (b). For Gaussian errors both integrands equal $(2\pi^2\sigma^2f^2)^2 S_m$ to leading order, so the population distortion is of fourth order in $\sigma$. Beyond leading order the integrand under (b) is larger by the factor $e^{4\pi^2\sigma^2f^2}$, so a Berkson error leaves room for a larger gain than a classical error of the same width. The factor grows quickly with frequency: for $\sigma = 2$\,ms it is 1.10 at 25\,Hz and 1.77 at 60\,Hz. The weight $f^4$ also moves the distortion to high frequencies. For the Oracle predictions of Section~\ref{sec:exp:p2r}, 71--73\% of the band power that is coherent with the label lies below 25\,Hz, but the median frequency of the leading-order distortion is 67--72\,Hz. There the integral under (b) is 1.5--1.7 times that under (a) at $\sigma = 1.5$\,ms, 2.1--2.6 times at 2\,ms and 3.3--4.6 times at 2.5\,ms. A bound computed for one structure therefore does not hold for the other. The bound $1/B_a(\sigpost)$ registered for Section~\ref{sec:exp:p2r} is $\rho^\star$ under (a) for Gaussian errors, with the Oracle network's predictions in place of $m$. Section~\ref{sec:exp:p2r} also evaluates $1/B_b$, the same estimate under (b).
\paragraph{Finite samples.}
The label error itself is of first order. For zero-mean errors with variance $\sigma^2$, $\tilde y - y \approx \delta\, y'$ under (a) and $\tilde y - y \approx -\varepsilon\,\tilde y'$ under (b). To this order its conditional mean given $X$ vanishes, and for an error that is constant over the window its in-band variance is $\sigma^2\int_{|f|\ge f_c}(2\pi f)^2 S_y\dd f$. Most of this variance moves label noise that is unpredictable from $X$ anyway. To second order in $\sigma$ and averaged over the window, the conditional variance that a network trained on $\tilde y$ has to absorb grows by the mean of $\sigma^2 m'^2$ under (a) and shrinks by about as much under (b) (Proposition~\ref{prop:tie}). This is a second-order effect, against the fourth-order distortion of $\tilde m$, so with few wells finite-sample effects can outweigh the population bias. The argument is heuristic. It suggests that a tie error with exactly structure (b) would not, to second order, make a network worse than the Oracle, because its labels carry less conditional noise than the true labels. A bank can also change finite-sample learning in ways that \eqref{eq:rhostar} does not capture. A learned variance absorbs the spread of the bank and down-weights samples where the members disagree, and for $\lambda > 0$ the responsibilities re-register the labels during training (Remark~\ref{rem:lambda}). Section~\ref{sec:exp:p2r} compares the measured gains with $\rho^\star$.
\subsection{Coverage of the predictive intervals}
\label{sec:theory:cov}
Let a method predict a mean $\mu$ and a variance $s^2$ at every test sample. For method $j$ let $v_j = \E s^2$, $w_j = \E(y - \mu)^2$ and $\xi_j = v_j/w_j$, with expectations over test samples; $\xi = 1$ means that the predicted variance matches the squared error on average.
\begin{proposition}[Coverage]
\label{prop:coverage}
\begin{enumerate}
\item[(a)] For any methods $j$ and $O$, $\xi_j - \xi_O = (\Delta v - \xi_O\,\Delta w)/w_j$, with $\Delta v = v_j - v_O$ and $\Delta w = w_j - w_O$.
\item[(b)] Let $y$ be stationary, and let (A1) hold with real $0 \le P \le 1$. Compare the point label at its population optimum ($\mu = \tilde m$, $s^2 = \Var(\tilde y\mid X)$) with the oracle at its optimum ($\mu = m$, $s^2 = \Var(y\mid X)$). Then $\xi_O = 1$ and
\begin{equation*}
\xi_j - \xi_O = \frac{2}{w_j}\int P(1 - P)\, S_m\dd f \ \ge 0 .
\end{equation*}
\item[(c)] Under structure (b) of Proposition~\ref{prop:tie}, with $q_t$ independent of $t$ and $y$ stationary, the point label at its population optimum has $\xi_j \le 1$. A calibrated bank has $\xi_j = 1$.
\end{enumerate}
If $y - \mu = sZ/\sqrt{\xi}$ with $Z$ standard normal and independent of $s$, the interval $\mu \pm z s$ covers with probability $2\Phi(z\sqrt{\xi}) - 1$, which increases with $\xi$.
\end{proposition}
Part (a) is an identity and holds for any finite ensemble. A method covers more than the Oracle when its predicted variance exceeds the Oracle's by more than $\xi_O$ times its excess squared error. Parts (b) and (c) describe the population limit. There, classical tie error widens the intervals of a point-label method, Berkson error narrows them, and a calibrated bank matches the oracle. A finite ensemble can be far from this limit, and in our experiments every ensemble is (Section~\ref{sec:exp:p2r}).
\subsection{Scoring against a misregistered reference}
\label{sec:theory:ref}
Field evaluation compares predictions with labels at blind wells, and those labels need a tie as well. Let the reference be $y_{\mathrm{ref}}(t) = y(t + \varepsilon_r)$, where $\varepsilon_r$ is constant over the window, independent of the prediction $\hat y$ and of the true label $y$, and has characteristic function $Q_r$. Let $\hat y$ and $y$ be jointly stationary with cross-spectrum $S_{\hat y y}$, defined by $\E[\hat y(t)\,y(t+\tau)] = \int S_{\hat y y}(f)\,e^{i2\pi f\tau}\dd f$.
\begin{proposition}[Misregistered reference]
\label{prop:reference}
Under these assumptions,
\begin{equation}
\E|B(\hat y - y_{\mathrm{ref}})|^2 = \E|B(\hat y - y)|^2 + 2\int_{|f|\ge f_c}\operatorname{Re}\big[(1 - Q_r(f))\,S_{\hat y y}(f)\big]\dd f .
\label{eq:refbias}
\end{equation}
\end{proposition}
For a symmetric error, $0 \le 1 - Q_r \le 2$, so the reference penalizes in-band agreement with the true label. The extra term depends on the method, so it can change the ranking of two methods, and it does not average out over wells: more blind wells reduce the variance of a comparison but not its bias.
\begin{corollary}[Tolerance]
\label{cor:tolerance}
For two methods $A$ and $B$, let $G$ be the true band-MSE advantage of $A$ and $G_r$ the advantage measured against $y_{\mathrm{ref}}$. Then $G_r - G = 2\int_{|f|\ge f_c}\operatorname{Re}\big[(1 - Q_r)(S_{\hat y_B y} - S_{\hat y_A y})\big]\dd f$. Let $\hat y_A = Hm$ and $\hat y_B = HPm$, with real filters $0 \le H, P \le 1$: $A$ learns the oracle and $B$ the blurred optimum of (a), both shrunk by the same finite-sample factor $H$. Then
\begin{equation*}
G = \int_{|f|\ge f_c} H(1 - P)\big[2 - H(1 + P)\big] S_m\dd f \ \ge 0,
\qquad
G_r = \int_{|f|\ge f_c} H(1 - P)\big[2Q_r - H(1 + P)\big] S_m\dd f .
\end{equation*}
For $H = 1$ and zero-mean Gaussian errors with standard deviations $\sigma$ and $\sigma_r$, $2Q_r - 1 - P = 2\pi^2f^2(\sigma^2 - 2\sigma_r^2) + O(f^4)$, so to leading order the measured advantage has the sign of the true one only if $\sigma_r < \sigma/\sqrt2$.
\end{corollary}
Shrinkage relaxes this condition, because $2Q_r - H(1 + P)$ grows as $H$ decreases. If $B$ is over-sharp instead, as under (b), with $\hat y_B = HKm$ and $K \ge 1$, then $G_r - G = 2\int_{|f|\ge f_c} H(K - 1)(1 - Q_r)S_m\dd f \ge 0$, and the reference exaggerates the advantage of $A$. Independence between $\varepsilon_r$ and the prediction is plausible for a reference from check shots or a vertical seismic profile. A reference tied by synthetic--seismic matching depends on the same seismic as the prediction, and its error adds a covariance term to \eqref{eq:refbias}. Section~\ref{sec:exp:detect} estimates how many blind wells a comparison needs at a given reference error.