Epilepsy detection method and system based on multi-band brain function network

By analyzing multi-band EEG signals and constructing a hybrid brain functional network, combined with graph attention networks and the Transformer model, the problem of insufficient multi-frequency information fusion in existing epilepsy detection technologies has been solved, achieving more efficient and accurate epilepsy detection.

CN120982974APending Publication Date: 2025-11-21ZHENGZHOU UNIVERSITY OF LIGHT INDUSTRY
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511097836.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing epilepsy detection technologies suffer from insufficient utilization of single-band EEG signals, limited brain network representation methods, limited spatiotemporal feature modeling capabilities, insufficient multi-frequency information fusion methods, and insufficient generalization ability due to individual differences, resulting in inadequate detection accuracy and stability.

Method used

Multi-band EEG signal analysis was employed, and a hybrid brain functional network was constructed by combining Pearson correlation coefficient, phase lock value, Granger causality, mutual information, and transfer entropy. Spatial features were extracted by combining graph attention network, temporal dependencies were captured by Transformer, and the weights of information in different frequency bands were optimized through an adaptive feature fusion strategy. A k-of-n voting mechanism was introduced to smooth the classification results.

Benefits of technology

It significantly improves the accuracy, robustness, and generalization ability of epilepsy detection, reduces the false alarm rate, and enhances the stability and adaptability of detection to different individuals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120982974A_ABST
    Figure CN120982974A_ABST
Patent Text Reader

Abstract

The invention discloses an epilepsy detection method and system based on a multi-band brain function network. The epilepsy detection method comprises the following steps: carrying out band-pass filtering, artifact removal and standardization processing on an obtained EEG signal; performing wavelet decomposition on the preprocessed signals, dividing the preprocessed signals into multiple frequency bands of delta, theta, alpha, beta and gamma, calculating PCC, PLV, GC, MI and TE for each frequency band, constructing a multi-frequency-band brain function network, and capturing linear and nonlinear connection characteristics; feature channel dynamic compression and screening are carried out on the multi-band brain function network features based on a sparse attention and information bottleneck structure; the method comprises the following steps: constructing a lightweight graph attention Transform model based on a multi-band multi-channel brain network, and performing efficient modeling and fusion on brain function information; a k-of-n voting mechanism is introduced in the model reasoning stage, and post-processing and smoothing operation are carried out on a classification result output by the lightweight graph attention Transform model. According to the method, the accuracy, the robustness and the generalization ability of epilepsy automatic detection can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of biomedical and artificial intelligence, and particularly relates to a seizure detection method and system based on a multi-band brain function network. BACKGROUND

[0002] Seizure is a temporary brain dysfunction caused by abnormal discharge of neurons in the brain. Patients may experience temporary symptoms such as loss of consciousness or perception, motor dysfunction, etc. Seizure has the characteristics of suddenness and recurrence, which brings great physical and mental distress to patients and their families. Therefore, accurate detection of seizure is crucial for the diagnosis, treatment and management of patients. Electroencephalogram (EEG) can record the electrical activity of brain nerve cell groups, which contains a large amount of physiological and pathological information. EEG has the advantages of effectiveness and non-invasiveness, and is an important tool for diagnosing nervous system diseases and monitoring brain activity, playing a key role in the detection and positioning of seizures. Traditional seizure detection mainly relies on the experience of neurologists, who analyze EEG waveforms manually to determine the occurrence and type of seizures. However, this method is time-consuming and labor-intensive, and is easily affected by subjective factors. Different people's detection results differ greatly, making it difficult to ensure the accuracy and consistency of the diagnosis results. Therefore, automatic, efficient and accurate detection of seizures has important clinical significance and has become a key direction of clinical demand.

[0003] In recent years, deep learning technology has made breakthrough progress in the field of epilepsy detection. Convolutional Neural Network (CNN) can extract spatial features of EEG, Recurrent Neural Network (RNN) such as Long Short-Term Memory (LSTM) and Bidirectional Long Short-Term Memory (BiLSTM) can model temporal dependencies, and Transformer is good at capturing long-range dependencies; however, the existing deep learning models still have the following shortcomings: 1. CNN lacks temporal modeling capability; 2. RNN is affected by gradient vanishing, and LSTM is limited in capturing long-range dependency information, affecting the detection effect; 3. Transformer has large computational overhead and is difficult to directly integrate spatial information. In addition, most existing researches only focus on the EEG features of a single frequency band, and fail to fully exploit the synergies between different frequency bands, thus limiting the model's detection ability of seizures; at the same time, although some researches introduce brain function network analysis, they usually construct functional connections based on a single type of brain network, and fail to fully depict the interaction between different brain regions, resulting in incomplete description of the complex functional connection patterns of the brain and affecting the stability and generalization ability of epilepsy detection. Most existing multi-frequency information fusion methods use simple concatenation or weighted averaging, ignoring the importance of different frequency band features in different situations, and failing to adaptively adjust the weights of different frequency band features, resulting in insufficient utilization of features and poor feature fusion effect, which limits the generalization ability and detection accuracy of the model. SUMMARY

