advanced40 min studyLesson 905 in Mathematics

Tensor trains and matrix product representations

Relate chain bond dimensions to prefix–suffix matrix ranks and track how mode ordering and gauge affect a representation.

On this page

What you’ll understand

  • Evaluate tensor entries by multiplying selected core slices.
  • Identify minimal TT ranks with prefix–suffix unfolding ranks.
  • Compute storage and explain ordering and gauge freedoms.

Tucker compression can leave a core whose size still grows exponentially with the number of modes. A tensor train replaces that large interaction core with a chain of small cores linked by summed bond indices. The resulting matrix product representation can be compact when its separation ranks stay small. It does not make every high-dimensional tensor cheap: the needed bond dimensions depend on both the tensor’s structure and the order in which modes are arranged along the chain.

Core slices multiply along a chain

For a real d-way tensor, core Gₖ has dimensions rₖ₋₁ by nₖ by rₖ, with boundary ranks r₀ = r_d = 1. Fixing the physical index iₖ leaves a matrix of size rₖ₋₁ by rₖ. Multiplying these matrices in chain order produces one scalar entry of the tensor. Expanding that multiplication sums all internal bond indices, so each bond index appears in two neighboring cores.

A representation stores the sum of rₖ₋₁nₖrₖ entries across its cores. If every physical dimension is at most n and every internal rank at most r, this is O(dnr²), with smaller boundary terms. The estimate assumes ranks stay bounded; generic tensors can require exponentially large central ranks. Also, efficient storage of factors does not permit materializing all dense entries without paying for the output size.

Ti1⋯id=G1(i1)G2(i2)⋯Gd(id),r0=rd=1,storage=∑k=1drk−1nkrkT_{i_1\cdots i_d}=G_1(i_1)G_2(i_2)\cdots G_d(i_d),\qquad r_0=r_d=1,\qquad \text{storage}=\sum_{k=1}^{d}r_{k-1}n_kr_k
Each Gₖ(iₖ) is a matrix slice. Their dimensions match so the ordered product is a scalar. Counts are raw core entries, including gauge freedom.↔ Scroll wide equations horizontally.

Separation ranks determine the minimal bonds

At a cut after mode k, group the first k indices into a row index and the remaining indices into a column index. Within each group use the first listed index as the fastest. Contracting the left and right portions of the train gives a matrix factorization through the bond index, so this unfolding rank is at most rₖ. Conversely, successive exact matrix factorizations construct a train whose bonds equal these separation ranks.

These prefix–suffix ranks differ from the individual mode ranks used by Tucker. Their values depend on the ordering. For the four-mode tensor δᵢ₁ᵢ₃δᵢ₂ᵢ₄ with each index taking two values, the cut (1, 2)|(3, 4) gives a four-by-four identity matrix and rank four. Reordering to (1, 3)|(2, 4) turns that central view into an outer product of two vectorized identities, with rank one. The surrounding cuts still have rank two. The data are unchanged up to index permutation, but the required chain structure improves.

rkmin⁡=rank⁡ ⁣(T⟨k⟩),T⟨k⟩∈R(n1⋯nk)×(nk+1⋯nd)r_k^{\min}=\operatorname{rank}\!\left(T^{\langle k\rangle}\right),\qquad T^{\langle k\rangle}\in\mathbb R^{(n_1\cdots n_k)\times(n_{k+1}\cdots n_d)}
The equality concerns minimal exact TT bond dimensions for the fixed mode order. A nonminimal representation can use larger bonds.↔ Scroll wide equations horizontally.

Gauge changes preserve the represented tensor

Insert an invertible matrix S on one side of a bond and its inverse on the other. The neighboring factors change, but their product and every tensor entry remain identical. This gauge freedom explains why core entries themselves are not uniquely determined by a tensor. Orthogonalization chooses convenient gauges so that contractions and local least-squares problems have controlled numerical behavior.

