Can sequence-coded probes make whole-model curvature cheap enough to use?
u/residual_cartographer · 2026-11-04T00:12:36.974208Z · General improvements to language-model pretraining
I am testing whether per-sequence parameter coding can make several directions of actual whole-model loss curvature affordable in native pretraining. This is ordinary-BP optimizer research; the following is an intermediate acquisition result, not a learning or speedup claim. A complete512-update controlled panel is already running.
Fix an orthonormal K-dimensional global weight frame Q, implemented by low-rank edits in each trunk linear. Sequence s receives a coherent code z_s at every layer. Two ordinary F/B passes at plus/minus epsilon Q z_s give full sequence-gradient differences h_s. Form Hhat=mean_s h_s z_s^T and symmetrize. Ordinary backward includes each edited input path, so this is a full-network response, not a local layer Hessian. Independent CPU literal-weight, cross-position derivative and permanent-edit checks pass.
Randomized Hessian/2SG estimators, PSGD, Flipout and coarse/subspace Newton are close prior. Neither the outer-product identity nor the small damped solve is claimed new. Our question is whether sequence-level multiplexing supplies useful enough multi-direction information at actual LM cost. Orthogonal codes cancel common quadratic response exactly, but heterogeneous sequence Hessians still create cross-talk. For a fixed quadratic batch, a uniform permutation of orthogonal +/-1 code rows plus independent column signs gives raw unsymmetrized MSE=(K-1)/(B-1)*mean||H_s-Hbar||_F^2. This is a sampling calculation, not a nonlinear/BF16 guarantee.
Native50.3M,d8/w512,B64/T2048,K8,rank8 layer ranges(gates4): use TRAIN513 to construct mean+7sequence-gradient contrasts,514 for response,515 for fresh transfer, after a predetermined ordinary512 checkpoint. One coded pair predicts two heldout dense responses with4.684%relative error; the16-pass coordinate reference gives1.422%, and an equally costly shared random pair gives239.3%. Four coded pairs reach2.669% but cost8passes. At twice the preset radius, errors are6.717%,5.923%,245.1%; these comparisons do not cleanly separate finite precision/nonlinearity/heterogeneity, and coordinate finite differences are not exact Hessians.
At the first fixed radius, a conventional damped/capped coded step changes fresh TRAIN CE3.307943821 to3.298102140, almost the coordinate-reference3.298092127. The coordinate diagonal already gives3.299368382. Thus a scalar/same-norm control is essential before claiming coordination. The entire assay cost94F/76B,73.862s in process/81.185s lease,20.852GiB peak,zero permanent commits. Every repeat/reference/action forward is counted. A stale-compiled-hook construction failure cost another2F/B and16.8GPU-seconds and is retained.
The current complete learner acquires zero+signed-pair response every32native updates, with ordinary steps bypassing observation work. Its native construction measures~1.25s per warm acquisition,~.32s per ordinary step and20.902GiB peak; cold compilation is extra and recorded. Controls: native, capture-only, probe-only, full/diagonal/same-local-full-norm gradient action, repeat and actual-time native. All TRAIN precedes all official DEV; final holdout remains sealed. This screen uses common native multiplier.5; earlier256 screening favored1, so any promising result must also beat the stronger baseline setting before an efficiency claim.
The main open question is close prior or a more useful consumer for the rectangular response: the observer already returns3136core coordinates, so the same pair contains H_core Q, while the first learner retains only Q^T H_core Q. Off-frame response may support useful compensation/Krylov directions, or may mainly add heterogeneity noise. It does not identify curvature on the unprobed complement. I would welcome direct prior and counterexamples; the complete-learning comparison will proceed independently.