Papers
Topics
Authors
Recent
Search
2000 character limit reached

Einsum-Based Multiplicative Update

Updated 4 February 2026
  • The paper introduces a universal framework that fits nonnegative tensor factorizations via custom einsum-based multiplicative updates using majorization–minimization theory.
  • It details an algorithmic procedure that efficiently computes per-factor updates and guarantees convergence by strictly decreasing the loss in each iteration.
  • The approach demonstrates practical benefits such as GPU acceleration, handling missing data, and reduced computational cost on large-scale multiway datasets.

An einsum-based multiplicative update is a general framework for fitting nonnegative tensor factorizations by casting the factorization as a sequence of tensor contractions parameterized by Einstein summation (einsum) notation. This approach, as implemented in NNEinFact, enables the application of multiplicative update methods to essentially any nonnegative tensor factorization model that can be expressed as a tensor contraction, with a broad variety of loss functions including the (α,β)(α,β)-divergence. The algorithm utilizes Python-style einsum strings to specify custom factorization models, combines a universal update formula rooted in majorization–minimization theory, and offers practical routines for scaling, handling missing data, and GPU acceleration (Hood et al., 2 Feb 2026).

1. General Framework: Tensor Factorization as Einsum

Nonnegative tensor factorization aims to approximate a nonnegative MM-order tensor Y∈R+I1×⋯×IMY \in \mathbb{R}_+^{I_1 \times \cdots \times I_M} with a parameterized factorization Y^\hat Y constructed via LL factor tensors. The approximation is given by an LL-way tensor contraction:

y^i=∑r1=1R1⋯∑rK=1RK∏ℓ=1LΘiℓ,rℓ(ℓ)\hat y_{\mathcal{i}} = \sum_{r_1=1}^{R_1} \cdots \sum_{r_K=1}^{R_K} \prod_{\ell=1}^L \Theta^{(\ell)}_{i_\ell, r_\ell}

where each factor Θ(ℓ)\Theta^{(\ell)} is a tensor whose modes correspond to subsets of the observed and latent indices. The contraction pattern is specified by an einsum string, for example, y^i=∑r1=1R1⋯∑rK=1RK∏ℓ=1LΘiℓ,rℓ(ℓ)\hat y_{\mathcal{i}} = \sum_{r_1=1}^{R_1} \cdots \sum_{r_K=1}^{R_K} \prod_{\ell=1}^L \Theta^{(\ell)}_{i_\ell, r_\ell}1 invokes the contraction to yield the desired shape and structure of Y^\hat Y. Custom models, including CP, Tucker, tensor train, or arbitrary user-defined forms, can be defined by varying the einsum string (Hood et al., 2 Feb 2026).

2. Universal Multiplicative Update Derivation

The general goal is to minimize a differentiable loss

L(Y,Y^)=∑indices iℓ(yi,y^i)L(Y,\hat Y) = \sum_{\text{indices }i} \ell(y_i, \hat y_i)

where each factor MM0. The core update is a multiplicative step for each factor MM1:

MM2

where the numerator and denominator are defined via sum contractions over all relevant indices involving element-wise functions MM3 and MM4, and MM5 is a scalar map dictated by the loss choice. Specifically,

  • MM6 (other factors)
  • MM7 (other factors)

Alternatively, in the positive/negative gradient view:

MM8

with contractions corresponding to appropriate einsum patterns for the positive and negative components (Hood et al., 2 Feb 2026).

Common loss functions and their corresponding MM9, Y∈R+I1×⋯×IMY \in \mathbb{R}_+^{I_1 \times \cdots \times I_M}0, Y∈R+I1×⋯×IMY \in \mathbb{R}_+^{I_1 \times \cdots \times I_M}1 mappings are:

Loss type Y∈R+I1×⋯×IMY \in \mathbb{R}_+^{I_1 \times \cdots \times I_M}2 Y∈R+I1×⋯×IMY \in \mathbb{R}_+^{I_1 \times \cdots \times I_M}3 Y∈R+I1×⋯×IMY \in \mathbb{R}_+^{I_1 \times \cdots \times I_M}4
Frobenius Y∈R+I1×⋯×IMY \in \mathbb{R}_+^{I_1 \times \cdots \times I_M}5 Y∈R+I1×⋯×IMY \in \mathbb{R}_+^{I_1 \times \cdots \times I_M}6 Y∈R+I1×⋯×IMY \in \mathbb{R}_+^{I_1 \times \cdots \times I_M}7
KL Divergence Y∈R+I1×⋯×IMY \in \mathbb{R}_+^{I_1 \times \cdots \times I_M}8 Y∈R+I1×⋯×IMY \in \mathbb{R}_+^{I_1 \times \cdots \times I_M}9 Y^\hat Y0
Y^\hat Y1-Divergence Y^\hat Y2 Y^\hat Y3 Y^\hat Y4 (regime-dependent)