[0004] In order to solve the problems of insufficient utilization of single frequency band EEG signal, single brain network representation, limited spatio-temporal feature modeling capability, insufficient multi-frequency information fusion method and individual difference affecting generalization ability in the prior art, the purpose of the present application is to provide a method and system for detecting epilepsy based on multi-frequency brain function network, which can significantly improve the accuracy, robustness and generalization ability of automatic epilepsy detection by combining multi-frequency EEG signal and deep learning model.

[0005] The application improves feature integrity through multi-band EEG signal analysis, constructs a hybrid brain function network by fusing Pearson correlation coefficient (PCC), phase locking value (PLV), Granger causality (GC), mutual information (MI) and transfer entropy (TE), more comprehensively depicts the interaction relationship between brain regions, solves the feature redundancy and noise problem in the constructed hybrid brain function network through channel weighting, combines Graph Attention Network (GAT) to extract spatial features, and uses Transformer to capture time sequence dependence, improves the epilepsy detection capability, combines an adaptive feature fusion strategy to optimize the information weight of different frequency bands, enhances the model generalization, uses a k-of-n voting mechanism to smooth the classification result, reduces the false positive rate, and improves the detection stability.

[0006] To achieve the above-mentioned purposes, the application adopts the following technical solutions:

[0007] A epilepsy detection method based on a multi-band brain function network, comprising the following steps:

[0008] S1, performing band-pass filtering, de-artifacting and standardization processing on the acquired EEG signal;

[0009] S2, wavelet decomposing the signal preprocessed in step S1, dividing into δ, θ, α, β, γ multiple frequency bands, calculating PCC, PLV, GC, MI and TE for each frequency band, constructing a multi-band brain function network, and capturing linear and nonlinear connection features;

[0010] (1), PCC is used to measure the linear correlation between brain region signal X and brain region signal Y, the value range is [-1, 1], and is defined as:

[0011]

[0012] Wherein, X i , Y i respectively represent the observation value of the brain region signal X and the brain region signal Y of the i-th sample; respectively represent the sample mean of the brain region signal X and the brain region signal Y; the PCC value close to 1 represents strong positive correlation, and the PCC value close to-1 represents strong negative correlation;

[0013] (2), PLV reflects the phase synchronization degree between brain region signal X and brain region signal Y, and the calculation formula is:

[0014]

[0015] Wherein, φ X (n) and φ Y(n) respectively represent the instantaneous phase of brain region signal X and brain region signal Y at time point n; N is the total number of samples; 0 < PLV < 1, the higher the PLV value, the stronger the phase synchronization of the two brain regions;

[0016] (3) GC is used to evaluate whether brain region signal Y can predict brain region signal X, which is mathematically defined as:

[0017] An autoregressive model containing only the historical information of brain region signal X itself is constructed:

[0018]

[0019] wherein, p represents the lag order; a k represents the regression coefficient of brain region signal X; ∈ t represents the residual error;

[0020] The historical information of brain region signal Y is added to the model:

[0021]

[0022] wherein, b k represents the regression coefficient of brain region signal Y; ∈' t represents the residual error after adding brain region signal Y;

[0023] If the residual error ∈' t after adding brain region signal Y is significantly reduced, it indicates that brain region signal Y has a causal effect on brain region signal X; the larger the GC value, the stronger the causal relationship;

[0024] (4) MI is used to evaluate the nonlinear statistical dependence between brain region signal X and brain region signal Y, and the calculation formula is:

[0025]

[0026] wherein, p(x, y) represents the joint probability distribution; p(x) and p(y) respectively represent the marginal probability distribution; the higher the MI value, the stronger the dependence between brain regions;

[0027] (5) TE is used to measure the degree of information flow from brain region signal X to brain region signal Y, and the calculation formula is:

[0028]

[0029] wherein, p(.) represents the joint probability or conditional probability; y t+1 represents the state of brain region signal Y at time t+1, x t and y t respectively represent the state of brain region signal X and brain region signal Y at time t; the higher the TE value, the more information is transmitted from brain region signal X to brain region signal Y;

[0030] Multi-band brain function network feature representation as a tensor Wherein, C=25, that is, 5 frequency bands × 5 feature representations; M represents the number of brain region nodes;

[0031] S3, the multi-band brain function network features are compressed and screened through the feature channel by the sparse attention and information bottleneck structure;

[0032] S4, constructing a lightweight graph attention Transformer model based on multi-band multi-path brain network, efficiently modeling and fusing brain function information;

[0033] S5, introducing a k-of-n voting mechanism in the model inference stage, post-processing and smoothing the classification results output by the lightweight graph attention Transformer model in step S4.

[0034] Further, the step S1 above is operated as follows: first, the electroencephalogram signal data is filtered by 1-70Hz Butterworth band-pass filter, and the 57-63Hz power frequency interference is eliminated by using a notch filter; then, the filtered EEG signal is cut into a fixed length time window.

[0035] Further, in the step S2 above, the δ frequency band represents 0.5-4Hz, the θ frequency band represents 4-8Hz, the α frequency band represents 8-13Hz, the β frequency band represents 13-30Hz, and the γ frequency band represents 30-70Hz.

