Tensorregression

Als Tensorregression bezeichnet man in der Statistik ein Regressionsmodell basierend auf Tensoren. Bei einer solchen Regression können entweder der Regressor X {\displaystyle X} , der Regressand Y {\displaystyle Y} oder beide Tensoren sein. Tensorregressionen werden vor allem für hochdimensionale oder große Daten verwendet, da Tensoren eine natürliche Darstellung solcher Daten sind. Ein Anwendungsbeispiel für die Tensorregression liegt im Neuroimaging, wo man zum Beispiel die Hirnaktivität einer Maus misst, welche durch ein Labyrinth rennt. Dabei werden Hunderte von Neuronen über einen längeren Zeitraum gemessen.

Bei hochdimensionalen Daten besitzt der Koeffiziententensor meistens einen viel höheren Rang als der Regressor und der Regressand, weshalb man – ähnlich wie bei der Regression mit reduziertem Rang – häufig die Annahme trifft, dass der Koeffiziententensor einen tiefen Rang basierend auf einer Tensorzerlegung besitzt. Bekannte solche Zerlegungen sind die Candecomp/Parafac-Zerlegung (CP), die Tucker-Zerlegung, die Tensor-Singulärwertzerlegung (t-SVD) und die Tensor-Train-Zerlegung (TT).

Im Artikel wird eine Tensor-Verallgemeinerung der verallgemeinerten linearen Modelle (GLM) behandelt, welche 2013 von Hua Zhou et al.[1] mit der Candecomp/Parafec-Zerlegung eingeführt wurde und manchmal als CP-GLTR (englisch generalized linear tensor regression) abgekürzt wird.

Tensorregression

Im Artikel wird die Tensorregression auf den reellen Zahlen mit dem reellen Tensorprodukt := R {\displaystyle \otimes :=\otimes _{\mathbb {R} }} definiert, das Konzept lässt sich aber auch auf allgemeinen Vektorräumen respektive Moduln definieren.

In der allgemeinen Form sind Tensordaten { X n , Y n } 1 n N {\displaystyle \{{\mathcal {X}}_{n},{\mathcal {Y}}_{n}\}_{1\leq n\leq N}} gegeben, dann ist das Tensorregressionsmodell von der Form

Y n = f ( X n , B ) + E n , {\displaystyle {\mathcal {Y}}_{n}=f({\mathcal {X}}_{n},{\mathcal {B}})+{\mathcal {E}}_{n},}

wobei

Y n i = 1 M R q i , X n i = 1 L R p i , B , E n i = 1 M R q i {\displaystyle {\mathcal {Y}}_{n}\in \bigotimes _{i=1}^{M}\mathbb {R} ^{q_{i}},\quad {\mathcal {X}}_{n}\in \bigotimes _{i=1}^{L}\mathbb {R} ^{p_{i}},\quad {\mathcal {B}},\quad {\mathcal {E}}_{n}\in \bigotimes _{i=1}^{M}\mathbb {R} ^{q_{i}}}

Tensoren und q 1 , , q M , p 1 , , p L {\displaystyle q_{1},\dots ,q_{M},p_{1},\dots ,p_{L}} natürliche Zahlen sind. Typischerweise besitzt der Koeffiziententensor B {\displaystyle {\mathcal {B}}} einen viel höheren Rang als die anderen Tensoren.

Durch Konkatenation Y R N R q 1 R q M , X R N R p 1 R p L , E R N R q 1 R q M {\displaystyle {\mathcal {Y}}\in \mathbb {R} ^{N}\otimes \mathbb {R} ^{q_{1}}\otimes \cdots \otimes \mathbb {R} ^{q_{M}},{\mathcal {X}}\in \mathbb {R} ^{N}\otimes \mathbb {R} ^{p_{1}}\otimes \cdots \otimes \mathbb {R} ^{p_{L}},{\mathcal {E}}\in \mathbb {R} ^{N}\otimes \mathbb {R} ^{q_{1}}\otimes \cdots \otimes \mathbb {R} ^{q_{M}}} , lässt sich das auch kompakter als

Y = f ( X , B ) + E {\displaystyle {\mathcal {Y}}=f({\mathcal {X}},{\mathcal {B}})+{\mathcal {E}}}

hinschreiben.[2]

Tensorapproximation

Für einen beliebigen Tensor T {\displaystyle T} sucht man einen Tensor T ^ {\displaystyle {\widehat {T}}} mit einer niedrigen Rang-Zerlegung, welche T {\displaystyle T} am besten approximiert, welches zu einem Optimierungsproblem der Form

L ( T ) = min T ^ T T ^ F {\displaystyle {\mathcal {L}}(T)=\min \limits _{\widehat {T}}\|T-{\widehat {T}}\|_{F}}

führt, wobei wir hier die Frobenius-Norm gewählt haben. Zwei populäre Wahlen für eine solche Zerlegung sind die Candecomp/Parafec-Zerlegung (kurz CP-Zerlegung) und die Tucker-Zerlegung. Die CP-Zerlegung ist auch unter dem Namen canonical polyadic decomposition bekannt. Die Tucker-Zerlegung ist eine Form einer höher-dimensionalen Hauptkomponentenanalyse und wird auch HOSVD für englisch higher-order singular value decomposition genannt.

