Affine-Invariant SPD Batch Alignment
Implementation & benchmark of arXiv:2607.11092 — A Tractable Pseudo-Metric on Non-Parametric Exponential Statistical Manifolds via SPD Geometry
Source paper: A Tractable Pseudo-Metric on Non-Parametric Exponential Statistical Manifolds via SPD Geometry arXiv:2607.11092 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Add a distribution-level regularizer that compares augmented second-moment matrices of neural activations using the affine-invariant Riemannian metric on SPD matrices. This aligns means, variances, and selected nonlinear moments while remaining invariant to invertible linear reparameterizations of feature coordinates.
Formulas
Mathematical statement
The paper defines the pulled-back pseudo-metric by \(\tilde d(q_1,q_2)=d_{\mathcal F}(\pi^{(m)}(q_1),\pi^{(m)}(q_2))\), where \(\pi^{(m)}\) projects a distribution onto an exponential family by matching expectations of sufficient statistics \(u_1,\ldots,u_d\). Its fibers are \((\pi^{(m)})^{-1}(p_\theta)=\{q:\mathbb E_q[u_j]=\eta_j(\theta),\ j=1,\ldots,d\}\), so the comparison observes only the selected moment vector. The SPD embedding uses the augmented sufficient-statistic vector \(z(x)=[1,u(x)^\top]^\top\) and matrix \(S(q)=\mathbb E_q[z(x)z(x)^\top]\). The paper gives \([A(\theta)]_{jk}=\partial^2\psi/(\partial\theta_j\partial\theta_k)+(\partial\psi/\partial\theta_j)(\partial\psi/\partial\theta_k)\), where \(\psi\) is the log-partition function, \(\eta_j=\partial\psi/\partial\theta_j\), and the Hessian is the Fisher information. Use the affine-invariant SPD distance \(d_{\mathrm{AIRM}}(P,Q)=\|\log(P^{-1/2}QP^{-1/2})\|_F\) for positive-definite matrices \(P,Q\). The paper establishes this ambient distance as a computable lower bound for the induced pseudo-metric; the neural adaptation directly uses it as a loss.
Implementation notes
Integrate this loss at an intermediate feature tensor, such as the output of a Transformer block or CNN stage. Let each feature vector be \(h_i\in\mathbb R^r\), and choose a small statistic map \(u(h)\), initially \(u(h)=h\) for mean/covariance alignment or \(u(h)=[h_1,\ldots,h_r,h_1^2,\ldots,h_r^2]\) for additional marginal second moments. For two batches, domains, augmentations, or teacher/student streams \(B,C\), compute \(z_i=[1;u(h_i)]\), then \(S_B=|B|^{-1}\sum_i z_i z_i^\top+\varepsilon I\) and analogously \(S_C\). Compute the eigendecomposition \(S_B=U\operatorname{diag}(a)U^\top\), form \(S_B^{-1/2}=U\operatorname{diag}((a+\varepsilon)^{-1/2})U^\top\), construct \(M=S_B^{-1/2}S_CS_B^{-1/2}\), eigendecompose \(M\), and evaluate the squared Frobenius norm of its matrix logarithm, equivalently \(\sum_j(\log\lambda_j(M))^2\). Backpropagate this term with the task loss; for teacher targets, use stop-gradient on \(S_C\) and update the teacher by EMA if direct alignment causes collapse. The exact mathematical computation is the empirical outer-product embedding and AIRM surrogate. Empirically choose \(\varepsilon\), statistic dimension, and \(\lambda\); use feature projection to dimension 16--64 when the raw activation dimension makes eigendecompositions expensive. First test on CIFAR-10 with a small ResNet, aligning clean and augmented feature batches, against BatchNorm-statistics matching and MMD using the median bandwidth heuristic. Measure validation accuracy, corruption accuracy, training variance, and sensitivity to random invertible feature transforms. Success is higher augmentation or corruption accuracy at comparable compute, lower run-to-run variance, and nearly unchanged alignment loss after invertible feature reparameterizations.
Verification
This idea has not been verified yet.
Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.
Artifacts
Artifacts unavailable.