8.2 Tensor Decomposition Algorithms

DATA 442/642 · Week 8 · PDF · Slides

CP, Tucker, and how the factors are computed.

These notes walk through the lecture slides. The original deck is unchanged; use (slides) on the course hub if you want that PDF.

Figures and notes follow Introduction to Tensor Decompositions and their Applications in Machine Learning.

1. Tucker decomposition

Tucker writes a tensor as a core tensor plus a factor matrix per mode. It is a higher-order PCA.

Core tensor. A compressed version of the original: the essential interactions, in a smaller array.

Factor matrices. Principal components in that mode. Multiply them with the core to stretch back to the original sizes.


2. Why higher-order PCA?

PCA decomposes a matrix into orthogonal components that capture variance. Tucker does the same for a tensor: a core, and matrices that capture variance along each mode.

PCA reduces matrix dimension by keeping the important components. Tucker reduces tensor dimension by keeping the important interactions. That is the analysis and visualization move for multiway data.


3. Practical benefits

Compression. Choose a core smaller than 𝒳. Less storage, cheaper arithmetic.

Interpretability. Each column of a factor matrix is a principal component along that mode.

Flexibility. You choose the core size, so you choose how much you compress versus how much detail you keep. Other decompositions are less free here.

Picture the core as a small dense block of interactions, and each factor matrix as axes that stretch or compress that block back toward the data.


4. Problem formulation

For 𝒳∈ℝI×J×K, find 𝒢∈ℝP×Q×R, 𝐀∈ℝI×P, 𝐁∈ℝJ×Q, 𝐂∈ℝK×R solving

min𝒳^‖𝒳−𝒳^‖with𝒳^=∑p=1P∑q=1Q∑r=1Rgpqr𝐚p⊚𝐛q⊚𝐜r=𝒢×1𝐀×2𝐁×3𝐂.

Tucker decomposition: core and three factor matrices

  • 𝒢 is the core: how, and how much, elements interact.
  • 𝐀, 𝐁, 𝐂 are the principal components in each mode.
  • If P<I, Q<J, R<K, you compress: 𝒢 is the compressed 𝒳.

Matricized form (⊗ is Kronecker):

X^(1)=𝐀G(1)(𝐂⊗𝐁)⊤, X^(2)=𝐁G(1)(𝐂⊗𝐀)⊤, X^(3)=𝐂G(1)(𝐁⊗𝐀)⊤.

N-way:

𝒳^=∑r1=1R1⋯∑rN=1RNgr1⋯rN𝐚i1r1(1)⊚⋯⊚𝐚iNrN(N)=𝒢×1𝐀(1)×2⋯×N𝐀(N), X^(n)=𝐀(n)G(n)(𝐀(N)⊗⋯⊗𝐀(n+1)⊗𝐀(n−1)⊗⋯⊗𝐀(1))⊤.

5. n-rank

Before computing Tucker, you need n-rank.

The n-rank of 𝒳∈ℝI1×⋯×IN is the column rank of the nth unfolding X(n), written rankn(𝒳).

This is not the tensor rank of the previous note.


6. Higher-order SVD (HOSVD)

For a given 𝒳 there is an exact Tucker decomposition of rank (R1,…,RN) with Rn=rankn(𝒳). That factorization is HOSVD.

The idea: in each mode n, find the components that best capture variation in that mode alone, ignoring the others for that step. PCA, one unfolding at a time.

HOSVD (𝒳;R1,…,RN):

  1. For n=1,…,N: set 𝐀(n) to the Rn leading left singular vectors of X(n).
  2. Core:
𝒢=𝒳×1𝐀(1)⊤×2⋯×N𝐀(N)⊤.
  1. Return 𝒢,𝐀(1),…,𝐀(N).

7. Limitations of Tucker

  • Cost. Factor matrices plus core are expensive for large tensors and high ranks.
  • Memory. The core and the factors can be large.
  • Initialization. Quality can depend on the starting factors; optimality is not guaranteed.

8. Canonical polyadic decomposition (CPD)

An alternative: write the tensor as a sum of a finite number of rank-1 tensors. CPD comes from CANDECOMP (canonical decomposition) and PARAFAC (parallel factors).

Canonical polyadic decomposition as a sum of rank-1 terms

Tucker CPD
Flexibility Different ranks per mode; complex interactions Rank-1 sum; simpler structure
Interpretability Core shows how modes interact Factor matrices as patterns in each mode
Compression / scale Can compress well when interactions are complex Cheaper; often scales better on large or high-order data

Practice

  1. In Tucker, what does the core tensor store that a CPD sum of rank-1 terms does not?

  2. How does HOSVD choose each factor matrix 𝐀(n)?

  3. When might you prefer CPD to Tucker?