# Epileptic Seizure Detection in Neonatal EEG Using a Multi-Band Graph Neural Network Model
## 3 Methods
### Multi-Band Graph Neural Network
#### 3.3.1 Graph Convolution  
To comprehensively explore the structural evolution pattern of multi-channel EEG signals, the GAT [29] is employed as the front end of the proposed MBGNN. The GAT layer extracts information from multi-channel EEG signals by treating the channels as nodes and the correlation coefficients between channels as edges. In contrast to typical spatial graph convolution operations, such as GNN [30] and GraphSAGE [31], GAT implicitly assignsdifferent convolution kernels to neighboring nodes through an attention mechanism, thus allowing an adaptive aggregation of neighborhood information. In other words, GAT fully takes into account the correlation differences between channel pairs during the advanced extraction of multi-channel EEG signals. Suppose the input of a GAT layer is \(\mathbf{h}=\left\{\overrightarrow{h}_{1},\overrightarrow{h}_{2},\ldots, \overrightarrow{h}_{N}\right\}\), where \(\overrightarrow{h}_{i}\in\mathbb{R}^{F}\) is the feature vector of the \(i\)-th node. Firstly, a linear transformation is applied to map the input features to higher-level features, parametrized by a shared weight matrix \(\mathbf{W}\in\mathbb{R}^{F\times F^{\prime}}\). Then, the self-attention coefficients are computed as follows:  
\[e_{ij}=a\left(\overrightarrow{\mathbf{W}}\overrightarrow{h}_{i},\overrightarrow {\mathbf{W}}\overrightarrow{h}_{j}\right) \tag{8}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Layer** & **Parameters** & **Sizes** \\ \hline Input & \multicolumn{2}{c}{Node: 6 \(\times\) 19 \(\times\) 11} & - \\  & \multicolumn{2}{c}{Edge: 6 \(\times\) 19 \(\times\) 19} & \multicolumn{1}{c}{Conv Weight: 32 \(\times\) 11} \\ GAT Convolution 1 & Hidden Channels: 32 & \multicolumn{2}{c}{Conv Bias: 32} \\ Batch Normalization 1 & \multicolumn{2}{c}{Batch Size: 32} & \multicolumn{2}{c}{Batch Norm Weight: 32} \\  & \multicolumn{2}{c}{Linear 1} & \multicolumn{2}{c}{Batch Norm Bias: 32} \\ Six & DIFFOOL 1 & Node Number: 6 & Assignment Weight: 6 \(\times\) 32 \\ Channels & \multicolumn{2}{c}{GAT Convolution 2} & Hidden Channels: 32 & \multicolumn{2}{c}{Conv Weight: 32 \(\times\) 32} \\  & \multicolumn{2}{c}{Batch Normalization 2} & \multicolumn{2}{c}{Batch Norm Weight: 32} \\  & \multicolumn{2}{c}{Batch Normalization 2} & \multicolumn{2}{c}{Batch Norm Bias: 32} \\  & \multicolumn{2}{c}{Linear 2} & \multicolumn{2}{c}{Batch Norm Bias: 1} \\  & \multicolumn{2}{c}{DiffFOOL 2} & Node Number: 1 & Assignment Weight: 1 \(\times\) 32 \\  & \multicolumn{2}{c}{Node Number: 1} & \multicolumn{2}{c}{Assignment Weight: 6 \(\times\) 32} \\ Attention Layer & \multicolumn{2}{c}{-} & \multicolumn{2}{c}{Attention Bias: 1} \\ Attention Layer & \multicolumn{2}{c}{Linear Weight: 2 \(\times\) 32} \\ Linear 3 & \multicolumn{2}{c}{Hidden Channels: 2} & \multicolumn{2}{c}{Linear Bias: 2} \\ Softmax & \multicolumn{2}{c}{-} & - \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Individual layer parameters and sizes of MBGNN model. Figure 3: Architecture of the proposed multi-band graph neural network with band-wise attention mechanism. where \(a\) is the mapping of \(\mathbb{R}^{F\times F^{\prime}}\rightarrow\mathbb{R}\). The self-attention coefficient \(e_{ij}\) indicates the importance of the \(j\)-th node to the \(i\)-th node. Instead of allocating attention to all nodes in the graph, which results in a loss of structural information, the attention coefficients of the first-order neighbors are computed for each node as follows:  
\[\alpha_{ij}=\text{softmax}_{j}(e_{ij})=\frac{\exp(e_{ij})}{\sum_{k\in N_{i}} \exp(e_{ik})} \tag{9}\]  
where \(\mathcal{N}_{i}\) represents the first-order neighbor set of the \(i\)-th node.