# A Domain-Based, Adaptive, Multi-Scale, Inter-Subject Sleep Stage Classification Network
## 3 Experiments
### Results
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**CNN Block + Bi-GRU**} & \multicolumn{2}{c}{**Residual Module + Bi-GRU**} & \multicolumn{2}{c}{**Multi-Scale Residual Module**} \\  & & **Inner-Subject** & **Inter-Subject** & **Inter-Subject** & **Inner-Subject** & **Inter-Subject** \\ \hline \multirow{2}{*}{SHHS2} & Train & 71.7\% (0.62) & 70.8\% (0.58) & 72.3\% (0.60) & 71.8\% (0.63) & 73.9\% (0.67) & 72.4\% (0.67) \\  & Test & 70.6\% (0.60) & 56.3\% (0.30) & 71.2\% (0.58) & 54.7\% (0.35) & 72.2\% (0.64) & 54.1\% (0.39) \\ \hline \multirow{2}{*}{SHHS1} & Train & 71.0\% (0.59) & 66.9\% (0.55) & 67.6\% (0.47) & 65.5\% (0.50) & 68.3\% (0.57) & 70.9\% (0.62) \\  & Test & 68.9\% (0.57) & 49.6\% (0.28) & 66.1\% (0.45) & 50.3\% (0.26) & 66.3\% (0.54) & 47.4\% (0.26) \\ \hline \multirow{2}{*}{MESA} & Train & 75.6\% (0.59) & 75.2\% (0.58) & 78.9\% (0.68) & 71.5\% (0.55) & 76.9\% (0.62) & 76.3\% (0.62) \\  & Test & 74.4\% (0.58) & 64.2\% (0.36) & 75.7\% (0.63) & 65.9\% (0.39) & 76.0\% (0.60) & 63.3\% (0.38) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The accuracy and Kappa of sleep staging on datasets in inner-subject and inter-subject mode. MESA obtain the best evaluation of the residual model with a kernel size of 11. It can be seen that ECGs collected in different environments behave differently under different scales of convolution kernels, whose feature maps are shown in Figure 3. The multi-scale residual network can combine detailed information at multiple scales to improve the performance and robustness of the model. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**Approaches**} & \multirow{2}{*}{**Data Source**} & \multirow{2}{*}{**Sleep Stages**} & \multirow{2}{*}{**Accuracy**} & \multirow{2}{*}{**Kappa**} & \multicolumn{6}{c}{**Precision of Each Stage**} \\ \cline{5-8}  & & & & & **Wake** & **REM** & **Light** & **Deep** \\ \hline \multirow{2}{*}{[PERSON] et al. (2020) [18]} & SHHS & Wake-REM- & 77.3\% & 0.66 & 80\% & 81\% & 82\% & 49\% \\  & MESA & Light-Deep & 80\% & 0.69 & – & – & – & – \\ \hline \multirow{2}{*}{[PERSON] et al. (2021) [42]} & SHHS & Wake-REM- & 65.9\% & 0.47 & 73.1\% & 38.6\% & 83.6\% & 12.6\% \\ \hline \multirow{2}{*}{Convolutional Adaptive Networks [22]} & SHHS2 & Wake-REM- & 78.7\% & 0.75 & 82.4\% & 58.1\% & 80.6\% & 57.8\% \\  & SHHS1 & Light-Deep & 74.8\% & 0.67 & 82.1\% & 53.3\% & 81.3\% & 58.6\% \\  & MESA & & 80.6\% & 0.70 & 90.0\% & 64.3\% & 86.6\% & 44.0\% \\ \hline \multirow{2}{*}{Multi-Scale Residual Adaptive Network (proposed)} & SHHS2 & Wake-REM- & 84.9\% & 0.84 & 91.1\% & 96.2\% & 79.0\% & 80.6\% \\  & SHHS1 & Light-Deep & 82.7\% & 0.79 & 87.2\% & 83.9\% & 79.7\% & 81.1\% \\ \cline{1-1}  & MESA & & 86.8\% & 0.84 & 87.5\% & 81.4\% & 85.0\% & 66.6\% \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison with other sleep stage classification approaches based on ECG. Figure 5: T-SNE results of SHHS2\({}^{\prime}\)s feature distribution extracted by the CNN block module before DA and after DA. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**T-SNE**} & \multirow{2}{*}{**SHES1**} & \multirow{2}{*}{**MESA**} \\ \cline{2-2} \cline{4-6}  & **Before DA** & **After DA** & **Before DA** & **After DA** & **Before DA** & **After DA** \\ \hline Accuracy & 0.522 \(\pm\) 0.042 & 0.849 \(\pm\) 0.027 & 0.499 \(\pm\) 0.037 & 0.827 \(\pm\) 0.031 & 0.623 \(\pm\) 0.029 & 0.868 \(\pm\) 0.030 \\ \hline Kappa & 0.277 \(\pm\) 0.068 & 0.837 \(\pm\) 0.039 & 0.267 \(\pm\) 0.039 & 0.790 \(\pm\) 0.048 & 0.390 \(\pm\) 0.043 & 0.840 \(\pm\) 0.047 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Results of sleep stage classification on the test sets. For the performance of the model on each class, as shown in Figure 6, the confusion matrix on the three test sets shows that introducing the domain alignment improves the performance of the model on each class, especially in terms of deep sleep and REM.