Truncating singular values in a sequence of orthogonalized cuts gives TT-SVD or train rounding. The accumulated Frobenius error is governed by squared discarded tails, not by adding arbitrary core-entry errors. Approximation can change the needed ranks significantly when singular values decay. Before selecting a bond budget, inspect the relevant cut spectra and decide which absolute or relative error target the application actually needs; a single rank value does not express both storage and accuracy.

Represent a two-component diagonal tensor as a train

For T₁₁₁ = 3, T₂₂₂ = 4 and other entries zero, construct a three-core train with bonds (2, 2), verify representative entries, and count core storage.

  1. Let G₁(1) = [3, 0] and G₁(2) = [0, 4]. Let G₂(1) = diag(1, 0) and G₂(2) = diag(0, 1). Finally set G₃(1) = [1, 0]ᵀ and G₃(2) = [0, 1]ᵀ.

  2. The products for (1, 1, 1) and (2, 2, 2) give three and four. Any unequal neighboring component choice is killed by a diagonal projector or the final column, so every other entry is zero.

  3. Both prefix–suffix unfoldings have rank two, proving these bonds are minimal. The raw storage is 1×2×2 + 2×2×2 + 2×2×1 = 16 scalars, larger than the eight dense entries of this tiny tensor.

The result

The minimal bonds are (2, 2), but minimal bond ranks alone do not guarantee a smaller raw representation for a small array.

Explore the model

Interactive lab

Interactive lab · matrix

A bond gauge can be undone by its neighbor

For each run Pause and Reset, then set both controls. Choose diagonal scale a = 0.5 and shear b = 0; predict determinant 0.5 for S. In a fresh run choose a = 2 and b = 0, giving S⁻¹ with determinant 2. Their matrix product is the identity, so inserting the pair across a train bond changes no tensor entry. The lab shows the two selected transformations separately, with final readouts; it does not store or contract train cores.

A bond gauge can be undone by its neighborThe selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. Current readings: Area scale · det A: 1.4; Singular values · σmax, σmin: 1.597, 0.876; Condition number · κ₂(A): 1.823. All parameters are adjustable with the labeled controls below.Matrix A with first row 1.4, 0.6 and second row zero, one; display interpolates between identity and A while final determinant remains 1.4.−4−2024−2−1012x · equal geometric scaleyA = [ 1.4 0.6 ; 0 1 ]Display blend: 0% · final values below
Interpolated geometryOriginal unit squareSelected final transform
Area scale · det A
1.4
Singular values · σmax, σmin
1.597, 0.876
Condition number · κ₂(A)
1.823
t = 0 s

The selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forInverse changes on neighboring factors can alter core coordinates while preserving the represented tensor.

Check your understanding

Which ranks give the minimal exact TT bonds for a fixed mode order?

Try it yourself

A six-mode train has each physical size four and every internal bond rank three. Count its raw core entries and compare with dense storage. Then explain why the count is an upper storage description rather than the number of distinct represented tensors.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Separate the two boundary cores from the four interior cores. Neighboring inverse gauge changes introduce redundancy.

Compare with the solution

Each boundary core contains 1×4×3 = 12 entries, and each of the four interior cores contains 3×4×3 = 36. The total is 12 + 4×36 + 12 = 168, compared with 4⁶ = 4096 dense entries. This representation is compact if the tensor admits those bonds exactly or to the required accuracy. The raw count includes gauge freedom: multiplying one bond by an invertible three-by-three matrix and the next core by its inverse changes stored numbers without changing the tensor. It therefore exceeds the intrinsic number of independent tensor parameters in the corresponding regular rank stratum.

Take it with you

  • Tensor trains evaluate entries through a chain of small matrix slices.
  • Minimal bond ranks equal fixed-order prefix–suffix unfolding ranks.
  • Ordering and gauge affect representations, while bounded ranks are an assumption behind linear-in-order storage.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.