UniformManifoldGeometry#

class t3toolbox.uniform_manifold.UniformManifoldGeometry#

The Riemannian geometry of the uniform fixed-rank Tucker tensor train manifold (uniform mirror of ManifoldGeometry).

A stateless bundle of the chart-level choices that distinguish the manifold from the over-parametrized corewise geometry – the orthonormal frame (frame()), the gauge projection Pi (project()), and the manifold retraction (retract()) – plus the ambient projection and transport. Tangents live in T_xM with an orthonormal, gauged frame; the metric is Hilbert-Schmidt. All methods are per-element-mask-aware (varying ranks across the frame stack C are supported) and carry the per-element safe-mode preconditions (orthogonal frame, gauged variations; .all() over the stack). Use the module singleton UNIFORM_MANIFOLD. The corewise counterpart is UniformCorewiseGeometry.

Examples

>>> import numpy as np
>>> import t3toolbox.tucker_tensor_train as t3
>>> import t3toolbox.uniform_tucker_tensor_train as ut3
>>> import t3toolbox.uniform_manifold as ut3m
>>> np.random.seed(0)
>>> x = ut3.UniformTuckerTensorTrain.from_t3(t3.TuckerTensorTrain.randn((10, 11, 12), (3, 4, 3), (1, 2, 2, 1)))
>>> frame = ut3m.UNIFORM_MANIFOLD.frame(x)            # orthonormal frame at x
>>> print(bool(frame.is_orthogonal().all()))
True
>>> v = ut3m.UNIFORM_MANIFOLD.randn(frame)           # a standard Gaussian on T_xM (gauged)
>>> print(bool(v.is_gauged().all()))
True
>>> y = ut3m.UNIFORM_MANIFOLD.retract(ut3m.UT3Tangent.zeros(frame))   # retract the zero tangent == the base point
>>> print(bool(np.allclose(y.to_dense(), x.to_dense())))
True

Methods#

frame(x)

The orthonormal frame at x (the frame part of ut3_orthogonal_representations).

randn(frame[, stack_shape])

Random tangent at frame: a standard Gaussian on the tangent space T_xM.

random_orthogonal(shape, tucker_ranks, tt_ranks[, ...])

A gauged random tangent at a random orthogonal base point (random direction, random frame).

randn_like(tangent)

A gauged random tangent at tangent's frame, with tangent's tangent stack K.

project(v)

The gauge projection Pi: raw cotangent -> Riemannian gradient (orthogonal gauge).

project_oblique(v)

Gauge v's variations while preserving the represented tangent vector (oblique projection).

inner(t1, t2)

The Hilbert-Schmidt inner product of two tangents -- the Riemannian metric on the manifold.

norm(t)

The Hilbert-Schmidt norm of a tangent. Safe mode checks the frame orthogonal + variations

retract(p)

Retract the step p to the manifold: shifted doubled-rank embedding, truncated to frame ranks.

project_ambient(frame, grad)

Project an ambient gradient onto T_xM -- the Riemannian gradient.

transport(v, new_frame)

Projective vector transport of v to the tangent space at new_frame.