[0036] Further, the step S3 above includes the following sub-steps:

[0037] S3.1, using global average pooling to compress the multi-band brain function network features in step S2 Compress in each channel dimension to get channel description z:

[0038]

[0039] S3.2, generate an attention weight vector w through a two-layer fully connected network MLP:

[0040] w=Softmax(W2·ReLU(W1·z))

[0041] Wherein, W1 represents the weight matrix of the first layer of fully connected layer; W2 represents the weight matrix of the second layer of fully connected layer;

[0042] S3.3, multiply the generated channel attention weight w with the original input x, and the sparse attention weighted output is:

[0043]

[0044] wherein, denotes the multiplication in the channel direction;

[0045] S3.4, by information bottleneck constraint, the information most relevant to the target variable is reserved in the compression process, and the information bottleneck constraint loss function is:

[0046]

[0047] wherein, denotes the mutual information between the original features; denotes the mutual information between the task label; β' denotes the trade-off between the compression degree and the information reservation;

[0048] S3.5, adding an information bottleneck loss term in training

[0049]

[0050] wherein, denotes the task loss; λ denotes the influence weight of the information bottleneck loss term to the total loss. .

[0051] Further, in the step S3.2, the two-layer fully connected network MLP includes: a linear layer with an input of 25 and an output of 5; a relu activation function layer; a linear layer with an input of 5 and an output of 25; and a softmax function.

[0052] Further, the step S4 described above includes the following sub-steps:

[0053] S4.1, parallel modeling of multi-band brain function connectivity graph, extracting spatial topological features of each frequency band;

[0054] S4.2, interaction and fusion of multi-band graph features, learning important associations between frequency bands;

[0055] S4.3, spatiotemporal joint modeling of the fused graph features, extracting global temporal dependencies;

[0056] Further, the step S4.1 described above is:

[0057] First, the original EEG signal is divided into multiple frequency bands through a filter bank; for each frequency band, the functional connection strength between brain regions is calculated, and an initial adjacency matrix is constructed

[0058] Second, a learnable adjacency matrix is introduced for each frequency band The attention mechanism is updated dynamically in each layer of GAT, and the update formula is:

[0059]

[0060] wherein, represents the learnable parameters of the frequency band in the lth layer; a represents the attention coefficient vector; h i , h j respectively represent the input feature vectors of node i and node j;

[0061] Each frequency band uses multiple layers of GAT to extract the graph node features; the node feature update formula of the lth layer of GAT is:

[0062]

[0063] wherein, represents the attention weight from ; σ represents a nonlinear activation function; represents the set of direct neighbor nodes of node i in the graph;

[0064] Finally, the graph node features of each frequency band are output wherein, M represents the number of brain region nodes; d represents the embedding dimension.

[0065] Further, the step S4.2 is operated as:

[0066] Firstly, the cross-frequency band attention weight matrix A bb′ is constructed, which measures the correlation between frequency bands b and b';

[0067] The attention weight calculation formula is:

[0068]

[0069] wherein, Q b , K b' respectively represent the query and key vectors of frequency bands b and b'; d k represents the dimension of the key vector;

[0070] Secondly, a gating mechanism is used to control the fusion ratio of information of different frequency bands; the fusion formula is:

[0071]

[0072] wherein, g b represents the fusion weight of frequency band b; Z b,i represents the feature of node i in frequency band b; B represents the total number of frequency bands;

[0073] Finally, the fused graph node features are output As a unified graph representation.

[0074] Further, the step S4.3 described above is operated as:

[0075] First, introduce learnable position encoding Where t represents a time in the total duration;

[0076] The node features of the graph are added to the time position encoding to form a spatio-temporal embedding:

[0077] E i,t = Z fused,i,t + PE t

[0078] Where Z fused,i,t represents the fusion graph feature vector of node i at time step t;

[0079] Second, a lightweight Transformer structure is used, including multi-head self-attention and a feedforward network, to perform time series modeling on the brain network features, and the spatio-temporal modeling formula is:

[0080] H t = MHSA(E t ), O t = FFN(H t )

[0081] Finally, the spatio-temporal fusion features are output Where V represents the total duration; and a linear layer is used to complete the final classification.

[0082] An epilepsy detection system based on a multi-band brain function network, comprising:

[0083] A signal preprocessing module for band-pass filtering, de-artifacting, and standardizing the acquired EEG signals;

[0084] A multi-band brain function network construction module for wavelet decomposition of the preprocessed signals into delta, theta, alpha, beta, and gamma bands, calculating PCC, PLV, GC, MI, and TE for each band, and constructing a multi-band brain function network to capture linear and nonlinear connection features;

[0085] A feature channel dynamic compression module for dynamic compression and selection of multi-band brain function network features based on sparse attention and information bottleneck structure;

[0086] A graph attention Transformer model construction module for efficient modeling and fusion of brain function information;

[0087] The classification result processing module is configured to perform post-processing and smoothing operation on the classification result output by the graph attention Transformer model through a k-of-n voting mechanism.