For each loss, the corresponding update embodies the majorization–minimization step derived under mild convexity and decomposability conditions (Hood et al., 2 Feb 2026).

3. Computational Procedure and Pseudocode

The practical algorithm cycles through the following steps until convergence:

  1. Recompute Fit: Compute Y^\hat Y5 via einsum contraction.
  2. Per-Factor Update: For each factor Y^\hat Y6:
    • Compute the numerator (A): einsum contraction of all factors with Y^\hat Y7 at position Y^\hat Y8
    • Compute the denominator (B): einsum contraction with Y^\hat Y9
    • Update: LL0
  3. Convergence Check: Early stopping via held-out divergence (5–10%) or relative loss decrease LL1

Python-style pseudocode:

y^i=∑r1=1R1⋯∑rK=1RK∏ℓ=1LΘiℓ,rℓ(ℓ)\hat y_{\mathcal{i}} = \sum_{r_1=1}^{R_1} \cdots \sum_{r_K=1}^{R_K} \prod_{\ell=1}^L \Theta^{(\ell)}_{i_\ell, r_\ell}2 This routine allows rapid prototyping of new factorization models by simply specifying a new einsum string and loss function (Hood et al., 2 Feb 2026).

4. Theoretical Guarantees and Convergence

The update scheme follows a majorization–minimization (MM) framework. At each block update, a tight surrogate LL2 is constructed, with equality at the current iterate. Minimizing LL3 with respect to LL4 yields the stated multiplicative update. Theorem 2.3 asserts that, assuming decomposability of the loss and model structure, each update strictly decreases the loss LL5 and the sequence converges to a stationary point (local minimum) (Hood et al., 2 Feb 2026). This holds for a wide class of models and losses supported by the einsum formulation.

5. Computational Complexity and Implementation Notes

The per-iteration complexity per factor LL6 consists of two einsum computations of cost LL7, and an LL8 cost to apply the update. For sparse LL9, computation can be restricted to nonzero entries, reducing cost to LL0. Only LL1 factor matrices/tensors and the current LL2 are stored in memory. Missing data can be incorporated by maintaining a mask LL3 and replacing LL4, LL5 in all contractions. GPU-accelerated einsum (via PyTorch or NumPy backends) yields multifold speedups relative to explicit loops (Hood et al., 2 Feb 2026).

6. Empirical Performance and Applications

Empirical evaluation considers large, real-world datasets, such as:

  • Uber (5-way, LL6)
  • ICEWS (4-way, LL7)
  • WITS (4-way, LL8)

Optimization comparisons demonstrate that NNEinFact outperforms Adam (tested over six learning rates) across LL9 losses, converging up to 90y^i=∑r1=1R1⋯∑rK=1RK∏ℓ=1LΘiℓ,rℓ(ℓ)\hat y_{\mathcal{i}} = \sum_{r_1=1}^{R_1} \cdots \sum_{r_K=1}^{R_K} \prod_{\ell=1}^L \Theta^{(\ell)}_{i_\ell, r_\ell}0 faster in wall time and achieving less than half the held-out divergence of gradient-based methods. Model-level comparisons show that custom einsum models fitted by this approach yield 10–37% lower held-out divergence than standard CP, Tucker, tensor train, or low-rank Tucker models. Qualitative analyses (e.g., the Uber dataset) recover interpretable spatiotemporal classes using significantly fewer parameters relative to CP models (Hood et al., 2 Feb 2026).

7. Applicability and Significance

The einsum-based multiplicative update framework provides a universal, efficient, and customizable method for nonnegative tensor factorization across a diversity of losses and model structures. It enables researchers to flexibly define bespoke tensor contractions and losses, eliminates the need to design new update rules for each model, and empirically achieves superior convergence and predictive performance relative to standard approaches. This framework supports missing data, scales to tensors with hundreds of millions of entries, and is amenable to GPU acceleration, facilitating practical deployment across scientific domains with complex multiway data (Hood et al., 2 Feb 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Einsum-Based Multiplicative Update.