Verification records#

Recorded numerical evidence behind claims the user docs state qualitatively. These are lab-notebook entries: the numbers are from the referenced verification runs, and the corresponding automated tests are the living guarantee.

The three sampling transposes are Riemannian-compatible#

(Stated qualitatively in ../entries_apply_probe.md §4.) For the least-squares objective f(X) = ½‖S(X) − b‖² on the fixed-rank manifold, with S each of the three sampling operations, the matrix-free Riemannian gradient g = MANIFOLD.project(op_transpose(r, …, sum_over_probes=True)) and the Gauss-Newton Hessian H V = (𝒥ᵀ 𝒥 V) gauged were checked end-to-end at an orthogonal, minimal-rank frame:

operator

adjoint ⟨r, 𝒥V⟩ = ⟨𝒥ᵀr, V⟩

gradient vs finite-diff along the retraction

Gauss-Newton Hessian

entries

exact

rel. err ~5e-8

symmetric ~5e-17, PSD

apply

exact

rel. err ~3e-7

symmetric ~1e-12, PSD

probe

exact

rel. err ~5e-7

symmetric ~3e-13, PSD

The adjoint identity and gradient/Hessian checks are pinned by the fitting and manifold test suites (tests/test_fitting.py, tests/test_manifold.py).

The exact Riemannian Hessian (2026.3.0)#

(Stated qualitatively in ../fitting_and_optimization.md §4.12; the design and the facts table are curvature_internals.md.) The measurements below come from the writer/critic verification scripts of the implementation plan and from each implementation slice’s handoff and independent review (the slice records, archived under dev/archive/). The automated guarantees are tests/backend/test_curvature.py, tests/backend/test_uniform_curvature.py, the exact oracle sweep (tests/oracle_sweeps/sweep_exact.py) and the dispatch tests.

Correctness#

check

result

probe-derivative two-hole vs the block-sum oracle, orders 0–3, K ∈ {(2,), (2,3)}, C ∈ {(), (2,)}, d ∈ {4, 3, 1}, slack frames

≤ 4.4e-16 (plan bar 1.0e-15)

the recurrence kernels vs the dense _trs twins (orders 0–4)

≤ 5.8e-16 (bar 1e-14)

apply / entries derivative two-holes vs an independent dense oracle (the review’s own einsum, no FD, no library kernel), orders 0–3

9.7e-16

plain probe / apply / entries two-holes: entries == apply at the one-hot vectors

bitwise

<p, H p> vs d²/dt² f(R(tp)) (Richardson), resolving the curvature term itself

within 1e-3 of the curvature term (every kind)

the exact hvp vs the dense extrinsic oracle (Weingarten form through the exact Jacobians), every kind × geometry × representation × sharing × weight × regularizer, d ∈ {3, 2, 1}

always-on 720 cases, max 2.5e-14; slow tier 8000 cases (4 seeds, W ∈ {(12,), (3, 4)}, orders 1–3), max 2.6e-11 (bar 1e-9); a Gauss-Newton mutant fails 72/72, a per-mode-lift mutant 9/9

jax.jvp of each corewise transpose along θ̂ vs its two-hole (float64, 7 ragged + the uniform probe derivative)

≤ 1e-12

uniform two-holes vs ragged, per element (varying-rank stacks, forced padding, a TT-slack element)

5.4e-16 (kernels), 1.4e-14 (model hvp); finite garbage in θ, θ̂ (boundary bonds included), the frame and the samples: bitwise

shared: the tied lift identity / the shared retraction’s FD ratios / the dense Lagrangian of Φ ∘ T

4.7e-16 / 4.0, 4.25 (O(h²)) / 1.1e-14 (a per-mode lift: off by 0.68–3.4)

downstream (T3Polynomial e01, L3 checkpoint, dof 1001): ‖H_fd p − hessian(p)‖ / ‖hessian(p)‖ along the retraction, t = 1e-2 … 3e-6

O(t²) down to a ~1e-9 floor (4.3e-2 → 4.3e-9); Gauss-Newton off by 0.10–0.94 at every t