[0088] Further, the graph attention Transformer model comprises a multi-band parallel graph attention encoder, a cross-band graph attention fusion module and a lightweight space-time Transformer module.

[0089] The multi-band parallel graph attention encoder is configured to independently construct a brain function connection graph for each frequency band, extract node features of each frequency band by using an improved graph attention network, and introduce a learnable adjacency matrix in each layer of GAT.

[0090] The cross-band graph attention fusion module is configured to automatically learn important associations between different frequency bands by introducing a cross-band attention mechanism, control the fusion weight of information of different frequency bands by using a gating mechanism, and output a unified graph representation after fusion.

[0091] The lightweight space-time Transformer module is configured to realize global time sequence modeling by combining position encoding and channel attention mechanism, and jointly model spatial graph features and time features to form a space-time integrated feature representation.

[0092] The application further provides a computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the epilepsy detection method based on the multi-band brain function network.

[0093] The application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executable by a processor to implement the epilepsy detection method based on the multi-band brain function network.

[0094] Due to the adoption of the technical solutions described above, the application has the following advantages:

[0095] This invention relates to an epilepsy detection method and system based on multi-band brain functional networks. It utilizes EEG signals from five frequency bands (δ, θ, α, β, and γ) to fully exploit the complementary information across these bands. Different frequency bands carry different physiological information, and comprehensive analysis improves the sensitivity and accuracy of epilepsy detection. Combining five network construction methods (PCC, PLV, GC, MI, and TE), it captures linear, nonlinear, and directional connectivity features between brain regions. All networks are stacked to form a (path number, N, N) multi-path network, which more comprehensively and accurately characterizes functional network changes during epileptic seizures, improving detection performance. By introducing sparse attention and information bottleneck structures, a dual-module approach of channel weighting and compression is constructed to dynamically evaluate and screen the importance of brain network channels, suppressing redundant information and noise interference, adapting to different frequency bands and individual differences, and effectively improving the model's stability and generalization ability. The graph attention Transformer model based on the multi-band multi-path brain network utilizes the graph attention mechanism (GAT) to extract spatial correlations in the multi-band brain functional connectivity network, refining the data. This approach accurately characterizes the functional interaction patterns between different brain regions. Based on this, a lightweight Transformer structure is used to perform temporal modeling of sequential brain network features, effectively capturing the dynamic evolutionary features during epileptic seizures. It achieves effective fusion of spatial and temporal information while maintaining computational efficiency, contributing to improved accuracy and robustness in epileptic state recognition. A dynamic adaptive feature fusion strategy, combined with the attention mechanism of GAT and Transformer, adaptively adjusts the weights of features in different frequency bands. This strategy optimizes feature fusion based on input data characteristics, improving the model's generalization ability and enhancing its adaptability to different individuals. A k-of-n voting mechanism is employed to smooth the detection results, reducing classification fluctuations caused by short-term misjudgments, effectively reducing false alarms, improving detection stability, and making epilepsy detection more reliable. Attached Figure Description

[0096] Figure 1 This is a flowchart of the epilepsy detection method based on multi-band brain functional networks of the present invention;

[0097] Figure 2 This is a structural diagram of the epilepsy detection system based on multi-band brain functional networks of the present invention. Detailed Implementation

[0098] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can fully understand and implement the present invention.

[0099] The original EEG signal of the application is collected from the CHB-MIT scalp EEG dataset collected by Boston Children's Hospital and Massachusetts Institute of Technology, and is preprocessed to ensure the reliability of the signal and the accuracy of the analysis. First, 18 common electrode channels are selected to cover the frontal, parietal, temporal and occipital regions to reduce the influence of individual brain electrical configuration differences and ensure the comprehensiveness of the brain functional network construction.

[0100] Embodiment 1: As shown in the figure, a multi-band brain functional network-based epilepsy detection method comprises the following steps: Figure 1

[0101] S1, the acquired EEG signal is subjected to band pass filtering, deartifacting and standardization processing; the operation is: first, the electroencephalogram signal data is subjected to 1-70Hz Butterworth band pass filtering for filtering processing to remove irrelevant frequency band signals, and a notch filter is used to eliminate 57-63Hz power frequency interference to improve the signal quality; then, the filtered EEG signal is cut into a fixed length time window for time series analysis, preferably 4 seconds as the window length, and different segmentation strategies are adopted for seizure period and non-seizure period data; for seizure period data, 3.5 seconds of overlapping segmentation is adopted to increase the sample size and alleviate the data imbalance problem; for non-seizure period data, 4 seconds of non-overlapping slicing is adopted to ensure the independence and continuity of the data;

[0102] S2, the signal preprocessed in step S1 is subjected to wavelet decomposition into δ, θ, α, β and γ frequency bands, δ frequency band represents 0.5-4Hz, θ frequency band represents 4-8Hz, α frequency band represents 8-13Hz, β frequency band represents 13-30Hz, and γ frequency band represents 30-70Hz; PCC, PLV, GC, MI and TE are calculated for each frequency band to construct a multi-band brain functional network to capture linear and nonlinear connection characteristics;

