Induced-metric optimizer with non-zero off-diagonal blocks in the ambient metric: h = [[γI, a], [bᵀ, 1]]. The pullback becomes G = γI + ξ(alᵀ + lbᵀ + llᵀ) where l, a, b can be gradient, momentum, parameters, or zero. Inverse via rank-2 Woodbury or Sherman-Morrison. Setting a=b=l recovers the original metric.
The induced metric is derived from a particular ambient inner product on : block-diagonal, . Parameter space and the loss dimension are orthogonal in the ambient view. There is no geometric reason for this choice, and dropping the orthogonality assumption yields a strictly more expressive family of optimizers.
This entry derives the metric, the inverse via Woodbury, the resulting update rule, the combinatorial space of design choices, and the empirical results on MNIST MLP. The headline empirical finding is that the off-diagonal variant beats Adam on best-run accuracy but is dominated by the learnable diagonal on both best and median, suggesting that per-parameter adaptation matters more than off-diagonal coupling at the tested scale.
Replace the block-diagonal ambient metric with
where are vectors that introduce off-diagonal coupling between parameter space and the loss dimension. The factor scales the entire loss-dimension block. When , , the original ambient metric, and we recover the standard induced metric.
The embedding is unchanged: with Jacobian . The pullback metric is
which in matrix form, writing , is
This is a rank-two perturbation of in general, rank-one when or , and rank-zero (returning to ) when and . The structure is a sum of outer products with a shared vector , which keeps the inverse tractable.
Decompose with
The Woodbury identity gives
The inner matrix is . Writing for brevity,
The inverse uses Cramer's rule: compute and four dot products (, , , ). When the metric is near-singular and the implementation falls back to identity scaling to avoid numerical instability.
The total cost per step is dominated by the dot products and the matrix-vector products and , all of which are . No matrix factorisation of itself is required.
Special cases.
The three vectors in the off-diagonal metric (, , ) can each be set to one of several observables available at each step. The naming convention uses the pair .
| Choice | Vector | Interpretation |
|---|---|---|
| zero | drops that off-diagonal term | |
| gradient | current minibatch gradient | |
| momentum | bias-corrected momentum (smoothed gradient) | |
| parameters | current parameter values |
Three "modes" are exposed per vector (, , and the base direction ), giving combinations in principle. The implementation registers the most physically motivated subset, with defaulting to "same as " to reduce the combinatorial explosion. The remaining sweep dimensions are with , plus the base (typically the gradient).
The expression
is not symmetric unless . Direct check: the antisymmetric part is
which is nonzero whenever is not parallel to . A concrete counterexample: with , , , , the formula gives , which is not symmetric.
Two consequences need to be acknowledged explicitly, because they bear on how the construction should be interpreted.
(i) For , the construction is a pullback bilinear form that is symmetric, but symmetry alone is not enough. A Riemannian metric also requires positive-definiteness. The ambient is symmetric when . It is positive-definite iff , , and the Schur complement is positive: , which under reduces to (in the scalar- case). When this fails the ambient bilinear form is indefinite, and the pullback can be indefinite as well. The Christoffel symbols, geodesics, and the geodesic convexity machinery apply when all three conditions hold.
(ii) For , the construction is a non-symmetric bilinear form rather than a metric. The "update rule" is still well defined whenever is invertible, but the resulting flow is not a Riemannian gradient flow. It is a preconditioned gradient descent with a non-symmetric preconditioner. There is no Riemannian Hessian, no notion of geodesic convexity, and no second-fundamental-form interpretation.
This is the honest framing. The empirical asymmetry between and reported in Section 6 is not a feature of the geometry; it is a feature of the non-symmetric preconditioner. When swapping and the preconditioner is replaced by its transpose, which produces a different update rule. The transpose has the same eigenvalues as but acts on the gradient differently in a way that depends on the gradient's specific direction.
Empirically (Section 6), the asymmetry is large enough that the variants are worth keeping as engineering tools. Their theoretical status is more constrained than the symmetric case, and any claims that invoke the geodesic-convexity framework must restrict to .
Setting (both off-diagonal vectors equal to the base direction) gives
This is the original induced metric, with rescaled to . The rank-one metric is therefore recovered at two points in the design space: trivially at (with ), and along the aligned diagonal (with ).
Given that one has added an L2 regulariser to the loss, the continuous-time Riemannian flow routes the resulting decay step through : the decay term is contravariant (parameter-direction) while the metric is covariant (cotangent direction), and the natural flow contracts them, giving a step . This is a consequence of index placement, not a design choice — given the regulariser. The metric itself does not generate the decay; it determines how an externally-added decay is routed.
The current implementations use decoupled weight decay (AdamW-style) for practical reasons: the decay is added separately, outside . The Riemannian-correct version is implementable but has not been swept. Whether coupled weight decay would help in practice is an open question; the small-batch implicit-regularisation literature on AdamW suggests the answer is non-obvious and benchmark-dependent.
This section is about routing of an externally-added regulariser. It is logically distinct from §5.3 below, which is about a -direction term that the metric itself introduces into the update — with no regulariser added — when the params mode is selected for . The two phenomena have opposite signs and are easy to conflate.
params mode introduces structural anti-decayWhen is set to (the params mode of Appendix B), the metric explicitly depends on , and the update acquires a -direction component for free. The structural fact, from the Woodbury form with and :
The output is a linear combination of the columns of . Therefore a -direction component in the update appears iff . Setting alone puts into , where it only multiplies things and never appears as an output direction. The role of and is asymmetric in a sharper way than §4's antisymmetric-part argument captures.
When , the coefficient of in works out to
where is the inner matrix from §2 and is the corresponding coefficient of in . In the positive-definite regime (, which is exactly the condition under which is a Riemannian metric), this coefficient is strictly positive: the update adds a positive multiple of , producing weight growth, not decay. The sign can only flip outside the PD regime, where the construction is no longer a Riemannian metric.
Combined with AdamW-style decoupled decay , the effective weight-decay coefficient becomes
Across the sweep bounds in Appendix A (, reaching ), the structural anti-decay term typically dominates the configured decay, so the variants effectively run with net weight growth. The empirical signature is documented in §6.1.
The detailed derivation lives in notebooks/params-mode-analysis.nb.
Setup: 2-layer MLP (784, 64, 64, 10), 200 epochs, batch size 1024, 5 trials per configuration with Optuna. The same sweep ranges as the project MNIST MLP sweep (Appendix A).
(Provenance: the 5-trial figures in the table below come from a one-off local run recorded in notes/offdiag-benchmark-results.md. The 1000-trial sweep numbers cited in §6.1 are from the project MNIST MLP sweep, results/mnist_mlp/.)
| Configuration | Best | Mean | Notes |
|---|---|---|---|
| 96.63% | 94.03% | most consistent | |
| 96.43% | 86.20% | 1 of 5 trials diverged (57.26%) | |
| 91.42% | 91.42% | only 1 trial | |
sgd_learn_diag (best baseline) | 97.99% | n/a | best peak overall |
sgd_metric (rank-one) | 97.98% | n/a | close second |
| Adam | 95.89% | 95.2% | most consistent baseline |
Three observations.
Off-diagonal beats Adam on peak in this small probe, and the 1000-trial sweep agrees on best but not on robustness. In this 5-trial sweep, both and achieve higher peak accuracy than Adam ( and vs ). The improvement is modest ( to percentage points). The genuinely rank-two 1000-trial sweep (§6.1) gives both orderings a best of , slightly above Adam's on the same sweep; the means collapse to for and for , well below Adam's . The ceiling claim survives the larger sweep; the robustness claim does not.
The asymmetry is large. achieves a mean of across 5 trials. The reversed has a mean of because one trial of five diverged to . The other four trials of the reversed configuration are in the to range, comparable to the forward configuration. The conclusion is that the choice of which observable plays the "direction" role and which plays the "cogradient" role matters substantially for training stability.
Off-diagonal is dominated by the learnable diagonal at this scale. The best learnable diagonal run () is percentage points above the best off-diagonal run (). The off-diagonal variant adds rank-two correction to the ambient metric but does not give each parameter its own scale factor. The result suggests that per-parameter adaptation matters more than off-diagonal coupling for this task, although a fair direct comparison would require matching the sweep budget (5 trials for off-diagonal versus 1000 for learn-diag).

