# Functional Connectome Fingerprinting Through Tucker Tensor Decomposition
## 2 Materials and Methods
### Tucker Decomposition of Functional Comectomes  
For each of the eight fMRI conditions analyzed in this study, we represent the data as a third-order tensor \(\mathbf{\mathcal{X}}\in\mathbb{R}^{M\times M\times N}\). Here, \(M\) is equal to the granularity of the brain parcellation and \(N=426\) corresponds to the total number of participants. Given the symmetry of FC matrices, we refer to \(\mathbf{\mathcal{X}}\) as a semi-symmetric tensor, meaning it remains invariant under permutation of two (or more) indices. In our case, \(x_{i,j,k}=x_{j,j,k}\) for \(k=1,\ldots,426\). All analyses performed in this work have an input of a semi-symmetric tensor \(\mathbf{\mathcal{X}}\) constructed by concatenating participants' FCs obtained in one fMRI scanning session (either test or retest). Once the data have been structured as a semi-symmetric tensor, we can produce a low-rank estimation of the FCs through either of the previously mentioned tensor decomposition methods. Due to the lack of interactions between components, the results of CP decomposition are generally easier to interpret [21] compared to Tucker decomposition. However, this lack of interaction often leads CP to produce less accurate approximations of the original tensor, as measured by the \(L_{2}\) norm. In contrast, Tucker decomposition leverages its core tensor to capture interactions between components, enabling it to approximate the original tensor with greater precision [40]. Considering the interpretability/accuracy trade-off in the context of brain fingerprinting, we focus on Tucker decomposition. Several methods have been developed to estimate the Tucker decomposition. Notably, we highlight Sequentially Truncated Higher-Order Singular Value Decomposition (ST-HOSVD) [41; 42] and Higher-Order Orthogonal Iteration (HOOI) [43]. For a given tensor \(\mathbf{\mathcal{X}}\in\mathbb{R}^{I_{1}\times R_{2}\times\cdots\times I_{N}}\), ST-HOSVD sequentially computes the factor matrices via truncated eigenvalue decompositions of the mode-\(n\) matricizations (for \(n=1,2,\ldots,N\)) of \(\mathbf{\mathcal{X}}\), while iteratively updating \(\mathbf{\mathcal{X}}\) at each step. The output of the algorithm is a core tensor and a set of column-wise orthogonal factor matrices. Similarly to PCA, the components from the factor matrices capture most of the variance across each of the tensor modes. The Tucker estimation via ST-HOSVD of \(\mathbf{\mathcal{X}}\) is shown in Algorithm 1. ```
1:\(\mathbf{\mathcal{X}}\in\mathbb{R}^{I_{1}\times I_{2}\times\cdots\times I_{N}},\{R_{1},R_{2}, \ldots,R_{N}\}\)
2:for\(i\gets 1\) to \(N\)do
3: Matricize the tensor along mode \(i\) to obtain \(\mathbf{X}_{(i)}\)
4: Compute the Gram matrix \(\mathbf{Z}_{(i)}=\mathbf{X}_{(i)}\times\mathbf{X}_{(i)}^{T}\)
5: Compute the eigenvalue decomposition of \(\mathbf{Z}_{(i)}\) and sort the eigenvalues in descending order
6:\(\mathbf{A}^{(i)}\gets R_{i}\) eigenvectors corresponding to the sorted \(R_{i}\) eigenvalues of \(\mathbf{Z}_{(i)}\)
7:\(\mathbf{\mathcal{X}}\leftarrow\mathbf{\mathcal{X}}\times_{i}\mathbf{A}^{(i)}{}^{T}\)
8:endfor
9:\(\mathbf{\mathcal{G}}\leftarrow\mathbf{\mathcal{X}}\)
10:\(\mathbf{\mathcal{G}}\in\mathbb{R}^{R_{1}\times R_{2}\times\cdots\times R_{N}},\mathbf{A }^{(1)}\in\mathbb{R}^{I_{1}\times R_{1}},\mathbf{A}^{(2)}\in\mathbb{R}^{I_{2} \times R_{2}},\cdots,\mathbf{A}^{(N)}\in\mathbb{R}^{I_{N}\times R_{N}}\)
```  
**Algorithm 1** Sequentially Truncated Higher-Order Singular Value Decomposition (ST-HOSVD)  
On the other hand, HOOI utilizes an Alternating Least Squares (ALS) approach to estimate each of the factor matrices by sequentially solving sub-problems of the form in (4):  
\[\max_{\mathbf{A}^{(n)}} ||\mathbf{\mathcal{X}}\times_{1}\mathbf{A}^{(1)}\times_{2}\mathbf{A}^{(2)} \cdots\times_{N}\mathbf{A}^{(N)}||\] (4) s.t.