Convergence#

  • The critic’s first restart experiment was ONE unseeded draw. check_restart_tr.py seeded only a default_rng(7) stream, never the legacy np.random stream TuckerTensorTrain.randn draws from, so its “exact + TR 13 / 69, 0 rejected, vs GN + Armijo 54 and GN + TR 52 / 352” is irreproducible at any commit. Cite the seeded rows instead.

  • Seeded: probe derivatives, order 2, ω = [1, .5, .25], restart rank 2 → 3, target 4, 5 % noise: Gauss-Newton + Armijo 39 steps / 130 Hessian-applies; exact + TR 8 / 23 at forcing power 1.0, 10 / 28 at 0.5, 0 rejected. Its reference interplay: zero 7.01e4 vs warm start 2.07e4 (ratio 0.30); GN 36 vs 39 steps at gtol_rel 1e-8, 13 vs 15 at 1e-3; exact + TR 9/27 vs 10/28 (power 0.5), 7/24 vs 8/23 (1.0).

  • The three apply restarts above, seeded: warm/zero reference ratios 1.9e-2, 1.6e-14, 3.1e-1. The library’s exact newton_cg reproduces the critic harness row for row (outer / rejected / CG): A 18/1/117 at gtol_rel 1e-8, 17/1/92 at 1e-3; B 4/1/12 (objective_floor, noise-free: the zero reference declares the start converged); C 11/1/53 and 10/1/33.

  • No minimal reduction: Tucker slack 20 outer / 4 rejected / 78 CG iterations → 2.6e-9; TT slack 34 / 9 / 272 → 2.2e-12; the same counts from the same tensor at minimal ranks; ε = 0 ≡ 1e-6‖X‖; reproduced exactly by the library on plain apply; apply_derivatives order 1: 17/4/56 (2.3e-9), 31/10/240 (2.0e-9). (Gauss-Newton + Armijo’s 80-step stall from the TT-slack start is a property of the problem — identical from the minimal-rank tensor, f = 1.335520e3 — not of the frame.)

  • Plain apply, target (4,4,4), rank-2 fit, W = 200, 1 % noise; the GN warm-up uses g0_reference='warm_start'): GN ratios 0.56–0.68; exact power 1.0 e_{k+1}/e_k² ≤ 0.917; power 0.5 e_{k+1}/e_k^{1.5} 0.43–0.98 in [1e-6, 1e-1]. With the zero-reference warm-up the power-1.0 constant is 0.941 — the warm-up ends at a different point; the kernels are bit-identical. The rate test itself is re-based on probe derivatives (order 1, W = 200, 6 GN warm-start steps, ≥ 2 window points per seed); an apply_derivatives rate test, if ever added, must draw its start by a predicate (exact Hessian PD on range(Π) and ρ(H_GN⁻¹K) < 0.9: one measured seed was genuinely indefinite, ρ = 1.03–1.10).

  • The restart and slack tests re-measured: the restart (W = 60) ragged 8 outer / 0 rejected / 27 CG; uniform 8/0/27, the same final objective. Tucker slack 14/1/26, TT slack 22/6/70 — uniform backend and frontend identical counts, losses row by row ≤ 1.9e-13. The shared restart: ragged 10/0/41, uniform 13/0/40 (same final objective, tied), Gauss-Newton 25 steps to max_newton.

Cost and memory#

measurement

result

exact / GN Hessian-apply, probe derivatives (numpy CPU; d5 r8 o2 W300 and d4 r16 o3 W2000)

first build 2.2–2.7×; after the recurrence conversion 2.8–3.5× — Gauss-Newton got 2.3× faster, the two-hole’s dominant pieces were recurrences already (plan gate ≤ 3.5×)

the same for the other kinds

probe 2.8–2.9×, apply 3.1–3.2×, entries 3.1–3.3×; apply derivatives 3.0–3.1× (d5) / 3.5–3.9× (d4)

downstream (T3Polynomial, W = 208, dof 153 / 425 / 1001)

exact hvp 3.0 / 1.9 / 3.5× a GN hvp; an exact model build 2.5–2.7×

two-hole per-row scratch vs the GN transpose (uniform, jax f32)

the TT-assembly kernel alone (unchunked memory_analysis): 2.2–2.8× after the recurrence conversion (was 2.5–3.5×); the running chunked program (the estimator’s slope, current jax): ~1.3–2.2× (~1× on jaxlib 0.4.30); unchunked peak 1.85–2.1×

the chunked probe-derivative two-hole at estimate_chunk_size(hessian='exact')

1.25–1.61× the GN assembly at its own default chunk, each held at its own jet floor (near, not strictly under, the plan’s 1.5× gate; recorded, not changed)

compile (fresh process, CPU x64, small problems)

the exact uniform CG compiles once per run, ~14.5–14.8 s vs ~9.2–9.7 s for Gauss-Newton

uniform-transpose re-mask overhead

0.08–0.61 % of the transpose; re-measured ~1.1 % eager on a small transpose including the host mask build, ~0.13 % large, 0 under jit

