Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 12, No. 3, 2024 81 Parallel Channel Feature Weighted Seizure Prediction Based on Multi‐Scale Spatial and Temporal Factorization Jinying Han1, * 1The School of Computer Science and Technology, Henan Polytechnic University, Jiaozuo 454003, China * Corresponding author Abstract: Epileptic seizure prediction based on electroencephalography (EEG) plays an important role in the field. However, the existing epilepsy prediction methods have little modeling ability to capture the interaction between features, and the high redundancy of features leads to the limitations of model performance. In addition, the feature information guided by the multi- channel spatial location of the brain region is ignored. To solve these problems, this paper proposes a parallel channel feature- weighted seizure prediction network based on multi-scale temporal and spatial factorization (MS-STFM-PCFWNet). Specifically, the feature information of time domain and multi-channel spatial domain of brain region can be extracted by using feature matrix to fully learn the correlation between channels. Secondly, the multi-scale spatiotemporal Factorizer (MS-STFM) is utilized to combine and interact the features, and the correlation information between the features is captured. Finally, by combining the multi-scale Inception module with an efficient channel attention mechanism, a parallel channel feature weighted network (PCFWNet) is constructed to effectively learn multi-domain features and map the discriminant representation of epilepsy prediction. The proposed MS-STFM-PCFWNet is evaluated on public CHB-MIT and BONN datasets. The experimental results show that compared with the most advanced methods, the proposed method achieves excellent predictive performance, which can be used for early warning of epileptic seizures in specific patients. Keywords: EEG, Seizure prediction, Multiscale features, Spatio-temporal factorization, Attention. 1. Introduction As a common neurological disorder, epilepsy is characterized by sudden, abnormal and excessive electrical disturbance of brain neurons. According to the World Health Organization, there are more than 50 million patients with epilepsy worldwide [1]. Electroencephalography (EEG) has become an indispensable tool in the diagnosis of brain diseases [2-3]. The main challenge in the face of epilepsy is the inability to predict and control seizures. If a reliable epilepsy prediction algorithm can be developed to capture and identify abnormal epileptic activity in the clinic [4], effective measures can be taken in advance to reduce the harm caused by avoiding seizures. In view of this, it is of great practical value to develop an accurate and reliable epileptic seizure prediction system to reduce the workload of medical personnel. The EEG electrical signal state changed obviously before and after seizure [5]. The researchers divided this seizure process into four periods, including interictal, preictal, ictal and postictal. The focus of seizures is to accurately identify the preictal period, by defining the data length of different periods, the signals of the interictal period and the preictal period are distinguished [6]. Seizure is the result of overactivity and abnormal activity of neurons in the cerebral cortex, so epilepsy is usually detected using EEG. EEG records voltage fluctuations caused by electrical activity on the scalp surface. It helps detect normal and abnormal activity occurring in the human brain and shows the dynamic changes caused by seizures. With the development of technology, it has been widely used in research related to seizure prediction [7-9], and a variety of seizure prediction methods have been developed. Since the development of seizure prediction, there have been many encouraging developments in the field. By manually extracting features, it has made an outstanding contribution for the field of seizure prediction. Lu et al. proposed an automatic classification method for epilepsy EEG signals based on support vector machines. They selected sample entropy and Higuchi fractal dimension as features, and the nonlinear features showed the effectiveness of seizure prediction [10]. Yu et al. combined the extracted features with hidden deep features in a complementary manner, which input features into multiplicative long short-term memory (MLSTM) to explore the temporal dependence of EEG [11]. Chen et al. proposed the chaos theory of seizure detection combined with decision tree [12]. The theory often ignores the correlation of data attributes. Tapani et al. proposed a new method to detect neonatal epilepsy by extracting non-stationary periodic features in the time and frequency domains [13]. Feature extraction enables the model to capture the basic features of EEG data, and appropriate feature selection determines the accuracy of the system. However, highly redundant features can affect the performance of the model, and these methods do not effectively deal with the association between features. Only by selecting features to reduce the redundancy among features, it can improve the computational efficiency of the model, which the performance of the model be optimized. With the rapid development of neural networks, a variety of deep learning neural networks combined with attention mechanisms are applied in seizure prediction. Among them, the classic ones are Recurrent Neural networks (RNN), Convolutional Neural networks (CNN) and Long Short-Term Memory networks (LSTM). He et al. employed graph attention network as the front end to extract spatial features, 82 and Bidirectional Long Short-Term Memory (Bi-LSTM) as the back end to capture temporal relationships [14]. Ra et al. improved the time-frequency resolution of EEG features based on singular value decomposition (SET-SVD), and then used CNN to classify seizure states [15]. Sun et al. adopted Time  domain  analysis Mapping 1×1   Conv1 3×3   Conv2 5×5   Conv3 7×7   Conv4 5×5   Conv5 C on catFlatten ... ... ... ... ECA  Attention FM layer MLP layer Conv layer Feature matrix classification Preictal Interictal Softmax Figure 1. Seizure prediction framework of MS-STFM-PCFWNet the method of channel attention to fuse temporal and spatial features with original EEG data, so as to acquire timing information, spectrum information and spatial location information in EEG data [16]. Due to its conventional convolution operation and local receptor field, the CNN framework in the epilepsy prediction task can only learn low- dimensional spatial correlations between EEG channels [17]. Therefore, graph convolutional networks (GCN) are studied in the latest research [18], Dissanayake et al. proposed a subject-independent epileptic seizure predictor, the prediction of seizure is employed by using geometric deep learning to synthesize EEG through LSTM network [19]. A common procedure in GCN is to define a prior adjacency matrix to build the graph structure between channels, which helps to convert epileptic EEG signals into a graph representation with graph nodes and edges [20]. Zhong et al. Introduced the differential entropy (DE) to inference of spatial coupled in network topology, which calculated the temporal correlation of EEG and generated graph nodes [21]. Li et al. proposed a time-spectrum compression and excitation scheme, which can effectively integrate the layered multi-domain representation of EEG for epilepsy, thereby reducing the information redundancy of high-dimensional features[22]. Prathaban et al. reconstructed EEG with sparsity and converted it into a two- dimensional (2D) image. The time, signal value and channel representation of 2D images are converted to three- dimensional (3D) images to interpret the relationship between channels, and the optimized 3D convolutional neural network is used to predict seizures [23], the feasibility based on 3D neural network is demonstrated. However, in their dependence on capturing longer sequences, these models usually ignore information about the spatial location of electrodes in brain regions with multiple channels. This information may contain valuable information for predicting seizures. The main purpose of this paper is to break through the limitations of existing prediction methods, solve the lack of feature information guided by spatial positions of multi- channel brain areas, the lack of modeling ability to capture interaction features between data, and the limitations of model performance caused by highly redundant features. Therefore, a parallel channel feature weighted seizure prediction based on multi-scale spatial and temporal factorization machine (MS-STFM-PCFWNet) is proposed for seizure prediction. Firstly, in order to fully learn the correlation between channels, 3D feature matrix is employed to extract the temporal and spatial information from multiple channels. Secondly, Factorization machine (FM) is used for feature combination and interaction modeling on the output of the multi-scale inception module. Finally, a parallel channel feature weighted network (PCFWNet) is proposed to effectively learn multi-domain features, which introduces an efficient channel attention mechanism (ECA) to reflect discriminant representations of seizure prediction. The proposed MS-STFM-PCFWNet is evaluated on the CHB- MIT and BONN datasets. The proposed method achieves the encouraging performance results compared to the most advanced techniques, which validated the breakthrough of the 83 method in the task of seizure prediction. In general, the main contributions of this paper are summarized as follows: (1) A MS-STFM-PCFWNet is proposed to predict seizures, which can effectively extract spatiotemporal features and obtain good prediction performance on the CHB-MIT and BONN datasets, respectively. (2) A 3D feature matrix is introduced to extract EEG features in time domain and spatial domain, which captures the correlation information between channels, it makes up for the deficiency of extracting spatiotemporal feature representations in the past. (3) The FM hidden layer is utilized to conduct interactive modeling for the output generation of the multi-scale Inception module, so that the gain information for seizure prediction can be fully captured. (4) A PCFWNet is proposed, it can effectively adjust the channel weights to capture the global spatiotemporal features, and realize the discriminant representation of mapped seizure prediction and improve the prediction performance. 2. Mathodology The proposed MS-STFM-PCFWNet seizure prediction framework is shown in Fig. 1. The overall architecture is mainly composed of multi-scale inception module, FM layer and PCFWNet, which can be summarized as follows: (1) 3D feature matrix is mainly used to extract multi- channel spatiotemporal features from EEG signals, which the features are extracted through 1×1 convolution kernel. The inception module of different scales is employed to convolve the feature graphs, and then merged in the same dimension. The gain information related to seizure state in adjacent electrodes is extracted by convolution operation of 5×5 convolution kernel. (2) The FM layer is introduced to conduct the feature interaction modeling on the merged outputs of inception modules with three different scales, the interaction and correlation information between channel features is captured. (3) The PCFWNet can dynamically adjust channel weights to capture global spatiotemporal features between FM and linear hidden layer outputs. The detailed steps are as follows. 1. Multi-Scale feature merging convolutional network Reference [24] proposed the planar graph and mapping matrix of the international 10/20 system, and constructed the feature matrix by using the global information and spatial features of electrode positions. According to the relative position of the electrodes, the time domain features of the multi-channel are filled into the corresponding position of the feature matrix according to the coordinates. To ensure the integrity of the feature matrix, the number "0" is used to represent the unused channels, as shown in Fig. 1. According to literature [24], a 3D feature matrix of 9×9×1 is constructed for each sample according to the rules. The time-domain features extracted in this paper include mean value, variance, standard value, fuzzy entropy, skewness and peak value, which these 6 time-domain features are constructed as 2D feature matrix and superimposed into the 3D feature matrix 9×9×6 on the dimension 9×9×1. The matrix contains not only the timing features within the EEG channels, but also the position correlation information of the electrode channels. The extracted spatiotemporal features are input into the multi-scale feature merging convolutional network, as shown in Fig. 2. Firstly, The EEG features of each channel are obtained by 1×1 convolution kernel according to the input 3D feature matrix. The extracted features are input into convolution kernels of different scales, the convolution kernel sizes are 3×3, 5×5, and 7×7 respectively. The features extracted by multi-scale convolution are used for convolution operation, so the feature representations at different scales can be obtained.so the feature representations at different scales can be obtained. Then, the multi-scale convolution kernel is merged on the same dimension, and the convolution is carried out by 5×5 convolution kernel, which the extracted spatiotemporal features are input the FM layer to capture the interaction relationship between the features. Through fusing multi-scale feature information, the global information of electrode channels can be captured effectively, thus improving the performance and robustness of feature extraction. 1×1 3×3 5×5 7×7 5×5 Flatten Layer FM Layer Figure 2. Multi-scale feature merging convolutional networks. 84 2. Spatiotemporal Factorization Machine Spatiotemporal features are extracted from 3D feature matrix, the interaction of feature combination and the potential data sparsity of convolutional networks are ignored. However, the introduction of spatiotemporal factorization machine can solve this problem skillfully. Rendle et al. proposed the factorization machine [25], inspired by support vector machines (SVM) and matrix factorization techniques. FM is originally introduced for collaborative filtering, which has since been widely used in recommendation systems and other fields. The core idea of FM is to learn the interaction between features by factorizing features. Compared with the traditional linear model, FM introduced the concept of hidden factors, which represents the associations between each feature by modeling feature combinations as the inner product of pairwise feature interactions. This allows FM to better capture higher-order relationships between features, which improves the expressiveness of the model. With the introduction of hidden factors, FM can effectively solve the feature combination problem of high-dimensional sparse data, which has good scalability. The FM layer is added to the multi-scale feature convolution layer, which can effectively enhance the spatiotemporal feature interaction and simplify parameter updating. Due to the sparsity of convolutional networks, the parameter estimation of linear models may become unstable. In view of this, the most important features can be selected through FM, or the most informative features can be extracted. In this way, the correlation between features can be reduced, thus solving the problem of network sparsity. In other words, interaction items in the FM layer∑ ∑ 〈v , v 〉x ∙ x can learn their interactions between the different features obtained. Therefore, FM captures the nonlinear interactions of second- order factors between features while maintaining linear complexity, the FM plays a key advantage in learning feature interactions. Given a real valued eigenvector 𝐱∈R𝑛, the FM model can represent (1). 𝐹 𝑥 𝜃 𝜃 ∙ 𝑦 〈𝑤 , 𝑤 〉𝑦 ∙ 𝑦 , 1 Where 𝜃 ∈R is the deviation and 𝜃∈Rn represents the linear interaction of the target. The inner product term 〈𝑤 , 𝑤 〉 captures interactions between variables, where each w ∈R𝑘 is the first 𝑖 vector of the coefficient matrix W, and 𝑘 is the dimensional parameter of the auxiliary vector. Limiting the 𝑘 value can improve the generalization ability of the model to some extent. As can be seen from equation (1), the complexity of the algorithm is 𝑂(𝑘𝑛2). However, in practical applications, the value of n is usually too large, which results in excessive computational complexity. Therefore, in order to alleviate this situation, the complexity of FM algorithm can be reduced to 𝑘𝑛 by a series of identity transformations, which can reduce the computational pressure to a certain extent. The expression can be re-deduced as: 𝐹 𝑥 𝜃 𝜃 ∙ 𝑦 1 2 𝑤 𝑦 𝑤 𝑦 2 Where w𝑖𝑓 represents the element of w𝑖. Through the identity transformation, the complexity of the model is reduced to 𝑂(𝑘𝑛). Given that the number of input features is n, the number of neurons in the FM layer is q and the number of neurons in the output layer is O. Then, by extracting the nonlinear features of the FM layer, the output is obtained: 𝑦 𝑓 1 2 𝑤 𝑦 𝑤 𝑦 3 Where j=1,2,3,...,q, W𝑖𝑙∈𝑅 is the undetermined weight corresponding to 𝑦 , the auxiliary vector W𝑖 is the 𝑘 dimension and f represents the activation function. Figure 3. EEG spatial and temporal feature extraction. 3. Parallel channel Feature Weighted Network (PCFWNet) The advanced features extracted by multi-scale feature convolution and spatiotemporal factor factorization, which fully contain the sequence of channels and the interaction information between features. Based on this feature, the method of epileptic EEG signal extraction feature map [26] is introduced, and the spatiotemporal feature extraction maps of epilepsy EEG signal are obtained, as shown in Fig. 3. The area where the electrode channel is active, it is also the area with high attention weight. According to the energy distribution in the EEG time domain and channel location, the extracted features are input into the PCFWNet, and the interactive 85 information and global features are obtained by dynamically adjusting channel weights in time. The network consists of a multi-scale inception module and an ECA module, as shown in Fig. 4. ECANet is an efficient channel attention network, the structure of which is shown in Fig. 4. ECA channels use each channel and K-Nearest Neighbor (KNN) method to capture interaction information between part cross-channel features. By performing 1D convolution of size k, the strategy of part cross-channel interaction without reducing dimension can be effectively implemented. Given an input X∈RH*W*C, it becomes X∈R1*1*C through a global average pooling layer (GAP). In order to adjust the resulting feature map y to the shape required for subsequent convolution operations, it becomes X∈R1*C, after 1D convolution, the weight of 1D convolution is: 𝑊 𝜎 𝑊 𝑦 , 𝑦 𝜖𝜑 4 Where the 𝜑 represents the set of k adjacent channels of 𝑦 , which the feature interaction between channels is realized by 1D convolution of size k. Practice has proved that appropriate cross-channel interaction can significantly reduce the complexity of the model, which maintain the performance of the model. Among them, GAP can carry out global average pooling of input feature graphs without dimensionality reduction, the number of channel dimensions remains unchanged, and the spatial dimension is compressed to 1. The convolution kernel size k represents the coverage of part cross-channel interactions. This mechanism helps to enhance the interaction between channels more effectively while maintaining the correlation between channels, in order to improve the network's expressive ability and performance. The inception module is a structure that applies multiple different size convolutional kernels in parallel on the same network layer. It allows the network to capture multi-scale features at a single tier. By adding the ECA module to the multi-scale inception module, which can help the model better capture global context information while avoiding reducing the dimensions of the model. Extracting spatiotemporal local features through multi-scale inception modules, and utilizing ECA to capture global context information, it can make the model understand the input data more comprehensively, thus improving the learning ability and performance of the model. 3. Experimental Data and Settings 1. Dataset (1) CHB-MIT datasets In this paper, the proposed method is evaluated on the CHB-MIT dataset. It consists of scalp EEG records taken from children with epilepsy at Boston Children's Hospital. It contains 23 records from 22 subjects at a sampling frequency of 256Hz. Among them, each patient has at least two seizures and a three-hour interictal period recorded, and these patients are used for specific evaluation of seizure prediction model Inception  Flatte n  La ye r 1×1×C 1×1×C X 9 9 C X 9 9 C X’ECA MS‐Feature Conv FM  La ye r M LP  Lay e r preictal interictal PCFWNet K=5 GAP σ  Softmax Figure 4. Parallel channel feature weighted network (PCFWNet) [27]. In addition, the study excluded records of multiple seizures occurring within two hours. To rule out the effect on later seizures and help the model predict major seizures [28]. (2) BONN datasets The BONN dataset consists EEG data from 5 healthy people and 5 patients with epilepsy, which contains 5 data subsets, namely F, S, N, Z, and O. Each of these sub-datasets contains 100 data fragments, each with a duration of 23.6 seconds. As can be seen from the Table I. Data Z and O are scalp EEG information of 5 healthy people, which constituted the comparison group. The fragment in Z is EEG when the subject's eyes are open, and the fragment in O is EEG when 86 the subject's eyes are closed. Data N, F and S are intracranial EEG collected from 5 patients with epilepsy. N and F are collected during the interictal period, and S is collected during the seizure period. Table I. BONN dataset introduction Dataset Status Evaluate State Record Resources A_Z Normal Eye open Surface electrode B_O Normal Eye closed Surface electrode C_F Patient Interictal Inner electrode D_F Patient Interictal Inner electrode E_S Patient Seizure Inner electrode 2. Experimental setting and evaluation indicators This paper is based on the CHB-MIT and BONN public epilepsy datasets. In recent studies, preictal period is generally considered to be 30 minutes or 15 minutes before onset [29], which interictal period is defined as the time before and at least 2 hours after the seizure ended [30]. Therefore, the same preictal and interictal time settings are used in this study. The dataset is clipped as a time window lasting 4 seconds before it is input into MS-STFM-PCFWNet. The continuous EEG signals 15 to 30 minutes before the seizure are considered as preictal period. The time between the end of an onset and the start of the next onset is defined as the interictal period. EEG features are extracted from the CHB-MIT dataset, which the pre-seizure duration of each seizure recorded in the dataset is defined as 1800 seconds ,and the inter-seizure duration as 1200 seconds. Setting to one sample every 4 seconds, each pre-seizure and inter-seizure period can obtain 450 and 300 samples, respectively. The spatiotemporal features of 18 channels EEG signals are extracted from each sample. Each BONN data subset contains 100 single channel i-EEG records, for a total of 500 records. The time length of each data fragment in the database is 23.6 seconds and the sampling frequency is 173.61Hz. A total of 4097 samples are recorded in each data subset. In this paper, the BONN dataset is divided into five non-epileptic and epileptic control groups, namely A_E, B_E, C_E, D_E and ABCD_E. Because the model needs to deal with more dimensions, too many features can affect training and test results. This may can increase training time and increase the risk of overfitting the model. In addition, too many features also increase the presence of noise and redundant information, which make it more difficult to learn and generalize the model. To avoid this problem, feature selection method is used to select the features most relevant to the seizure prediction task. It includes mean, standard deviation, peak, fuzzy entropy, skewness and variance. In order to evaluate the performance of the method, the 5- fold cross-validation technique and three indexes, including accuracy, sensitivity and specificity, are used. Considering that choosing a large number of iterations can easily lead to overfitting, so this paper introduces an Adam optimizer with a learning rate of 0.0001 to minimize the loss function. Table II. The proposed method results in data on the CHB-MIT dataset P.ID Used Cases lr batch size ACC(%) SPE(%) SEN(%) Chb01 7 10-4 32 100 100 100 Chb02 3 10-4 32 97.8 100 99.4 Chb03 6 10-4 32 95.8 93.1 94.3 Chb04 7 10-4 32 97.6 97.2 96.2 Chb05 5 10-4 32 97.0 100 99.0 Chb06 7 10-4 32 98.1 98.5 98.5 Chb07 3 10-4 32 94.2 100 100 Chb08 5 10-4 32 90.9 90.2 88.8 Chb09 3 10-4 32 94.5 96.2 96.7 Chb10 6 10-4 32 100 100 100 Chb11 3 10-4 32 96.3 95.8 97.8 Chb12 7 10-4 32 94.8 91.5 94.5 Chb13 4 10-4 32 99.3 100 100 Chb14 6 10-4 32 100 100 100 Chb15 4 10-4 32 89.9 90.1 92 Chb16 5 10-4 32 98.1 97.7 97.4 Chb17 3 10-4 32 93.9 89.9 91.1 Chb18 5 10-4 32 100 100 100 Chb19 3 10-4 32 93.3 92.7 94.4 Chb20 4 10-4 32 100 100 100 Chb21 3 10-4 32 100 100 100 Chb22 6 10-4 32 98.9 100 100 Chb23 5 10-4 32 96.5 96.8 96.2 Chb24 6 10-4 32 97.4 95.9 96.6 Average -- -- -- 96.8 96.9 97.2 4. Experimental Results and Analysis 1.Analysis and comparison of MS-STFM-PCFWNet and baseline network results In order to verify the learning performance of the MS- STFM-PCFWNet method proposed in this paper, the proposed method is compared with the performance results of the baseline network on the CHB-MIT and BONN datasets. Table II shows the results of the proposed seizure prediction method in the CHB-MIT dataset, which achieve a 87 mean accuracy of 96.8%, a mean specificity of 96.9%, and a mean sensitivity of 97.2%. For all the epileptic and non- epileptic classification results considered on the BONN dataset, as shown in Table III. The accuracy, specificity and sensitivity of the method on the BONN dataset achieves 100%. The MS-STFM-PCFWNet model reaches good results with a learning rate of 0.0001. Table III. The proposed method results in data on the Bonn dataset cases lr batch size ACC(%) SPE(%) SEN(%) A_E 10-4 32 100 100 100 B_E 10-4 32 100 100 100 C_E 10-4 32 100 100 100 D_E 10-4 32 100 100 100 ABCD_E 10-4 32 100 100 100 In this experiment, the MS-STFM-PCFWNet model is compared with various baseline network models (1D-CNN, MLP, SVM, PCNN). As shown in Fig. 5 and Fig. 6, for the CHB-MIT and BONN datasets, the MS-STFM-PCFWNet is superior to the baseline network in the prediction task. In particular, for both CHB-MIT and BONN datasets, the accuracy of the proposed methods is better than the baseline network. In contrast, the proposed method has good learning performance. Figure 5. The average accuracy of the method is compared with the baseline network. CHB‐MIT BONN Figure 6. Performance comparison between the proposed method and the baseline network on CHB-MIT and BONN. 1. Comparative analysis of the results of MS-STFM- PCFWNet and the original model (1) Influence of multi-scale feature convolution In order to further intuitively verify the superiority of the proposed FM feature extraction, the scatterplot is utilized to compare MS-STFM-PCFWNet with a simplified model without FM feature extraction. The visual scatter plots of interictal and preictal features on the two datasets are shown 88 in Fig. 7. Where Fig. 7(a) and (b) respectively show the output of FM and without FM on the CHB-MIT dataset, and Figure (c) and (e) respectively show the output of FM and without FM on the BONN dataset. It can be seen that the feature distribution of binary classification using FM feature extraction is more distinguishable than that without FM. In particular, for the CHB-MIT and BONN datasets, without a model using FM feature extraction, a portion of the inter- seizure and pre-seizure features would be confused. In contrast, models utilize FM feature extraction obtained more discriminating features. This shows that the combination of multi-scale convolution and 3D feature matrix can produce good seizure prediction performance, which also fully illustrates the innovation of FM feature extraction in spatiotemporal feature extraction. without FM FM interictal preictal interictal preictal C H B -M IT B O N N (a) (b) (c) (d) Figure 7. Visual interictal and preictal features of FM and FM are not compared using scatter plots. (2) The influence of simplified model on model learning performance In order to verify the learning ability and performance of the model, the network structure of the proposed model and three groups of simplified models are recorded. Among them, the network structure of the four groups of models is consistent, but PCNN-FMNet and PCNN-ECANet respectively add FM and ECA module to the PCNN model, as shown in Table IV. In addition, the proposed model and three groups of simplified models are recorded, which the accuracy of the first 300 training cycles of the training set and the verification set are respectively employed on the CHB- MIT dataset, as shown in Fig. 8. When the training cycles are less than 50, the prediction accuracy of the four groups of models is continuously improved, when the training period is greater than 50, the accuracy is no longer increased. Compared with the proposed model, the three simplified models have greater fluctuation during training, while the proposed MS-STFM-PCFWNet model has stable convergence and no greater fluctuation. Table IV. The proposed method is compared with the network structure of four groups of simplified models FM ECA Layer Name Network Structure PCNN -- -- Input Input layer Inception1 Inception2 Inception3 Concat layer MLP layer Softmax 9×9×6 1 1conv, 32 5 5conv, 128 3 3conv, 128 3 3conv, 128 5 5conv, 128 5 5conv, 128 7 7conv, 128 7 7conv, 128 1 1conv, 512 5 5conv, 96 HL1, 1024units HL2, 512units 2 PCNN-FMNet √ -- PCNN-ECANet -- √ This work √ √ It can be seen from Fig. 8 and Fig. 9 that the proposed MS- STFM-PCFWNet has more stable performance than PCNN, PCNN-FMNet and PCNN-ECANet. It can be concluded that the integration of FM and ECA modules can better mine the 89 global features and interactive information between features, which map the discriminant representation of seizure prediction. Thus, the learning ability is better than that of the three simplified models train validation Figure 8. The change process of the accuracy of the first 300 training cycles of the training set and the validation set on the CHB-MIT dataset. Table V. The experimental method and performance comparison between the proposed method and the advanced method on the CHB-MIT dataset are presented Author Year Method ACC(%) SEN(%) SPE(%) Wei et al.[8] 2019 LRCN 93.4 91.8 86.1 Yu et al.[11] 2022 MLSTM -- 89.5 -- Sun et al.[16] 2021 CADCNN -- 97.1 95.6 Gao et al.[26] 2020 PSDED+DCNN 90.0 -- -- Ma et al.[31] 2023 CNN-Bi-LSTM 94.8 94.8 94.8 Zhong et al.[32] 2023 SVM 95.9 -- 94.9 Ma et al.[33] 2021 BNLSTM+CASA 95.6 96.2 91.5 Yang et al.[34] 2021 STFT+RDANet 92.0 -- 92.7 S,M et al.[35] 2020 STFT+CNN+SVM -- 92.7 90.8 This work 2024 MS-STFM-PCFWNet 96.8 96.9 97.2 Table VI. The experimental method and performance comparison between the proposed method and the advanced method on the BONN dataset are presented Author Year Method ACC(%) SEN(%) SPE(%) Turk et al.[36] 2019 CWT and CNN 98.5 98.00 98.98 Chakraborty et al.[37] 2021 MSSFs and RF classifier 99.65 98.06 100 Zhao et al.[38] 2020 1D-CNN 97.63 -- -- Mahfuz et al.[39] 2021 Deep CNN and CWT 98.44 97.50 98.38 This work 2024 MS-STFM-PCFWNet 100 100 100 1. Comparative analysis with previous methods In order to demonstrate the advantages of the proposed model, the performance of the previous seizure prediction 90 methods on the CHB-MIT dataset is summarized ,which the objective comparative analysis of these methods is carried out. Figure 9. Confusion matrix of four network models on CHB-MIT and BONN datasets. As shown in Table V and Table VI, it can be seen from the table that both [34] and [35] use short-time Fourier transform (STFT) to extract features, and the specificity is 92.7% and 90.8%, which is lower than the specificity of the proposed method. This is attributed to the proposed MS feature extractor can extract multi-scale spatiotemporal features of electrode channels, which capture gain information. Compared with [26], [31] and [32], the proposed PCFWNet method can learn spatiotemporal features more efficiently, and thus the accuracy of the three previous methods is improved by 6.8%, 2.0% and 0.8%. For BONN dataset, the proposed method is also superior to previous methods. Therefore, compared with other previous methods, the MS- STFM-PCFWNet model proposed can effectively capture the global features and interaction information between spatiotemporal features in this paper. In general, the proposed method can compensate for the spatiotemporal feature information guided by multi-channel spatial location in brain regions, at the same time, the interaction information between learning features can be captured by the parallel channel attention. 5. Conclusion In this paper, the MS-STFM-PCFWNet model for seizure prediction is proposed. Multi-channel spatiotemporal features are extracted from EEG signals by using 3D feature matrix. Convolution operations are applied to the feature maps using inception modules of different scales, and the gain information is extracted by merging in the same dimension. The FM layer is employed to merge the outputs of three different scale inceptionmodules, for feature interaction modeling, which the interaction and correlation information between channel features are captured. Finally, the PCFWNet is utilized to dynamically adjust the channel weights, which captures the global features between the FM and linear hidden layer outputs. The accuracy, sensitivity and specificity of the method are 96.8%, 96.9% and 97.2%. Compared with previous research tasks, the experimental results show that the method has relatively high accuracy. Due to different epileptic patients have different epileptic EEG data, more subjects of different age groups, clinical conditions, which disease characteristics need to be tested in future work to ensure the popularization of the method. As data sharing increases, cross-institutional, cross-international collaborative research promotes more comprehensive seizure prediction models. These efforts are expected to provide more effective treatment and improved quality of life for people with epilepsy. References [1] World Health Organization. [Online]. Available: https://www.who.int/ne ws/item/27-05-2022-seventy-fifth- world-health-asse- mbly---daily-upda te--27-may-2022, A- ccessed on: October. 6, 2022. [2] A. Shoeibi et al., “A comprehensive comparison of handcrafted features and convolutional autoencoders for epileptic seizures detection in EEGs ignals,” Expert Syst. Appl., vol. 163, 2021, Art. no. 113788. [3] S. Chakrabarti, A. Swetapadma, and P. K. Pattnaik, “A channel in dependent generalized seizure detection method for pediatric epileptic seizures,”Comput. Methods Programs Biomed., vol. 209, 2021, Art. no.106335. [4] H. Daoud and M. Bayoumi, “Deep learning approach for epileptic focus localization,”IEEE Trans.Biomed. Circuits Syst., vol. 14, no. 2, pp. 209–220,Apr. 2020. [5] C. A.Teixeira et al., “Epileptic seizure predictors based on computational intelligence techniques: A comparative study with 278 patients,” Comput. Methods Programs Biomed., vol. 114, no. 3, pp. 324–336, 2014. [6] Wang, Y., et al., A Spatiotemporal Graph Attention Network Based on S ynchronization for Epileptic Seizure Prediction. IEEE JOURNAL OF BI OMEDICAL AND HEALTH INFORMATICS, 2023. 27(2): p. 900-911. [7] K. M. Tsiouris, V. C. Pezoulas, M. Zervakis, S. Konitsiotis, D. D. Koutsouris, and D. I. Fotiadis, “A long short-term memory deep learning network for the prediction of epileptic seizures using EEG signals,” Comput.Biol. Med., vol. 99, pp. 24–37, 2018. [8] X. Wei, L. Zhou, Z. Zhang, Z. Chen, and Y. Zhou, “Early prediction of epileptic seizures using a long-term recurrent convolutional network,” J. Neurosci. Methods, vol. 327, 2019, Art. no. 108395. [9] N. D. Truong et al., “Convolutional neural networks for seizure prediction using intracranial and scalp electroencephalogram,” Neural Netwvol. 105, pp. 104–111, 2018. [10] Lu, X., Zhang, J., Huang, S., Lu, J., Ye, M., and Wang, M., “Detection and classification of epileptic EEG signals by the methods of nonlinear dynamics”. ChaosSolitons Fractals 151:111032. doi:10.1016/j.chaos.2021.111032. [11] Yu, Z.Y., et al., Epileptic Seizure Prediction Using Deep Neural Network Via Transfer Learning and Multi-Feature Fusion. INTERNATIONAL JOURNAL OF NEURAL SYSTEMS, 2022. 32(07). 91 [12] C. Chen, J. Liu, and J. Syu, ‘‘Application of chaos theory and data mining to seizure detection of epilepsy,’’ in Proc. Conf. IPCSIT/Hong Kong, vol. 25,2012, pp. 23–28. [13] K. T. Tapani, S. Vanhatalo, and N. J. Stevenson, ‘‘Time varying EEG correlations improve automated neonatal seizure detection,’’ Int. J. Neural Syst., vol. 29, no. 4, May 2019, Art. no. 1850030. [14] He, J., Cui, J., Zhang, G., Xue, M., Chu, D., and Zhao, Y., “Spatial-temoral seizure detection with graph att-ention network and bi-directional LSTM architecture”. Bi-omed. Signal Proc. Control 78:103908.doi: 10.1016 /j.bsp- c.2022.103908. [15] Ra, J.S.,T. Li and YanLi, A novel epileptic seizure prediction method based on synchro extracting transform and 1- dimensional convolutional neural network. COMPU-TER METHODS AND PROGRAMS IN BIOMEDICINE,2023.240. [16] Sun, B. et al. Seizure prediction in scalp EEG based channel attention dual input convolutional neural network. Physica A:Statistical Mechanics and its Applications, 2021.584:p.126376. [17] T. Zhang, X. Wang, X. Xu, and C. L. P. Chen, “GCB-Net: Graph convolutional broad network and its application in emotion recognition” IEEE Trans. Affect. Comput., vol. 13, no. 1, pp. 379–388,Jan. 2022. [18] Q. Lian, Y. Qi, G. Pan, and Y. Wang, “Learning graph in graph convolutional neural networks for robust seizure prediction,” J. Neural Eng., vol. 17,no. 3, Jun. 2020, Art. no. 035004. [19] T.Dissanayake, T. Fernando, S. Denman, S. Sridharan, and C. Fookes,“Geometric deep learning for subject independent epileptic seizure prediction using scalp EEG signals,” IEEE J. Biomed. Health Informat.,vol. 26, no. 2,pp. 527–538, Feb. 2022. [20] S. Jang, S.E. Moon, and J.S. Lee, “EEG-based video identification using graph signal modeling and graph convolutional neural network, ”in Proc. IEEE Int. Conf. Acoust., Speech Signal Process. (ICASSP),Apr. 2018, pp. 3066–3070. [21] P. Zhong, D. Wang, and C. Miao, “EEG-based emotion recognition using regularized graph neural networks,” IEEE Trans. Affect. Comput.,vol.13, no.3, pp.1290–1301, Jul. 2022. [22] Y. Li, Y. Liu, W.G. Cui, Y.Z. Guo, H. Huang, and Z.Y. Hu., “Epileptic seizure detection in EEG signals using a unified temporal-spectral squeeze-and-excitation network,” IEEE Trans. Neural Syst. Rehabil. Eng.,vol. 28, no. 4, pp. 782–794, Apr. 2020. [23] Prathaban, B. P., and Balasubramanian, R., “Dynam-ic learning framework for epileptic seizure prediction usi-ng sparsity based EEG reconstruction with optimized C-NN classifier”. Expert Syst. Appl. 170:114533.doi: 10.1016/j.eswa.2020.114533. [24] CHAO H, DONG L. Emotion Recognition Using Three- Dimensional Feature and Convolutional Neural Network from Multichannel EEG Signals. IEEE Sensors Journal, 2021. 21(2): 2024-2034. [25] Rendle, Steffen, 2010. Factorization machines. In: 2010 IEEE International Conference on Data Mining. IEEE,pp.995–1000. [Online] Available: http://dx.doi.org/10.1109/ICDM.2010.127. [26] Gao, Y.Y., et al., “Deep Convolutional Neural Network Based Epileptic Electroencephalogram (EEG) Signal Classification”.FRONTIERS IN NEUROLOGY, 2020. 11. [27] A. R. Ozcan and S. Erturk, “Seizure prediction in scalp EEG using 3D convolutional neural networks with an image-based approach,” IEEE Trans. Neural Syst. Rehabil. Eng., vol. 27, no. 11, pp. 2284–2293,Nov. 2019. [28] D. R. Freestone, P. J. Karoly, and M. J. Cook, ‘‘A forward looking review of seizure prediction,’’ Current Opinion Neurol., vol.30, no. 2, pp.167–173, 2017. [29] Y. Li, Y. Liu, Y.Z. Guo, X.F. Liao, B. Hu, and T. Yu,“Spatio- temporal-spectral hierarchical graph convolutional network with semi-supervised active learning for patie-nt specific seizure prediction,” IEEE Trans. Cybern., vol.52, no.11, pp. 12189–12204,Nov. 2022. [30] N. D. Truong et al., “Convolutional neural networks for seizure prediction using intracranial and scalp electroencephalogram,” Neural Netw., vol. 105, pp. 104–111, Sep. 2018. [31] Ma, Y., et al., A Multi-Channel Feature Fusion CNN-Bi-LSTM Epilepsy EEG Classification and Prediction Model Based on Attention Mechanism. IEEE ACCESS, 2023. 11: p. 62855- 62864. [32] Zhong,L.,et al., Epileptic prediction using spatiotem-poral information combined with optimal features strateg-yon EEG. FRONTIERS IN NEUROSCIENCE, 2023. 17. [33] M. Ma et al., “Early prediction of epileptic seizure based on the BNLSM-CASA model,” IEEE Access, vol. 9, pp. 79600– 79610, 2021. [34] X.Yang, J. Zhao, Q. Sun, J. Lu, and X. Ma, “An effective dual self-attention residual network for seizure prediction,” IEEE Trans. Neural Syst. Rehabil. Eng., vol. 29, pp. 1604–1613, 2021. [35] S. M. Usman, S. Khalid, and M. H. Aslam, “Epileptic seizures prediction using deep learning techniques,” IEEE Access, vol. 8, pp. 39998–40007,2020. [36] Turk, O. and M.S. Ozerdem, Epilepsy Detection by Using Scalogram Based Convolutional Neural Network from EEG Signals. BRAIN SCIENCES, 2019. 9(5). [37] M. Chakraborty, D. Mitra, A computationally efficient automated seizure detection method based on the novel idea of multiscale spectral features, Biomed.Signal Process. Control. 70 (2021) 102990 Sep 1 . [38] W. Zhao, W. Zhao, W. Wang, X. Jiang, X. Zhang, Y. Peng, B. Zhang, G. Zhang, A novel deep neural network for robust detection of seizures using EEG signals,Comput. Math. Methods Med. 2020 (2020) 2020 Apr 7. [39] Rashed-Al-Mahfuz, M., et al., A Deep Convolution-al Neural Network Method to Detect Seizures and Chara-cteristic Frequencies Using Epileptic Electroencephalogra-m (EEG) Data. IEEE JOURNAL OF TRANSLATIONAL ENGINEERING IN HEALTH AND MEDICINE, 2021.9.