###### Abstract  
For attention deficit hyperactivity disorder (ADHD), a common neurological disease, accurate identification is the basis for treatment. In this paper, a novel end-to-end representation learning framework for ADHD classification of functional magnetic resonance imaging (fMRI) sequences is proposed. With such a framework, the complexity of the sequence representation learning neural network decreases, the overfitting problem of deep learning for small samples cases is solved effectively, and superior classification performance is achieved. Specifically, a data conversion module was designed to convert a two-dimensional sequence into a three-dimensional image, which expands the modeling area and greatly reduces the computational complexity. The transfer learning method was utilized to freeze or fine-tune the parameters of the pre-trained neural network to reduce the risk of overfitting in the cases with small samples. Hierarchical feature extraction can be performed automatically by combining the sequence representation learning modules with a weighted cross-entropy loss. Experiments were conducted both with individual imaging sites and combining them, and the results showed that the classification average accuracies with the proposed framework were 73.73% and 72.02%, respectively, which are much higher than those of the existing methods. ADHD; representation learning; sequence; pre-trained; convolutional neural network +
Footnote †: journal: Medical  
the accurate positioning of brain functional activation areas. Therefore, fMRI is considered to be the most suitable brain function imaging for determining the functional activities of brain regions. The accurate identification of ADHD will contribute to the early treatment and targeted treatment of the disease. In recent years, many achievements have been made in the classification of brain neurological diseases based on fMRI imaging and machine learning. The representation of data is one of the key parts of machine learning, data mining, and other fields, as its performance affects the achievable efficiency significantly. The structure of the human brain is complex, and the neurons in various functional brain areas interact with each other. At present, the classification of ADHD is generally based on the functional connectivity between brain regions for feature extraction and support vector machine (SVM) [2] for classification. Traditional neuroimaging data classification usually requires several preprocessing steps, such as subject selection, feature extraction, and feature selection. These steps require a large amount of domain knowledge and many skilled selection methods and will bring about the problem of experimental reproducibility [3, 4]. Currently, representation learning, known as feature learning, based on deep neural networks (DNNs), has become a hot spot. The representation learning method does not need explicit data transformation, and the internal representation of data can be learned implicitly as well. Deep learning (DL) implements layer-by-layer representation transformation on massive amounts of training data by constructing a DNN with multiple hidden layers. On the other hand, automatically learned data representation has a strong description ability. Hence, with the support of extraordinary computing power, massive data, and complex models, the DL method has been successfully applied to image processing, speech recognition, intelligent search, and other fields with large amounts of training data. However, for practical applications constrained by time, environment, and other limitations, it is usually difficult to obtain large-scale data. Generally, the sample sizes of most fMRI data sets are relatively small. In the case of a few training samples, DL has the risk of easy overfitting, and the effectiveness of the algorithm will be significantly reduced.