COMPUTER PROGRAM FOR TRAINING A NEUROLOGICAL CONDITION DETECTION ALGORITHM, METHOD OF PROGRAMMING AN IMPLANTABLE NEUROSTIMULATION DEVICE AND COMPUTER PROGRAM THEREFOR
20230405326 · 2023-12-21
Inventors
- Farrokh MANZOURI (Freiburg im Breisgau, DE)
- Andreas SCHULZE-BONHAGE (Freiburg im Breisgau, DE)
- Matthias DÜMPELMANN (Freiburg im Breisgau, DE)
Cpc classification
G16H20/30
PHYSICS
A61N1/025
HUMAN NECESSITIES
G16H50/20
PHYSICS
G16H20/40
PHYSICS
A61B5/4094
HUMAN NECESSITIES
G06N3/082
PHYSICS
G06N5/01
PHYSICS
A61B5/4836
HUMAN NECESSITIES
G16H50/70
PHYSICS
International classification
A61N1/372
HUMAN NECESSITIES
Abstract
The invention relates to a computer program for training a neurological condition detection algorithm to be used for neurological condition detection in an implantable neurostimulation device having a target electrode arrangement, the computer program comprising the following steps: a) inputting EEG data in a computer which executes the computer program, the EEG data being recorded by at least one EEG from at least one patient using an electrode system with a plurality of electrode channels, b) identifying neurological activity in the EEG data, which corresponds to a neurological condition, based upon neurological condition identification tags included in the EEG data and/or input in the computer, c) selecting a subset of electrode channels out of the available electrode channels in the EEG data depending c1) on the identified neurological activity and/or c2) on characteristic data of the target electrode arrangement, d) training a neurological condition detection algorithm by using the EEG data only of the selected subset of electrode channels.
Claims
1. A computer program for training a neurological condition detection algorithm to be used for neurological condition detection in an implantable neurostimulation device having a target electrode arrangement, the computer program comprising the following steps: a) inputting EEG data in a computer which executes the computer program, the EEG data being recorded by at least one EEG from at least one patient using an electrode system with a plurality of electrode channels, b) identifying neurological activity in the EEG data, which corresponds to a neurological condition, based upon neurological condition identification tags included in the EEG data and/or input in the computer, c) selecting a subset of electrode channels out of the available electrode channels in the EEG data depending c1) on the identified neurological activity and/or c2) on characteristic data of the target electrode arrangement, d) training a neurological condition detection algorithm by using the EEG data only of the selected subset of electrode channels.
2. The computer program of claim 1, wherein such electrode channels are selected out of the available electrode channels which are in closest proximity to the location of the identified neurological activity which corresponds to the neurological condition.
3. The computer program of any of the preceding claims, wherein such electrode channels are selected out of the available electrode channels which have the closest geometrical match with the electrodes of the target electrode arrangement.
4. The computer program of any of the preceding claims, wherein such electrode channels are selected out of the available electrode channels which are arranged in a pseudo-Laplacian pattern.
5. The computer program of any of the preceding claims, wherein step d) comprises the steps: d1) calculating linear combinations of the EEG data of the selected subset of electrode channels, e.g. calculating linear combinations representing bipolar or quadrupolar electrode channels, d2) training the neurological condition detection algorithm by using calculated linear combinations of the EEG data.
6. The computer program of any of the preceding claims, wherein exactly 5 electrode channels are selected out of the available electrode channels.
7. The computer program of any the preceding claims, wherein the neurological condition detection algorithm is an artificial intelligence algorithm, e.g. Random Forest, Support Vector Machine, Multi-layer Perceptron, Convolutional Neural Network, Long Short-Term Memory Network.
8. The computer program of any of the preceding claims, wherein the computer program comprises at least two training cycles of the neurological condition detection algorithm: e) in a first training cycle a general training of the neurological condition detection algorithm is done using the EEG data of one or more patients, f) in a second training cycle a patient specific training of the neurological condition detection algorithm is done using the EEG data only of the patient to which the neurological condition detection algorithm shall be applied and/or using the EEG data of another patient having similar neurological condition onset pattern as the patient to which the neurological condition detection algorithm shall be applied.
9. The computer program of any of the preceding claims, wherein the computer program is arranged for evaluating data tags which are assigned to the EEG data which are input in the computer which executes the computer program, wherein the data tags are used for selecting the subset of electrode channels out of the available electrode channels.
10. A method of programming an implantable neurostimulation device, comprising the following steps: g) running a computer program of any the preceding claims on a computer, h) programming the neurological condition detection algorithm trained by the computer program into the implantable neurostimulation device.
11. The method of claim 10, wherein the implantable neurostimulation device is a closed-loop neurostimulator which is arranged for recording EEG signals, for calculating stimulation signals based upon the recorded EEG signals and for outputting the stimulation signals.
12. The method of claim 10 or 11, wherein in step g) the computer program is run on an external computer which is not part of the implantable neurostimulation device.
13. A computer program in the form of a neurological condition detection algorithm or classifier for detecting neurological conditions from EEG data which has been trained and/or is being trained by a computer program according to any of claims 1 to 9.
14. The computer program of claim 13, wherein the computer program is configured for implementation on a microcontroller.
15. The computer program of claim 13 or 14, wherein the computer program is optimized for lowest power consumption.
16. The computer program of any of claims 13 to 15, wherein the neurological condition detection algorithm or classifier for detecting neurological conditions is an artificial intelligence algorithm, e.g. Random Forest, Support Vector Machine, Multi-layer Perceptron, Convolutional Neural Network, Long Short-Term Memory Network.
17. An implantable neurostimulation device running a computer program according to any of claims 13 to 16.
18. A method for treatment of a neurological condition using an implantable neurostimulation device according to claim 17.
Description
[0039] Further exemplary embodiments of the invention are described using the following figures, which show in:
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047] The control processor 6 can be a microcontroller unit (MCU) or any other unit, which can perform control steps via processing of computer programs, e.g. in the form of hardware, firmware or software programs.
[0048] The signal generation circuit 3 is able to create and deliver stimulation pulses to the stimulation electrodes 21, 22, 23, 24 upon command from the control processor 6. The signal generation circuit 3 may comprise amplifier components.
[0049] The control processor 6 can detect neuro-signals and/or brain activities through the sensors 7, 8. The detected neuro-signals and/or brain activities can be processed and used for event driven delivery of stimulation pulses to any of the stimulation electrodes 21, 22, 23, 24.
[0050] The battery pack 9 supplies the aforementioned elements of the power unit 1 with electrical energy. The battery pack 9 may comprise rechargeable batteries.
[0051] The control processor 6 is arranged for executing the trained neurological condition detection algorithm. The training of the neurological condition detection algorithm is done on the computer 13, as it will be described in the following.
[0052] The neurological condition detection algorithm for such a system must be trained on recordings configured similar to the subgaleal electrodes. Since there is a high similarity between EEG data from subcutaneous and proximate scalp electrodes in patients with neocortical epilepsy, we use surface EEG recordings obtained from electrode configurations representing the implanted subgaleal electrode for training and evaluation of the neurological condition detection algorithm. This approach could be used to pre-train an individualized detector using scalp-based neurological condition recordings prior to a device implantation.
[0053] Electrode selection can be performed to represent the target electrode arrangement 2 during long-term video-EEG monitoring of neurological conditions. Expert epileptologists may define the seizure onset zone (SOZ) by visual exploration of the seizure onset electrodes and considering inter-electrode distances. Our proposed methods automate the electrode selection by considering the geometrical dimensions of the system shown in
[0054] In our system, after development and implementation of two automatic electrode selection methods, we designed and implemented four energy-efficient neurological condition detection algorithms using Random Forest (RF) classifier, Support Vector Machine (SVM), Multi-Layer Perceptron (MLP), and Convolutional Neural Network (CNN) that can perform reliably with a reduced electrode set for detection of focal-onset seizures. Finally, we compared their detection performance to evaluate their suitability for implantable devices.
[0055] The EEG dataset used for training included surface EEG recordings of 50 patients with a total number of 358 seizures. Patients were selected, having the SOZ covered by electrodes positioned according to the 10-10 system in addition to the traditional 10-20 electrode layout. EEG data were recorded at a 250 Hz sampling rate on a 256-channels DC amplifier with a resolution of 24 bit. Electrodes were re-referenced to the centrally positioned electrode. For antialiasing, a low-pass filter with a cut-off frequency of 100 Hz was applied. EEG data from ten patients were used for training the hybrid model of the CNN. Therefore, to keep the test dataset consistent over all the classifiers, the remaining 40 patients with a total number of 286 seizures were used for evaluating the classifiers.
[0056] To improve the data quality and removing data contaminated with artifacts, first, data were filtered by a Chebyshev II band-pass (order:10, band stop=40 dB) with low and high cut-off frequencies of 0.1 Hz and 48 Hz. Next, very high amplitudes representing artifacts were removed from the analysis.
[0057] Electrode selection was performed to obtain an electrode set with the maximum number of electrodes covering the seizure onset area at inter-electrode distances below a threshold mapping to the design of the implantable system shown in
Method 1
[0058] In this method, first, the mean of the five selected electrode coordinates was calculated and the nearest scalp electrode to this position was found. This electrode was considered as the center electrode. Any of the selected five electrodes that had a distance from the center electrode greater than the threshold distance was excluded from the list. As depicted in
Method 2
[0059] In this method, in each step, one electrode was selected as the central electrode and similar to method 1, the number of electrodes from the initial SOZ electrodes whose distance from the central electrode was smaller than the threshold distance was counted. This process was repeated for all EEG electrode positions over the scalp, and a list of the selected initial SOZ electrodes enclosed with each electrode was generated. The electrode that contained the maximum number of initial SOZ electrodes was chosen as the optimal central electrode. If required, electrodes with a minimum distance from the central electrode were added to the list to yield exactly five electrodes for seizure detection.
[0060] Several features in the time and frequency domain were selected for seizure detection. Time-domain features were mean, maximum, mean absolute deviation, variance, skewness, kurtosis, line length, autocorrelation, and entropy. Frequency domain features included mean, maximum, and variance of the power spectrum, power in the theta (4-8 Hz), beta (13-30 Hz), and gamma band (30-45 Hz), spectral entropy, and epileptogenicity index. These features were used for classification by Random Forest, SVM, and MLP classifiers. For SVM and MLP, as the range of calculated features affect their weight as well as the subsequent decision boundaries, features were scaled for classification.
1) Random Forest
[0061] The number of binary decision trees was set to 100. We selected entropy for impurity measurement as the branching index. Four features were randomly selected at each node. To keep the size of the trees limited, the maximum depth of the trees was limited to 10. Bootstrap samples were used during building decision trees. The sample weights for each class were adjusted inversely proportional to class frequencies in the input data. The leave one out method was used for crossvalidation.
2) Support Vector Machine (SVM)
[0062] We selected the Gaussian Radial Basis Function (RBF) as the kernel function for handling non-linearity between the features and class labels. Two hyperparameters needed to be set for this purpose: the kernel coefficient of the Gaussian function was set to 0.01, and the penalty parameter of the error term, which behaves as a regularization parameter for the SVM, was set to 0.1. The sample weights for each class were adjusted so that they were inversely proportional to class frequencies in the input data. The leave-one-out method was used for cross-validation.
3) Multi-layer Perceptron (MLP)
[0063] The MLP network consists of at least three layers of nodes: an input layer, one or more hidden layers, and an output layer. We implemented an MLP classifier consisting of one hidden layer with 20 neurons. We selected Adam as the solver for weight optimization. The logistic sigmoid function was selected as the activation function and an adaptive learning rate was selected to schedule for weight updates. The L2 penalty (regularization term) parameter was set to 10.sup.4. The leave one out method was used for cross-validation.
4) Convolutional Neural Network (CNN)
[0064] A CNN consists of an input layer, multiple hidden layers, and an output layer. The hidden layers consist of convolutional layers, pooling layers, and fully connected layers. The architecture of our proposed CNN is shown in Table I. In the first layer, to be able to learn spatio-temporal patterns efficiently, we used a kernel size that extends over all the channels and detection time window (2 seconds=500 data points). In all hidden layers, we used batch normalization after the convolutions and Rectified Linear Units (ReLu) were used as the activation function. Dropout regularization was applied during the training to reduce overfitting. In the two last layers, we used two fully connected layers.
[0065] The following table shows a preferred architecture of our proposed CNN:
TABLE-US-00001 Layer Operation Output Input (4 500) C 500 1 1 15 Conv2D (4 21) 1 480 15 2 MaxPool2D (1 4) 1 120 15 Dropout (0.2) 1 120 15 3 15 Conv2D (1 9) 1 112 15 4 MaxPool2D (1 4) 1 28 15 Dropout (0.2) 1 28 15 5 10 Conv2D (1 5) 1 24 10 6 MaxPool2D (1 2) 1 12 10 Dropout (0.2) 1 12 10 7 10 Conv2D (1 5) 1 8 10 Dropout (0.2) 1 8 10 8 Dense (8) 8 9 Dense (4) 4 10 Sigmoid 1
[0066] For training, because the available data for each patient was limited, we used the transfer learning method that consists of freezing the bottom layers in a model and only training the top layers. Therefore, we pre-trained the network over data from 10 patients, and subsequently, for each of the remaining 40 patients, the last convolution layer and the two fully connected layers were fine-tuned using the patient-specific data. Because the classes are imbalanced, the class indices were weighted to balance the weighting of the loss function during the training. Each model was trained with a batch size of 512 for 500 epochs. For weight optimization, we used Adam solver with a learning rate of 10.sup.3. We used binary cross-entropy as the loss function. For evaluation, we used 3-fold cross-validation.