The zero reference#

  • Per-layer LAPACK zero references differ ragged vs uniform by 0.56–1.93×, and 6 of 16 seeded newton_cg pairs drift; with one reference, 0 of 16. The canonical frame is valid (orthogonality residual 0, base point 0, Π idempotent) at d = 1, 3, 4 and shared; ragged == packed uniform to ≤ 3.9e-16; a mode’s factor is bit-identical when another mode’s rank or size changes; level r’s factor is exactly the prefix of level r + 1’s (error 0.0 over r = 1…7); the 44 O2 ragged/uniform pairs agree to 3.5e-12.

  • On data with no energy on the leading coordinates, the LAPACK and identity-prefix completions give a reference of exactly 0; Haar seeds 0–5 give 9.5–24 there and 4.4e1–7.0e1 on generic data (LAPACK 7.0e1). A mode rotation moves the reference by ≤ 1.6–1.7×; a nonzero start’s ‖g‖ is invariant.

  • Downstream (T3Polynomial e01): the library’s zero reference vs the downstream’s own _zero_gradient_norm (a zero frame from zeros()’ LAPACK completion) is 2.18 / 0.73 / 0.94 / 0.97 by level — not a drop-in.

The downstream measurement (T3Polynomial against the 2026.3.0 release candidate, small sizes)#

  • Tail (e01 L3 checkpoint, gtol_rel 1e-9, ≤ 30 steps): Gauss-Newton 30 steps (ρ 0.02–0.03), 817 CG, ‖g‖ 4.2e-2 → 2.2e-2; exact 6 steps, 205 CG, → 1.1e-8 (3.5e-12 at power 1.0). Damping 0 / 1e-6 / 1e-3 give the same steps (206 / 205 / 207 CG): 1e-6 ≡ 0 for the default.

  • Per-level restarts from identical warm starts (steps (rejected) / CG / final f): e01 L0 GN 60(cap)/149 vs exact 15/54 (same f); L1 44/310 vs 21(1)/91; L2 60(cap)/584/1.8050 vs 23(3)/203/1.7999; L3 60(cap)/888/0.8354 vs 24(4)/284/0.8367. o01 L1: GN 0.987 vs exact 1.108 — exact converged to a verified minimum (dense Hessian PSD, the 81 zero eigenvalues the gauge) of a worse basin from the zero-padded start; the trust region is radius-limited for ~13 early steps (Δ0 = the Cauchy length, doubling per boundary step). On the small-residual b01 toy exact took 27/26/15 steps vs GN’s 20/17/10 at 2.4× the wall.

The Newton-schedule experiments (the records are archived under dev/archive/)#

  • Shared vs unshared (probe derivatives order 2, d = 4, shape (6,6,6,6), W = 60, 9 seeds (+3 at W = 120), a heavily misspecified high-residual target): Gauss-Newton’s rate constant ρ(H_GN⁻¹K) at the minimizer is ≈ 0.7 in every cell — shared (0,0,1,1) 0.76, (0,0,0,0) 0.69; unshared on the same data 0.71 / 0.73; untied 0.69 — with paired differences on both sides of zero. The exact Hessian’s gain is the same size shared or unshared: 3.5–5× fewer outer steps, 5–6.6× fewer CG, 1.6–2× less wall. The shared manifold is mildly more curved on average (1.7× on random tangents, λ-RMS 1.15×) but not in the top eigenvalue that sets GN’s rate. GN’s measured tail ratio matched ρ within 0.03 in 51 of 58 runs (ρ_tr − 1 ≈ −⟨p, Kp⟩/⟨p, H_GN p⟩).

  • Tied-factor scaling (one group of m = 1…d modes, d ∈ {6, 4}, 5 seeds): ρ(H_GN⁻¹K) flat within seed noise (d = 6: 0.90 / 0.78 / 1.03 / 0.83 / 0.88 / 0.87; d = 4: 0.66 / 0.56 / 0.72 / 0.69), the same-data unshared control moving the same way; κ and the exact step counts flat. Average curvature rises mildly with m when shared (λ-RMS +20–25 %, random-tangent ratio +35–50 % at m = d), entirely through the shared fit’s larger misfit (×0.96–1.03 per tied factor once misfit is in the regression). ρ depends on d more than on m (≈ 0.85 at d = 6, ≈ 0.65 at d = 4); no single quantity explains it (R² ≤ 0.13). Untested hypothesis: the tied space shrinks 6–9 dimensions per tied factor, capping the top eigenvalue while the residual raises the average.

  • Both are thin: one setup each, numpy eager, a contended CPU, seed spreads (~0.3) larger than any effect.

The aligned padded frame (2026.4.0)#

