Tensor rank decomposition explained
In multilinear algebra, the tensor rank decomposition [1] or rank-R decomposition is the decomposition of a tensor as a sum of R rank-1 tensors, where R is minimal. Computing this decomposition is an open problem.
Canonical polyadic decomposition (CPD) is a variant of the tensor rank decomposition, in which the tensor is approximated as a sum of K rank-1 tensors for a user-specified K. The CP decomposition has found some applications in linguistics and chemometrics. It was introduced by Frank Lauren Hitchcock in 1927[2] and later rediscovered several times, notably in psychometrics.[3] [4] The CP decomposition is referred to as CANDECOMP, PARAFAC, or CANDECOMP/PARAFAC (CP). Note that the PARAFAC2 rank decomposition is a variation of the CP decomposition.[5]
Another popular generalization of the matrix SVD known as the higher-order singular value decomposition computes orthonormal mode matrices and has found applications in econometrics, signal processing, computer vision, computer graphics, and psychometrics.
Notation
A scalar variable is denoted by lower case italic letters,
and an upper bound scalar is denoted by an upper case italic letter,
.
Indices are denoted by a combination of lowercase and upper case italic letters,
. Multiple indices that one might encounter when referring to the multiple modes of a tensor are conveniently denoted by
where
.
A vector is denoted by a lower case bold Times Roman,
and a matrix is denoted by bold upper case letters
.
A higher order tensor is denoted by calligraphic letters,
. An element of an
-order tensor
is denoted by
or
.
Definition
A data tensor
is a collection of multivariate observations organized into a -way array where =+1. Every tensor may be represented with a suitably large
as a linear combination of
rank-1 tensors:
l{A}=
λra0,r ⊗ a1,r ⊗ a2,r... ⊗ ac,r ⊗ … ⊗ aC,r,
where
and
where
. When the number of terms
is minimal in the above expression, then
is called the
rank of the tensor, and the decomposition is often referred to as a
(tensor) rank decomposition,
minimal CP decomposition, or
Canonical Polyadic Decomposition (CPD). If the number of terms is not minimal, then the above decomposition is often referred to as
CANDECOMP/PARAFAC,
Polyadic decomposition'.Tensor rank
Contrary to the case of matrices, computing the rank of a tensor is NP-hard.[6] The only notable well-understood case consists of tensors in
, whose rank can be obtained from the
Kronecker–
Weierstrass normal form of the linear
matrix pencil that the tensor represents.
[7] A simple polynomial-time algorithm exists for certifying that a tensor is of rank 1, namely the
higher-order singular value decomposition.
The rank of the tensor of zeros is zero by convention. The rank of a tensor
is one, provided that
.
Field dependence
The rank of a tensor depends on the field over which the tensor is decomposed. It is known that some real tensors may admit a complex decomposition whose rank is strictly less than the rank of a real decomposition of the same tensor. As an example, consider the following real tensor
l{A}=x1 ⊗ x2 ⊗ x3+x1 ⊗ y2 ⊗ y3-y1 ⊗ x2 ⊗ y3+y1 ⊗ y2 ⊗ x3,
where
. The rank of this tensor over the reals is known to be 3, while its complex rank is only 2 because it is the sum of a complex rank-1 tensor with its
complex conjugate, namely
}_1 \otimes \mathbf_2 \otimes \bar_3 + \mathbf_1 \otimes \bar_2 \otimes \mathbf_3),
where
.
In contrast, the rank of real matrices will never decrease under a field extension to
: real matrix rank and complex matrix rank coincide for real matrices.
Generic rank
The generic rank
is defined as the least rank
such that the closure in the
Zariski topology of the set of tensors of rank at most
is the entire space
. In the case of complex tensors, tensors of rank at most
form a
dense set
: every tensor in the aforementioned space is either of rank less than the generic rank, or it is the limit in the
Euclidean topology of a sequence of tensors from
. In the case of real tensors, the set of tensors of rank at most
only forms an open set of positive measure in the Euclidean topology. There may exist Euclidean-open sets of tensors of rank strictly higher than the generic rank. All ranks appearing on open sets in the Euclidean topology are called
typical ranks. The smallest typical rank is called the generic rank; this definition applies to both complex and real tensors. The generic rank of tensor spaces was initially studied in 1983 by
Volker Strassen.
[8] As an illustration of the above concepts, it is known that both 2 and 3 are typical ranks of
while the generic rank of
is 2. Practically, this means that a randomly sampled real tensor (from a continuous probability measure on the space of tensors) of size
will be a rank-1 tensor with probability zero, a rank-2 tensor with positive probability, and rank-3 with positive probability. On the other hand, a randomly sampled complex tensor of the same size will be a rank-1 tensor with probability zero, a rank-2 tensor with probability one, and a rank-3 tensor with probability zero. It is even known that the generic rank-3 real tensor in
will be of complex rank equal to 2.
The generic rank of tensor spaces depends on the distinction between balanced and unbalanced tensor spaces. A tensor space
, where
,is called
unbalanced whenever
and it is called balanced otherwise.
Unbalanced tensor spaces
When the first factor is very large with respect to the other factors in the tensor product, then the tensor space essentially behaves as a matrix space. The generic rank of tensors living in an unbalanced tensor spaces is known to equal
r(I1,\ldots,IM)=min\left\{I1,
Im\right\}
almost everywhere. More precisely, the rank of every tensor in an unbalanced tensor space
, where
is some indeterminate closed set in the Zariski topology, equals the above value.
[9] Balanced tensor spaces
The expected generic rank of tensors living in a balanced tensor space is equal to
rE(I1,\ldots,IM)=\left\lceil
\right\rceil
almost everywhere for complex tensors and on a Euclidean-open set for real tensors, where
\Pi=
Im and \Sigma=
(Im-1).
More precisely, the rank of every tensor in
, where
is some indeterminate closed set in the
Zariski topology, is expected to equal the above value.
[10] For real tensors,
is the least rank that is expected to occur on a set of positive Euclidean measure. The value
is often referred to as the
expected generic rank of the tensor space
because it is only conjecturally correct. It is known that the true generic rank always satisfies
r(I1,\ldots,IM)\gerE(I1,\ldots,IM).
The Abo–Ottaviani–Peterson conjecture states that equality is expected, i.e.,
r(I1,\ldots,IM)=rE(I1,\ldots,IM)
, with the following exceptional cases:
In each of these exceptional cases, the generic rank is known to be
r(I1,\ldots,Im,\ldots,IM)=rE(I1,\ldots,IM)+1
. Note that while the set of tensors of rank 3 in
is defective (13 and not the expected 14), the generic rank in that space is still the expected one, 4. Similarly, the set of tensors of rank 5 in
is defective (44 and not the expected 45), but the generic rank in that space is still the expected 6.
The AOP conjecture has been proved completely in a number of special cases. Lickteig showed already in 1985 that
, provided that
.
[11] In 2011, a major breakthrough was established by Catalisano, Geramita, and Gimigliano who proved that the expected dimension of the set of rank
tensors of format
is the expected one except for rank 3 tensors in the 4 factor case, yet the expected rank in that case is still 4. As a consequence,
r(2,2,\ldots,2)=rE(2,2,\ldots,2)
for all binary tensors.
[12] Maximum rank
The maximum rank that can be admitted by any of the tensors in a tensor space is unknown in general; even a conjecture about this maximum rank is missing. Presently, the best general upper bound states that the maximum rank
of
, where
, satisfies
rmax(I1,\ldots,IM)\lemin\left\{
Im,2 ⋅ r(I1,\ldots,IM)\right\},
where
is the (least)
generic rank of
.
[13] It is well-known that the foregoing inequality may be strict. For instance, the generic rank of tensors in
is two, so that the above bound yields
, while it is known that the maximum rank equals 3.
[14] Border rank
A rank-
tensor
is called a
border tensor if there exists a sequence of tensors of rank at most
whose limit is
. If
is the least value for which such a convergent sequence exists, then it is called the
border rank of
. For order-2 tensors, i.e., matrices, rank and border rank
always coincide, however, for tensors of order
they may differ. Border tensors were first studied in the context of fast
approximate matrix multiplication algorithms by Bini, Lotti, and Romani in 1980.
[15] A classic example of a border tensor is the rank-3 tensor
l{A}=u ⊗ u ⊗ v+u ⊗ v ⊗ u+v ⊗ u ⊗ u, with\|u\|=\|v\|=1and\langleu,v\rangle\ne1.
It can be approximated arbitrarily well by the following sequence of rank-2 tensors
\begin{align}l{A}m&=m(u+
v) ⊗ (u+
v) ⊗ (u+
v)-mu ⊗ u ⊗ u\\
&=u ⊗ u ⊗ v+u ⊗ v ⊗ u+v ⊗ u ⊗ u+
(u ⊗ v ⊗ v+v ⊗ u ⊗ v+v ⊗ v ⊗ u)+
v ⊗ v ⊗ v
\end{align}
as
. Therefore, its border rank is 2, which is strictly less than its rank. When the two vectors are orthogonal, this example is also known as a
W state.
Properties
Identifiability
It follows from the definition of a pure tensor that
l{A}=a1 ⊗ a2 ⊗ … ⊗ aM=b1 ⊗ b2 ⊗ … ⊗ bM
if and only if there exist
such that
and
for all
m. For this reason, the parameters
of a rank-1 tensor
are called identifiable or essentially unique. A rank-
tensor
is called
identifiable if every of its tensor rank decompositions is the sum of the same set of
distinct tensors
\{l{A}1,l{A}2,\ldots,l{A}r\}
where the
's are of rank 1. An identifiable rank-
thus has only one essentially unique decomposition
and all
tensor rank decompositions of
can be obtained by permuting the order of the summands. Observe that in a tensor rank decomposition all the
's are distinct, for otherwise the rank of
would be at most
.
Generic identifiability
Order-2 tensors in
, i.e., matrices, are not identifiable for
. This follows essentially from the observation
where
is an invertible
matrix,
,
,
and
. It can be shown
[16] that for every
, where
is a closed set in the Zariski topology, the decomposition on the right-hand side is a sum of a different set of rank-1 tensors than the decomposition on the left-hand side, entailing that order-2 tensors of rank
are generically not identifiable.
The situation changes completely for higher-order tensors in
with
and all
. For simplicity in notation, assume without loss of generality that the factors are ordered such that
. Let
denote the set of tensors of rank bounded by
. Then, the following statement was proved to be correct using a
computer-assisted proof for all spaces of dimension
,
[17] and it is conjectured to be valid in general:
[18] [19] There exists a closed set
in the Zariski topology such that
every tensor
is identifiable (
is called
generically identifiable in this case), unless either one of the following exceptional cases holds:
- The rank is too large:
;
- The space is identifiability-unbalanced, i.e., , and the rank is too large: ;
- The space is the defective case
and the rank is
;
- The space is the defective case
, where
, and the rank is
;
- The space is
and the rank is
;
- The space is
and the rank is
; or
- The space is
and the rank is
.
- The space is perfect, i.e., is an integer, and the rank is .
In these exceptional cases, the generic (and also minimum) number of complex decompositions is
in the first 4 cases;
- proved to be two in case 5;[20]
- expected[21] to be six in case 6;
- proved to be two in case 7;[22] and
- expected to be at least two in case 8 with exception of the two identifiable cases
and
.In summary, the generic tensor of order
and rank
that is not identifiability-unbalanced is expected to be identifiable (modulo the exceptional cases in small spaces).
Ill-posedness of the standard approximation problem
The rank approximation problem asks for the rank-
decomposition closest (in the usual Euclidean topology) to some rank-
tensor
, where
. That is, one seeks to solve
where
is the Frobenius norm.
It was shown in a 2008 paper by de Silva and Lim that the above standard approximation problem may be ill-posed. A solution to aforementioned problem may sometimes not exist because the set over which one optimizes is not closed. As such, a minimizer may not exist, even though an infimum would exist. In particular, it is known that certain so-called border tensors may be approximated arbitrarily well by a sequence of tensor of rank at most
, even though the limit of the sequence converges to a tensor of rank strictly higher than
. The rank-3 tensor
l{A}=u ⊗ u ⊗ v+u ⊗ v ⊗ u+v ⊗ u ⊗ u, with\|u\|=\|v\|=1and\langleu,v\rangle\ne1
can be approximated arbitrarily well by the following sequence of rank-2 tensors
l{A}n=n(u+
v) ⊗ (u+
v) ⊗ (u+
v)-nu ⊗ u ⊗ u
as
. This example neatly illustrates the general principle that a sequence of rank-
tensors that converges to a tensor of strictly higher rank needs to admit at least two individual rank-1 terms whose norms become unbounded. Stated formally, whenever a sequence
has the property that
(in the Euclidean topology) as
, then there should exist at least
such that
\|
⊗
⊗ … ⊗
\|F\toinftyand\|
⊗
⊗ … ⊗
\|F\toinfty
as
. This phenomenon is often encountered when attempting to approximate a tensor using numerical optimization algorithms. It is sometimes called the problem of
diverging components. It was, in addition, shown that a random low-rank tensor over the reals may not admit a rank-2 approximation with positive probability, leading to the understanding that the ill-posedness problem is an important consideration when employing the tensor rank decomposition.
A common partial solution to the ill-posedness problem consists of imposing an additional inequality constraint that bounds the norm of the individual rank-1 terms by some constant. Other constraints that result in a closed set, and, thus, well-posed optimization problem, include imposing positivity or a bounded inner product strictly less than unity between the rank-1 terms appearing in the sought decomposition.
Calculating the CPD
Alternating algorithms:
- alternating least squares (ALS)
- alternating slice-wise diagonalisation (ASD)
Direct algorithms:
General optimization algorithms:
General polynomial system solving algorithms:
- homotopy continuation[31]
Applications
In machine learning, the CP-decomposition is the central ingredient in learning probabilistic latent variables models via the technique of moment-matching. For example, consider the multi-view model[32] which is a probabilistic latent variable model. In this model, the generation of samples are posited as follows: there exists a hidden random variable that is not observed directly, given which, there are several conditionally independent random variables known as the different "views" of the hidden variable. For example, assume there are three views
of a
-state categorical hidden variable
. Then the empirical third moment of this latent variable model
is a rank 3 tensor and can be decomposed as:
E[x1 ⊗ x2 ⊗ x3]=
Pr(h=i)E[x1|h=i] ⊗ E[x2|h=i] ⊗ E[x3|h=i]
.
In applications such as topic modeling, this can be interpreted as the co-occurrence of words in a document. Then the coefficients in the decomposition of this empirical moment tensor can be interpreted as the probability of choosing a specific topic and each column of the factor matrix
corresponds to probabilities of words in the vocabulary in the corresponding topic.
See also
Further reading
- Kolda . Tamara G. . Tamara G. Kolda. Bader . Brett W. . 2009 . Tensor Decompositions and Applications . 10.1.1.153.2059 . SIAM Rev. . 51 . 3 . 455–500 . 10.1137/07070111X . 2009SIAMR..51..455K . 16074195 .
- Book: Joseph M. . Landsberg . Tensors: Geometry and Applications . AMS . 2012.
External links
Notes and References
- Web site: Papalexakis . Evangelos . Automatic Unsupervised Tensor Mining with Quality Assessment .
- F. L. Hitchcock . F. L. Hitchcock . The expression of a tensor or a polyadic as a sum of products . . 6 . 164–189 . 1927. 1–4 . 10.1002/sapm192761164 .
- J. D. . Carroll . J. D. Carroll . J. . Chang . J. Chang . Analysis of individual differences in multidimensional scaling via an n-way generalization of 'Eckart–Young' decomposition . . 35 . 3 . 283–319 . 1970 . 10.1007/BF02310791 . 50364581 .
- Richard A. . Harshman . Richard A. Harshman . 1970 . Foundations of the PARAFAC procedure: Models and conditions for an "explanatory" multi-modal factor analysis . UCLA Working Papers in Phonetics . 16 . 84 . No. 10,085 . dead . https://web.archive.org/web/20041010092429/http://publish.uwo.ca/~harshman/wpppfac0.pdf . October 10, 2004 .
- Web site: Gujral . Ekta . Aptera: Automatic PARAFAC2 Tensor Analysis . ASONAM 2022.
- C. J. . Hillar . C. J. Hillar . L. . Lim . L. Lim . Most tensor problems are NP-Hard . Journal of the ACM . 60 . 6 . 2013 . 1–39 . 10.1145/2512329. 0911.1393 . 1460452 .
- Book: J. M. . Landsberg . J. M. Landsberg . Tensors: Geometry and Applications . AMS . 2012.
- V. . Strassen . Volker Strassen . Rank and optimal computation of generic tensors . . 1983 . 52/53 . 645–685 . 10.1016/0024-3795(83)80041-x. free .
- M. V. . Catalisano . M. V. Catalisano . A. V. . Geramita . A. V. Geramita . A. . Gimigliano . A. Gimigliano . Ranks of tensors, secant varieties of Segre varieties and fat points . . 355 . 263–285 . 2002 . 1–3 . 10.1016/s0024-3795(02)00352-x. free.
- H. . Abo . H. Abo . G. . Ottaviani . G. Ottaviani . C. . Peterson . C. Peterson . Induction for secant varieties of Segre varieties . . 361 . 2 . 767–792 . 2009 . 10.1090/s0002-9947-08-04725-9. math/0607191. 59069541 .
- Thomas . Lickteig . T. Lickteig . Typical tensorial rank . . 1985 . 69 . 95–120 . 10.1016/0024-3795(85)90070-9. free .
- M. V. . Catalisano . M. V. Catalisano . A. V. . Geramita . A. V. Geramita . A. . Gimigliano . A. Gimigliano . Secant varieties of
1 × ··· ×
1 (n-times) are not defective for n ≥ 5 . Journal of Algebraic Geometry . 2011 . 20 . 2 . 295–327 . 10.1090/s1056-3911-10-00537-0. free .
- G. . Blehkerman . G. Blehkerman . Z. . Teitler . Z. Teitler . On maximum, typical and generic ranks . . 362 . 3–4 . 1–11 . 2015 . 10.1007/s00208-014-1150-3 . 1402.2371. 14309435 .
- V. . de Silva . V. de Silva . L. . Lim . L. Lim . Tensor Rank and the Ill-Posedness of the Best Low-Rank Approximation Problem . . 30 . 3 . 1084–1127 . 2008 . 10.1137/06066518x. math/0607647. 7159193 .
- Approximate solutions for the bilinear form computational problem . . D. . Bini . D. Bini . G. . Lotti . G. Lotti . F. . Romani . F. Romani . 9 . 4 . 692–697 . 1980 . 10.1137/0209053.
- Book: Harris, Joe. Algebraic Geometry SpringerLink. 133. 10.1007/978-1-4757-2189-8. Graduate Texts in Mathematics. 1992. 978-1-4419-3099-6.
- Chiantini. L.. Ottaviani. G.. Vannieuwenhoven. N.. 2014-01-01. An Algorithm For Generic and Low-Rank Specific Identifiability of Complex Tensors. SIAM Journal on Matrix Analysis and Applications. 35. 4. 1265–1287. 10.1137/140961389. 0895-4798. 1403.4157. 28478606.
- Bocci. Cristiano. Chiantini. Luca. Ottaviani. Giorgio. 2014-12-01. Refined methods for the identifiability of tensors. Annali di Matematica Pura ed Applicata. 193. 6. 1691–1702. 10.1007/s10231-013-0352-8. 0373-3114. 1303.6915. 119721371.
- Chiantini. L.. Ottaviani. G.. Vannieuwenhoven. N.. 2017-01-01. Effective Criteria for Specific Identifiability of Tensors and Forms. SIAM Journal on Matrix Analysis and Applications. 38. 2. 656–681. 10.1137/16m1090132. 0895-4798. 1609.00123. 23983015.
- Chiantini. L.. Ottaviani. G.. 2012-01-01. On Generic Identifiability of 3-Tensors of Small Rank. SIAM Journal on Matrix Analysis and Applications. 33. 3. 1018–1037. 10.1137/110829180. 0895-4798. 1103.2696. 43781880.
- Hauenstein. J. D.. Oeding. L.. Ottaviani. G.. Sommese. A. J.. Homotopy techniques for tensor decomposition and perfect identifiability. J. Reine Angew. Math.. 10.1515/crelle-2016-0067. 2016. 2019. 753. 1–22. 1501.00090. 16324593.
- Bocci. Cristiano. Chiantini. Luca. 2013. On the identifiability of binary Segre products. Journal of Algebraic Geometry. 22. 1. 1–11. 10.1090/s1056-3911-2011-00592-4. 1056-3911. 1105.3643. 119671913.
- Domanov. Ignat. Lathauwer. Lieven De. January 2014. Canonical Polyadic Decomposition of Third-Order Tensors: Reduction to Generalized Eigenvalue Decomposition. SIAM Journal on Matrix Analysis and Applications. 35. 2. 636–660. 10.1137/130916084. 0895-4798. 1312.2848. 14851072.
- Domanov. Ignat. De Lathauwer. Lieven. January 2017. Canonical polyadic decomposition of third-order tensors: Relaxed uniqueness conditions and algebraic algorithm. Linear Algebra and Its Applications. 513. 342–375. 10.1016/j.laa.2016.10.019. 0024-3795. 1501.07251. 119729978.
- Faber. Nicolaas (Klaas) M.. Ferré. Joan. Boqué. Ricard. January 2001. Iteratively reweighted generalized rank annihilation method. Chemometrics and Intelligent Laboratory Systems. 55. 1–2. 67–90. 10.1016/s0169-7439(00)00117-9. 0169-7439.
- Leurgans. S. E.. Sue Leurgans. Ross. R. T.. Abel. R. B.. October 1993. A Decomposition for Three-Way Arrays. SIAM Journal on Matrix Analysis and Applications. 14. 4. 1064–1083. 10.1137/0614071. 0895-4798.
- Lorber. Avraham.. October 1985. Features of quantifying chemical composition from two-dimensional data array by the rank annihilation factor analysis method. Analytical Chemistry. 57. 12. 2395–2397. 10.1021/ac00289a052. 0003-2700.
- Sanchez. Eugenio. Kowalski. Bruce R.. January 1990. Tensorial resolution: A direct trilinear decomposition. Journal of Chemometrics. 4. 1. 29–45. 10.1002/cem.1180040105. 120459386. 0886-9383.
- Sands. Richard. Young. Forrest W.. March 1980. Component models for three-way data: An alternating least squares algorithm with optimal scaling features. Psychometrika. 45. 1. 39–67. 10.1007/bf02293598. 121003817. 0033-3123.
- Bernardi. A.. Brachat. J.. Comon. P.. Mourrain. B.. May 2013. General tensor decomposition, moment matrices and applications. Journal of Symbolic Computation. 52. 51–71. 10.1016/j.jsc.2012.05.012. 0747-7171. 1105.1229. 14181289.
- Bernardi. Alessandra. Daleo. Noah S.. Hauenstein. Jonathan D.. Mourrain. Bernard. December 2017. Tensor decomposition and homotopy continuation. Differential Geometry and Its Applications. 55. 78–105. 10.1016/j.difgeo.2017.07.009. 0926-2245. 1512.04312. 119147635.
- Anandkumar. Animashree. Ge. Rong. Hsu. Daniel. Kakade. Sham M. Telgarsky. Matus. Tensor decompositions for learning latent variable models. The Journal of Machine Learning Research. 15. 1. 2773–2832. 2014.