CorewiseGeometry#
- class t3toolbox.manifold.CorewiseGeometry#
The Euclidean geometry of the core parameter space
P(the over-parametrized cover ofM).Optimization happens on the raw cores: tangents are perturbations of the cores
(U, G, G, G)(the non-orthonormal frame whose down/left/right cores are all the TT coresG), the metric is the plain Euclidean (corewise) inner product, the “projection” is the identity (no gauge), and the retraction is vector addition in the cores. The corewise gradient is a genuineT3Tangentat this frame – not a raw tuple. Gauge directions lie in the kernel of the pushforward, so the Gauss-Newton Hessian is gauge-singular (fine for Adam / L-BFGS, needs regularization for Newton). Use the module singletonCOREWISE. The §6.3 substitution(O, P, Q) -> Gis exactly this change of frame; the manifold counterpart isManifoldGeometry.Examples
>>> import numpy as np >>> import t3toolbox.tucker_tensor_train as t3 >>> import t3toolbox.manifold as t3m >>> np.random.seed(0) >>> x = t3.TuckerTensorTrain.randn((10, 11, 12), (3, 4, 3), (1, 2, 2, 1)) >>> frame = t3m.COREWISE.frame(x) # the (U, G, G, G) frame >>> v = t3m.COREWISE.randn(frame) # raw randn cores (no gauge) >>> print(v.is_gauged()) False >>> y = t3m.COREWISE.retract(v) # additive: cores += v (a multilinear curve on M) >>> U, G = x.data >>> dU, dG = v.variations.tucker_variations, v.variations.tt_variations >>> ref = t3.TuckerTensorTrain(tuple(u + du for u, du in zip(U, dU)), ... tuple(g + dg for g, dg in zip(G, dG))) >>> print(bool(np.allclose(y.to_dense(), ref.to_dense()))) True
Methods#
|
The core-parameter frame at |
|
Random tangent at |
|
A raw random tangent at |
|
The identity: the core parameter space is Euclidean, with no gauge projection. |
|
The Euclidean (coordinate) inner product of two tangents on the core parameter space. |
|
The Euclidean (coordinate) norm of a tangent (= |
|
Additive retraction: add the variation cores to the point's cores ( |