sampling_derivatives#

Jet machinery: symmetric directional derivatives of probe/apply/entries, all in one place.

The *_derivatives ops strictly generalize the plain sampling ops with a leading order axis (order 0 == the plain op). The jets of the helper chain (compute_*_jets, binomial_combine_tensor) are shared across the three sampling types, which is why the derivative layer is one module rather than three. Math: docs/symmetric_probe_derivatives.tex; costs/usage: docs/entries_apply_probe.md.

Functions#

t3_probe_derivatives(ww, pp, x, order)

Symmetric derivatives of probing a Tucker tensor train, in one repeated direction.

check_perturbation_vectors(ww, pp)

Structural check (hard error): the perturbation P (pp) shares the sample stack W and

check_perturbation_index(index, pp[, shape])

Structural check (hard error): the perturbation P shares the sample stack W of the grid

binomial_combine_tensor(order)

Binomial tensor driving every jet convolution.

build_input_jets(xis, dxis)

Input jets: stack each (value, direction) pair on a leading order axis.

compute_mu_jets_trs(tt_cores, xi_jets, trs)

Left derivative-pushthrough jets.

compute_mu_jets(tt_cores, xi_jets, trs)

Left derivative-pushthrough jets (standard fused-recurrence form).

compute_nu_jets_trs(tt_cores, xi_jets, trs)

Right derivative-pushthrough jets.

compute_nu_jets(tt_cores, xi_jets, trs)

Right derivative-pushthrough jets (standard recurrence form).

compute_eta_jets_trs(tt_cores, mu_jets, nu_jets, trs)

Combine the left and right jets at each free mode via the binomial jet-product.

compute_eta_jets(tt_cores, mu_jets, nu_jets, trs)

Combine the left and right jets at each free mode (standard order-scan form).

assemble_z_jets(tucker_cores, eta_jets)

Lift the combined jets back to the ambient modes through the Tucker cores (order by order).

tv_precompute_apply_frame_sweep_jets(frame, ww, pp, order)

The apply-derivative frame sweep (lean): the up-index jet build_input_jets(U_i x_i, U_i p_i)

tv_precompute_entries_frame_sweep_jets(frame, index, ...)

The entries-derivative frame sweep (lean): like tv_precompute_apply_frame_sweep_jets()

tv_precompute_probe_frame_sweep_jets(frame, ww, pp, order)

The probe-derivative frame sweep (full): the jet-ified twin of

compute_sigma_jets_trs(var_tt_cores, right_tt_cores, ...)

Variation-leftward edge-variable jets sigma (the jet-ified Algorithm-7 sigma recursion).

compute_tau_jets_trs(var_tt_cores, left_tt_cores, ...)

Variation-rightward edge-variable jets tau -- the mirror of compute_sigma_jets_trs().

compute_deta_jets_trs(var_tt_cores, left_tt_cores, ...)

Variation-downward edge-variable jets deta (the jet-ified Algorithm-7 deta combine).

compute_deta_jets(var_tt_cores, left_tt_cores, ...)

Tangent combine at each free mode (standard order-scan form).

compute_sigma_jets(var_tt_cores, right_tt_cores, ...)

Variation-leftward edge-variable jets sigma (standard banded-recurrence form).

compute_tau_jets(var_tt_cores, left_tt_cores, ...)

Variation-rightward edge-variable jets tau (standard banded-recurrence form) -- sigma-banded on

assemble_tangent_z_jets(tucker_cores, ...)

Assemble tangent-probe-derivative jets: z_i = U_i deta_i + dU_i eta_i -- two lifts

tv_probe_jacobian_derivatives_from_sweep(variation, ...)

Variation half of tv_probe_derivatives() from a precomputed frame sweep: the

tv_probe_derivatives(ww, pp, variation, frame, order)

Symmetric derivatives of probing a tangent vector, in one repeated direction (Riemannian J^(s)).

t3_apply_derivatives(ww, pp, x, order)

Symmetric derivatives of applying a Tucker tensor train in all modes, in one repeated direction.

tv_apply_jacobian_derivatives_from_sweep(variation, ...)

Variation half of tv_apply_derivatives() from a precomputed frame sweep: the

tv_apply_derivatives(ww, pp, variation, frame, order)

Symmetric derivatives of applying a tangent vector in all modes, in one repeated direction.

t3_entries_derivatives(index, pp, x, order)

