fv_tied_lift_factors ==================== .. py:function:: t3toolbox.backend.sharing.fv_tied_lift_factors(frame, curvature_damping, shared_data, rcond = None) .. code-block:: python def fv_tied_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 shared_data: SharedFrameData, # the frame's companion (fv_shared_frame_data) rcond: typ.Optional[float] = None, # relative clip, per mode and per group ) -> fv_operations.LiftFactors: # with shared_data and one tied filter per nontrivial group The lift factors of a SHARED point -- :py:func:`~t3toolbox.backend.fv_operations.fv_lift_factors` plus, per nontrivial sharing group, the damped filter of the group's tied solve -- so that :py:func:`~t3toolbox.backend.tv_operations.tv_corewise_lift` lifts the group's Tucker slots TIED. On the shared set the point is ``Phi(T theta_sh)``, with ``T`` copying each group's factor to all its modes, and a tied coordinate ``V_i = S_i^T Bdot`` has ONE raw factor direction per group. The lift recovers it from all the group's coordinates at once, ``Bdot_g = M_g^{+eps} [V_i1; ...; V_ik]``, ``M_g = [S_i1^T; ...; S_ik^T]`` (the companion's stacked SVD), and puts it at every group mode; singleton modes and every TT slot lift as unshared. The group filter ``f(s_g) = s_g / (s_g^2 + eps^2)``, clipped (:py:func:`~t3toolbox.backend.linalg.filtered_reciprocal`), uses the same absolute ``eps = curvature_damping * ||X||_HS`` as the per-mode factors and the same SVD as the tied projection, so the two agree about the tied subspace. The per-mode Tucker factors of a group mode are still built but not used: ``M_g`` is what the tied lift inverts, so ``s_g`` (not a group mode's own spectrum) is the lift's singular value there -- the per-mode ``S_i^T`` can be rank-deficient on a perfectly regular shared point, when the group rank exceeds a mode's own ceiling. - **Exactness.** At ``eps = 0`` the tied lift satisfies ``dPhi[L v] = E v`` on tied coordinates wherever the stacked ``M_g`` has full column rank, which is the shared analogue of a numerically full-rank frame (the group spectrum ``s_g`` is the Jacobian spectrum of the shared factor, ``docs/sharing.md``). That is sufficient, not necessary: the group part stays exact at a zero-padded warm start too (a tied tangent's group coordinates lie in the range of ``M_g``, so the filter's zeros lose nothing; measured 8.8e-16), while the singleton Tucker and TT slots carry the unshared lift's caveat (exact on a numerically full-rank frame). - **Warm starts (zero-padded).** A zero-padded shared warm start's new ``s_g`` levels are zero, so their filter is exactly 0: the gated tied channel gets no curvature in the new directions, as it gets no first-order motion; the escape through the TT variations (their per-bond lift) is untouched. Requires an orthogonal frame and its own companion (check-free). Stack-aware (frame stack ``C``); dispatch is inferred. The uniform twin is :py:func:`~t3toolbox.backend.ufv_operations.ufv_tied_lift_factors`. .. rubric:: Examples The tied lift of a tied tangent is one factor direction per group, and it represents the tangent: >>> 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 >>> import t3toolbox.backend.tv_operations as tvo >>> import t3toolbox.backend.sharing as sharing >>> np.random.seed(0) >>> x = t3.TuckerTensorTrain.randn((6, 6, 4), (4, 4, 2), (1, 2, 2, 1)) >>> x = t3.TuckerTensorTrain(*sharing.t3_tie_tucker_factors(x.data, (0, 0, 1))) # a tied point >>> frame, _ = fvc.t3_orthogonal_representations(x.data) >>> sfd = sharing.fv_shared_frame_data(frame, sharing.validate_sharing((0, 0, 1), x.shape)) >>> v = tvo.tv_orthogonal_gauge_projection(frame, fvo.fv_variations_randn(fvo.fv_variation_shapes(frame)), ... shared_data=sfd) # a tied, gauged tangent >>> lf = sharing.fv_tied_lift_factors(frame, 0.0, sfd) >>> Bdot, Gdot = tvo.tv_corewise_lift(frame, v, lf) >>> print(Bdot[0] is Bdot[1], [b.shape for b in Bdot]) True [(4, 6), (4, 6), (2, 4)] >>> corewise_frame = fvc.t3_corewise_frame((frame[0], frame[2])) >>> print(np.allclose(tvo.tv_to_dense(corewise_frame, (Bdot, Gdot)), tvo.tv_to_dense(frame, v))) True Mode 0's own ``S_0^T`` is ``2 x 4`` here (the group rank 4 exceeds the mode's ceiling ``1 * 2``), so the per-mode lift -- a minimum-norm solve per mode -- still represents the tangent but is not TIED: it is no direction of the shared parametrization, and its second derivative (the curvature) is not the shared manifold's: >>> Bdot_pm, Gdot_pm = tvo.tv_corewise_lift(frame, v, fvo.fv_lift_factors(frame, 0.0)) >>> print(frame[1][0].shape[-2], np.allclose(tvo.tv_to_dense(corewise_frame, (Bdot_pm, Gdot_pm)), ... tvo.tv_to_dense(frame, v)), np.allclose(Bdot_pm[0], Bdot_pm[1])) 2 True False