Neural network model for simulating BIS and training method thereof
By designing a neural network model including input layer, double convolutional layer, memory network layer, self-attention layer and fully connected layer, the problem of lack of simulated BIS neural network model for deep monitoring of anesthesia in the prior art is solved, and more efficient EEG signal feature extraction and monitoring effects are achieved.
Patent Information
- Application Number
- CN202411743541.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-30
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art lacks neural network models and training methods for simulated BIS for deep monitoring of anesthesia.
A neural network model that simulates BIS is provided, including an input layer, a double convolutional layer, a memory network layer, a self-attention layer and a fully connected layer. Through specific hierarchical structures and training methods, the characteristics of the EEG signal are extracted and monitored.
This model can effectively pay attention to the key feature information of the brain waveform, combine forward and backward constraints, and realize multi-dimensional interpretation of feature information, improving simulation performance, fault tolerance and anti-interference ability, especially in the deep anesthesia stage.
Smart Images

Figure CN119761413A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of physiological and medical signal processing, and specifically to a neural network model simulating BIS and a training method thereof. Background Art
[0002] Electroencephalogram (EEG) is an important source of information for studying brain activity, and BIS is a mixed information fit of the power and frequency of the EEG through bispectral analysis into an optimal number. BIS makes full use of EEG information and has a good correlation with sedation and sleep in anesthesia. It is not affected by muscle relaxation level, electromyography and other activities, and can provide objective and continuous monitoring of consciousness level. In previous studies of the bispectral index of EEG, as the core technology of the BIS monitor, bispectral analysis is an advanced signal processing technology that quantifies the quadratic nonlinearity between signal components.
[0003] The depth of anesthesia generally refers to the degree to which systemic anesthetics inhibit the central nervous system, circulation, respiratory function and stress response under noxious stimulation. Too deep anesthesia can cause adverse consequences, such as respiratory function inhibition, circulatory function inhibition, and vital center inhibition; while too shallow anesthesia can also cause discomfort to the patient, such as significant stress response, circulatory system excitement, endocrine disorders, metabolic abnormalities, and intraoperative awareness; therefore, the appropriate depth of general anesthesia based on the disappearance of consciousness, good analgesia, moderate muscle relaxation, appropriate suppression of stress response, and stable internal environment is a safe depth to ensure patient safety and provide good surgical conditions. This creates a need for real-time, high-precision anesthesia depth monitoring.
[0004] At present, commercial anesthesia monitoring systems are based on frontal EEG data for calculation, using a 30-second cycle and a unique algorithm to monitor the depth of anesthesia. With the development of computer science, machine deep learning has a more obvious technical advantage.
[0005] Convolutional neural network is a type of feedforward neural network with deep structure and convolution calculation. It is one of the representative algorithms of deep learning. Convolutional neural network has the ability of representation learning and can classify input information in a translation-invariant manner according to its hierarchical structure. Therefore, it is also called "translation-invariant artificial neural network". Convolutional neural network is constructed by imitating the visual perception mechanism of organisms. It can perform supervised learning and unsupervised learning. The convolution kernel parameter sharing in the hidden layer and the sparsity of the inter-layer connection enable the convolutional neural network to learn grid features such as pixels and audio with a small amount of calculation, with stable effect and no additional feature engineering requirements for the data.
[0006] In anesthesia depth monitoring, currently, there is still a lack of neural network models and training methods for simulating BIS for anesthesia depth monitoring simulation. Summary of the invention
[0007] In order to solve the aforementioned problems, the present application provides a neural network model simulating BIS, including: an input layer, a double convolution layer, a memory network layer, a self-attention layer and a fully connected layer; in, The input layer is used to preprocess the EEG waveform data with BIS labels to obtain one-dimensional EEG sequence data, and input the data into the double convolution layer; Double convolutional layer, used to perform convolution, batch normalization and downsampling on the input data to obtain shallow features; The memory network layer is used to extract shallow features from the forward and backward directions to obtain middle-level features that contain temporal and spatial dependencies. The self-attention layer linearly transforms the middle-level features obtained from the memory network layer to obtain high-level information; Preferably, the self-attention layer includes: a self-attention module, which performs linear transformation on the middle-level feature data obtained from the memory network layer to extract the internal features of the data; a feedforward layer, which maps the feature data obtained from the self-attention module to a high-dimensional space and then maps it back to the original dimensional space to obtain complex feature data; a residual connection module, which adds the complex feature data of the feedforward layer to the input data of the self-attention module to obtain high-level information as input data of the fully connected layer; The fully connected layer maps the high-level information obtained from the self-attention layer to a single value.
[0008] Preferably, the dual convolutional layers respectively include: a first one-dimensional convolutional layer, a second one-dimensional convolutional layer, a third batch normalization layer, a fourth maximum pooling layer and a fifth Dropout layer.
[0009] Preferably, the memory network layer includes: a bidirectional long short-term memory network layer (Bi-LSTM) and a Dropout layer. It is used to extract shallow features from the forward and backward directions to obtain middle-level feature data containing temporal and spatial dependencies; Further, preferably, the bidirectional long short-term memory network layer (Bi-LSTM) includes: a forward LSTM layer and a backward LSTM layer.
[0010] Further, preferably, the processing of data by the feedforward layer includes: data linear transformation, ELU function activation and Dropout operation in sequence, so as to complete the nonlinear expression of the result and solve the problems of insufficient model simulation ability and overfitting.
[0011] Further, preferably, the processing of data by the fully connected layer includes the following steps: first data linear transformation, ELU function activation, Dropout operation, and second data linear transformation.
[0012] The present application also provides a training method for a neural network model simulating BIS, which is implemented based on the aforementioned neural network model simulating BIS; the convolution layer and the memory network layer are connected together, and a new network structure is formed by combining the self-attention mechanism, and finally the data pre-processed by the input layer is input into a neural network model simulating BIS for simulation, and the training steps include: S1. Obtain the EEG data training set with BIS labels, and perform training data preprocessing at the input layer, including: S1.1. Capture a continuous 60-second EEG waveform with BIS value, and the waveform data obtained is represented by one-dimensional data of at least 7680 points in the 60-second duration; The EEG waveform data of the average BIS value within the same time period are stored in the same text file, and each text file contains at least 1000 EEG waveform data as training data; The average BIS value is based on 1S as the basic unit, one BIS value corresponds to each second, and the average value of the corresponding BIS values in the multiple of 1S is continuously intercepted; S1.2. Further, preferably, each line of data in the text file corresponds to a label, and the label meaning of each line of data is: BIS, start, end and EEG waveform characteristic value; S1.3. Normalize the final data of S1.1. to the range of (-1,1); S1.4. Initialize the parameters of the neural network model simulating BIS with random numbers: Wherein, the model parameters include: weight, convolution kernel and bias; Wherein, the random number conforms to the normal distribution.
[0013] S2. Input the data obtained in S1.3 into the double convolution layer to train a neural network model simulating BIS after parameter initialization, including: inputting the data into the double convolution layer to extract shallow features, obtain feature maps, use zero padding, and add them to the beginning and end of the input sequence respectively; the calculation formula is as follows: ; The output shallow feature data is: , h1 is the feature vector of the shallow feature in the first dimension; h2 is the feature vector of the shallow feature in the second dimension; It is the feature vector of the shallow feature in T dimension; in, is the length of the input sequence; is the length of the output sequence; is the size of the convolution kernel; the step size of the convolution kernel sliding is ;Padding is the number of zeros filled in the length and width of the data.
[0014] S3. The memory network layer receives the shallow feature data output by the double convolutional layer: after being processed by the forward LSTM layer and the backward LSTM layer, the forward and backward hidden state sequences are obtained respectively; including: The calculation formula in the forward LSTM network is: ; Among them, F() is the mapping function in the forward LSTM network; the hidden state sequence of the forward LSTM layer is: ; The left arrow represents the hidden state sequence of the forward LSTM layer. i-th, The vector direction of the dimensional feature vector; The calculation formula in the backward LSTM network is: ; Among them, B() is the mapping function in the backward LSTM network; the hidden state sequence of the backward LSTM layer is: ; The right arrow represents the hidden state sequence of the backward LSTM layer. i-th, The vector direction of the dimensional feature vector; Finally, the hidden state sequence of the forward LSTM layer is and the hidden state sequence of the backward LSTM layer Splicing to obtain the middle-level feature data of the memory network layer: .
[0015] S4. The self-attention layer linearly transforms the middle-level feature data obtained from the memory network layer to obtain high-level information; including: S4.1. The middle-level feature data from the memory network layer are combined with , , , Multiply them to perform linear transformation to obtain the query (Q), key (K), and value (V) of the same shape. The calculation formula is as follows: ; ; ; in, is the query weight matrix; is the bond weight matrix; is the value weight matrix; Q is the query; K is the key; V is the value; Q i is the characteristic component of the query vector in the i-th dimension, ; K i is the characteristic component of the key vector in the i-th dimension, ; V i is the characteristic component of the value vector in the i-th dimension, ; m means that the self-attention module adopts the m-head attention mechanism; Compute Query (Q i ) and key (K i ) to obtain the attention scores and scale them; then, perform Softmax normalization on the attention scores to obtain the attention weights; finally, add the attention weights to the value (V i ) are multiplied together to obtain weighted values, including: ; in: Indicates the length of the sequence; express The transpose of The function is used to normalize the attention weights so that they sum to 1, assigning attention to the value ;head i is the i-th attention score; back, ; in, It’s multi-headed attention; It means to concatenate the attention outputs of each head in sequence; forming a larger tensor.
[0016] S4.2. In the feed-forward layer, the internal feature data obtained from the self-attention module is mapped to a high-dimensional space, and then mapped back to the original dimensional space to obtain complex feature data; The input and output sizes of step S4.2 remain unchanged.
[0017] S4.3. The residual connection module adds the complex feature data of the feedforward layer to the input data of the self-attention module to obtain high-level information as the input data of the fully connected layer.
[0018] S5. Fully connected layer, mapping the high-level information obtained from the self-attention layer to a single value.
[0019] S6. Optimize the model parameters described in step S1 using the Adam optimizer, and then execute steps S2 to S5 again; the calculation formula used is: ; in, is the loss function used by the Adam optimizer; n is the number of samples; is the true value of the i-th sample; is the corresponding analog value.
[0020] S7. Repeat the above steps S1 to S6 until all the data in the data training set are traversed, thus completing the training process of the neural network model simulating BIS.
[0021] Preferably, a training method for a neural network model simulating BIS further includes: S8. Input the test data into a trained neural network model that simulates BIS, with the horizontal axis representing the true BIS value and the vertical axis representing the simulated BIS, and output a regression effect diagram of the true BIS and the model-simulated BIS.
[0022] Beneficial effects: The model can focus on the key feature information of the waveform, incorporate the forward and backward constraints of the features, and interpret the feature information in multiple dimensions. It has good simulation performance, improved simulation fault tolerance, and anti-interference ability, especially in the deep anesthesia stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a schematic diagram of the structure of the neural network model simulating BIS; Figure 2 It is a flow chart of the neural network model simulating BIS; Figure 3 It is a schematic diagram of the regression effect of the simulated BIS value and the real BIS value of the neural network model simulating BIS. DETAILED DESCRIPTION
[0024] Those skilled in the art will understand that, unless otherwise stated, the terms used in this application have the following meanings: Double convolutional layer: A structure that uses two convolutional layers consecutively in a neural network architecture.
[0025] Bi-LSTM: It includes forward LSTM layer and backward LSTM layer. It is a variant of recurrent neural network (RNN) and is very effective in processing sequence data. It combines two directional LSTM units to process the forward and reverse information of sequence data respectively, thereby capturing the bidirectional dependency in the sequence. Bi-LSTM is widely used in natural language processing, speech recognition and other fields, and can effectively handle long-term dependency and sequence modeling problems.
[0026] Max pooling layer: The max pooling layer is a downsampling operation commonly used in convolutional neural networks. It reduces the size of the feature map by selecting the maximum value in the local area, thereby reducing the computational complexity and number of parameters of the model.
[0027] Query (Q), Key (K) and Value (V): When using the Self-Attention Mechanism, the input sequence is linearly transformed into three different representations, namely query (Q), key (K) and value (V). These three representations are usually obtained by linearly projecting the original input.
[0028] Multi-head attention mechanism: Multi-head attention mechanism is a technique for extracting important information from a sequence. It applies the attention mechanism to multiple independent Q, K, and V projections to obtain richer representation capabilities.
[0029] Softmax normalization: Softmax normalization is a commonly used probability distribution normalization method, which converts the output into a probability distribution by exponentially and normalizing the original output of the model so that the output value of each category is between 0 and 1 and the sum is 1.
[0030] Dropout (random inactivation): A regularization technique that randomly discards the output of neurons with a certain probability, similar to ensemble learning of the model. By randomly discarding neurons, the coupling between them is reduced, making the network more robust and improving generalization capabilities.
[0031] Shallow features: The features extracted by the shallow network are closer to the input and contain more pixel information. Some fine-grained information is the color, texture, edge, and angular information of the image.
[0032] Mid-level features: Located between shallow features and high-level information, they deconstruct shallow features into feature components of different complexity. Mid-level features are often mixed and contain rich information, such as more detailed information and noise information to further promote the accuracy of neural network classification.
[0033] High-level information: The features extracted by the deep network are closer to the output, and some coarse-grained information contains more abstract information, namely semantic information. The high-level information in this patent further promotes the accuracy of network classification without increasing the dimension of feature data.
[0034] Adam optimizer: (Adaptive Moment Estimation) is a widely used deep learning optimization algorithm that aims to achieve more efficient network training by adjusting the learning rate of each parameter by calculating the first-order and second-order moment estimates of the gradient.
[0035] As attached Figures 1 to 3 : This embodiment provides a simulated BIS convolutional neural network model, including: an input layer, a dual convolutional layer, a memory network layer, a self-attention layer, a fully connected layer and an output layer.
[0036] Among them, the input layer is used to preprocess the EEG waveform data with BIS labels to obtain one-dimensional EEG sequence data, and input the data into the double convolution layer.
[0037] Preferably, in this embodiment, the dual convolutional layers respectively include: a first one-dimensional convolutional layer, a second one-dimensional convolutional layer, a third batch normalization layer, a fourth maximum pooling layer and a fifth Dropout layer.
[0038] Further, preferably, a hidden layer is further provided between the third batch normalization layer and the fourth maximum pooling layer, and the ELU function of the hidden layer unit is: ; Among them: x is the output result of the previous layer of the network received by this network layer; a is a trainable parameter.
[0039] In this embodiment, preferably, the memory network layer includes three bidirectional long short-term memory network layers (Bi-LSTM) and one Dropout layer, which are used to extract shallow features from forward and backward directions, obtain middle-level feature data containing temporal and spatial dependencies, improve network feature modeling and simulation capabilities, and improve the accuracy of simulation results.
[0040] Further, preferably, the bidirectional long short-term memory network layer (Bi-LSTM) layer includes: a forward LSTM layer and a backward LSTM layer.
[0041] Preferably, the self-attention layer includes a multi-head self-attention module (Multi HeadAttention) based on the self-attention mechanism, a feed-forward layer, and a residual connection module (Residual Add).
[0042] Furthermore, preferably, the multi-head self-attention modules and feed-forward layers are connected together and stacked through residual connections (i.e., the output results of the attention modules of each head are connected end to end). This is used to make the network pay more attention to key information by assigning different weights to different information.
[0043] In this embodiment, a double convolutional layer has a convolutional feature map of 56 channels; the hidden state dimension of the bidirectional long short-term memory layer is 44; the embedding dimension of the self-attention layer is 44; the fully connected layer is set to 512 nodes, and the output layer is set to 1 node.
[0044] Further, preferably, the processing of data by the fully connected layer includes the following steps: first data linear transformation, ELU function activation, Dropout operation, and second data linear transformation.
[0045] This embodiment also provides a training method for a neural network model simulating BIS, including: S1. Obtain the EEG data training set with BIS labels, and perform training data preprocessing at the input layer, including: S1.1. Capture a continuous 60-second EEG waveform with BIS value, and the waveform data obtained is represented by one-dimensional data of at least 7680 points in the 60-second duration; The EEG waveform data of the average BIS value within the same time period are stored in the same text file, and each text file contains at least 1000 EEG waveform data as training data; The average BIS value is based on 1S as the basic unit, one BIS value corresponds to each second, and the average value of the corresponding BIS values in the multiple of 1S is continuously intercepted; S1.2. Further, preferably, each line of data in the text file corresponds to a label, and the label meaning of each line of data is: BIS, start, end and EEG waveform characteristic value; as shown in Table 1: Table 1
[0046] It should be noted that in Table 1: BIS represents the EEG index; Start and End represent the start and end positions of the recording respectively; and “EEG waveform characteristic value” represents the sampled data point, which is a one-dimensional data of 1x7680.
[0047] S1.3. Normalize the final data of S1.1. to the range of (-1,1); S1.4. Initialize the parameters of the neural network model simulating BIS using random numbers: Wherein, the model parameters include: weight, convolution kernel and bias; Wherein, the random number conforms to the normal distribution.
[0048] S2. Input the data obtained in S1.3. into the double convolution layer, so that a neural network model simulating BIS after parameter initialization is trained, including: inputting the data into the double convolution layer to extract shallow features, obtaining feature maps, using zero padding, and adding them to the beginning and end of the input sequence respectively; the calculation formula is as follows: ; The output shallow feature data is: , h1 is the feature vector of the shallow feature in the first dimension; h2 is the feature vector of the shallow feature in the second dimension; It is the feature vector of the shallow feature in T dimension; in, is the length of the input sequence; is the length of the output sequence; is the size of the convolution kernel; the step size of the convolution kernel sliding is ;Padding is the number of zeros filled in the length and width of the data.
[0049] Further, in this embodiment, S2.1 input data (brain wave feature data + BIS) is filled with zero data in the first convolution layer. The input data is dot-producted with the convolution kernel, and the convolution kernel moves with a specific step length stride to obtain the output data, and the same operation is performed in the second convolution layer to obtain the output data of the second convolution layer. S2.2. Normalize the output data of the second convolution layer. S2.3. Input the output data of each channel obtained by the normalization layer into the ELU function to obtain the output data of the hidden layer. S2.4. The maximum pooling layer, that is, the output data obtained by the hidden layer in the fixed window is taken as the maximum value, and down-sampled to reduce redundant samples. S2.5. Add a probability P (0-1) to each neuron, and give a sampling threshold (assuming the sampling threshold is 0.3, then the neural unit data with probability P<0.3 is set to 0) to reduce the number of features and reduce data redundancy.
[0050] In this embodiment, feature extraction is performed in the convolutional layer in the network, and the projected features are passed to a bidirectional long short-term memory neural network (Bi-LSTM) composed of multiple LSTM layers. These layers process the input sequence simultaneously in the horizontal and vertical directions, and the output is the bidirectional hidden state of the bidirectional long short-term memory network (Bi-LSTM), which is used to capture the global information of the sequence; finally, the self-attention layer learns the dependency between each position in the sequence through the self-attention mechanism, and then further encodes and integrates the output feature sequence.
[0051] S3. The memory network layer receives the shallow feature data output by the double convolutional layer: after being processed by the forward LSTM layer and the backward LSTM layer, the forward and backward hidden state sequences are obtained respectively; The calculation formula in the forward LSTM network is as follows: ; Among them, F() is the mapping function in the forward LSTM network; the hidden state sequence of the forward LSTM layer is: ; The left arrow represents the hidden state sequence of the forward LSTM layer. i-th, The vector direction of the dimensional feature vector; The calculation formula in the backward LSTM network is as follows: ; Among them, B() is the mapping function in the backward LSTM network; the hidden state sequence of the backward LSTM layer is: ; The right arrow represents the hidden state sequence of the backward LSTM layer. i-th, The vector direction of the dimensional feature vector; Finally, the hidden state sequence of the forward LSTM layer is and the hidden state sequence of the backward LSTM layer Splicing to obtain the middle-level feature data of the memory network layer: .
[0052] S4. The self-attention layer linearly transforms the middle-level feature data obtained from the memory network layer to obtain high-level information; including: S4.1. The middle-level feature data from the memory network layer are combined with , , , Multiply them to perform linear transformation to obtain the query (Q), key (K), and value (V) of the same shape. The calculation formula is as follows: ; ; ; in, is the query weight matrix; is the bond weight matrix; is the value weight matrix; Q is the query; K is the key; V is the value; Q i is the characteristic component of the query vector in the i-th dimension, ; K i is the characteristic component of the key vector in the i-th dimension, ; V iis the characteristic component of the value vector in the i-th dimension, ; m means that the self-attention module adopts the m-head attention mechanism; Compute Query (Q i ) and key (K i ) to obtain the attention scores and scale them; then, perform Softmax normalization on the attention scores to obtain the attention weights; finally, add the attention weights to the value (V i ) are multiplied together to obtain weighted values, including: ; in: Indicates the length of the sequence; express The transpose of The function is used to normalize the attention weights so that they sum to 1, assigning attention to the value ;head i is the i-th attention score; then, ; in, It’s multi-headed attention; It means to concatenate the attention outputs of each head in sequence to form a larger tensor.
[0053] Among them, the attention calculation in the self-attention module is repeated at least 7 times.
[0054] In addition, in this embodiment, S4.2 maps the internal feature data obtained from the self-attention module to a high-dimensional space in the feed-forward layer, and then maps it back to the original dimensional space to obtain complex feature data; the input and output sizes of step S4.2 remain unchanged.
[0055] S4.3. The residual connection module adds the complex feature data of the feedforward layer to the input data of the self-attention module to obtain high-level information as the input data of the fully connected layer.
[0056] S5. Fully connected layer maps the high-level information obtained from the self-attention layer to a single value as the output of the entire network.
[0057] Among them, the data processing of the fully connected layer includes: first data linear transformation, ELU function activation, Dropout operation and second data linear transformation data processing.
[0058] S6. Optimize the model parameters described in step S1 using the Adam optimizer, and then execute steps S2 to S5 again; the calculation formula used is: ; in, is the loss function used by the Adam optimizer; n is the number of samples; is the true value of the i-th sample; is the corresponding analog value.
[0059] The model shows the best performance with an initial Adam learning rate of 0.0005 and a batch size of 64, with the learning rate decayed between epochs and an early stopping criterion.
[0060] S7. Repeat the above steps S1 to S6 until all the data in the data training set are traversed to complete the training process of the neural network model simulating BIS.
[0061] Preferably, a training method for a neural network model simulating BIS further includes: S8. Input the test data into a trained neural network model that simulates BIS, with the horizontal axis representing the true BIS value and the vertical axis representing the simulated BIS, and output a regression effect diagram of the true BIS and the model-simulated BIS.
[0062] The specific implementation methods described above provide a detailed description of the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, etc. made on the basis of the technical solutions of the present application should be included in the scope of protection of the present application.
Claims
1. A neural network model simulating BIS, characterized in that: include: The input layer is used to preprocess the EEG waveform data with BIS labels to obtain one-dimensional EEG sequence data, and input the data into the double convolution layer; Double convolutional layer, used to perform convolution, batch normalization and downsampling on the input data in order to obtain shallow features; The memory network layer is used to extract shallow features from the forward and backward directions to obtain middle-level features that contain temporal and spatial dependencies. The self-attention layer linearly transforms the middle-level features obtained from the memory network layer to obtain high-level information; The fully connected layer maps the high-level information obtained from the self-attention layer to a single value.
2. The neural network model for simulating BIS according to claim 1, characterized in that: The self-attention layer includes: a self-attention module that performs linear transformation on the middle-level feature data obtained from the memory network layer to extract the internal features of the data; The feedforward layer maps the feature data obtained from the self-attention module to a high-dimensional space, and then maps it back to the original dimensional space to obtain complex feature data; The residual connection module adds the complex feature data of the feedforward layer to the input data of the self-attention module to obtain high-level information as the input data of the fully connected layer.
3. A neural network model for simulating BIS according to claim 2, characterized in that: The feedforward layer processes the data, including: data linear transformation, ELU function activation and Dropout operation, which is used to complete the nonlinear expression of the result.
4. The neural network model for simulating BIS according to claim 1, characterized in that: The double convolutional layers respectively include: a first one-dimensional convolutional layer, a second one-dimensional convolutional layer, a third batch normalization layer, a fourth maximum pooling layer and a fifth Dropout layer.
5. The neural network model for simulating BIS according to claim 1, characterized in that: The memory network layer includes: bidirectional long short-term memory network layer and Dropout layer.
6. The neural network model for simulating BIS according to claim 5, characterized in that: The bidirectional long short-term memory network layer includes: a forward LSTM layer and a backward LSTM layer.
7. The neural network model for simulating BIS according to claim 1, characterized in that: The fully connected layer processes data in the following order: first data linear transformation, ELU function activation, Dropout operation, and second data linear transformation.
8. A training method for a neural network model simulating BIS, characterized in that: A neural network model based on any one of claims 1-7 simulating BIS; The training steps include: S1. Obtain the EEG data training set with BIS labels, and perform training data preprocessing by the input layer; S1.
1. Capture a continuous 60-second EEG waveform with BIS value, and the waveform data obtained is represented by one-dimensional data of at least 7680 points in the 60-second duration; The EEG waveform data of the average BIS value within the same time period are stored in the same text file, and each text file contains at least 1000 EEG waveform data as training data; The average BIS value is based on 1S as the basic unit, one BIS value corresponds to each second, and the average value of the corresponding BIS values in the multiple of 1S is continuously intercepted; S1.
2. Further, preferably, each line of data in the text file corresponds to a label, and the label meaning of each line of data is: BIS, start, end and EEG waveform characteristic value; S1.
3. Normalize the final data of S1.
1. to the range of (-1,1); S1.
4. Initialize the parameters of the neural network model simulating BIS with random numbers: Wherein, the model parameters include: weight, convolution kernel and bias; Wherein, the random number conforms to normal distribution; S2. Input the data obtained in S1.3 into the double convolution layer to train a neural network model simulating BIS after parameter initialization, including: inputting the data into the double convolution layer to extract shallow features, obtaining feature maps, using zero padding, and adding them to the beginning and end of the input sequence respectively; the calculation formula is as follows: ; The output shallow feature data is: , h1 is the feature vector of the shallow feature in the first dimension; h2 is the feature vector of the shallow feature in the second dimension; It is the feature vector of the shallow feature in T dimension; in, is the length of the input sequence; is the length of the output sequence; is the size of the convolution kernel; the step size of the convolution kernel sliding is ;Padding is the number of zeros filled in the length and width of the data; S3. The memory network layer receives the shallow feature data output by the double convolutional layer: after being processed by the forward LSTM layer and the backward LSTM layer, the forward and backward hidden state sequences are obtained respectively; including: The calculation formula in the forward LSTM network is: ; Among them, F() is the mapping function in the forward LSTM network; the hidden state sequence of the forward LSTM layer is: ; The left arrow represents the hidden state sequence of the forward LSTM layer. i-th, The vector direction of the dimensional feature vector; The calculation formula in the backward LSTM network is: ; Among them, B() is the mapping function in the backward LSTM network; the hidden state sequence of the backward LSTM layer is: ; The right arrow represents the hidden state sequence of the backward LSTM layer. i-th, The vector direction of the dimensional feature vector; Finally, the hidden state sequence of the forward LSTM layer is and the hidden state sequence of the backward LSTM layer Splicing to obtain the middle-level feature data of the memory network layer: ; S4. The self-attention layer linearly transforms the middle-level feature data obtained from the memory network layer to obtain high-level information; including: S4.
1. The middle-level feature data from the memory network layer are combined with , , , Multiply them to perform linear transformation to obtain queries, keys, and values of the same shape. The calculation formula is: ; ; ; in, is the query weight matrix; is the bond weight matrix; is the value weight matrix; Q i is the characteristic component of the query vector in the i-th dimension, ; K i is the characteristic component of the key vector in the i-th dimension, ; V i is the characteristic component of the value vector in the i-th dimension, ; m means that the self-attention module adopts the m-head attention mechanism; Compute Query (Q i ) and key (K i ) to obtain the attention scores and scale them; then, perform Softmax normalization on the attention scores to obtain the attention weights; finally, add the attention weights to the value (V i ) are multiplied together to obtain weighted values, including: ; in: Indicates the length of the sequence; express The transpose of The function is used to normalize the attention weights so that they sum to 1, assigning attention to the value ; back, ; in, It’s multi-headed attention; It means to concatenate the attention outputs of each head in sequence; S4.
2. In the feed-forward layer, the internal feature data obtained from the self-attention module is mapped to a high-dimensional space, and then mapped back to the original dimensional space to obtain complex feature data; S4.
3. The residual connection module adds the complex feature data of the feedforward layer to the input data of the self-attention module to obtain high-level information as the input data of the fully connected layer; S5. Fully connected layer, mapping high-level information obtained from the self-attention layer to a single value; S6. Optimize the model parameters described in step S1 using the Adam optimizer, and then execute steps S2 to S5 again; the calculation formula is: ; in, is the loss function used by the Adam optimizer; n is the number of samples; is the true value of the i-th sample; is the corresponding analog value; S7. Repeat steps S1 to S6 until all the data in the data training set are traversed.
9. The method for training a neural network model simulating BIS according to claim 8, characterized in that: Also includes: S8. Input the test data into a trained neural network model that simulates BIS, with the horizontal axis representing the true BIS value and the vertical axis representing the simulated BIS, and output a regression effect diagram of the true BIS and the model-simulated BIS.