# Age Estimation from fMRI Data Using Recurrent Neural Network
## 2 Methods
### Data Preprocessing  
The fMRI scanner often performs environmental adaptation at the beginning of the scan. It is also unstable during the adaptation, which may provide inconsistent data. To avoid this issue, we discard the earliest part of fMRI data (the first 10 repetition time points). Since we collect the data from various projects, each project may have its own setups or imaging parameters. In other words, each project may have its own bias, and therefore we need to remove the bias from each project. Moreover, each subject may have different sizes of brains, and the brain positions might vary while scanning. These variations in the sample can impact our model since the size of the dataset is not large enough. To resolve the issue, we apply a normalization technique for the individual data. First, we use the FMRIB software library (FSL) to preprocess fMRI data. FSL is a widely used tool for brain imaging data [55; 56]. More precisely, we employ the FEAT toolbox in the FSL software library to normalize the fMRI data. To remove the bias of the project, we extract imaging parameters from each project and center the images of the project with corresponding parameters. The second part of the preprocessing is the registration of the normalized image. The registration step clusters the image to several regions accordingly and provides a \"mask\" that indicates the coverage of regions. Among various registration methods, we use AAL2 from the Montreal Institute of Neurology (MNI) brain space Automated Anatomical Labeling atlas (AAL) [57]. FMRIB Linear Image Registration Tool (FLIRT) is used for registration, which is an automation tool for brain image registration in the FSL software library. This registration step divides the brain into 94 regions of interest (ROI). Note that the above steps do not reduce the dimension of data and the original data can be recovered \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Project** & **Subjects** & **Age** & **M** & **F** & \(\mathbf{N_{TR}}\) \\ \hline AnnArbor\_a & 18 & 13–40 & 17 & 1 & 283 \\ Baltimore & 12 & 30–40 & 6 & 6 & 111 \\ Bangor & 3 & 19 & 3 & 0 & 253 \\ Beijing\_Zang & 39 & 18–24 & 21 & 18 & 213 \\ Berlin\_Margulies & 14 & 23–44 & 7 & 7 & 183 \\ Cambridge\_Buckner & 81 & 18-30 & 30 & 51 & 107 \\ Dallas & 14 & 20–71 & 8 & 6 & 103 \\ ICBM & 35 & 19–79 & 15 & 20 & 116 \\ Leiden\_2180 & 3 & 20–27 & 3 & 0 & 203 \\ Leiden\_2200 & 4 & 18-25 & 4 & 0 & 203 \\ Leipzig & 15 & 22–42 & 7 & 8 & 183 \\ Milwaukee\_b & 46 & 44–65 & 15 & 31 & 163 \\ Newark & 7 & 21–39 & 4 & 3 & 123 \\ NewHaven\_a & 2 & 18–38 & 2 & 0 & 237 \\ NewHaven\_b & 6 & 18–42 & 4 & 2 & 169 \\ NewWork\_a & 37 & 10–49 & 20 & 17 & 180 \\ NewYork\_a ADHD & 16 & 24–50 & 15 & 1 & 180 \\ NewYork\_b & 11 & 18–46 & 7 & 4 & 163 \\ Orangeburg & 14 & 31–55 & 11 & 3 & 153 \\ Oulu & 17 & 21–22 & 4 & 13 & 233 \\ Oxford & 8 & 30–35 & 6 & 2 & 163 \\ PaloAlto & 12 & 26–46 & 1 & 11 & 223 \\ Pittsburgh & 1 & 27 & 1 & 0 & 263 \\ Queensland & 6 & 21–34 & 4 & 2 & 178 \\ SaintLouis & 5 & 21–28 & 3 & 2 & 115 \\ SALD & 369 & 19–80 & 140 & 229 & 230 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Detailed information of data collection. (M: Male; F: Female; \(N_{TR}\): the number of repetition time points). by reversing the process. An example of normalization and registration of fMRI images is shown in Figure 1.  
After the registration step, we average the voxel values of each region to reduce the dimension of data. Thus, after the preprocessing, we obtain a time series data \(X\) of length \(t\). More precisely, let \(C\) be the fMRI sample and \(f_{pre}\) be the preprocessing procedure including normalization, registration, and averaging. Then, we obtain the time series data \(X=(x_{1},x_{2},\cdots,x_{t})=f_{pre}(C)\in\mathbb{R}^{94\times t}\), where the preprocessed brain image at the \(i\)-th repetition time point \(X_{i}\in\mathbb{R}^{94}\) is a 94-dimensional vector. Note that fMRI data from different projects may have different repetition time points. The whole preprocessing steps are depicted in Figure 2.