Tensorzerlegungen

CP-Zerlegung

Sei T R q 1 R q 2 R q D {\displaystyle T\in \mathbb {R} ^{q_{1}}\otimes \mathbb {R} ^{q_{2}}\otimes \cdots \otimes \mathbb {R} ^{q_{D}}} ein Tensor. Eine CP-Zerlegung für ein R N {\displaystyle R\in \mathbb {N} } ist eine Rang- R {\displaystyle R} -Zerlegung von T {\displaystyle T} in Elementartensoren

T = k = 1 R λ k v k ( 1 ) v k ( 2 ) v k ( D ) , {\displaystyle T=\sum \limits _{k=1}^{R}\lambda _{k}\mathbf {v} _{k}^{(1)}\otimes \mathbf {v} _{k}^{(2)}\otimes \cdots \otimes \mathbf {v} _{k}^{(D)},}

wobei die v k ( 1 ) , , v k ( D ) {\displaystyle \mathbf {v} _{k}^{(1)},\dots ,\mathbf {v} _{k}^{(D)}} Vektoren der Form v k ( i ) = ( v k , 1 ( i ) , v k , 2 ( i ) , , v k , q i ( i ) ) T R q i {\displaystyle \mathbf {v} _{k}^{(i)}=(v_{k,1}^{(i)},v_{k,2}^{(i)},\dots ,v_{k,q_{i}}^{(i)})^{T}\in \mathbb {R} ^{q_{i}}} sind und λ = ( λ 1 , , λ R ) T R R {\displaystyle {\boldsymbol {\lambda }}=(\lambda _{1},\dots ,\lambda _{R})^{T}\in \mathbb {R} ^{R}} ein Gewichtsvektor zur Normierung ist. Die minimale Zahl

rank ( T ) = min { R N : T = k = 1 R v k ( 1 ) v k ( 2 ) v k ( D ) } {\displaystyle \operatorname {rank} (T)=\min \left\{R\in \mathbb {N} \colon T=\sum \limits _{k=1}^{R}\mathbf {v} _{k}^{(1)}\otimes \mathbf {v} _{k}^{(2)}\otimes \cdots \otimes \mathbf {v} _{k}^{(D)}\right\}}

nennt man den Rang von T {\displaystyle T} und er ist invariant unter Basiswechsel. Die Berechnung des Rangs ist jedoch NP-schwer.[3]

Tucker-Zerlegung

Die Tucker-Zerlegung (oder auch HOSVD) zerlegt einen Tensor T R q 1 R q 2 R q D {\displaystyle T\in \mathbb {R} ^{q_{1}}\otimes \mathbb {R} ^{q_{2}}\otimes \cdots \otimes \mathbb {R} ^{q_{D}}} in einen Kern-Tensor G R R 1 R R 2 R R D {\displaystyle G\in \mathbb {R} ^{R_{1}}\otimes \mathbb {R} ^{R_{2}}\otimes \cdots \otimes \mathbb {R} ^{R_{D}}} und D {\displaystyle D} Faktor-Matrizen A 1 R q 1 × R 1 , A 2 R q 2 × R 2 , , A D R q D × R D {\displaystyle A_{1}\in \mathbb {R} ^{q_{1}\times R_{1}},A_{2}\in \mathbb {R} ^{q_{2}\times R_{2}},\dots ,A_{D}\in \mathbb {R} ^{q_{D}\times R_{D}}}

T = G × A 1 × × A D {\displaystyle T=G\times A_{1}\times \cdots \times A_{D}}

elementweise geschrieben

T = j 1 = 1 R 1 j 2 = 1 R 2 j D = 1 R D g i 1 , i 2 , , i D a j 1 ( 1 ) a j 2 ( 2 ) a j D ( D ) {\displaystyle T=\sum \limits _{j_{1}=1}^{R_{1}}\sum \limits _{j_{2}=1}^{R_{2}}\cdots \sum \limits _{j_{D}=1}^{R_{D}}g_{i_{1},i_{2},\dots ,i_{D}}\mathbf {a} _{j_{1}}^{(1)}\otimes \mathbf {a} _{j_{2}}^{(2)}\otimes \cdots \otimes \mathbf {a} _{j_{D}}^{(D)}}

wobei a j k ( k ) R q k {\displaystyle \mathbf {a} _{j_{k}}^{(k)}\in \mathbb {R} ^{q_{k}}} für k = 1 , , d {\displaystyle k=1,\dots ,d} und j k = 1 , , R k {\displaystyle j_{k}=1,\dots ,R_{k}} Vektoren sind und g i 1 , i 2 , , i D R {\displaystyle g_{i_{1},i_{2},\dots ,i_{D}}\in \mathbb {R} } . Die Parameter ( R 1 , , R D ) {\displaystyle (R_{1},\dots ,R_{D})} nennt man Tucker-Ränge.

Regressionsmodelle

Verallgemeinerte lineare Tensorregression mit CP-Zerlegung

