## 5 Discussion  
In this paper, we proposed an fMRI sequence representation learning framework and demonstrated its application to ADHD classification. The sequence representation learning framework was mainly composed of an fMRI data preprocessing module, a data conversion module, and a sequence representation learning neural network. The data conversion module transformed the two-dimensional sequence, \(X_{TS}\), into the three-dimensional image, \(X_{IMG}\), the rationale for which can be described from three aspects. First, if a \(3\times 3\) convolution kernel is used for the convolution operation on the three-dimensional image, \(X_{IMG}\), the relationships among the nine adjacent regions of interest can be modeled, and the modeling area becomes larger than that of the convolution operation on the two-dimensional sequence, \(X_{TS}\). Second, the channel sequence representation learning module can easily and effectively capture the discriminative low-level channel-wise features of the fMRI data by the operating convolution with a \(1\times 1\times s\) kernel on the \(X_{IMG}\). Three, after the operation of the data conversion and the channel sequence representation learning, the image size was much smaller than \(X_{TS}\). Therefore, the computational complexity of the convolution operation on the pre-trained neural network was greatly reduced. Aimed at the problem of a few ADHD samples, the transfer learning method was used to freeze or fine-tune the pre-trained neural network parameters to reduce the risk of overfitting. We have leveraged a transfer learning strategy where a deep network model such as ResNet is pre-trained using a large-scale natural image dataset, such as the ImageNet dataset [25], given the fact that different types of images share common features. This strategy has been successful in many applications, including those for medical data, for example, the detection of erythema migrants [26]. Further, there are two main reasons why our proposed framework with the pre-trained ResNet model trained on the ImageNet dataset can achieve satisfactory classification performances. One of the reasons may be that the ImageNet dataset is massive. The model trained from large-scale data sets has better representation ability. Generally, the layers of the neural network are deeper, and the representation ability of the model is higher. Another reason may be that the ResNet with deep layers can capture discriminative features for ADHD classification. To explore the \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Submodule** & **Output Shape** & \begin{tabular}{c} **Computational Complexity** \\ **of the Submodule** \\ \end{tabular} & \begin{tabular}{c} **Total Computational** \\ **Complexity** \\ \end{tabular} \\ \hline \begin{tabular}{c} Data conversion \\ Channel sequence representation \\ learning module \\ \end{tabular} & \begin{tabular}{c} (54, 54, 3) \\ (512) \\ MLP classifier \\ \end{tabular} & \begin{tabular}{c} 0 \\ (514, 54, 3) \\ (512) \\ (2) \\ \end{tabular} & \
\begin{tabular}{c} 0.639 MFLOPs \\ 267.057 MFLOPs \\ 0.001 MFLOPs \\ \end{tabular} &
\begin{tabular}{c} 267.697 MFLOPs \\ 267.697 MFLOPs \\ 267.057 MFLOPs \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 7: The FLOPs of our proposed method. effectiveness of the sequence representation learning network based on transfer learning, we carried out experiments using the pre-trained network freezing method and pre-trained network fine-tuning method and compared them with the raw_svm method. As can be seen from Figure 6, in general, both in the individual site experiment and the combining site experiment, the classification accuracies of the freezing_mlp and finetuning_mlp proposed in this paper were higher than that of the raw_svm method. To alleviate the problem of sample imbalance, the proposed method used weighted cross-entropy as a loss function.