Polarized Generalized-Dual Curvature Regularization
Implementation & benchmark of arXiv:2608.15345 — Efficient Computation of Arbitrary-Order Directional Derivatives in Multiple Directions via Generalized Dual Numbers
Source paper: Efficient Computation of Arbitrary-Order Directional Derivatives in Multiple Directions via Generalized Dual Numbers arXiv:2608.15345 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Use generalized dual numbers to compute second- or third-order derivatives of the training loss along several parameter-space directions, then use polarization to recover mixed directional derivatives without forming a Hessian or third-order tensor. Add a bounded mixed-curvature penalty or use the resulting directional curvature to rescale updates in directions that are simultaneously sharp.
Formulas
Mathematical statement
The paper defines a generalized dual number r=\sum_{k=0}^{n}r_k\epsilon_k, where n is the retained derivative order and the basis elements obey \epsilon_i\epsilon_j=0 when i+j>n and \epsilon_i\epsilon_j=((i+j)!/(i!j!))\epsilon_{i+j} otherwise. For an analytic scalar function f:\mathbb{R}^m o\mathbb{R}, a base point q\in\mathbb{R}^m, and direction v\in\mathbb{R}^m, evaluating f(q+\epsilon_1v) yields the repeated directional derivative D^k f(q)[v,\ldots,v] in coefficient r_k. For distinct directions v_1,\ldots,v_k, let P_k(v)=D^k f(q)[v,\ldots,v]. Since D^k f(q) is symmetric k-linear, polarization reconstructs the mixed derivative as D^k f(q)[v_1,\ldots,v_k]=(1/k!)\sum_{S\subseteq\{1,\ldots,k\}}(-1)^{k-|S|}P_k(\sum_{i\in S}v_i). For k=2 this is (P_2(v_1+v_2)-P_2(v_1)-P_2(v_2))/2. The implementation uses this identity for k=2 or k=3; the mathematical work is exact up to floating-point and network nonlinearity evaluation, while random direction selection and penalty weights are empirical design choices.
Implementation notes
Integrate this at the training-loss evaluation, not inside the ordinary forward activations initially. Flatten a sampled subset of model parameters into q, choose k=2 first, and draw two independent normalized directions v1 and v2 from the same distribution as the optimizer update or from Gaussian noise. Implement a generalized-dual scalar type containing coefficients [r0,r1,r2]; overload addition and multiplication using the paper's epsilon rule, and implement exp, log, tanh, and division through truncated Taylor coefficient propagation. Run the network and scalar loss with dual-valued parameters q+epsilon1*u for u equal to v1, v2, and v1+v2. Extract P2(u) as coefficient r2, compute the mixed curvature C12=(P2(v1+v2)-P2(v1)-P2(v2))/2, and add lambda*C12^2 or lambda*relu(abs(C12)-tau)^2 to the minibatch loss. The empty-set evaluation is zero for a second derivative and need not be run. The algebraic formulas and polarization coefficients are fixed by the paper; lambda, tau, direction sampling, and whether directions are full-parameter or layerwise are empirical. First test on a small ResNet-18 or 3-layer MLP on CIFAR-10 against baseline SGD or AdamW with identical minibatches and approximately matched forward FLOPs. Measure training-loss descent, validation accuracy, gradient norm spikes, and estimated Hessian-vector curvature. A useful success signal is fewer exploding-loss events or improved validation accuracy at equal final training loss; a failure signal is overhead exceeding the curvature benefit or no reduction in sharpness.
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.