T3Tangent.probe#
- t3toolbox.manifold.T3Tangent.probe(ww)#
def probe( self, ww: typ.Sequence[NDArray], # probing vectors, len=d, elm_shape=W+(Ni,) ) -> typ.Sequence[NDArray]: # probes, len=d, elm_shape=W+K+C+(Ni,)
Probe this tangent vector: apply the single-sample least-squares Jacobian J^(s).
Contracts the tangent vector with the probing vectors
wwin all-but-one index, for each index – the tangent analogue ofTuckerTensorTrain.probe(). The probes are stackedW + K + C(probe stackWfromwwoutermost, tangent stackKnext, frame stackCinnermost).Kis empty unless this is a tangent-stacked (K-stacked) T3Tangent, in which caseJ^(s)is applied to each of theKtangent vectors sharing the frame.This is the bare
J^(s)(no gauge projectorPi); for the RiemannianJ = J^(s) o Picompose a gauge projection (e.g.ManifoldGeometry.project()) yourself.See Section 6.2.2 (Algorithms 6-7) of Alger et al. (2026), “Tucker Tensor Train Taylor Series” (arXiv:2603.21141).
See also
Examples
>>> import numpy as np >>> import t3toolbox.tucker_tensor_train as t3 >>> import t3toolbox.frame_variations_format as bvf >>> import t3toolbox.manifold as t3m >>> import t3toolbox.backend.probing as t3p >>> x = t3.TuckerTensorTrain.randn((10, 11, 12), (5, 6, 4), (1, 2, 3, 1)) >>> frame, variations = bvf.t3_orthogonal_representations(x) >>> v = t3m.T3Tangent(frame, variations) >>> ww = (np.random.randn(2, 10), np.random.randn(2, 11), np.random.randn(2, 12)) >>> zz = v.probe(ww) >>> print(zz[0].shape) # W + C + (N0,) = (2,) + () + (10,) (2, 10) >>> zz2 = t3p.dense_probe(ww, v.to_dense()) # dense reference >>> print(bool(max(float(np.linalg.norm(a - b)) for a, b in zip(zz, zz2)) < 1e-9)) True
A tangent-stacked (K-stacked) tangent probes each of its
Kvectors, outputW + K + C:>>> vb = t3m.COREWISE.randn(frame, stack_shape=(3,)) >>> zzb = vb.probe(ww) >>> print(zzb[0].shape) # W + K + C + (N0,) = (2,) + (3,) + () + (10,) (2, 3, 10)