# Adaptive Aggregated Attention Network for Pulmonary
## 3 Materials and Methods  
### Material and Preprocessing  
In this paper, the employed dataset was Lung Image Database Consortium image collection (LIDC-IDRI) [23]. LIDC-IDRI is one of the largest open databases in the cancer imaging archive (TCIA) for lung cancer diagnosis, and LIDC-IDRI contains 1018 patients' chest CT scans. Each CT scan has a corresponding XML annotation file, which contains four professional thoracic radiologists' diagnosis annotations on the CT scans. The size of each scan is 512 \(\times\) 512, and each XML file details the locations, boundaries, malignant level of each nodule, and so on.  
The LIDC-IDRI dataset was equally and randomly split into ten folds with the LUNA16's split principle [24], 10-fold patient-level cross validation. The raw data were clipped into [\(-\)1200,600], and the values were normalized to [0,1] linearly. To reduce interference, the segmentation ground truth of LUNA16 was utilized to remove the nodules' background and the uncertain lung nodules for which the average malignant levels were equal to 3 were ignored. After data processing, we obtained 1001 3D lung nodules, in which there were 447 positive nodules and 554 negative nodules. The lung nodules of each subset were from different patients, and the detailed number of each subset is shown as Table 1.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Subset**} & **Number of** & **Number of** & **Number of Benign** & **Number of Malignant** \\  & **Patients** & **Nodules** & **Nodules** & **Nodules** \\ \hline Subset0 & 89 & 91 & 40 & 51 \\ Subset1 & 89 & 106 & 61 & 45 \\ Subset2 & 89 & 111 & 62 & 49 \\ Subset3 & 89 & 103 & 57 & 46 \\ Subset4 & 89 & 100 & 47 & 53 \\ Subset5 & 89 & 91 & 55 & 36 \\ Subset6 & 89 & 115 & 73 & 42 \\ Subset7 & 89 & 90 & 62 & 28 \\ Subset8 & 88 & 104 & 55 & 49 \\ Subset9 & 88 & 90 & 42 & 48 \\ Sum & 888 & 1001 & 554 & 447 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Detailed information of each subset.  
Nodules were cropped from the raw CT images at sizes of 32 \(\times\) 32 \(\times\) 32 randomly, and the nodules were enlarged to sizes of 36 \(\times\) 36 \(\times\) 36 by adding padding to the margin of the lung nodules. For data augmentation, we flipped the cropped data in the horizontal, vertical, z-axis directions and we set a 4 \(\times\) 4 \(\times\) 4 patch as 0 randomly. Our proposed architecture was tested on folds 0-9 separately, and the average experimental results are reported. Due to time and computation limitations, we conducted the ablation experiments on the 5 th fold.  
In addition, the data augmentation strategy beyond empirical risk minimization (MIXUP) [25] shows excellent performance on many natural image datasets, such as the ImageNet-2012, CIFAR-10, CIFAR-100, Google commands, and UCI datasets. Therefore, the strategy MIXUP was utilized to augment lung nodule data. The MIXUP strategy was only used in the training phase, and it constructed virtual training data. The MIXUP operation is described in Equation (1), in which \(x_{i}\) and \(x_{j}\) are raw input vectors, and \(y_{i}\) and \(y_{j}\) are one-hot label encodings. \((x_{i},y_{i})\) and \((x_{j},y_{j})\) are two examples drawn at random from our training data, and \(\lambda\in[0,1]\). The illustration of data preprocessing is shown as Figure 1.  
\[\left\{\begin{array}{l}\widetilde{x}=\lambda x_{i}+(1-\lambda)x_{j}\\ \widetilde{y}=\lambda y_{i}+(1-\lambda)y_{j}\end{array}\right. \tag{1}\]  
We used an Adam optimizer with a learning rate if 0.0001, and the momentum parameters were set as (0.5,0.999). We conducted our experiments on a workstation with a Linux system. The GPU hardware was TITANX, and the GPU memory was about 12 G. Due to the limitation in GPU memory, we set the training batch size to 4 and set the testing batch size to 2. The iteration epochs totalled 1200 for each fold.