[0103] (1), PCC is used to measure the linear correlation between brain region signal X and brain region signal Y, with a value range of [-1, 1], and is defined as:

[0104]

[0105] Wherein, X i , Y i respectively represent the observation value of the brain region signal X and the brain region signal Y of the i-th sample; respectively represent the sample mean of the brain region signal X and the brain region signal Y; PCC value close to 1 indicates strong positive correlation, and close to -1 indicates strong negative correlation;

[0106] (2), PLV reflects the phase synchronization degree between brain region signal X and brain region signal Y, and the calculation formula is: ​

[0107]

[0108] where φ X (n) and φ Y (n) represent the instantaneous phase of brain region signal X and brain region signal Y at time point n, respectively; N represents the total number of samples; 0 < PLV < 1, the higher the PLV value, the stronger the phase synchronization of the two brain regions;

[0109] (3) GC is used to evaluate whether brain region signal Y can predict brain region signal X, so as to determine the flow direction of information, and is mathematically defined as:

[0110] An autoregressive model containing only the historical information of brain region signal X itself is constructed:

[0111]

[0112] where p represents the lag order; a k represents the regression coefficient of brain region signal X; ∈ t represents the residual error;

[0113] The historical information of brain region signal Y is added to the model:

[0114]

[0115] where b k represents the regression coefficient of brain region signal Y; ∈' t represents the residual error after adding brain region signal Y;

[0116] If the residual error ∈' t after adding brain region signal Y is significantly reduced, it indicates that brain region signal Y has a causal effect on brain region signal X; the larger the GC value, the stronger the causal relationship;

[0117] (4) MI is used to evaluate the nonlinear statistical dependence between brain region signal X and brain region signal Y, and the calculation formula is:

[0118]

[0119] where p(x, y) represents the joint probability distribution; p(x) and p(y) represent the marginal probability distribution, respectively; the higher the MI value, the stronger the dependence between brain regions;

[0120] (5) TE is used to measure the degree of information flow from brain region signal X to brain region signal Y, which is a directional connection index based on information theory, and the calculation formula is:

[0121]

[0122] Where p(.) represents the joint probability or conditional probability; y t+1 This represents the state of brain region signal Y at time t+1, x t and y t These represent the states of brain region signal X and brain region signal Y at time t, respectively; the higher the TE value, the more information is transmitted from brain region signal X to brain region signal Y.

[0123] Multi-band brain functional network features are represented as a tensor Where C = 25, which means 5 frequency bands × 5 feature representations; M represents the number of brain region nodes;

[0124] S3. The multi-band brain functional network features from step S2 are dynamically compressed and filtered based on sparse attention and information bottleneck structures to retain the most discriminative brain functional connectivity channels, remove redundant or noisy channels, and improve the robustness of the model; including the following sub-steps:

[0125] S3.1. Use Global Average Pooling (GAP) to process the multi-band brain functional network features x∈ from step S2. Compression is performed on each channel dimension to obtain the channel description z:

[0126]

[0127] S3.2. Generate the attention weight vector w using a two-layer fully connected network MLP:

[0128] w = Softmax(W2·ReLU(W1·z))

[0129] Where W1 represents the weight matrix of the first fully connected layer; W2 represents the weight matrix of the second fully connected layer;

[0130] S3.3 Multiply the generated channel attention weight w with the original input x to obtain the sparse attention weighted output:

[0131]

[0132] in, Multiplication indicating the direction of the channel;

[0133] S3.4. By applying information bottleneck constraints, the information most relevant to the target variable (such as the label) is retained during the compression process. The information bottleneck constraint loss function is:

[0134]

[0135] in, This represents the mutual information between the original features and the original features; denotes the mutual information between the task label; β' denotes the trade-off between the compression degree and information preservation;

[0136] S3.5, adding an information bottleneck loss term in training

[0137]

[0138] wherein, denotes the task loss; λ denotes the control information bottleneck loss term the total loss ;

[0139] S4, constructing a lightweight graph attention Transformer model based on a multi-band multi-path brain network to efficiently model and fuse brain function information; including the following sub-steps:

[0140] S4.1, parallel modeling of multi-band brain function connection graphs to extract spatial topological features of each frequency band; the specific operation is:

[0141] First, the original EEG signal is divided into multiple frequency bands through a filter bank; for each frequency band, the functional connection strength between brain regions is calculated, such as the Pearson correlation coefficient, PLV, MI, and an initial adjacency matrix is constructed

[0142] Second, a learnable adjacency matrix is introduced for each frequency band which is dynamically updated in each layer of GAT through a graph attention mechanism; the update formula is:

[0143]

[0144] wherein, denotes the learnable parameters of the frequency band in the lth layer; a denotes the attention coefficient vector; h i , h j denote the input feature vectors of node i and node j, respectively;

[0145] Each frequency band uses multiple layers of GAT to extract graph node features; the node feature update formula of the lth layer of GAT is:

[0146]

[0147] wherein, denotes the attention weight from ; σ denotes a nonlinear activation function; denotes the set of direct neighbor nodes of node i in the graph;

