Method and system for determining epilepsy signal characteristics based on adaptive spatiotemporal fusion network
By adopting an adaptive spatiotemporal fusion network method in epilepsy prediction, the weight of spatiotemporal features is dynamically adjusted, the key features of EEG signals are extracted, and the accuracy and personalized ability of prediction are improved through bidirectional processing and adaptive adjustment, the problems of strong timing dependence, difficulty in feature extraction and insufficient personalized prediction capabilities in the prior art are solved.
Patent Information
- Application Number
- CN202510180237.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-02-19
AI Technical Summary
The prior art has problems such as strong timing dependence, difficulty in feature extraction and insufficient personalized prediction ability in epilepsy prediction, resulting in low prediction accuracy and low efficiency.
Using an adaptive spatiotemporal fusion network method, the synergistic effect of the adaptive perception module, front-end and back information perception network and neural adaptive adjustment module is adopted to dynamically adjust the weight of spatiotemporal characteristics, extract key features of the EEG signal, and improve the accuracy and personalization of prediction through bidirectional processing and adaptive adjustment.
It significantly improves the accuracy and real-time extraction of epilepsy signal characteristics, can better adapt to the EEG signal characteristics of different patients, and enhances personalized prediction capabilities.
Smart Images

Figure CN119655772B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic technology, and in particular to a method and system for determining epilepsy signal features based on an adaptive spatiotemporal fusion network. Background Art
[0002] Epilepsy is a chronic neurological disease caused by abnormal discharges of brain neurons. It manifests as sudden, transient brain dysfunction, which has a significant impact on the patient's quality of life.
[0003] Existing technology uses electroencephalogram (EEG) to record the electrical activity of brain neurons, and then uses epilepsy experts to identify the waveform to determine whether epilepsy is about to occur.
[0004] However, traditional epilepsy prediction is mainly based on the detection of epilepsy, which is too cumbersome, inefficient, and consumes a lot of manpower, especially for the processing of complex EEG signals, and the prediction accuracy is not high. Summary of the invention
[0005] In view of the above problems, the present invention is proposed to provide a method and system for determining epilepsy signal features based on an adaptive spatiotemporal fusion network, which overcomes the above problems or at least partially solves the above problems.
[0006] In a first aspect, a method for determining epilepsy signal features based on an adaptive spatiotemporal fusion network comprises:
[0007] Input the EEG signal into the adaptive perception module, extract the EEG signal by dynamically adjusting the weight of the spatiotemporal features, and obtain key features. The adaptive perception module includes: a selective scanning algorithm unit and a BigBird hybrid attention mechanism unit. The EEG signal includes sequence data.
[0008] The key features are bidirectionally processed through a front-back information perception network to determine the front-back timing information of the EEG signal;
[0009] Processing the preceding and following time sequence information through a neural adaptive adjustment module to determine global information on each channel, and determining important features in the EEG signal based on the global information;
[0010] Based on the important features, it is determined whether epilepsy signal features exist.
[0011] Optionally, the EEG signal is input into the adaptive perception module, and the EEG signal is feature extracted by dynamically adjusting the weights of the spatiotemporal features to obtain key features, including:
[0012] Sequence data Divide into The length is subsequence of ;
[0013] Select some subsequences according to , obtain the prefix sum of the partial subsequence, the For the The prefix sum of subsequences; here Identified as the position index in the sequence, that is, the first data point, It is used as an offset calculation factor. Its function is to determine the relative position offset within the subsequence and is defined as the subsequence length parameter. Defined as the subsequence length parameter, indicating that the original sequence The number of elements contained in each subsequence when it is divided into m equal-length subsequences;
[0014] according to , get the complete prefix and sequence, where Indicates The prefix sum of the last element of the subsequence;
[0015] according to , determine the time step The hidden state vector ,in, is the complete prefix and sequence, is the time step The dynamic state transfer matrix, As a time step The input matrix of
[0016] according to , determine the output of the selective scanning algorithm unit ,in is the output matrix.
[0017] Optionally, the step of inputting the EEG signal into the adaptive perception module, extracting features from the EEG signal by dynamically adjusting the weights of the spatiotemporal features, and obtaining key features may also include:
[0018] according to , determine the attention output ,in, For the The value vector at each time point, attention weight , For the The query vector at each time point, For the The key vector at each time point, Indicates query vector and Key vector The similarity between is the query vector, is the key vector, is a value vector, Indicates The key vector at each time point The transpose of Indicates The key vector at each time point The transpose of
[0019] according to , determine the output of the BigBird hybrid attention mechanism unit ,in, , , , , , is the weight matrix, is the matrix of sequence data, is the value matrix, is the weight matrix of the output gate;
[0020] The output of the BigBird hybrid attention mechanism unit The output result of the selective scanning algorithm unit A fusion process is performed to determine the key features.
[0021] Optionally, the key features are bidirectionally processed through a front-back information perception network to determine the front-back timing information of the EEG signal, including:
[0022] The key features are simultaneously subjected to forward calculation and backward calculation to determine the front and back timing information of the EEG signal, wherein the forward calculation and backward calculation process include candidate memory cells and memory cells for controlling the key features, wherein the candidate memory cells , is the weight matrix for calculating candidate memory cells, is the bias term associated with the candidate memory cell, tanh is the hyperbolic tangent activation function, is the hidden state at time step t, is the key feature; memory cells , , They are the weight matrices for calculating the forget gate and the output gate, , are the bias terms associated with the forget gate and the output gate, respectively.
[0023] Optionally, the processing of the preceding and following time sequence information through a neural adaptive adjustment module to determine global information on each channel, and determining important features in the EEG signal according to the global information, includes:
[0024] according to , determine the attention value ,in, is the weight matrix of the linear layer, Indicates input Take the average of the last dimension of
[0025] according to , determine the adjustment width , and are learnable scaling and offset parameters;
[0026] according to , determine the important feature Y in the EEG signal.
[0027] The other party provides an epilepsy signal feature prediction system, comprising:
[0028] An adaptive perception module is used to receive EEG signals, extract features from EEG signals by dynamically adjusting the weights of spatiotemporal features, and obtain key features. The adaptive perception module includes a selective scanning algorithm unit and a BigBird hybrid attention mechanism unit. The EEG signals include sequence data.
[0029] The front and back information perception network is used to process the key features bidirectionally through the front and back information perception network through a bidirectional processing module to determine the front and back timing information of the EEG signal;
[0030] A neural adaptive adjustment module, used for processing the preceding and following time sequence information, determining global information on each channel, and determining important features in the EEG signal according to the global information;
[0031] The determination module is used to determine whether there is an epilepsy signal feature based on the important feature.
[0032] Optionally, the adaptive perception module is specifically used to convert the sequence data Divide into The length is subsequence of ; Select some subsequences according to , obtain the prefix sum of the partial subsequence, the For the The prefix sum of subsequences; according to , get the complete prefix and sequence, where Indicates The prefix sum of the last elements of the subsequence; according to , determine the time step The hidden state vector ,in, is the complete prefix and sequence, is the time step The dynamic state transfer matrix, As a time step The input matrix of , determine the output of the selective scanning algorithm unit ,in is the output matrix.
[0033] Optionally, the adaptive perception module is further configured to: , determine the attention output ,in, For the The value vector at each time point, attention weight , For the The query vector at each time point, For the The key vector at each time point, Indicates query vector and Key vector The similarity between is the query vector, is the key vector, is a value vector, Indicates The key vector at each time point The transpose of Indicates The key vector at each time point The transpose of , determine the output of the BigBird hybrid attention mechanism unit ,in, , , , , , is the weight matrix, is the matrix of sequence data, is the value matrix, is the weight matrix of the output gate, which is used to linearly transform the result calculated by the attention mechanism; the output result of the BigBird hybrid attention mechanism unit The output result of the selective scanning algorithm unit A fusion process is performed to determine the key features.
[0034] Optionally, the front-to-back information perception network is used to process the key features through forward calculation and backward calculation at the same time through a bidirectional processing module to determine the front-to-back timing information of the EEG signal, wherein the forward calculation and backward calculation process include candidate memory cells and memory cells for controlling the key features, wherein the candidate memory cells , is the weight matrix for calculating candidate memory cells, is the bias term associated with the candidate memory cell, tanh is the hyperbolic tangent activation function, is the hidden state at time step t, is the key feature; memory cells , , They are the weight matrices for calculating the forget gate and the output gate, , are the bias terms associated with the forget gate and the output gate, respectively.
[0035] Optionally, the neural adaptive adjustment module is specifically used according to , determine the attention value ,in, is the weight matrix of the linear layer, Indicates input The last dimension of is averaged; according to , determine the adjustment width , and are learnable scaling and offset parameters; according to , determine the important feature Y in the EEG signal.
[0036] The technical solution provided in the embodiments of the present invention has at least the following technical effects or advantages:
[0037] The embodiment of the present invention provides an epilepsy signal feature determination method and system based on an adaptive spatiotemporal fusion network, which inputs an EEG signal into an adaptive perception module, extracts features of the EEG signal by dynamically adjusting the weights of the spatiotemporal features, and obtains key features. The adaptive perception module includes: a selective scanning algorithm unit and a BigBird hybrid attention mechanism unit, and the EEG signal includes sequence data; the key features are bidirectionally processed through a front-end and back-end information perception network to determine the front-end and back-end timing information of the EEG signal; the front-end and back-end timing information is processed through a neural adaptive adjustment module to determine the global information on each channel, and the important features in the EEG signal are determined based on the global information; based on the important features, it is determined whether there are epilepsy signal features.
[0038] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0040] Figure 1 Schematic diagram of the flow of a method for determining epilepsy signal features based on an adaptive spatiotemporal fusion network in an embodiment of the present invention;
[0041] Figure 2 It is a structural schematic diagram of the overall model diagram of ASTF-Net in an embodiment of the present invention;
[0042] Figure 3 It is a detailed flow chart of the adaptive perception module in an embodiment of the present invention;
[0043] Figure 4 It is a detailed flow chart of the front and back information perception network in an embodiment of the present invention;
[0044] Figure 5 This is a schematic diagram of the structure of a neural adaptive adjustment module in an embodiment of the present invention;
[0045] Figure 6 This is the performance of the CHB-MIT dataset in an embodiment of the present invention;
[0046] Figure 7 This is the performance of the SWEC-ETHZ dataset in the embodiment of the present invention;
[0047] Figure 8 Schematic diagram of the structure of an epilepsy signal feature determination system based on an adaptive spatiotemporal fusion network in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to be able to fully convey the scope of the present disclosure to those skilled in the art. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0049] Various structural schematic diagrams according to embodiments of the present disclosure are shown in the accompanying drawings. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may further design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0050] During the research of the present invention, the inventor found that the prior art has the following problems:
[0051] 1. Most methods are based on self-attention mechanisms and sub-quadratic time structures. Existing research has solved the problem of low computational efficiency on long sequences to a certain extent, but the prediction accuracy is not as good as expected, and there is still a common key problem of being unable to perform content-based reasoning. For example, when the patient's condition changes, it is impossible to make accurate and effective predictions.
[0052] 2. Most current models are based on recursive neural networks or similar structures, which are prone to error accumulation problems in long-term time series tasks, resulting in unstable model prediction effects.
[0053] 3. Existing epilepsy prediction models lack personalization and are unable to cope with the differences in seizure patterns between different patients, resulting in inaccurate prediction results.
[0054] See also Figure 1 The embodiment of the present application provides a method for determining epilepsy signal features based on an adaptive spatiotemporal fusion network, comprising:
[0055] Step 101: Input the EEG signal into the adaptive perception module, extract the EEG signal by dynamically adjusting the weights of the spatiotemporal features, and obtain key features.
[0056] In this embodiment, the adaptive perception module includes: a selective scanning algorithm unit and a BigBird hybrid attention mechanism unit, and the EEG signal includes sequence data;
[0057] Aiming at the time-dependent problems, feature extraction difficulties and insufficient personalized prediction capabilities in epilepsy signal feature prediction, this paper proposes a new deep learning model: Adaptive Spatiotemporal Feature Fusion Network (ASTF-Net). Figure 2 As shown in the figure. By introducing the adaptive perception module, the temporal and spatial characteristics of the input data can be dynamically adaptively captured and adjusted without the need for additional network design; the combination of the front and back information perception networks enables the model to maintain coherence and stability in time-dependent processing and effectively enhance information interaction at different time steps; the neural adaptive regulation module implicitly enhances the model's feature learning ability by adaptively adjusting and regulating the feature space of the input signal, thereby providing an inductive bias for the accurate prediction of complex epileptic seizure patterns. This achieves a more accurate prediction of epileptic seizures and can effectively improve the accuracy and real-time performance of the prediction.
[0058] The main goal of the present invention is to overcome the shortcomings of the existing technology in epilepsy prediction, especially the processing of complex EEG signals, through a number of innovative technologies. Through the three core modules of the present invention, the model is optimized and improved in data temporal dependency modeling, feature extraction and personalized prediction.
[0059] In order to solve the problem that EEG signal features are complex and time-dependent, the present invention proposes an adaptive perception module. This module can dynamically adjust the weights of spatiotemporal features through the selective scanning algorithm and the BigBird hybrid attention mechanism, so that the model can capture the key features in the EEG signal more efficiently. This module ensures that the model can focus on the important parts of the time series signal through global processing of the input features, thereby improving the accuracy of prediction and computational efficiency.
[0060] In terms of feature extraction and dependency modeling, the front-to-back information perception network of the present invention can simultaneously capture the front-to-back timing information of the EEG signal through a bidirectional processing algorithm, thereby enhancing the ability to capture long-term and short-term dependencies during epileptic seizures. The reset gate and update gate mechanisms of the GRU layer ensure flexible control of information flow, allowing the model to exhibit higher robustness in long-term and short-term dependency modeling. At the same time, the average pooling layer reduces the size of the feature map, improving computational efficiency while retaining key features. The network converts multidimensional features into one-dimensional vectors through a flattening layer, and introduces a mechanism for randomly discarding neurons to prevent overfitting and enhance generalization capabilities. While capturing global and local features, the network effectively improves the prediction accuracy and sensitivity of the model.
[0061] In order to solve the problem of insufficient personalized prediction ability, the present invention designs a neural adaptive adjustment module, which dynamically adjusts the model's attention to different channel features through global information extraction and adaptive weighting mechanism. Through learnable scaling and offset parameters, the model can automatically adapt to the EEG signal characteristics of different patients and enhance the ability of personalized prediction. This mechanism effectively solves the impact of different individual EEG signal differences on the prediction results and significantly improves the generalization ability of the model.
[0062] (1) Adaptive perception module
[0063] When processing complex EEG time series data, traditional models have significant deficiencies in capturing multi-scale features and long sequence dependencies, resulting in reduced prediction performance. To address these problems, this paper proposes an innovative method based on an adaptive perception module. By combining the selective scanning algorithm and the BigBird layer, this module can dynamically adjust the input information and hybrid attention mechanism, enhance the model's ability to process EEG signals, and greatly improve computational efficiency. Figure 3 shown.
[0064] In this module, this study uses two parallel convolution blocks to extract features of different scales and capture multiple modes of EEG signals. The ReLU activation function and batch normalization layer are used to further enhance the expressiveness and stability of the features. In order to improve the model's ability to capture information at different time scales, this study designed two parallel convolution blocks to extract features of different scales and capture the multimodal features of EEG signals. The processed EEG signals are finally input into the selective scanning algorithm and BigBird layer for further feature extraction and temporal dependency capture.
[0065] In the selective scanning algorithm, the input sequence is first The selective mechanism effectively improves the computational efficiency of long sequence data through parallel processing strategy. Specifically, given an input sequence And the corresponding prefix and sequence , and its prefix and calculation formula is shown in Formula 1.
[0066] (1)
[0067] in, Indicates The prefix sum of the positions, that is, starting from the first element To Elements The cumulative sum of . Symbol Represents the first elements, prefix and The accumulated This calculation method effectively retains the global information of the input sequence and provides a basis for subsequent hidden state updates.
[0068] The input sequence is first divided into multiple subsequences, the formula of which is shown in Formula 2.
[0069] (2)
[0070] The entire sequence Divided into subsequences, each of which has a length of The first subsequence Contains the sequence before elements, the second subsequence Contains arrive elements, and so on, until the entire sequence is completely divided into subsequences. Each subsequence is calculated in parallel on different processors, and the state is updated through the selective state space model. Subsequently, each subsequence is subjected to a selective mechanism to calculate its partial sum, as shown in the specific formula 3.
[0071] (3)
[0072] here Identified as the position index in the sequence, that is, the first data point, It is used as an offset calculation factor. Its function is to determine the relative position offset within the subsequence and is defined as the subsequence length parameter. Defined as the subsequence length parameter, indicating that the original sequence The number of elements contained in each subsequence when it is divided into m equal-length subsequences
[0073] Finally, the partial sums of each subsequence are aggregated to form a complete prefix sum sequence, as shown in the specific formula 4.
[0074] (4)
[0075] in, Indicates The prefix sum of the subsequences, specifically, from The cumulative sum from the starting position of the subsequence to the i-th element; Indicates The prefix sum of the last element of the j-th subsequence, that is, the sum accumulated from the first element to the k-th element in the j-th subsequence. Represents the prefix sum of the m-th subsequence, accumulated to the i-th element; Represents the prefix sum of the first subsequence, accumulated to the i-th element; Represents the prefix sum of the second subsequence, accumulated to the i-th element; Represents the prefix sum accumulated to the kth element in the first subsequence; represents the prefix sum of the second subsequence accumulated to the 2kth element; through the calculation of the prefix sum sequence, the model can quickly integrate and process the accumulated information of the input sequence, providing a solid foundation for the hidden state update. With the help of multi-core parallel processing, the selective scanning algorithm greatly improves the computational efficiency, so that it can effectively process longer sequences, demonstrating its advantages in long sequence processing tasks.
[0076] After the selective mechanism is completed, the processed data is passed to the selective state space model for further processing. The selective state space model uses the state transition matrix , input matrix And the output matrix The data of each time step is dynamically updated. The mathematical definition of this process is shown in Formula 5-6.
[0077] (5)
[0078] (6)
[0079] In the above formula, equal is the complete prefix and sequence, Represents the time step The hidden state vector of is the time step The dynamic state transfer matrix allows each time step to have different state transfer modes. As a time step The input matrix is responsible for the input vector to process; is the output matrix, responsible for the output vector of each time step By dynamically adjusting these matrices, the selective state space model can be adjusted according to the input data Dynamically selectively focus on or ignore specific information to retain useful state information. This mechanism enables the model to effectively capture long-term dependencies while maintaining a small state size, ensuring that the cumulative effect of the input sequence can be reflected in the hidden state. , thus affecting the output .
[0080] In the BigBird layer, BigBird reduces the computational complexity through a hybrid attention mechanism that combines global attention, local attention, and random attention. The formula is shown in Formula 7.
[0081] (7)
[0082] Among them, GlobalAttention is the global attention function, LocalAttention is the local attention function, and RandomAttention is the random attention function.
[0083] The calculation formula of Attention is as follows:
[0084] (8)
[0085] in, is the query vector, is the key vector, is a value vector, For the The output of the attention mechanism is obtained by Perform weighted summation to obtain the weight It is based on query vector and the The formula ensures that when generating the output, all time points The value vector of are all considered.
[0086] Attention Weight The calculation formula is Formula 9.
[0087] (9)
[0088] in, For the The query vector at each time point, For the The key vector at each time point, Indicates query vector and Key vector The similarity between Indicates The key vector at each time point The transpose of Indicates The key vector at each time point The transpose of . Through the dot product To measure the similarity between them, the softmax function is then used to normalize the similarity to ensure that all weights falls within the interval [0,1], and the sum of the weights at all time points is 1. For all key vectors The similarity calculation is normalized. is the traversal index of the key vector, Represents the full set of key vectors, including all key vectors.
[0089] Through this process, the model is able to The similarity of the value vector Weighted to generate the final attention output , where the value vector at each time point contributes to the final output according to its similarity with the query vector. This weighted summation allows the model to effectively capture global dependencies and balance the contributions of local and global features.
[0090] The BigBird layer combines these three attention mechanisms, enabling the module to efficiently process long sequence problems in EEG signals while retaining the ability to process long-distance dependencies. , , The matrix with parameters , , The linear change is as follows: Formula 10-12.
[0091] (10)
[0092] (11)
[0093] (12)
[0094] The output formula is Formula 13.
[0095] (13)
[0096] in is the value matrix, is the input matrix, , , is the weight matrix. , , It is an adjustable model learning, and the parameters are automatically updated during the network training process. Therefore, the model can be automatically adjusted multiple times , , , so that the BigBird layer can achieve an adaptive perception adjustment effect, It is the weight matrix of the output gate, which is used to linearly transform the results calculated by the attention mechanism.
[0097] After the selective scanning algorithm and BigBird layer perform deeper feature extraction, these features are fused to better provide detailed temporal dynamic information and rich contextual information, enabling the model to better understand long-range dependencies and local patterns during training.
[0098] Step 102, bidirectionally processing the key features through a front-back information perception network to determine the front-back timing information of the EEG signal;
[0099] Most of the existing models have the problem of difficulty in capturing abnormal patterns in sequence data. Therefore, this study integrates the bidirectional processing algorithm into the before-after information perception network, and uses the bidirectional processing algorithm to integrate the before-after information of the sequence to more comprehensively capture abnormal patterns. The flowchart of the before-after information perception network is shown in the figure. Figure 4 shown.
[0100] The EEG signal processed by the adaptive perception module is input into the front and back information perception network, and the average pooling is used to calculate the average value in the local area to reduce the size of the feature map while retaining important features. The multi-dimensional feature map is then converted into a one-dimensional feature vector through a flattening layer, and some neurons are randomly discarded to prevent overfitting. Finally, these features are input into the GRU layer for further processing.
[0101] In this layer, we use update gates and reset gates to control the flow of information so that it can capture long-term dependencies. The formula is shown in Formula 14-17.
[0102] (14)
[0103] (15)
[0104] (16)
[0105] (17)
[0106] in It is the reset gate. It is the update gate. is a candidate hidden state, is the input of the current time step, is the hidden state of the previous time step, , , is a weight matrix, which is used to calculate the linear transformation of the reset gate, update gate and candidate hidden state, respectively. is the sigmoid activation function.
[0107] GRU effectively alleviates the gradient vanishing problem through the gating mechanism. The update gate and reset gate enable the model to remember information for a long time step, and perform well in long sequence tasks. The interaction between the update gate and the reset gate effectively controls the flow of information and enhances the model's ability to capture long-term dependencies.
[0108] The processed frequency domain features are input into the bidirectional processing algorithm to better capture the bidirectional dependency information, and the formula is shown in Formula 18-20.
[0109] (18)
[0110] (19)
[0111] (20)
[0112] in, is the result of the forward calculation, is the result of the backward calculation, is the result of a two-way calculation, where is the forward calculation function, The reverse calculation function.
[0113] In the bidirectional processing algorithm, the input sequence is calculated both forward and backward. Combining the forward and backward hidden states can capture the bidirectional dependency information in the sequence and improve the model's ability to understand contextual information. From the beginning to the end of the sequence, it helps to capture the impact of early time points on the current, and from the end to the beginning of the sequence, it helps to understand the development trend behind the current moment.
[0114] During the forward and backward calculation process, candidate memory cells and memory cells ensure the control of information flow, update and maintain memory. The formula is as follows: Formula 21-22.
[0115] (twenty one)
[0116] (twenty two)
[0117] in, are candidate memory cells, It's a memory cell. , , They are the weight matrices for calculating candidate memory cells, forget gates, and output gates, respectively. , , are the bias terms associated with candidate memory cells, forget gates, and output gates, respectively. It is a hyperbolic tangent activation function, which compresses the calculation result to between -1 and 1 to ensure that the generated candidate memory cell state is within the appropriate range.
[0118] Candidate memory cells are used to generate new memory information by combining the current input and the hidden state of the previous time step to generate new memory for the current time step, flexibly update and maintain memory, better understand the contextual information, and capture long-term dependencies.
[0119] The forward and backward information perception network processes signal features at different time scales, comprehensively analyzes the signals at previous and next moments, better understands and predicts complex time series data, generates a more comprehensive feature representation, and improves the accuracy and robustness of the model.
[0120] Step 103, processing the preceding and following time sequence information through a neural adaptive adjustment module, determining global information on each channel, and determining important features in the EEG signal according to the global information;
[0121] In this study, due to the complex time dependence of EEG signals, it is necessary to consider information at multiple time points. Therefore, a neural adaptive regulation module is introduced into the model. The specific structure is as follows: Figure 5 shown.
[0122] By dynamically adjusting the weights of spatiotemporal features, the model can better capture temporal relationships, thereby improving performance in EEG data. The specific formula of the neural adaptive adjustment module is shown in Formula 23.
[0123] (twenty three)
[0124] in, is the weight matrix of the linear layer, Indicates input The final result is obtained by the sigmoid function. Mapped to [0,1][0,1][0,1] to generate attention weights.
[0125] This part uses global information extraction to extract the global information of the input data on each channel, representing the average strength of all features in each channel, and then generates attention weights. These weights represent the importance of each channel. This part adaptively generates weights based on the global features of the input, allowing the model to dynamically adjust the attention to different channels, and can more accurately focus on the most important part of the input features, improving the efficiency and effect of feature extraction. The formula is shown in Formula 24.
[0126] (twenty four)
[0127] in, and are learnable scaling and offset parameters.
[0128] Learnable parameters and The dynamic adjustment of enables the features of each channel to be scaled and offset, and the model can find a more appropriate representation in the feature space, thereby enhancing the ability to express complex input EEG signals. The formula is shown in Formula 25.
[0129] (25)
[0130] This part multiplies the adjusted features and weights element by element and outputs them. This part re-weights the features of each channel to further enhance or suppress the features of different channels.
[0131] The neural adaptive adjustment module can dynamically adjust the weights according to the input features, so that the model can adaptively handle different input data distributions. It introduces learnable scaling and offset parameters so that the weight adjustment process can be automatically optimized through training. At the same time, it helps the model focus on the most important part of the input data, reducing the complexity of directly calculating the correlation of high-dimensional features.
[0132] Step 104: Determine whether there is an epilepsy signal feature based on the important features.
[0133] In this embodiment, through the synergy of the adaptive perception module, the front and back information perception network and the neural adaptive adjustment module, the key problems such as the strong temporal dependence of the EEG signal, the difficulty in feature extraction and the lack of personalized prediction ability are solved. The adaptive perception module combines the selective scanning algorithm with the BigBird hybrid attention mechanism, which can dynamically adjust the weights of the spatiotemporal features and effectively capture the important features in the EEG signal. The module ensures that the model focuses on the key timing signals through global processing of the input features, significantly improving the prediction accuracy and computational efficiency. The front and back information perception network realizes the comprehensive integration of the front and back information of the epileptic signal through a bidirectional processing algorithm. The network combines the reset gate and update gate mechanism of the GRU layer to enhance the model's ability to capture long-term and short-term dependencies, thereby improving the prediction accuracy of epileptic seizures. Compared with traditional methods, the network can capture abnormal signal patterns more accurately, while taking into account global and local features. The neural adaptive adjustment module realizes the dynamic adjustment of individual EEG signals of different patients by introducing learnable scaling and offset parameters, and enhances the personalized prediction ability. This module not only improves the adaptability of the model to the differences between different patients, but also effectively solves the shortcomings of traditional models in personalized prediction.
[0134] These innovative designs significantly improve the performance of the model in complex epileptic signal processing, enabling it to demonstrate obvious advantages in temporal dependency modeling, personalized prediction, and real-time performance.
[0135] According to the above prediction method, the accuracy of the prediction results can be evaluated in the following ways:
[0136] (1) Evaluation method
[0137] In this study, in order to evaluate the performance of the model, we used a series of indicators, including accuracy (Acc), sensitivity (Sen) and specificity (Spe). The formulas are shown in Formulas 26-28.
[0138] (26)
[0139] (27)
[0140] (28)
[0141] in, , , and Respectively represent the number of true positive, true negative, false positive, and false negative predictions made by the model. It reflects the overall classification effect of the model on all samples and shows the proportion of correct predictions. Evaluate the model's ability to identify positive samples, indicating how many actual positive samples the model can capture. It measures the model's ability to identify negative samples, indicating how many samples that are actually negative can be correctly excluded by the model.
[0142] (2) Dataset
[0143] In this study, we used two well-known publicly accessible datasets: CHB-MIT and SWEC-ETHZ datasets to evaluate the epilepsy prediction ability of the model.
[0144] The CHB-MIT dataset is an EEG dataset commonly used in epileptic seizure detection and prediction research. The dataset was collected by Boston Children's Hospital and Massachusetts Institute of Technology (MIT). The CHB-MIT dataset contains long-term EEG records of 23 epilepsy patients, including 5 males, 17 females, and 1 patient with unmarked gender. The age range of patients is 1.5 to 22 years old. Most files contain 23 EEG signals (24 or 26 in some cases). These records use the international 10-20 EEG electrode position and naming system. The EEG is recorded using 18 / 23 leads, with a sampling frequency and resolution of 256Hz and 16bit respectively. The lead information is shown in Table 1 (channel 23 and channel 15 leads are repeated and need to be removed in actual use). Table 2 lists the main information of the 23 patients.
[0145] Table 1 Lead table
[0146]
[0147] Table 2 Main information of 23 patients
[0148]
[0149] The SWEC-ETHZ dataset is an international electrophysiological signal (iEEG) dataset established for epilepsy research. It is provided by the Swiss Federal Institute of Technology (ETH Zurich). This dataset is specifically for patients with drug-resistant epilepsy, and the iEEG records are collected during the pre-surgical evaluation. The data comes from the Sleep-Wake-Epilepsy Center of the Department of Neurology at the University of Bern, with a sampling rate of 512 or 1024Hz, covering 2656 hours of continuous iEEG records from 18 patients. The dataset is divided into two parts: long-term and short-term records. The long-term dataset contains continuous EEG activity records, which are suitable for in-depth research on the physiological mechanisms and seizure patterns of epilepsy. The short-term dataset includes 100 iEEG short-term records from 16 patients, which are mainly used to test the effectiveness of epilepsy detection and prediction algorithms. Table 3 lists the main information of the 18 patients.
[0150] Table 3 Main information of 18 patients
[0151]
[0152] In this study, both datasets were divided into test sets and validation sets by five folds for cross-validation.
[0153] (3) Data preprocessing
[0154] In the preparation stage before the start of preprocessing, we studied the CHB-MIT and SWEC-ETHZ epilepsy datasets in detail and strictly screened the patient data. Based on the principle of selecting high-quality data, we removed case 9 in the SWEC-ETHZ dataset and cases 12, 20, and 24 in the CHB-MIT dataset, leaving other valuable high-quality data. Then we started the formal data preprocessing process.
[0155] This study extracted EEG signals from the EDF files of the cases retained in the CHB-MIT and SWEC-ETHZ epilepsy datasets. EEG signals often contain fast-changing dynamic information. In order to better capture these dynamic information, we used a 64s window to cut the long EEG signal into short-term signals of multiple windows. Considering that EEG signals are easily interfered by noise during data collection, such as power line interference, muscle activity, etc., we used a 50-100HZ fourth-order band-stop filter and a fourth-order high-pass filter that filters out noise below 1HZ to filter the short-term signals of multiple windows. This not only eliminates the interference of noise, but also retains the frequency components related to epilepsy. Then, the short-time Fourier transform is used to extract the time-frequency features of the short-time signal and generate a spectrogram. Finally, the spectrogram is normalized to ensure that the value of the spectrogram is scaled between 0 and 1, so that different spectrograms can have the same scale, which is convenient for subsequent model training and verification. The accuracy of our model training is ensured by careful and rigorous preprocessing of the EEG signal.
[0156] (4) Prediction performance evaluation
[0157] In this section, we study the application of ASTF-Net in depth and verify it on the CHB-MIT and SWEC-ETHZ datasets. Figure 6 As shown in the figure, the accuracy, sensitivity and specificity of the model in the vast majority of patients are maintained at a high level, especially the accuracy, which is basically close to or exceeds 98%. This shows that the model is stable and accurate when processing data from different patients. Although there are certain fluctuations in the indicators between different patients, the fluctuation range is not large, especially the fluctuation of the accuracy is smaller. This shows that the model has good adaptability to the data of different patients and can stably maintain a high prediction performance. At the same time, the specificity and sensitivity are maintained at more than 95%, which can also illustrate the stability of the overall performance. It shows that the model can accurately identify epileptic seizures.
[0158] The performance on the SWEC-ETHZ dataset is as follows Figure 7As shown in the figure, the sensitivity and specificity in the figure remain almost on the same horizontal line with minimal fluctuations, indicating that the model performs very consistently across patients with almost no significant performance differences. The model accuracy remains at a very high level, with most patients achieving nearly 100% accuracy, further demonstrating the model's predictive power in a variety of situations. For the vast majority of patients, the model's predicted sensitivity and specificity reached 100%, indicating that in these cases, the model can perfectly distinguish between epileptic and non-epileptic states.
[0159] In this experiment, we evaluated the model classification performance based on data from four epilepsy patients at different time periods. The model's ability to predict epileptic seizures at different time points and its classification stability were explored through confusion matrix analysis.
[0160] In this experiment, the performance of the model was evaluated for four patients, and the experimental cycle was set to 15 cycles, 30 cycles, and 50 cycles. The results show that with the increase of training cycles, the performance of the model in classifying epileptic seizures and non-seizure states gradually improves. In the 15th cycle, the model performed poorly in identifying epileptic seizure states, and some patients failed to effectively identify the seizures, with a high misjudgment rate. The recognition of non-seizure states was relatively accurate, but the overall classification effect was insufficient. By the 30th cycle, the model's ability to recognize epileptic seizure states was significantly improved, and the accuracy of capturing epileptic seizures was improved. The classification results of the four patients all showed some progress. Although the improvement of individual patients was small, the overall misjudgment rate gradually decreased. By the 50th cycle, the classification ability of the model reached the best state, the ability to distinguish between epileptic seizures and non-seizure states was significantly enhanced, the classification accuracy was significantly improved, and misjudgment was almost eliminated. This shows that after continuous training, the model has strong stability and accuracy, and can effectively distinguish between epileptic seizures and non-seizure states. The experimental results show that with the increase of training cycles, the classification ability of the model has been significantly improved. Especially at the 50th cycle, the model's ability to distinguish between epileptic seizures and non-seizure states reached the optimal level, and the classification error rate dropped significantly. This phenomenon shows that the model can improve its ability to capture complex features through continuous training and gradually reduce misjudgments. This not only verifies the effectiveness of the model, but also proves its potential to monitor and predict epileptic seizures over a long period of time.
[0161] Finally, we conducted a comprehensive comparative analysis of the classification effect of the model with other models of the same type of tasks, as shown in Table 4. The comparison results show that our model has excellent performance in all major indicators. In particular, in the three indicators of Acc, Sen and Sep, our model reached 98.5%, 97.6% and 97.1% respectively, significantly surpassing the highest values of other methods. At the same time, our model also has the ability to efficiently process complex epileptic seizure data, and can stably and accurately capture epileptic seizure signals in different cycles. It fully demonstrates the feasibility and excellent performance of our model in epileptic seizure detection tasks, indicating that it has important potential in future clinical applications.
[0162] Table 4 Comparison of ASTF-Net and similar models
[0163]
[0164] like Figure 8 As shown, the embodiment of the present invention provides an epilepsy signal feature determination system based on an adaptive spatiotemporal fusion network, including: an adaptive perception module 91, a front and back information perception network through a bidirectional processing module 92, a neural adaptive adjustment module 93 and a determination module 94; wherein,
[0165] The adaptive perception module 91 is used to receive the EEG signal, extract the features of the EEG signal by dynamically adjusting the weights of the spatiotemporal features, and obtain key features. The adaptive perception module includes: a selective scanning algorithm unit and a BigBird hybrid attention mechanism unit. The EEG signal includes sequence data.
[0166] The front and back information perception network is used to process the key features through the front and back information perception network through a bidirectional processing module 92 to determine the front and back timing information of the EEG signal;
[0167] A neural adaptive adjustment module 93, used for processing the preceding and following time sequence information, determining global information on each channel, and determining important features in the EEG signal according to the global information;
[0168] The determination module 94 is used to determine whether there is an epilepsy signal feature based on the important feature.
[0169] In this embodiment, through the synergy of the adaptive perception module, the front and back information perception network and the neural adaptive adjustment module, the key problems such as the strong temporal dependence of the EEG signal, the difficulty in feature extraction and the lack of personalized prediction ability are solved. The adaptive perception module combines the selective scanning algorithm with the BigBird hybrid attention mechanism, which can dynamically adjust the weights of the spatiotemporal features and effectively capture the important features in the EEG signal. The module ensures that the model focuses on the key timing signals through global processing of the input features, significantly improving the prediction accuracy and computational efficiency. The front and back information perception network realizes the comprehensive integration of the front and back information of the epileptic signal through a bidirectional processing algorithm. The network combines the reset gate and update gate mechanism of the GRU layer to enhance the model's ability to capture long-term and short-term dependencies, thereby improving the prediction accuracy of epileptic seizures. Compared with traditional methods, the network can capture abnormal signal patterns more accurately, while taking into account global and local features. The neural adaptive adjustment module realizes the dynamic adjustment of individual EEG signals of different patients by introducing learnable scaling and offset parameters, and enhances the personalized prediction ability. This module not only improves the adaptability of the model to the differences between different patients, but also effectively solves the shortcomings of traditional models in personalized prediction.
[0170] Based on the above embodiment, the adaptive perception module 91 is specifically used to convert the sequence data Divide into The length is subsequence of ; Select some subsequences according to , obtain the prefix sum of the partial subsequence, the For the The prefix sum of subsequences; according to , get the complete prefix and sequence, where Indicates The prefix sum of the last elements of the subsequence; according to , determine the time step The hidden state vector ,in, is the complete prefix and sequence, is the time step The dynamic state transfer matrix, As a time step The input matrix of , determine the output of the selective scanning algorithm unit ,in is the output matrix.
[0171] Based on the above embodiment, the adaptive perception module 91 is also used to , determine the attention output ,in, For the The value vector at each time point, attention weight , For the The query vector at each time point, For the The key vector at each time point, Indicates query vector and Key vector The similarity between is the query vector, is the key vector, is a value vector, Indicates The key vector at each time point The transpose of Indicates The key vector at each time point The transpose of , determine the output of the BigBird hybrid attention mechanism unit ,in, , , , , , is the weight matrix, is the matrix of sequence data, is the value matrix, is the weight matrix of the output gate; the output result of the BigBird hybrid attention mechanism unit The output result of the selective scanning algorithm unit A fusion process is performed to determine the key features.
[0172] Further, based on the above embodiment, the front-back information perception network is used to process the key features through forward calculation and backward calculation at the same time to determine the front-back timing information of the EEG signal through the bidirectional processing module 92, wherein the forward calculation and backward calculation process include candidate memory cells and memory cells for controlling the key features, wherein the candidate memory cells , is the weight matrix for calculating candidate memory cells, is the bias term associated with the candidate memory cell, tanh is the hyperbolic tangent activation function, is the hidden state at time step t, is the key feature; memory cells , , They are the weight matrices for calculating the forget gate and the output gate, , are the bias terms associated with the forget gate and the output gate, respectively.
[0173] Preferably, the neural adaptive adjustment module 93 is specifically used according to , determine the attention value ,in, is the weight matrix of the linear layer, Indicates input The last dimension of is averaged; according to , determine the adjustment width , and are learnable scaling and offset parameters; according to , determine the important feature Y in the EEG signal.
[0174] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0175] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0176] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof.
[0177] Those skilled in the art will appreciate that the modules in the system in the embodiment can be adaptively changed and set in one or more systems different from the embodiment. The modules or units or components in the embodiment can be combined into one module or unit or component, and in addition they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the abstract and drawings) and all processes or units of any method or device disclosed in this manner can be combined in any combination. Unless otherwise explicitly stated, each feature disclosed in this specification (including the accompanying abstract and drawings) can be replaced by an alternative feature that provides the same, equivalent or similar purpose.
[0178] Furthermore, those skilled in the art will appreciate that although some embodiments herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present invention and to form different embodiments.
[0179] It should be noted that the above embodiments illustrate the present invention rather than limiting it. Any reference symbol between brackets should not be constructed as a limitation of the present invention. The word "comprising" does not exclude the presence of components or steps not listed in the present invention. The word "one" or "an" preceding a component does not exclude the presence of multiple such components. The present invention can be implemented by means of hardware including several different components and by means of appropriately programmed computers. In the embodiments in which several systems are listed, several of these systems can be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.
Claims
1. A method for determining epilepsy signal features based on an adaptive spatiotemporal fusion network, characterized in that: include: The EEG signal is input into the adaptive perception module, and the EEG signal is feature extracted by dynamically adjusting the weight of the spatiotemporal features to obtain key features. The adaptive perception module includes: a selective scanning algorithm unit and a BigBird hybrid attention mechanism unit. The EEG signal includes sequence data. The output result of the BigBird hybrid attention mechanism unit is The output result of the selective scanning algorithm unit Performing fusion processing to determine the key features; The key features are bidirectionally processed through a front-to-back information perception network to determine the front-to-back timing information of the EEG signal, and the key features are simultaneously subjected to forward calculation and backward calculation to determine the front-to-back timing information of the EEG signal; Processing the preceding and following time sequence information through a neural adaptive adjustment module to determine global information on each channel, and determining important features in the EEG signal based on the global information; Determining whether epilepsy signal features exist according to the important features; The process of processing the preceding and following time sequence information through a neural adaptive adjustment module, determining global information on each channel, and determining important features in the EEG signal according to the global information includes: according to , determine the attention value ,in, is the weight matrix of the linear layer, Indicates input The last dimension of is averaged; according to , determine the adjustment width , and are learnable scaling and offset parameters; according to , determine the important feature Y in the EEG signal.
2. The epilepsy signal feature determination method based on the adaptive spatiotemporal fusion network according to claim 1, characterized in that: The EEG signal is input into the adaptive perception module, and the EEG signal is extracted by dynamically adjusting the weight of the spatiotemporal features to obtain key features, including: Sequence data Divide into The length is subsequence of ; Select some subsequences according to , obtain the prefix sum of the partial subsequence, the For the The prefix sum of subsequences, is the data in the sequence data, t is identified as the position index in the sequence, j-1 is used as an offset calculation factor to determine the relative position offset within the subsequence, and k is defined as a subsequence length parameter; according to , get the complete prefix and sequence, where Indicates The prefix sum of the last element of the subsequence; Represents the prefix sum of the first subsequence, accumulated to the i-th element; Represents the prefix sum of the second subsequence, accumulated to the i-th element; Represents the prefix sum accumulated to the kth element in the first subsequence; It represents the prefix sum of the second subsequence accumulated to the 2kth element; according to , determine the time step The hidden state vector ,in, is the complete prefix and sequence, is the time step The dynamic state transfer matrix, As a time step The input matrix of according to , determine the output of the selective scanning algorithm unit ,in is the output matrix.
3. The epilepsy signal feature determination method based on the adaptive spatiotemporal fusion network according to claim 2, characterized in that: The EEG signal is input into the adaptive perception module, and the EEG signal is extracted by dynamically adjusting the weight of the spatiotemporal features to obtain key features, and further includes: according to , determine the attention output ,in, For the The value vector at each time point, attention weight , For the The query vector at each time point, For the The key vector at each time point, Indicates query vector and Key vector The similarity between is the query vector, is the key vector, is a value vector, represents the transpose of the key vector Kk at the Kth time point, represents the transpose of the key vector Kj at the jth time point; according to , determine the output of the BigBird hybrid attention mechanism unit ,in, , , , , , is the weight matrix, is the matrix of sequence data, is the value matrix, is the weight matrix of the output gate.
4. The method for determining epilepsy signal characteristics based on an adaptive spatiotemporal fusion network according to claim 3, characterized in that: The key features are bidirectionally processed through a front-back information perception network to determine the front-back timing information of the EEG signal, including: The forward calculation and backward calculation process include candidate memory cells and memory cells for controlling the key features, wherein the candidate memory cells , is the weight matrix for calculating candidate memory cells, is the bias term associated with the candidate memory cell, tanh is the hyperbolic tangent activation function, is the hidden state at time step t, is the key feature; memory cells , , They are the weight matrices for calculating the forget gate and the output gate, , are the bias terms associated with the forget gate and the output gate, respectively. is the sigmoid activation function, is the state of the memory cell at time t-1.
5. An epilepsy signal feature determination system based on an adaptive spatiotemporal fusion network, characterized in that: include: The adaptive perception module is used to receive EEG signals, extract features from EEG signals by dynamically adjusting the weights of spatiotemporal features, and obtain key features. The adaptive perception module includes a selective scanning algorithm unit and a BigBird hybrid attention mechanism unit. The EEG signals include sequence data. The output result of the BigBird hybrid attention mechanism unit is The output result of the selective scanning algorithm unit Performing fusion processing to determine the key features; The front-to-back information perception network is used to bidirectionally process the key features through the front-to-back information perception network through a bidirectional processing module to determine the front-to-back timing information of the EEG signal, and the key features are simultaneously subjected to forward calculation and backward calculation to determine the front-to-back timing information of the EEG signal; The neural adaptive adjustment module is used to , determine the attention value ,in, is the weight matrix of the linear layer, Indicates input The last dimension of is averaged; according to , determine the adjustment width , and are learnable scaling and offset parameters; according to , determine the important feature Y in the EEG signal; The determination module is used to determine whether there is an epilepsy signal feature based on the important feature.
6. The epilepsy signal feature determination system based on the adaptive spatiotemporal fusion network according to claim 5, characterized in that: The adaptive perception module is specifically used to convert the sequence data Divide into The length is subsequence of ; Select some subsequences according to , obtain the prefix sum of the partial subsequence, the For the The prefix sum of subsequences; according to , get the complete prefix and sequence, where Indicates The prefix sum of the last element of the subsequence; Represents the prefix sum of the first subsequence, accumulated to the i-th element; Represents the prefix sum of the second subsequence, accumulated to the i-th element; Represents the prefix sum accumulated to the kth element in the first subsequence; It represents the prefix sum of the second subsequence accumulated to the 2kth element; according to , determine the time step The hidden state vector ,in, is the complete prefix and sequence, is the time step The dynamic state transfer matrix, As a time step The input matrix of , determine the output of the selective scanning algorithm unit ,in is the output matrix.
7. The epilepsy signal feature determination system based on the adaptive spatiotemporal fusion network according to claim 6, characterized in that: The adaptive perception module is also used to , determine the attention output ,in, For the The value vector at each time point, attention weight , For the The query vector at each time point, For the The key vector at each time point, Indicates query vector and Key vector The similarity between is the query vector, is the key vector, is a value vector, represents the transpose of the key vector Kk at the Kth time point, represents the transpose of the key vector Kj at the jth time point; according to , determine the output of the BigBird hybrid attention mechanism unit ,in, , , , , , is the weight matrix, is the matrix of sequence data, is the value matrix, is the output weight matrix.
8. The epilepsy signal feature determination system based on the adaptive spatiotemporal fusion network according to claim 7, characterized in that: The forward calculation and backward calculation process include candidate memory cells and memory cells for controlling the key features, wherein the candidate memory cells , is the weight matrix for calculating candidate memory cells, is the bias term associated with the candidate memory cell, tanh is the hyperbolic tangent activation function, is the hidden state at time step t, is the key feature; memory cells , , They are the weight matrices for calculating the forget gate and the output gate, , are the bias terms associated with the forget gate and the output gate, respectively.
Citation Information
Patent Citations
Real-time environment noise identification method, system and equipment fusing space-time attributes
CN115083394A
Remote sensing image semantic segmentation method based on double-branch dynamic attention
CN117422878A