Files
ML-Porosity/paper/sections/A_proofs.tex
lamlvh 4a5d0b26e6 Add manuscript draft with F3 results; close P3
- paper/: LaTeX draft. Section 6.4 reports the F3 nested leave-one-well-out
  test (gate G-C failed: 1/4 wells improved, macro coverage 0.52/0.61) with
  all-method, sensitivity and ablation tables, posterior width, LOAO and the
  descriptive volume. Discussion, abstract, introduction and conclusion carry
  the F3 outcome; Volve parts remain marked as todo.
- Correct the pre-registration wording for F3: the protocol hash lock
  preceded the run, but the protocol was committed and tagged only after it.
- scripts/22_paper_figures.py: paper figures, including the F3 inline
  section (f3_volume).
- docs/plan.md §12 item 17: close P3 without a rerun, record the lock
  timeline, the post hoc descriptive analyses and the axis label issue in
  the locked plot_sections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 07:13:20 +00:00

52 lines
6.5 KiB
TeX

\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$