[0148] Finally, the graph node features of each frequency band are output Wherein, M represents the number of brain region nodes; d represents the embedding dimension;

[0149] S4.2, the interaction and fusion of multi-band graph features are carried out, and important correlations between frequency bands are learned; the specific operation is:

[0150] Firstly, the cross-band attention weight matrix A is constructed bb' , which measures the correlation between frequency bands b and b';

[0151] The attention weight calculation formula is:

[0152]

[0153] Wherein, Q b , K b′ respectively represent the query and key vectors of frequency bands b and b'; d k represents the dimension of the key vector;

[0154] Secondly, the fusion ratio of different frequency band information is controlled by using the gating mechanism (GRU or Sigmoid gating); the fusion formula is:

[0155]

[0156] Wherein, g b represents the fusion weight of b frequency band; Z b,i represents the feature of node i in frequency band b; B represents the total number of frequency bands;

[0157] Finally, the fused graph node feature is output as a unified graph representation;

[0158] S4.3, the fused graph feature is subjected to spatio-temporal joint modeling, and global temporal dependence is extracted; the specific operation is:

[0159] Firstly, the learnable position encoding is introduced Wherein, t represents a time in the total time length;

[0160] The graph node feature and the time position encoding are added to form the spatio-temporal embedding:

[0161] E i,t =Z fused,i,t +PE t

[0162] Wherein, Z fused,i,t represents the fused graph feature vector of node i at time step t;

[0163] Secondly, the lightweight Transformer structure is adopted, which includes multi-head self-attention (MHSA) and feedforward network (FFN), to model the brain network features in time sequence, and the spatio-temporal modeling formula is:

[0164] H t = MHSA(E t ), O t = FFN(H t )

[0165] Finally, the spatio-temporal fusion feature is output where V represents the total duration; and the final classification is completed through a linear layer;

[0166] S5, to improve the stability and robustness of the model output, a k-of-n voting mechanism is introduced in the model inference stage, and the classification results output by the lightweight graph attention Transformer model in step S4 are post-processed and smoothed. The specific operation is: if there are more than or equal to 4 consecutive "onset" results in 9 consecutive output results, it is determined as an onset; by introducing the k-of-n voting mechanism, the model has good robustness to short-time misjudgment, and the overall system performance is avoided to be affected by a single abnormal prediction; through the fusion of historical information, the final output is more smooth and consistent, and the user experience is improved.

[0167] The k-of-n voting mechanism is a typical majority voting strategy, and its core idea is: in the classification results of the continuous n time windows, if a certain class appears at least k times, then the class is taken as the final decision result at the current time. Wherein, n is the size of the sliding window, k is the trigger threshold, 1≤k≤n, and preferably, the value is to realize simple majority voting.

[0168] Embodiment 2: As shown in the figure, an epilepsy detection system based on a multi-band brain function network comprises: Figure 2 A signal preprocessing module is configured to perform band-pass filtering, de-artifacting, and standardization processing on the acquired EEG signal.

[0169] A multi-band brain function network construction module is configured to perform wavelet decomposition on the preprocessed signal, divide the signal into a plurality of frequency bands of δ, θ, α, β, and γ, calculate PCC, PLV, GC, MI, and TE for each frequency band, construct a multi-band brain function network, and capture linear and nonlinear connection features.

[0170] A feature channel dynamic compression module is configured to perform dynamic compression and screening on the multi-band brain function network features based on sparse attention and information bottleneck structure.

[0171] A graph attention Transformer model construction module is configured to efficiently model and fuse brain function information.

[0172] A graph attention Transformer model construction module is configured to efficiently model and fuse brain function information.

[0173] The classification result processing module is configured to perform post-processing and smoothing operation on the classification result output by the graph attention Transformer model through a k-of-n voting mechanism.

[0174] The graph attention Transformer model comprises a multi-band parallel graph attention encoder, a cross-band graph attention fusion module and a lightweight spatio-temporal Transformer module, which are sequentially connected to form an end-to-end learning framework and realize mapping from original electroencephalogram signals to high-level spatio-temporal feature representation.

[0175] The multi-band parallel graph attention encoder independently constructs a brain functional connectivity graph for each frequency band, extracts node features of each frequency band by using an improved graph attention network (GAT), and introduces a learnable adjacency matrix in each GAT layer, so that the graph structure can be dynamically adjusted according to the input data, and the adaptability of the model to individual differences is enhanced.

[0176] The cross-band graph attention fusion module automatically learns important associations between different frequency bands by introducing a cross-band attention mechanism, controls the fusion weight of information of different frequency bands by using a gating mechanism, and realizes adaptive interaction between frequency bands.

[0177] The lightweight spatio-temporal Transformer module realizes global time series modeling by combining position encoding and channel attention mechanism, and jointly models spatial graph features and time features to form a spatio-temporal integrated feature representation.

[0178] Embodiment 3: The application further provides a computer device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to realize the epilepsy detection method based on the multi-band brain functional network.

[0179] Embodiment 4: The application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to realize the epilepsy detection method based on the multi-band brain functional network.