The project 1000-trial MNIST MLP sweep (results/mnist_mlp/, itr_4, sweep ranges as in Appendix A) covers every registered off-diagonal variant. The three rows that bear on the rank-two construction:
| Variant | Best | Median | Mean | Worst | |
|---|---|---|---|---|---|
sgd_offdiag_m_l | 98.27% | 57.77% | 54.79% | 4.78% | |
sgd_offdiag_l_m | 98.27% | 40.34% | 48.74% | 4.99% | |
sgd_offdiag_l_l* | 98.37% | 41.48% | 49.72% | 4.42% |
Baselines in the same sweep: Adam best / median / mean ; SGD / / ; Muon / / .
Three structural reads.
The asymmetry persists at scale. Both orderings hit the same best (), but the median and mean differ by and percentage points, with producing the longer left tail. This matches the qualitative signal from the 5-trial probe in Section 6 and shows the asymmetry is not a small-sample artefact.
sgd_offdiag_l_l is not a genuinely off-diagonal experiment (the * row). Per §5.1, collapses the construction to the rank-one induced metric with . Its 1000-trial best of measures the rank-one metric with a particular scaling, not the rank-two mechanism, and should not be cited as evidence for the latter.
The params-mode collapse asymmetry matches §5.3. Aggregating over the full set of registered variants, the divergent-trial rate (final accuracy ) separates cleanly by where appears in :
| Group | Trials | Collapse rate |
|---|---|---|
| (4 variants) | 4000 | 35.6% |
| , (3 variants) | 3000 | 19.4% |
| no (8 variants) | 8000 | 19.9% |
The group collapses at nearly double the rate of the no- control; the group is statistically indistinguishable from it. This is the exact signature predicted by §5.3: activates the structural anti-decay term (whose magnitude scales with and so amplifies divergent trials), alone does not.
The ceiling story for the genuinely rank-two variants holds in the larger sweep ( vs Adam ), but the robustness gap is in the same direction as the other learnable-metric variants across the sweep: high best, low median, high hyperparameter sensitivity.
The off-diagonal generalisation sits at one end of a hierarchy of extensions to the original rank-one induced metric.
| Variant | Ambient metric structure | Pullback rank | Parameter state |
|---|---|---|---|
| Original (rank-one) | rank-one perturbation | none | |
| Scalar learnable | rank-one perturbation | (scalar ) | |
| Diagonal learnable | rank-one perturbation | (vector ) | |
| Off-diagonal (this entry) | rank-two perturbation | (vectors are observables) | |
| Output embedding (KFAC) | , with -dim output | rank- perturbation () | none |
The off-diagonal variant occupies a niche: it raises the perturbation rank from one to two without introducing learnable per-parameter state, by using observables (, , ) as the off-diagonal vectors. This is structurally distinct from the learnable-diagonal direction, which keeps the perturbation rank at one but adds learnable scalars.