Symmetric derivatives of an entry of a Tucker tensor train, in one repeated direction.

tv_entries_jacobian_derivatives_from_sweep(variation, ...)

Variation half of tv_entries_derivatives() from a precomputed frame sweep:

tv_entries_derivatives(index, pp, variation, frame, order)

Symmetric derivatives of an entry of a tangent vector, in one repeated direction.

compute_deta_tilde_jets(up_tucker_cores, ztildes)

Adjoint-up edge-variable jets: deta_tilde_i = U_i r_i (contract the ambient mode, order

compute_tau_tilde_jets_trs(left_tt_cores, xi_jets, ...)

Adjoint-var-rightward edge-variable jets (jet-ified probing.compute_tau_tilde).

compute_sigma_tilde_jets_trs(right_tt_cores, xi_jets, ...)

Adjoint-var-leftward edge-variable jets -- the mirror (reverse) of compute_tau_tilde_jets_trs.

compute_tau_tilde_jets(left_tt_cores, xi_jets, ...)

Adjoint-var-leftward edge-variable jets tau_tilde (standard order-scan form). Dense reference:

compute_sigma_tilde_jets(right_tt_cores, xi_jets, ...)

Adjoint-var-rightward edge-variable jets sigma_tilde (standard order-scan form; reverse of

compute_dxi_tilde_jets(down_tt_cores, mu_jets, ...)

Adjoint-var-down edge-variable jets (jet-ified probing.compute_dxi_tilde): two adjoint-hooked

assemble_tucker_variation_jets_trs(ztildes, ...)

Assemble Tucker-core variation gradients (the 1-edge, plain-order-sum case):

assemble_tucker_variation_jets(ztildes, dxi_tildes, ...)

Assemble the Tucker variation gradient (standard W-chunked form; dense reference

assemble_tt_variation_jets_trs(sigma_tildes, ...)

Assemble TT-core variation gradients (the 3-edge, trs case): three order-less trs outer products

assemble_tt_variation_jets(sigma_tildes, tau_tildes, ...)

Assemble the TT variation gradient (standard W-chunked form; dense reference

estimate_chunk_size(mode_shapes, tucker_ranks, ...[, ...])

A memory-balanced chunk_size for the probe-derivative transpose assembly, from the problem

max_chunk_size_within(mode_shapes, tucker_ranks, ...)

The largest chunk_size whose gradient-assembly peak stays within target_bytes (per device)

tv_probe_transpose_derivatives_from_sweep(ztildes, ww, ...)

Variation gradient of tv_probe_derivatives_transpose() from a precomputed frame

tv_probe_derivatives_transpose(ztildes, ww, pp, frame, ...)

Transpose of tv_probe_derivatives(): back-project residual jets ztildes into a

compute_sigma_hat_jets(right_tt_cores, xi_jets, c, trs)

Propagation-only adjoint sweep via Q, seeded at the terminal bond by the residual jet c.

tv_apply_transpose_derivatives_from_sweep(c, ww, pp, ...)

Variation gradient of tv_apply_derivatives_transpose() from a precomputed frame

tv_apply_derivatives_transpose(c, ww, pp, frame, order)

Transpose of tv_apply_derivatives(): back-project residual jets c into a

tv_entries_transpose_derivatives_from_sweep(c, index, ...)

Variation gradient of tv_entries_derivatives_transpose() from a precomputed frame

tv_entries_derivatives_transpose(c, index, pp, frame, ...)

Transpose of tv_entries_derivatives(): scatter residual jets c at index

t3_probe_corewise_derivatives_transpose(ztildes, ww, ...)

Corewise (non-manifold) transpose of t3_probe_derivatives(): gradient of the

t3_apply_corewise_derivatives_transpose(c, ww, pp, ...)

Corewise transpose of t3_apply_derivatives(): gradient of the apply-derivative jets

t3_entries_corewise_derivatives_transpose(c, index, ...)

Corewise transpose of t3_entries_derivatives(): gradient of the entry-derivative jets

dense_probe_derivatives(ww, pp, T, order)

Exact dense symmetric probe derivatives, by the multilinear subset expansion (test oracle).

dense_apply_derivatives(ww, pp, T, order)

Exact dense symmetric apply derivatives, by the all-modes multilinear subset expansion (oracle).

dense_entries_derivatives(index, pp, T, order)

Exact dense symmetric entry derivatives (oracle): apply-derivatives with one-hot basis vectors