[0180] The protection scope of the present application is not limited to the above specific embodiments, any form of change based on the core principle of the present application, including but not limited to equivalent replacement of technical solutions, structural improvement, etc., should be considered to fall within the protection scope of the claims of the present application. Various modifications and adjustments made by those skilled in the art without departing from the design idea of the present application also fall within the protection scope of the present application.

Claims

1. A method for detecting epilepsy based on multi-band brain function network, characterized in that: It comprises the following steps: S1, the acquired EEG signal is band-pass filtered, de-noised and standardized; S2, the signal after step S1 preprocessing is wavelet decomposed into δ, θ, α, β, γ multiple frequency bands, PCC, PLV, GC, MI and TE are calculated for each frequency band, a multi-band brain function network is constructed, and linear and nonlinear connection characteristics are captured; (1), PCC is used to measure the linear correlation of brain region signal X and brain region signal Y, the value range is [-1, 1], and the definition is: wherein X i , Y i respectively represent the observation value of the brain region signal X, the brain region signal Y of the i-th sample; respectively represent the sample mean of the brain region signal X, the brain region signal Y; the PCC value close to 1 indicates strong positive correlation, close to -1 indicates strong negative correlation; (2), PLV reflects the phase synchronization degree between brain region signal X and brain region signal Y, and the calculation formula is: wherein φ X (n) and φ Y (n) represent the instantaneous phase of the brain region signal X and the brain region signal Y at time point n, respectively; N is the total number of samples; 0 < PLV < 1, the higher the PLV value, the stronger the phase synchronization of the two brain regions. (3), GC is used to evaluate whether brain region signal Y can predict brain region signal X, and the mathematical definition is: An autoregressive model containing only the historical information of brain region signal X itself is constructed: where p represents the lag order; a k represents the regression coefficient of the brain region signal X; ∈ t represents the residual error; Add the historical information of brain region signal Y in the model: where b k represents the regression coefficient of the brain region signal Y; ∈' t represents the residual after adding the brain region signal Y; If the residual error e' after adding the brain region signal Y t Significant reduction indicates that the brain region signal Y has a causal effect on the brain region signal X; the larger the GC value, the stronger the causal relationship; (4), MI is used to evaluate the nonlinear statistical dependence between brain region signal X and brain region signal Y, and the calculation formula is: Where, p(x,y) represents the joint probability distribution; p(x) and p(y) represent the marginal probability distribution respectively; the higher the MI value, the stronger the dependence between brain regions; (5), TE is used to measure the degree of information flow from brain region signal X to brain region signal Y, and the calculation formula is: where p(.) denotes joint or conditional probability; y t+1 represents the state of the brain region signal Y at time t+1, x t and y t represent the state of the brain region signal X and the brain region signal Y at time t, respectively; the higher the value of TE, the more information is transmitted from the brain region signal X to the brain region signal Y; Multiband brain functional network feature representation as a tensor where C=25, i.e. 5 frequency bands x 5 feature representations; M represents the number of brain region nodes; S3, the multi-band brain function network characteristics are dynamically compressed and screened through the feature channel based on sparse attention and information bottleneck structure; S4, a lightweight graph attention Transformer model based on multi-band multi-path brain network is constructed to efficiently model and fuse brain function information; S5, introduce k-of-n voting mechanism in the model reasoning stage, post-processing and smoothing operation is carried out on the classification result output by the lightweight graph attention Transformer model in step S4.

2. The method of claim 1, wherein the method comprises: It comprises the following features Any one or more: (1), the step S1, operation is: first, the electroencephalogram signal data is filtered by 1-70Hz Butterworth band-pass filter, and the 57-63Hz power frequency interference is eliminated by using notch filter; then, the filtered EEG signal is cut into fixed length time window; (2), in the step S2, δ frequency band represents 0.5-4Hz, θ frequency band represents 4-8Hz, α frequency band represents 8-13Hz, β frequency band represents 13-30Hz, and γ frequency band represents 30-70Hz.

3. The method of claim 1, wherein the method comprises: The step S3 comprises the following sub-steps: S3.1, using global average pooling on the multi-band brain function network features in step S2 Compression is performed in each channel dimension, resulting in channel description z: S3.2, generate attention weight vector w through a two-layer fully connected network MLP: w=Softmax(W2·ReLU(W1·z)) Wherein, W1 represents the weight matrix of the first layer full connection layer; W2 represents the weight matrix of the second layer full connection layer; S3.3, multiply the generated channel attention weight w with the original input x, and the sparse attention weighted output is: wherein represents a multiplication in the channel direction; S3.4, through information bottleneck constraint, the information most related to the target variable is reserved in the compression process, and the information bottleneck constraint loss function is: wherein, represents the mutual information between the original features; represents the mutual information between the original features and the task label; β' represents a trade-off between the degree of compression and information preservation; S3.5, adding an information bottleneck loss term to the training wherein, represents the task loss; λ represents the control information bottleneck loss term on the total loss has an influence weight.

4. The method of claim 4, wherein the method comprises: In the step S3.2, the two-layer fully connected network MLP comprises: a linear layer with an input of 25 and an output of 5; a relu activation function layer; a linear layer with an input of 5 and an output of 25; and a softmax function.