A head-to-head between "more rank" (off-diagonal) and "more state" (learnable diagonal) at matched 1000-trial budget on MNIST MLP: the state-rich variants win on best (sgd_learn_diag vs the rank-two off-diagonal best of ) and dominate on median ( vs for ). Whether off-diagonal becomes competitive at larger model sizes where the per-parameter overhead of learnable diagonal becomes prohibitive is open.
Restricting to the symmetric case (Section 4), the off-diagonal construction is a genuine pullback metric, and the geodesic convexity machinery applies. Two further structural facts.
First, and are observables (functions of the gradient, momentum, or parameters), not learnable parameters with their own update rule. The metric is therefore parameter-dependent through , , and , but not through any auxiliary state. Working out the Christoffel symbols for this -dependence is more involved than the loss-embedding case (where only depends on ): the bracket carries contributions from and as well as . The full derivation has not been carried out in the geodesic convexity entry; its Appendix B treats only the fixed off-diagonal case (constant , ) for the symmetric subset.
Second, in the constant- case (and assuming the Schur condition above so that the construction is actually a Riemannian metric), the off-diagonal correction contributes terms proportional to in the Riemannian Hessian. The eigenvalue-sign structure of is preserved up to a possible global flip if the proportionality scalar happens to be negative (a global flip exchanges minima and maxima but does not turn an indefinite Hessian into a definite one). In that case the off-diagonal metric is in the same theoretical class as the rank-one fixed metric: it cannot convert a non-convex landscape into a geodesically convex one.
The variable- case is open. Off-diagonal vectors that themselves depend on in principle add Christoffel-symbol corrections that could in principle change the eigenvalue structure. Whether they do is a calculation not yet completed.
The learnable diagonal variant, by contrast, sits in Level 2 of the geodesic convexity hierarchy and provably flips eigenvalue signs. This is one structural reason why the learnable diagonal dominates the off-diagonal variant empirically at the MNIST MLP scale: a richer and proven class of curvature corrections is available.
The canonical implementation in repo/optimisers/jax_offdiag.py (custom_sgd_offdiag) handles the rank-two Woodbury inverse with a Cramer's-rule solve and a near-singular fallback, and applies AdamW-style decoupled weight decay outside .
The sweep treats , , learning rate, momentum, and weight decay as free hyperparameters (Appendix A), along with the categorical base_mode and use_momentum_for_update. Earlier prototypes fixed on the grounds that the effective metric strength is , but the registered sweep keeps both free.
Sweep coverage caveat for the params variants. Per §5.3, when the metric itself contributes a -direction term to the update with effective coefficient (anti-decay). Across the swept volume in Appendix A (, reaching ), this structural term typically dominates the configured weight_decay, so the net weight-decay coefficient is usually negative for the sgd_offdiag_theta_* variants. The sweep therefore does not meaningfully exercise a net-decay regime for these four variants; reaching one would require either widening the weight_decay upper bound or restricting ranges.
Asymmetry mechanism. The -vs- asymmetry has two distinguishable pieces. For variants involving the params mode, §5.3 gives a clean mechanistic explanation: activates a structural anti-decay term scaling with , alone activates nothing, and the §6.1 collapse-rate signature confirms this. For variants between and , the divergence between configurations is empirically large but not mechanistically pinned down. The natural hypothesis is that the variance properties of vs differ when is the momentum (low variance) versus the gradient (high variance), but this has not been tested with a controlled-variance experiment.
Coupled weight decay. The Riemannian-correct decay (passed through ) has not been swept against the AdamW-style decoupled decay. A direct test would clarify whether the structural coupling is empirically beneficial.
Scaling to larger models. The MNIST MLP results suggest that learnable diagonal dominates off-diagonal at this scale. Whether off-diagonal becomes competitive at scales where the -dimensional learnable state of sgd_learn_diag becomes a memory or stability bottleneck is open.
Combination with learnable diagonal. The off-diagonal mechanism and the learnable diagonal mechanism are structurally orthogonal: one raises the ambient-metric rank, the other adds learnable per-parameter state. A combined variant has not been registered. The closest registered variant is sgd_offdiag_l_l (off-diagonal with ), which does not include the learnable diagonal.
The MNIST MLP 1000-trial sweep uses the unified hyperparameter bounds from repo/parameters/optimizer_registry.py (single source of truth for both the Optuna and W&B backends). The same bounds apply to every registered off-diagonal variant; there are no per-task overrides. The ranges are confirmed against the raw itr_4 configs.
| Parameter | Range | Scale |
|---|---|---|
learning_rate | log-uniform | |
momentum | uniform | |
xi () | log-uniform | |
gamma () | log-uniform | |
weight_decay | log-uniform | |
base_mode | categorical | |
use_momentum_for_update | categorical |
The pair is fixed per variant rather than swept inside an Optuna trial: e.g. sgd_offdiag_m_l is , sgd_offdiag_l_m is , sgd_offdiag_l_l is . The full set of 16 registered pairs (each over minus the redundant ) is enumerated in repo/parameters/optimizer_registry.py; each is a separate Optuna study with the bounds above.
The four modes for the off-diagonal vector (and ) correspond to the following physical observables.
| Mode | Vector | Captures |
|---|---|---|
momentum | smoothed gradient direction | |
grad | current minibatch gradient direction | |
params | current parameter values | |
zero | drops the term |
With (the default in the sweep), the metric becomes
The symmetric case collapses to the rank-one metric with (Section 5.1). The case recovers the rank-one metric exactly. The case with is the substantive new symmetric variant. The params mode is qualitatively different: when , the metric depends explicitly on the parameter, and the update acquires a -direction component for free (a structural anti-decay; see §5.3).
The off-diagonal generalisation is related to but distinct from the broader "nondiag-preconditioner" literature on neural-network Hessians. The classical observation (see the scenic-route note nondiag-preconditioner-scenic-route.md in the project repository) is that neural-network Hessians have substantial off-diagonal mass, so any diagonal preconditioner is structurally limited. The off-diagonal metric here is a different construction: it adds off-diagonal terms to the ambient metric on , which pull back to the rank-two correction on parameter space. It does not address the off-diagonal entries of the Hessian directly; it constructs a different preconditioner.
The structural answer to off-diagonal Hessian mass is the Kronecker factorisation discussed in the pullback unification entry, which targets per-layer Kronecker structure . The off-diagonal variant here targets a different signal (correlations between parameter directions and the loss covector), and the two are complementary in principle.
The canonical optimiser and sweep code live in the project repository, not in this entry. This entry attaches only the figure-reproduction script and the symbolic-derivation notebooks.
Scripts (scripts/):
scripts/make_figures.py: reproduces every figure shown in this entry (PDF and PNG written to figures/). Reads the project-level results/mnist_mlp/sgd_offdiag_{m_l,l_m}/itr_4/run_*.csv.Notebooks (notebooks/):
notebooks/off-diagonal-derivations.nb: Mathematica derivation and numerical sanity-checks for §§1-5.1 (pullback, Woodbury inverse, Sherman-Morrison limits, antisymmetric part, collapse).notebooks/params-mode-analysis.nb: Mathematica derivation backing §5.3 — master Woodbury formula, the structural fact, numerical confirmation across all 15 non-trivial mode pairs, closed-form -coefficient in , sign analysis in and out of the PD regime, interaction with AdamW decoupled decay, and the 1000-trial collapse-rate summary feeding §6.1.Canonical sources (in the project repository, not duplicated here):
repo/optimisers/jax_offdiag.py — custom_sgd_offdiag (the implementation referenced in §9, with decoupled weight decay).repo/parameters/optimizer_registry.py — unified hyperparameter bounds and the enumeration of registered variants (source of truth for Appendix A).repo/parameters/sweep_mnist_mlp.py, sweep_cifar.sbatch, sweep_shake.sbatch — the Optuna / W&B sweep drivers.