(The user doc is ../aligned_padded_frame.md; the internals are padded_frame_internals.md.) The measurements below come from the implementation plan’s prototype scripts (a separate research repo, maintainer-local) and from each implementation slice’s handoff and independent review. The automated guarantees are tests/backend/test_padded_frame.py, tests/backend/test_uniform_padded_frame.py, tests/backend/test_padded_start.py, tests/test_aligned_padded_frame_frontend.py and the dispatch tests.

The step and the loop (prototype facts)#

check

result

one step vs the dense per-edge update, all four stores (d = 2..5, uneven increments, non-minimal ranks, a tangent part 10× the normal part, truncating steps, sharing groups, the zero old point, stacks)

≤ 3e-14; frames orthonormal to 2e-15; the old block bitwise untouched

ungauged vs gauged variations

the same frames to 5e-15

float32

errors follow u·max(1, s), s the tangent-to-normal ratio of the hint; the step is scale-invariant in the hint

the movement vs the true frame movement

within 15 % from 1 down to 1e-15

the simultaneous update

cycles with period 2 (Darcy level 1 from about pass 400; a 243-number case), its stationary point not an attractor; two-colour converges on the same case with no merit decrease (0 of 299 passes)

two-colour vs simultaneous on the Darcy level-1 gradient (p = 5 for 2)

−1.4 % at pass 4, −0.5 % at pass 6; its movement falls to 5e-4 at pass 150 where the simultaneous one sticks at 1e-2

toy family, p = 5 for 2 passes

97 % of the converged merit in 4 passes, 99.7 % in 6; oversampling alone plateaus at 88 %

cost per pass (ragged numpy)

≤ 10 % of a gradient: 15 / 105 ms at Darcy level 1, 24–55 / 500–800 ms at level 2, 45 ms / 1.1 s at 11 → 16

d = 24 with a near-tied hint spectrum

the defaults do not converge in 10 passes in either layer

The implementation (slice records)#

check

result

the ragged step vs the dense oracle, d ∈ {1, 2, 3, 5} and the prototype list

principal-angle sines and movements within 1e-9 (the bar); frames orthonormal to 1e-12; the old block bitwise; both base-point reconstructions to 1e-12

uniform vs ragged, per element (varying ranks, gappy masks, forced padding, N padded, stacks, sharing)

step, start and loop to rounding (stacked vs per-element 1e-13); junk bitwise zero

uniform vs ragged loops on generic hints

the same pass counts; the captured energy equal to 1e-8 relative at tol=1e-10 (the uniform docstring’s example)

the start’s convention

each store equals the seeded pinned QR of its keyed rows; successive starts reuse no seed (both layers)

representation dependence (d = 4, generic, t3svd and shared points, three seeds each)

the layers’ starts differ by 0.95–1.00 in span; the aligned frames by 7e-4–3e-2 at the default tol (equal pass counts) and 8e-13–6e-11 at tol=1e-10 (pass counts within 2)

eager vs jitted loops (ragged and uniform)

the same pass counts and frames to rounding; the ragged jitted loop compiles at most four step programs, the uniform whole loop one program per structure, and a second eager-jax run at the same structure none

first-call times

ragged eager step at d = 4: 932 compilations, ~22 s (0.16 s after); jitted, one ~2 s compile. Uniform whole loop: 8.8 s at d = 6, 9.0 s at d = 24 (second call 0.02–0.08 s); eager jax 41.5 / 42.6 s (0.57 / 0.64 s after); numpy 0.2 / 0.6 s

memory mappings

8,000–9,500 per eager-jax alignment at a new structure (vm.max_map_count 65,530); jax.clear_caches() returns to ~900

mutation testing

every slice’s mutants killed or shown equivalent (the pinned-mask mutant of the uniform step is equivalent)

Acceptance (slice N10 and the GPU runs, 2026-11-10)#

The shipped padded_start on the Darcy o01 checkpoints (ragged numpy, seeds 0 / 1). The capture fraction is ‖P_F ∇f‖ / ‖∇f‖:

start

1 → 6

6 → 11

11 → 16

the library’s padded frame

.189

.117

.106

hint-free (Gaussian, slot-indexed)

.055 / .071

.091 / .092

.094 / .093

aligned, the default schedule (stopped at the 10-pass cap; equal to 10 fixed passes)

.451 / .464

.353 / .347

.262 / .260

Full ladders through T3Polynomial (A100, exact Hessian, gtol_rel=1e-3). Every level of every run stopped on the gradient tolerance, and every alignment on the 10-pass cap (last movements 0.27–0.43):

run

Newton

CG

best test p50

10 × 100, library start, 'zero'

254

10,175

0.0607

10 × 100, library start, 'cone'

119

2,610

0.0619

