optimizers#
Backend-first optimization algorithms for fixed-rank T3 least-squares fitting.
These operate on raw cores / tangent tuples via backend functions only – no frontend imports
(no TuckerTensorTrain / T3Tangent / GaussNewtonModel / geometry classes). A raw-.data
user can call them directly; the frontend optimizers.py is a thin adapter that validates the input
once and assembles the Problem oracle from the same backend functions (design:
dev/archive/optimizers_plan.md).
Because the numerical safety preconditions live only in the frontend, this layer is check-free of
them (structural shape guards inside the backend functions remain, and are jit-safe). So jit needs no
unsafe() wrapping; the use_jit machinery is a thin jax-only layer on top of the ordinary
numpy/jax dispatch (the per-step kernels jit via _maybe_jit; the inner CG runs as a
lax.while_loop – eager-vs-jit agreement is covered in tests/backend/test_optimizers.py).
The oracle:
Problem– (geometry ops, sampling kind, sample, data); builds per-pointLocalModelobjects and retracts.LocalModel– the GN model linearized at a point (.gradient/.objective/.hvp/.gn_quadratic/.retract), the backend twin offitting.GaussNewtonModel.GeometryOps– (frame, project, retract) on raw data;MANIFOLD_OPS/COREWISE_OPSsingletons.
Tangent vectors are raw (tucker_var, tt_var) tuples; vector arithmetic is the corewise ops.
Attributes#
Classes#
The Gauss-Newton model linearized at a point -- the backend twin of |
|
A fixed-rank least-squares fitting problem |
|
Per-iteration diagnostics passed to a |
Functions#
|
Assemble a least-squares |
|
The default minibatch draw: a uniform random subset of |
|
Steepest descent with a Cauchy initial step and an Armijo backtracking line search. The step |
|
Manifold Cauchy SGD (T4S §5.3.2): minibatch + the tuning-free Cauchy step |
|
Adam over the cores -- the dependency-free first-order method for the corewise geometry. The |
|
Inexact Riemannian Newton-CG with an Armijo line search -- the manifold workhorse (the gauged |
Module Contents#
- COREWISE_OPS#
- MANIFOLD_OPS#