fv_lift_factors =============== .. py:function:: t3toolbox.backend.fv_operations.fv_lift_factors(frame, curvature_damping, rcond = None) .. code-block:: python def fv_lift_factors( frame: typ.Tuple[ typ.Sequence[NDArray], # down_tucker_cores. len=d, elm_shape=C+(nDi, Ni) typ.Sequence[NDArray], # up_tt_cores. len=d, elm_shape=C+(rLi, nUi, rR(i+1)) typ.Sequence[NDArray], # left_tt_cores. len=d, elm_shape=C+(rLi, nDi, rL(i+1)) typ.Sequence[NDArray], # right_tt_cores. len=d, elm_shape=C+(rRi, nDi, rR(i+1)) ], curvature_damping: typ.Union[float, NDArray], # RELATIVE: eps = curvature_damping * ||X||_HS, >= 0 rcond: typ.Optional[float] = None, # relative clip (linalg.damped_pseudo_inverse) ) -> LiftFactors: The damped pseudo-inverses that lift frame coordinates to raw core variations. At an orthogonal frame of ``X = Phi(theta)``, with ``theta = (D, L)`` the frame's own raw cores (the left-canonical gauge of the base point), a gauged-or-not coordinate ``v = (V_i, H_i)`` and a raw variation ``theta_hat = (Bdot_i, Gdot_i)`` represent the same tangent vector, ``dPhi(theta)[theta_hat] = E v``, when ``Bdot_i = (S_i^T)^+ V_i``, ``Gdot_i = H_i x_3 T_i^+`` (``i <= d-2``), ``Gdot_{d-1} = H_{d-1}``, with ``S_i^T`` and ``T_i`` the center factors (:py:func:`fv_center_factors`). This function returns those pseudo-inverses, damped by the Tikhonov filter ``sigma / (sigma^2 + eps^2)`` (:py:func:`~t3toolbox.backend.linalg.damped_pseudo_inverse`), with the absolute damping ``eps = curvature_damping * ||X||_HS``, ``||X||_HS^2 = sum(sigma(S_0)^2)``, so ``curvature_damping`` is scale-free. The lift itself is :py:func:`~t3toolbox.backend.tv_operations.tv_corewise_lift`; at a shared point (tied Tucker factors) build the factors with :py:func:`~t3toolbox.backend.sharing.fv_tied_lift_factors` instead, which lifts each sharing group to one factor direction. - **Exactness.** At ``eps = 0`` the lift is exact on every *numerically full-rank* frame from ``t3_orthogonal_representations``, minimal or not: a Tucker-slack ``S_i^T`` is wide (``nUi < nDi``) and a TT-slack ``T_i`` is tall (``rR < rL``), and on both the pseudo-inverse is an exact one-sided inverse. At a rank-deficient point (a zero-padded warm start) the clipped directions drop out: the lift then satisfies ``dPhi[theta_hat] = E(Q v)`` with ``Q`` the projection off the clipped directions, not ``dPhi[theta_hat] = E v``. - **Rank-deficient points.** The filter clips (to exactly 0) every singular value below ``rcond * sigma_max``, so a zero-padded warm start -- whose padded singular values are roundoff -- gives finite factors at any ``eps``, ``eps = 0`` included. At the zero tensor everything is clipped: the lift is zero except the undamped last TT slot. - **Why it exists.** The lift is the only place an inverse singular value enters the exact Hessian (the Weingarten term of Absil, Mahony & Trumpf (2013), "An extrinsic look at the Riemannian Hessian"; the TT analogue of Psenka & Boumal (2020), arXiv:2011.13395, ``R_k^{-1}``). The damping bounds it by ``1/(2 eps)`` near a rank drop. Requires an orthogonal frame (the identities presume it; check-free, like all backend functions). Stack-aware: the factors and ``eps`` carry the frame stack ``C``; they broadcast over a tangent stack ``K`` in the lift. Dispatch is inferred. .. rubric:: Examples The absolute damping is relative to the tensor's norm, and at ``curvature_damping = 0`` the factors are the exact pseudo-inverses: >>> import numpy as np >>> import t3toolbox.tucker_tensor_train as t3 >>> import t3toolbox.backend.fv_conversions as fvc >>> import t3toolbox.backend.fv_operations as fvo >>> np.random.seed(0) >>> x = t3.TuckerTensorTrain.randn((5, 6, 7), (2, 3, 2), (1, 2, 2, 1)) >>> frame, _ = fvc.t3_orthogonal_representations(x.data) >>> lf = fvo.fv_lift_factors(frame, 1e-6) >>> print(bool(np.isclose(lf.eps, 1e-6 * np.linalg.norm(x.to_dense())))) True >>> lf0 = fvo.fv_lift_factors(frame, 0.0) >>> _, tucker_factors_T, bond_factors = fvo.fv_center_factors(frame) >>> print(np.allclose(lf0.tucker_pinvs[1], np.linalg.pinv(tucker_factors_T[1])), ... np.allclose(lf0.bond_pinvs[0], np.linalg.pinv(bond_factors[0]))) True True