10 × 100, hint-free start, 'cone'

110

2,576

0.0631

10 × 100, aligned start, 'cone'

115

1,839

0.0622

20 × 1000, aligned start, 'cone'

166

4,130

0.0449

20 × 1000, hint-free start, 'cone'

191

4,719

0.0448

20 × 1000, library start, zero-type reference (2026-11-01, another card)

167

4,688

0.0450

The GN-to-Newton switch (2026.5.0)#

(Stated in ../fitting_and_optimization.md §4.14; the Gauss-Newton view is in curvature_internals.md.) Full Darcy ladders through T3Polynomial (2026-11-14; an A100, the uniform layer under use_jit in x64, gtol_rel=1e-3 on the 'zero' reference, at most 300 Newton steps a level, each run in its own process). The library start is the ladder’s default; the aligned start passes the previous level’s point as padded_from. CG is Gauss-Newton + exact iterations. AE (apply-equivalents) adds the exact iterations and the tracking products to the Gauss-Newton ones, each weighted by its measured cost in Gauss-Newton applies; it leaves out the builds, trials and objectives, and compares runs within one table only. Net wall leaves out compile and the display. The benchmark’s record (W3) is archived under dev/archive/. The automated guarantees are the switch tests in tests/backend/test_optimizers.py, tests/test_optimizers_frontend.py, tests/backend/test_optimizer_display.py and the dispatch tests.

10 points × 100 directions, six levels to rank 24 (tracking is switch_tau=0: Gauss-Newton with the trust region, plus the tracking product on every countable step):

start

newton_cg

Newton

CG

AE

net s

levels at the cap

selected level: val_fsr / test p50

best test p50

library

'switch'

223

206 + 6,097

19,794

177

0

4: 0.3697 / 0.0675

0.0632

library

'exact'

267

10,751

33,309

275

0

4: 0.3722 / 0.0682

0.0631

library

Gauss-Newton, trust region

1,618

27,023

27,023

436

4

4: 0.3720 / 0.0664

0.0601

library

Gauss-Newton, line search (the default)

1,625

24,682

24,682

427

4

4: 0.3736 / 0.0689

0.0614

library

tracking

1,510

24,521

53,769

575

4

4: 0.3744 / 0.0660

0.0630

aligned

'switch'

303

173 + 10,995

35,203

294

0

4: 0.3722 / 0.0684

0.0610

aligned

'exact'

231

9,237

28,471

230

0

5: 0.3688 / 0.0620

0.0620

aligned

Gauss-Newton, trust region

1,723

27,356

27,356

454

4

4: 0.3743 / 0.0678

0.0624

aligned

Gauss-Newton, line search (the default)

1,652

24,469

24,469

432

3

4: 0.3746 / 0.0671

0.0625

aligned

tracking

1,666

23,786

55,806

609

4

5: 0.3748 / 0.0621

0.0621

20 points × 1000 directions, eleven levels (Tucker to 23–24, inner TT rank to 50); no level at the cap:

start

newton_cg

Newton

CG

AE

net s

selected level: val_fsr / test p50

best test p50

library

'switch'

287

378 + 9,928

32,309

3,851

7: 0.3842 / 0.0461

0.0449

library

'exact'

291

10,511

33,413

4,011

8: 0.3841 / 0.0452

0.0450

aligned

'switch'

308

287 + 11,094

36,028

4,486

8: 0.3841 / 0.0452

0.0450

aligned

'exact'

288

11,006

34,938

4,262

8: 0.3842 / 0.0451

0.0449

  • The switch fired on every level of every switch run, after 4–10 Gauss-Newton rows; every Gauss-Newton-phase row was countable. Its tracking (the curvature data and the product) took 0.44–3.3 % of its net wall on the GPU, 0.24 % on the laptop.

  • At 10 × 100 the Gauss-Newton runs stopped at the 300-step cap on 3–4 of 6 levels, so their counts are lower bounds. The uncensored comparison is the switch against 'exact'.

  • A Gauss-Newton trust-region ladder at 20 × 1000 (library start) ran only levels 0–4: 1,157 Newton / 9,729 CG, against the switch’s 138 / 2,458 and 'exact'’s 140 / 2,759 over the same levels.

  • The decisive pair on a laptop CPU (library start, 10 × 100): the switch 219 Newton / 220 + 7,759 CG / 13,068 s net against 'exact'’s 277 / 9,139 / 16,777 s.

  • Each run was one GPU process, and the GPU rounds differently from process to process; a rank-deficient level start amplifies that, so a second run would not reproduce these counts row for row. In one process from one start, the Gauss-Newton trust-region run and switch_tau=0 are bitwise equal.