Die von Zhou et al.[1] betrachtete Verallgemeinerung der verallgemeinerten linearen Modelle ist die Kopplungsfunktion

g ( μ ) = α + γ T z + B , X , {\displaystyle g(\mu )=\alpha +{\boldsymbol {\gamma }}^{T}\mathbf {z} +\langle {\mathcal {B}},{\mathcal {X}}\rangle ,}

wobei der Regressor X R N R p 1 R p 2 R p L {\displaystyle {\mathcal {X}}\in \mathbb {R} ^{N}\otimes \mathbb {R} ^{p_{1}}\otimes \mathbb {R} ^{p_{2}}\otimes \cdots \otimes \mathbb {R} ^{p_{L}}} und B {\displaystyle {\mathcal {B}}} Tensoren sind, z {\displaystyle \mathbf {z} } ein Vektor-Regressor, der Regressand y {\displaystyle y} ein Skalar und α R {\displaystyle \alpha \in \mathbb {R} } der y-Achsenabschnitt ist. Das innere Produkt ist über die Vektorisierung B , X = vec ( B ) , vec ( X ) {\displaystyle \langle {\mathcal {B}},{\mathcal {X}}\rangle =\langle \operatorname {vec} ({\mathcal {B}}),\operatorname {vec} ({\mathcal {X}})\rangle } definiert. Sie nahmen nun an, dass für B {\displaystyle {\mathcal {B}}} eine CP-Zerlegung mit Rang R {\displaystyle R} existiert

g ( μ ) = α + γ T z + k = 1 R b k ( 1 ) b k ( 2 ) b k ( D ) , X . {\displaystyle g(\mu )=\alpha +{\boldsymbol {\gamma }}^{T}\mathbf {z} +\left\langle \sum \limits _{k=1}^{R}\mathbf {b} _{k}^{(1)}\otimes \mathbf {b} _{k}^{(2)}\otimes \cdots \otimes \mathbf {b} _{k}^{(D)},{\mathcal {X}}\right\rangle .}

Das Khatri-Rao-Produkt {\displaystyle \star } (auch spaltenweises Kronecker-Produkt) ist für zwei Matrizen A R I × K {\displaystyle A\in \mathbb {R} ^{I\times K}} und B R J × K {\displaystyle B\in \mathbb {R} ^{J\times K}} wie folgt definiert

A B := [ a 1 b 1 a 2 b 2 a K b K ] R ( I J ) × K , {\displaystyle A\star B:={\begin{bmatrix}\mathbf {a} _{1}\otimes \mathbf {b} _{1}&\mathbf {a} _{2}\otimes \mathbf {b} _{2}&\cdots &\mathbf {a} _{K}\otimes \mathbf {b} _{K}\end{bmatrix}}\in \mathbb {R} ^{(IJ)\times K},}

wobei a 1 , , a K , b 1 , , b K {\displaystyle \mathbf {a} _{1},\dots ,\mathbf {a} _{K},\mathbf {b} _{1},\dots ,\mathbf {b} _{K}} hier die Spalten der Matrizen sind und das Kronecker-Produkt genommen wird.

Mit Hilfe des Khatri-Rao-Produkt kann das Regressionsmodell nun umgeschrieben werden

g ( μ ) = α + γ T z + ( B D B D 1 B 1 ) 1 R , vec ( X ) {\displaystyle g(\mu )=\alpha +{\boldsymbol {\gamma }}^{T}\mathbf {z} +\left\langle (B_{D}\star B_{D-1}\star \cdots \star B_{1})1_{R},\operatorname {vec} ({\mathcal {X}})\right\rangle }

wobei B D B D 1 B 1 R d p d × R {\displaystyle B_{D}\star B_{D-1}\star \cdots \star B_{1}\in \mathbb {R} ^{\prod _{d}p_{d}\times R}} aus D {\displaystyle D} Matrizen B i R p i × R {\displaystyle B_{i}\in \mathbb {R} ^{p_{i}\times R}} besteht, 1 R = ( 1 , , 1 ) {\displaystyle 1_{R}=(1,\dots ,1)} ein Vektor aus R {\displaystyle R} Einsen ist.[1]

Literatur

  • Yipeng Liu, Jiani Liu, Zhen Long und Ce Zhu: Tensor Regression. In: Foundations and Trends in Machine Learning. Band 14, Nr. 4, 2021, S. 379–565, doi:10.1561/2200000087. 

Einzelnachweise

  1. a b c Hua Zhou, Lexin Li und Hongtu Zhu: Tensor Regression with Applications in Neuroimaging Data Analysis. In: Journal of the American Statistical Association. Band 108, Nr. 502, 2013, S. 540–552, doi:10.1080/01621459.2013.776499. 
  2. Liu, Yipeng and Liu, Jiani and Long, Zhen and Zhu, Ce: Tensor Regression. In: Foundations and Trends in Machine Learning. Band 14, Nr. 4, 2021, S. 379–565, doi:10.1561/2200000087. 
  3. Tamara G. Kolda und Brett W. Bader: Tensor Decompositions and Applications. In: SIAM Review. Band 51, Nr. 3, 2009, S. 455–500, doi:10.1137/07070111X.