# Functional Connectome Fingerprinting Through Tucker Tensor Decomposition
## 2 Materials and Methods
### Tensor Decomposition  
In recent years, tensors have become increasingly popular in the fields of signal processing, machine learning, and neuroscience for their capacity to model complex high-order relationships among objects [35; 36; 37]. Tensor decomposition enables projecting high-dimensional data into a lower-dimensional space while preserving the original structure of the data. For the purpose of brain fingerprinting, tensor decomposition has the potential of extracting unique features from each participant's fMRI data acquisition session, thus facilitating subject distinctiveness. Several tensor decomposition algorithms can be found in the literature, each with their own characteristics and applications. The most commonly used ones are the CANDECOMP/PARAFAC (CP) [38; 39] decomposition and the Tucker decomposition [23]. The CP decomposition of a tensor \(\mathbf{\mathcal{X}}\in\mathbb{R}^{l_{1}\times l_{2}\times\cdots\times l_{N}}\) factorizes it into a sum of \(R\) rank-one tensors, where a rank-one tensor denotes the outer product between \(N\) vectors. Equation (1) shows the CP decomposition of \(\mathbf{\mathcal{X}}\):  
\[\mathbf{\mathcal{X}}\approx\sum_{r=1}^{R}\lambda_{r}\mathbf{a_{r}}^{(1)}\circ\mathbf{a_{r }}^{(2)}\cdots\circ\mathbf{a_{r}}^{(N)} \tag{1}\]  
where \(R\) denotes the rank of the decomposition. The vectors \(\mathbf{a_{r}}^{(1)}\in\mathbb{R}^{l_{1}}\), \(\mathbf{a_{r}}^{(2)}\in\mathbb{R}^{l_{2}},\dots,\mathbf{a_{r}}^{(N)}\in\mathbb{R}^{l_ {N}}\) are typically assumed to be normalized, with a corresponding scaling factor of \(\lambda_{r}\). Equation (1) can also be expressed in the simplified form \(\llbracket\mathbf{\lambda};A^{(1)},A^{(2)},\cdots,A^{(N)}\rrbracket\), in which \(A^{(i)}=\lfloor\mathbf{a_{1}^{(i)}}\quad\mathbf{a_{2}^{(i)}}\quad\cdots\quad\mathbf{a_{R }^{(i)}}\rfloor\), for \(i=1,2,\cdots,N\), are referred to as factor matrices, and \(\mathbf{\lambda}\in\mathbb{R}^{R}\) is a vector containing all scaling factors \(\lambda_{r}\), for \(r=1,2,\dots,R\). The Tucker decomposition [23] decomposes a tensor into a core tensor multiplied by a matrix along each of the tensor modes. For \(\mathbf{\mathcal{X}}\in\mathbb{R}^{l_{1}\times l_{2}\times\cdots\times l_{N}}\), its _n-rank_, denoted by \(rank_{n}(\mathbf{\mathcal{X}})\), is defined as the column rank of its mode-\(n\) matricization \(\mathbf{X}_{(n)}\). In other words, the _n-rank_ is the number of linearly independent vectors that span the basis of the _mode-\(n\)_ fibers of \(\mathbf{\mathcal{X}}\). Equation (2) shows the Tucker decomposition of \(\mathbf{\mathcal{X}}\). \[\mathbf{\mathcal{X}}\approx\sum_{r_{1}}^{R_{1}}\sum_{r_{2}=1}^{R_{2}}\cdots\sum_{ r_{n}=1}^{R_{N}}g_{r_{1}r_{2}\cdots n_{n}}A_{r_{1}}^{(1)}\circ A_{r_{2}}^{(2)} \circ\cdots\circ A_{r_{n}}^{(N)}\equiv\llbracket\mathbf{\mathcal{G}};A^{(1)},A^{(2 )},\cdots,A^{(N)}\rrbracket \tag{2}\]  
where \(A^{(1)}\in\mathbb{R}^{l_{1}\times R_{1}},A^{(2)}\in\mathbb{R}^{l_{2}\times R_ {2}}\), \(\cdots\), \(A^{(N)}\in\mathbb{R}^{l_{N}\times R_{N}}\) are column-wise orthonormal factor matrices, and \(R_{1},R_{2},\dots,R_{N}\) are the ranks of the decomposition, where \(R_{n}\leq rank_{n}(\mathbf{\mathcal{X}})\leq I_{n}\) for \(n=1,\dots,N\). If \(R_{n}<rank_{n}(\mathbf{\mathcal{X}})\), we refer to the decomposition as a truncated Tucker decomposition and refer to it as a rank-\((R_{1},R_{2},\dots,R_{N})\) decomposition. The tensor \(\mathbf{\mathcal{G}}\in\mathbb{R}^{R_{1}\times R_{2}\times\cdots\times R_{N}}\) is referred to as the core tensor and its entries represent the level of interaction between the different factors. Note that the CP decomposition can be understood as a special case of the Tucker decomposition when the Tucker's core is reduced to a hyper-diagonal tensor (all non-diagonal entries are equal to zero) and \(R=R_{1}=R_{2}=\cdots=R_{N}\). For simplicity, consider the third-order tensor \(\mathbf{\mathcal{X}}\in\mathbb{R}^{l_{1}\times l_{2}\times l_{3}}\).