5. The method of claim 1, wherein the method comprises: The step S4 comprises the following sub-steps: S4.1, parallel modeling of multi-band brain function connection graphs is performed, and spatial topological features of each frequency band are extracted; S4.2, interaction and fusion of multi-band graph features are performed, and important correlations between frequency bands are learned; S4.3, spatiotemporal joint modeling is performed on the fused graph features, and global temporal dependence is extracted.

6. The method of claim 5, wherein the method comprises: In the step S4.1, the operation is as follows: First, the original EEG signal is divided into multiple frequency bands by a filter bank; for each frequency band, the functional connection strength between brain regions is calculated to construct an initial adjacency matrix Secondly, a learnable adjacency matrix is introduced for each frequency band The dynamic update is performed in each layer GAT through a graph attention mechanism, and an update formula is: wherein, represents the learnable parameters of the frequency band in the lth layer; a represents the attention coefficient vector; h i , h j respectively represent the input feature vectors of node i, node j; Each frequency band uses a multi-layer GAT to extract graph node features; and a node feature updating formula of the lth layer GAT is as follows: wherein, represents the attention weight from ; σ represents a non-linear activation function; represents the set of direct neighbor nodes of node i in the graph; Finally, output the graph node features of each frequency band where M represents the number of brain region nodes; d represents the embedding dimension.

7. The method of claim 5, wherein the method comprises: In the step S4.2, the operation is as follows: First, a cross-band attention weight matrix A is constructed bb′ , which measures the correlation between bands b and b'. An attention weight calculation formula is as follows: wherein Q b , K b′ represent the query and key vectors of the frequency bands b, b', respectively; d k denotes the dimension of the key vector; Secondly, a gating mechanism is used to control the fusion proportion of information of different frequency bands; and a fusion formula is as follows: where g b represents the fusion weight of the b band; Z b,i represents the feature of node i in the band b; B represents the total number of bands; Finally, output the fused graph node features as a unified graph representation.

8. The method of claim 5, wherein the method comprises: In the step S4.3, the operation is as follows: First, we introduce learnable position encodings where t denotes a time instant in the total duration. Graph node features and time position encoding are added to form spatiotemporal embedding: E i,t = Z fused,i,t + PE t wherein Z fused,i,t represents the fused graph feature vector of node i at time step t; Secondly, a lightweight Transformer structure is adopted, including multi-head self-attention and a feedforward network, to perform temporal modeling on brain network features; and a spatiotemporal modeling formula is as follows: H t = MHSA(E t ), O t = FFN(H t ) Finally, the spatio-temporal fusion feature is output where V denotes the total length; and the final classification is completed by a linear layer.

9. An epilepsy detection system based on a multi-band brain functional network, characterized in that: It comprises: A signal preprocessing module, which is configured to perform band-pass filtering, de-artifacting and standardization processing on the acquired EEG signal; A multi-band brain function network construction module, which is configured to perform wavelet decomposition on the preprocessed signal, divide the signal into multiple frequency bands of δ, θ, α, β and γ, calculate PCC, PLV, GC, MI and TE for each frequency band, construct a multi-band brain function network, and capture linear and nonlinear connection features; A feature channel dynamic compression module, which is configured to perform dynamic compression and screening on the multi-band brain function network features through a sparse attention and information bottleneck structure; A graph attention Transformer model construction module, which is configured to efficiently model and fuse brain function information; A classification result processing module, which is configured to perform post-processing and smoothing operation on the classification results output by the graph attention Transformer model through a k-of-n voting mechanism.

10. The multi-band brain functional network based epilepsy detection system of claim 9, wherein: The graph attention Transformer model comprises: a multi-band parallel graph attention encoder, a cross-band graph attention fusion module, and a lightweight spatiotemporal Transformer module. The multi-band parallel graph attention encoder independently constructs a brain function connection graph for each frequency band, extracts node features of each frequency band by using an improved graph attention network, introduces a learnable adjacency matrix in each layer of GAT, and runs the graph attention modules of multiple frequency bands in parallel to retain the original spatial topological information of each frequency band. The cross-band graph attention fusion module automatically learns important correlations between different frequency bands by introducing a cross-band attention mechanism, controls the fusion weight of information of different frequency bands by using a gating mechanism, and outputs a unified graph representation after fusion. The lightweight spatiotemporal Transformer module combines position encoding and channel attention mechanism to realize global temporal modeling, jointly models spatial graph features and time features, and forms a spatiotemporal integrated feature representation.

Citation Information

Patent Citations

  • Symbolized permutation transfer entropy-based epileptic electroencephalogram bidirectional coupling analysis method

    CN112244870A

  • Epilepsy detection system based on bimodal electroencephalogram signal information bottleneck

    CN115363531A

  • Resting-state multi-channel electroencephalogram signal recognition method based on graph attention network and sparse coding

    CN116211319A

  • Epileptic seizure prediction method based on transfer entropy brain network analysis

    CN116439727A

  • Task state EEG channel attention map feature acquisition method based on frequency correlation analysis

    CN118734055A