Computer program for training a neurological disease detection algorithm, method of programming an implantable neurostimulation device and computer program thereof

By training a neurological disease detection algorithm in an implantable neurostimulation device, selecting electrode channels using EEG data, and employing a pseudo-Laplace mode, the problem of ineffective drug treatment for epilepsy patients has been solved, achieving efficient and energy-saving epileptic seizure detection and treatment.

CN116528749BActive Publication Date: 2026-08-04PRESEX CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PRESEX CO LTD
Filing Date
2021-11-19
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

In the current technology, many epilepsy patients do not respond to drug treatment and surgery is high-risk. There is a need for a reliable and energy-efficient method to detect epileptic seizures in order to interrupt the spread of epileptic seizures in the brain.

Method used

By training a neurological disease detection algorithm using a computer program in an implantable neurostimulation device, identifying neural activity using EEG data, selecting the electrode channel closest to the target electrode placement, and configuring the electrodes using a pseudo-Laplace pattern, the neurological disease detection algorithm is trained to optimize the detection effect, and combined with a closed-loop system for electrical stimulation therapy.

Benefits of technology

This approach achieves improved accuracy and efficiency in seizure detection while reducing the number of electrodes, lowers power consumption, adapts to individual patients' seizure patterns, and optimizes neurostimulation therapy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116528749B_ABST
    Figure CN116528749B_ABST
Patent Text Reader

Abstract

The invention relates to a computer program for training a neural disease detection algorithm to be used for neural disease detection in an implantable neurostimulation device having a target electrode arrangement, the computer program comprising the steps of: a) inputting EEG data in a computer executing the computer program, the EEG data being recorded from at least one EEG of at least one patient using an electrode system having a plurality of electrode channels, b) identifying in the EEG data a neural activity corresponding to a neural disease based on a neural disease recognition label included in the EEG data and / or inputted in the computer, c) selecting in the EEG data a subset of electrode channels from the available electrode channels depending on c1) the identified neural activity and / or c2) characteristic data of the target electrode arrangement, d) training the neural disease detection algorithm by using only the EEG data of the selected subset of electrode channels.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This invention relates to a computer program for training a neurological disease detection algorithm, such as for detecting seizures in an implantable neurostimulation device with a target electrode arrangement. This computer program is also referred to as a training computer program. The invention also relates to a method of programming an implantable neurostimulation device using such a training computer program, and to a computer program in the form of a neurological disease detection algorithm or classifier for detecting neurological diseases from EEG data, which has been trained and / or is being trained by such a training computer program. This computer program is also referred to as a neurological disease detection computer program. The invention further relates to a neurostimulation device running such a neurological disease detection computer program. The invention also relates to a method for treating neurological diseases using a neurostimulation device running such a neurological disease detection computer program.

[0002] Despite advances in drug therapy, a significant proportion of epilepsy patients are resistant to anti-epileptic drugs. Since only a small fraction of these patients are surgical candidates, innovative treatment methods are needed. An alternative treatment concept for these patients involves applying electrical stimulation in the early stages of a seizure to interrupt its spread in the brain. This can be achieved using a closed-loop system, where brain activity is recorded via a set of electrodes, and the activity is continuously or intermittently monitored using a seizure detector that triggers electrical stimulation of the seizure zone (SOZ) via the same or different electrodes.

[0003] Therefore, there is a need for reliable and energy-efficient seizure detectors. The purpose of this invention is to provide a solution to this need.

[0004] An embodiment of the present invention is a computer program for training a neurological disease detection algorithm, which is to be used, for example, in the detection of epileptic seizures in an implantable neurostimulation device having a target electrode arrangement. The computer program includes the following steps:

[0005] a) Inputting EEG data into a computer executing a computer program, the EEG data being recorded by at least one invasive and / or non-invasive EEG from at least one patient using a recording electrode system with multiple electrode channels (e.g., using a 10-20 EEG electrode system or a 10-10 EEG electrode system or any other high-density EEG electrode system).

[0006] b) Based on neurological disease identification tags included in the EEG data and / or input from the computer, identify neural activities corresponding to neurological diseases in the EEG data.

[0007] c) In the EEG data, select a subgroup of electrode channels from the available electrode channels, depending on:

[0008] c1) identified neural activity and / or

[0009] c2) Characteristic data of the target electrode arrangement,

[0010] d) Train the neurological disease detection algorithm using only EEG data from a subgroup of selected electrode channels.

[0011] Neurological disorders identified by neural activity can include epileptic seizures, stroke, neuropathic pain, dementia, Parkinson's disease, tinnitus, aphasia, or any other specific neurological event. In the following text, the example of epileptic seizures is primarily used to describe the invention. However, this should also cover other types of neurological events.

[0012] This invention allows neurological disease detection algorithms to be optimally adapted to a "real" electrode configuration (i.e., the pattern of the target electrode arrangement). In this way, the neurological disease detection algorithm can be optimally adapted to the patient's individual neurological disease attack pattern and the individual EEG recording sites of the implanted electrodes, at which optimal detection of neural events can be expected. The target electrode arrangement may consist only of recording electrodes, which are used in a neurostimulation device to record EEG signals from the patient. Alternatively, the target electrode arrangement may consist only of stimulating electrodes, which are used in a neurostimulation device to output a stimulating signal to the patient. Another possibility is that the target electrode arrangement may include a combination of recording and stimulating electrodes. In some cases, one, more, or all of the electrodes in the target electrode arrangement may be used for both recording EEG signals and outputting stimulating signals, making them a combination of recording and stimulating electrodes.

[0013] Typically, the steps of a computer program are executed by a computer. However, the present invention also relates to a method that includes the steps described above and / or the following steps. The target electrode arrangement must be defined before running the training computer program. For example, characteristic data of the target electrode arrangement can be input or programmed into the training computer program. The characteristic data of the target electrodes can include the position, size, and / or configuration geometry of the electrodes in the target electrode arrangement. Typically, the EEG data used for training includes multiple measurements for each recording electrode channel and for each patient over time. Training the computer program may require some additional manual input, depending on the details of the EEG dataset included in the computer program. For example, the EEG data may have been labeled or annotated with information identifying the time and / or location of neurological disorders such as seizure activity. Furthermore, the information identifying the time and / or location of neurological disorders can be manually entered. In the training step, the neurological disorder detection algorithm performs detection of neural activity in the EEG data, and the detection results of the neurological disorder detection algorithm are compared with the labeled information during training. Based on the comparison results, the parameters of the neurological disorder detection algorithm are recursively optimized until a sufficient detection level is achieved.

[0014] According to an embodiment of the invention, the electrode channel closest to the location of the identified neural activity corresponding to the neurological disease is selected from the available electrode channels. This allows for optimal spatial correlation between the patient's expected neural activity and the electrode location of the target electrode arrangement.

[0015] According to an embodiment of the invention, an electrode channel with a geometric match closest to the target electrode arrangement is selected from the available electrode channels. In this way, the detection of neurological diseases using electrodes from the target electrode arrangement can be optimized to perform at a level comparable to that using a relatively complex 10-20 EEG electrode system or a 10-10 EEG electrode system, without requiring such a large number of target electrodes in the target electrode arrangement.

[0016] According to an embodiment of the invention, the electrodes of the target electrode arrangement are arranged in a pseudo-Laplacian pattern. This allows for highly localized EEG recording. The pseudo-Laplacian configuration significantly reduces artifacts and / or external signal noise from muscle activity or movement, thereby improving the detection of neurological diseases.

[0017] According to an embodiment of the invention, an electrode channel arranged in a pseudo-Laplace pattern is selected from the available electrode channels. This allows for a close match between the selected electrode channel and the target electrode arrangement pattern of the pseudo-Laplace pattern. In the pseudo-Laplace pattern, the selected electrode channel includes a central electrode and at least two circumferential electrodes surrounding the central electrode.

[0018] According to an embodiment of the present invention, step d) includes the following steps:

[0019] d1) Calculate a linear combination of EEG data for the selected subgroup of electrode channels, for example, calculate a linear combination representing a bipolar or quadrupole electrode channel.

[0020] d2) The neurological disease detection algorithm is trained by using a linear combination of the calculated EEG data.

[0021] In this way, additional virtual electrode channels can be generated through such computational steps. This allows for refinement of the spatial signal resolution of the electrode pattern without requiring additional hardware electrode channels.

[0022] According to an embodiment of the invention, exactly five electrode channels are selected from the available electrode channels. This allows for an optimal match between the selected electrode channels and a target electrode arrangement that also has five electrodes.

[0023] According to an embodiment of the present invention, the computer program includes at least two training cycles of a neurological disease detection algorithm:

[0024] e) In the first training cycle, general training of the neurological disease detection algorithm is completed using EEG data from one or more patients.

[0025] f) In the second training cycle, patient-specific training of the neurological disease detection algorithm is completed using only the EEG data of the patient to whom the neurological disease detection algorithm will be applied, and / or using the EEG data of other patients with similar neurological disease attack patterns to the patient to whom the neurological disease detection algorithm will be applied.

[0026] In this way, the training of neural disease detection algorithms can be further optimized and accelerated.

[0027] According to an embodiment of the invention, a computer program is configured to evaluate data tags assigned to EEG data, which is input into a computer executing the computer program. The data tags are used to select a subgroup of electrode channels from available electrode channels. The data tags may include information about the location of the electrode channels on the patient's head during clinical measurement of the EEG signal.

[0028] Another embodiment of the present invention is a method for programming an implantable neurostimulation device, the method comprising the following steps:

[0029] g) Run the aforementioned type of training computer program on a computer.

[0030] h) Programming a neurological disease detection algorithm trained by a computer program into an implantable neurostimulation device.

[0031] In this way, the same advantages mentioned earlier can be achieved. Furthermore, for training purposes, a different computer can be used than the one used in the implanted neurostimulation device. This allows for the use of a more powerful computer to run the training computer program, saving a significant amount of time.

[0032] According to embodiments of the present invention, the implantable neurostimulation device is a closed-loop neurostimulator, which is arranged to record EEG signals, calculate stimulation signals based on the recorded EEG signals, and output stimulation signals. In this manner, neurostimulation therapy can be optimized and specifically tailored to the needs of individual patients. The stimulation signal is emitted via electrodes arranged with a target electrode. The same electrodes arranged with the target electrode can be used to record EEG signals. Alternatively, different electrodes (e.g., electrodes specifically optimized for EEG signal recording and electrodes specifically optimized for signal output) can be used to record EEG signals and output stimulation signals.

[0033] According to embodiments of the invention, the electrodes of the target electrode arrangement are arranged in a pseudo-Laplace configuration. This allows for optimal stimulation success when the electrodes are used for nerve stimulation. The pseudo-Laplace pattern enables deep stimulation to be delivered to the patient even if the electrode pattern is flat. For example, the electrodes may include a central electrode surrounded by at least two stimulating electrodes. A greater number of stimulating electrodes, such as four, may also be present around the central electrode.

[0034] According to an embodiment of the present invention, in step g), the computer program runs on an external computer that is not part of the implantable neurostimulation device.

[0035] Another embodiment of the present invention is a computer program in the form of a neurological disease detection algorithm or classifier for detecting neurological diseases based on EEG data. The neurological disease detection algorithm or classifier has been trained and / or is being trained by a training computer program of the aforementioned type. The computer program can be configured to be implemented on a microcontroller, a digital signal processor (DSP), a field-programmable gate array (FPGA), or an application-specific integrated circuit (ASIC). According to an embodiment of the present invention, the computer program is optimized to achieve the lowest power consumption. According to another embodiment of the present invention, the computer program is optimized to achieve the highest performance. According to another embodiment of the present invention, the computer program is optimized to achieve the lowest power consumption under defined performance constraints. According to another embodiment of the present invention, the computer program is optimized to achieve the highest performance under defined power constraints.

[0036] According to embodiments of the present invention, the neurological disease detection algorithm or classifier used to detect neurological diseases is an artificial intelligence algorithm, such as random forest, support vector machine, multilayer perceptron, convolutional neural network, recurrent neural network (e.g., long short-term memory network, or attention-based network). This allows the neurological disease detection algorithm to be easily and optimally adapted to typical neurological disease attack patterns occurring in real patients.

[0037] The computer can be located in the cloud (a server-type computer) or can be any commercially available computer, such as a PC, laptop, notebook, tablet, or smartphone, or a microprocessor, microcontroller, DSP, or FPGA, or a combination of these components. The computer program can be stored on a non-transitory computer-readable medium.

[0038] Regarding the aforementioned closed-loop control, the difference between closed-loop and open-loop control lies in the fact that closed-loop control has feedback or reversion of measured values ​​or internal values. This feedback, in the sense of the closed-loop control circuit, influences the output value generated by the closed-loop control. In a closed-loop control system, only variables are controlled in the absence of such feedback or reversion.

[0039] Other exemplary embodiments of the invention are described using the following figures, in which:

[0040] Figure 1 A patient with an implanted neurostimulation device is shown.

[0041] Figure 2 Details of the implanted neurostimulation device are shown.

[0042] Figure 3 Example results of automatic electrode selection using the first method are shown.

[0043] Figure 4 An example result of automatic electrode selection using the second method is shown.

[0044] Figure 1 A neurostimulation system implanted in a patient is shown. The system includes an implantable neurostimulation device 1 connected to a target electrode arrangement 2 via an electrical lead 12. The target electrode arrangement 2 can be placed outside the patient's skull, under the scalp.

[0045] Figure 1An external computer 13 and a patient controller 11, which is another external device, are also shown. Both the computer 13 and the patient controller 11 can communicate wirelessly with the implantable neurostimulation device 1. For example, the computer 13 can be used as a clinical system by a physician, such as for programming the implantable neurostimulation device 1. The patient controller 11 can be used by the patient to check the status of the implantable neurostimulation device 1 or to activate specific stimulation patterns. The patient controller 11 can also be used as a recorder to record seizure events or other events input by the patient or transmitted from the implantable neurostimulation device 1. The patient controller 11 can also be used as an alarm system that provides tactile and / or optical and / or acoustic feedback to the patient in the event of a neurological event. The computer 13 can also be used to run the training computer program of the present invention to train the neurological disease detection algorithm. The computer 13 can also be used to program the trained neurological disease detection algorithm into the implantable neurostimulation device 1.

[0046] Figure 2 Further details of the implantable neurostimulation device 1 and the target stimulation and / or recording electrode arrangement 2, represented as a block diagram similar to a circuit diagram, are shown. The neurostimulation device 1 includes a control processor 6, a signal generation circuit 3, a charge balancing circuit 4, a protection circuit 5, sensors 7 and 8, a battery pack 9, and a user input element 10. The neurostimulation device 1 is connected to the electrode arrangement 2 via a cable 12. It can be seen that the electrode arrangement 2 includes a central electrode 20 and four stimulation electrodes 21, 22, 23, and 24 located around the central electrode 20. The central electrode 20 may be a common ground electrode, meaning that the central electrode 20 is connected to the common ground of the neurostimulation device (its corresponding neurostimulation device 1).

[0047] The control processor 6 may be a microcontroller unit (MCU) or any other unit that can execute control steps via the processing of a computer program (e.g., in the form of a hardware program, firmware program, or software program).

[0048] The signal generation circuit 3 is capable of generating stimulation pulses and delivering them to the stimulation electrodes 21, 22, 23, and 24 according to commands from the control processor 6. The signal generation circuit 3 may include an amplifier component.

[0049] The control processor 6 can detect neural signals and / or brain activity via sensors 7 and 8. It can process the detected neural signals and / or brain activity and use them to deliver event-driven stimulation pulses to any of the stimulation electrodes 21, 22, 23, and 24.

[0050] Battery pack 9 provides electrical energy to the aforementioned components of the power unit. Battery pack 9 may include a rechargeable battery.

[0051] Control processor 6 is configured to execute a trained neurological disease detection algorithm. The training of the neurological disease detection algorithm is performed on computer 13, which will be described below.

[0052] Neurological disease detection algorithms for such systems must be trained using recordings from configurations similar to those of subgaleal electrodes. Due to the high similarity between EEG data from subcutaneous and near-scalp electrodes in patients with neocortical epilepsy, this invention uses surface EEG recordings obtained from electrode configurations representing implanted subgaleal electrodes to train and evaluate the neurological disease detection algorithm. This approach can be used to pre-train individualized detectors using scalp-based neurological disease recordings prior to device implantation.

[0053] Electrode selection can be performed during long-term video EEG monitoring of neurological diseases to indicate a target electrode arrangement. Epilepsy specialists can define the seizure zone (SOZ) by visually probing the seizure electrodes and considering the interelectrode distances. The method proposed in this invention considers... Figure 1 The geometry of the system shown automates electrode selection and ensures optimal electrode placement for simulating subgastric galea recording electrodes. Next, a neurological disease detection algorithm is needed that performs well with a reduced number of electrodes within a limited spatial coverage area and with low power consumption. This would allow for the integration of neurological disease detectors into fully implantable interventional devices. Several publications have been published on the development of neurological disease detection algorithms for both offline and online applications. However, the number of studies considering the limitations of closed-loop applications is limited.

[0054] In the system of this invention, after developing and implementing two automatic electrode selection methods, four energy-efficient neurological disease detection algorithms were designed and implemented using random forest (RF) classifiers, support vector machines (SVM), multilayer perceptrons (MLP), and convolutional neural networks (CNN). These algorithms can reliably perform to detect focal-onset seizures using a reduced electrode set. Finally, the detection performance of these four energy-efficient neurological disease detection algorithms was compared to evaluate their suitability for implantable devices.

[0055] The EEG dataset used for training consisted of surface EEG recordings of a total of 358 seizures from 50 patients. Patients were selected, and in addition to a conventional 10-20 electrode layout, the SOZ was covered by electrodes positioned according to a 10-10 system. EEG data were recorded at a sampling rate of 250 Hz on a 256-channel DC amplifier with a resolution of 24 bits. Electrodes were rereferenced to center-positioned electrodes. A low-pass filter with a cutoff frequency of 100 Hz was applied for anti-aliasing. EEG data from ten patients were used to train a hybrid model for the CNN. Therefore, to maintain consistency of the test dataset across all classifiers, a total of 286 seizures from the remaining 40 patients were used to evaluate the classifiers.

[0056] To improve data quality and remove artifact-contaminated data, the data was first filtered using a Chebyshev II bandpass filter (order: 10, bandstop = 40 dB) with a low cutoff frequency of 0.1 Hz and a high cutoff frequency of 48 Hz. Next, very high amplitudes representing artifacts were removed from the analysis.

[0057] Perform electrode selection to obtain an electrode set that has a lower mapping value than the electrode set. Figure 1 The design threshold of the implantable system shown represents the maximum number of electrodes that can cover the seizure zone (SOZ). To this end, for each seizure, an epilepsy specialist determines a list of electrodes believed to cover the SOZ. Subsequently, based on this list, a minimum electrode set including all seizure electrodes is determined. If the size of this electrode set is smaller than the number of implanted electrodes (n=5), then electrodes from the remaining seizure electrodes most frequently involved in the seizures are added to the electrode set. Through this process, a list of five electrodes most likely to capture all seizures is established for each patient.

[0058] Method 1

[0059] In this method, firstly, the average of the coordinates of the five selected electrodes is calculated, and the scalp electrode closest to that location is found. This electrode is considered the center electrode. Any of the five selected electrodes whose distance from the center electrode is greater than a threshold distance is excluded from the list. Figure 3 This can be visualized as drawing a sphere with a threshold radius centered at the selected central electrode and checking if other selected electrodes are located within that sphere. The filtered electrodes now consist of the central electrode and adjacent seizure electrodes. The remaining electrodes with the smallest distance from the central electrode replace those removed from the list of five electrodes.

[0060] Method 2

[0061] In this method, at each step, an electrode is selected as the central electrode, and similar to Method 1, the number of electrodes in the initial SOZ whose distance from the central electrode is less than a threshold distance is counted. This process is repeated for all EEG electrode locations on the scalp, and a list of the initial SOZ electrodes attached to each selected electrode is generated. The electrode containing the largest number of initial SOZ electrodes is selected as the optimal central electrode. If necessary, electrodes with the smallest distance from the central electrode are added to the list to produce exactly five electrodes for seizure detection.

[0062] Several features in the time and frequency domains were selected for seizure detection. Time-domain features included mean, maximum, mean absolute deviation, variance, skewness, kurtosis, line length, autocorrelation, and entropy. Frequency-domain features included the mean, maximum, and variance of the power spectrum; power in the θ band (4 Hz to 8 Hz), β band (13 Hz to 30 Hz), and γ band (30 Hz to 45 Hz); spectral entropy; and the epileptogenicity index. These features were used for classification using random forest, SVM, and MLP classifiers. For SVM and MLP, features were scaled for classification because the range of the computed features affected the weights of the SVM and MLP, as well as the subsequent decision boundary.

[0063] 1) Random Forest

[0064] Set the number of binary decision trees to 100. Choose the entropy, a measure of impurity, as the branching index. Randomly select four features at each node. To keep the tree size finite, limit the maximum tree depth to 10. Use bootstrap samples during decision tree construction. Adjust the sample weights for each class inversely proportional to the class frequency in the input data. Use a leave-one-out method for cross-validation.

[0065] 2) Support Vector Machine (SVM)

[0066] A Gaussian radial basis function (RBF) is chosen as the kernel function to handle the non-linearity between features and class labels. Two hyperparameters are set for this: the kernel coefficient of the Gaussian function is set to 0.01, and the penalty parameter for the error term (which manifests as the SVM's regularization parameter) is set to 0.1. The sample weights for each class are adjusted so that they are inversely proportional to the class frequency in the input data. A leave-one-out method is used for cross-validation.

[0067] 3) Multilayer Perceptron (MLP)

[0068] An MLP network consists of at least three layers: an input layer, one or more hidden layers, and an output layer. An MLP classifier with one hidden layer containing 20 neurons was implemented. Adam was chosen as the solver for weight optimization. A logistic sigmoid function was chosen as the activation function, and an adaptive learning rate was selected to schedule weight updates. The L2 penalty (regularization term) parameter was set to 10⁻⁴. Leave-one-out cross-validation was used.

[0069] 4) Convolutional Neural Network (CNN)

[0070] A CNN consists of an input layer, multiple hidden layers, and an output layer. The hidden layers include convolutional layers, pooling layers, and fully connected layers. The proposed CNN architecture is shown in Table I. In the first layer, to effectively learn spatiotemporal patterns, a kernel size expanded across all channels and the detection time window (2 seconds = 500 data points) is used. In all hidden layers, batch normalization is used after convolution, and Rectified Linear Units (ReLU) are used as the activation function. Dropout regularization is applied during training to reduce overfitting. In the last two layers, two fully connected layers are used.

[0071] The following table shows the preferred architecture of our proposed CNN:

[0072]

[0073] For training, due to the limited available data for each patient, a transfer learning approach was used, which included freezing the lower layers of the model and training only the top layers. Therefore, the network was pre-trained using data from 10 patients, and then fine-tuned for each of the remaining 40 patients using patient-specific data for the final convolutional layers and two fully connected layers. Because the classes were imbalanced, class indices were weighted during training to balance the weights of the loss function. Each model was trained with a batch size of 512 for 500 epochs. For weight optimization, an Adam solver with a learning rate of 10⁻³ was used. Binary cross-entropy was used as the loss function. For evaluation, triple cross-validation was used.

Claims

1. A computer program product comprising a computer program for training a neurological disease detection algorithm for detecting neurological diseases in an implantable neurostimulation device having a target electrode arrangement having five electrodes arranged in a pseudo-Laplace pattern, the pseudo-Laplace pattern having a central electrode and four stimulation electrodes surrounding the central electrode, the computer program comprising the following steps: a) Inputting EEG data into a computer executing the computer program, the EEG data being recorded from at least one EEG from at least one patient using a 10-20 EEG electrode system or a 10-10 EEG electrode system or any other high-density EEG electrode system. b) Based on the neurological disease identification tags included in the EEG data and / or input into the computer, identify the neural activities corresponding to the neurological disease in the EEG data. c) From the EEG data, select a subgroup of five electrode channels from the available electrode channels, depending on: i) the identified neural activities and ii) Feature data of the target electrode arrangement, Specifically, electrode selection is performed to obtain an electrode group having a maximum number of electrodes covering the seizure region with an inter-electrode distance below a threshold designed for a pseudo-Laplace pattern mapped to the implanted system. in, c21) Calculate the average of the coordinates of the five selected electrodes, and find the scalp electrode closest to the position corresponding to the calculated average, wherein the electrode is considered the center electrode, and exclude any of the five selected electrodes whose distance from the center electrode is greater than a threshold distance from the list, or c22) Select each of all EEG electrodes on the scalp as the central electrode, and count the number of electrodes in the initial seizure region that are less than the threshold distance from the central electrode; generate a list of initial seizure region electrodes to which each selected electrode is attached; select the electrode containing the largest number of initial seizure region electrodes as the central electrode; add the electrode with the smallest distance from the central electrode to the list to produce exactly five electrodes for seizure detection. d) Train the neurological disease detection algorithm using only EEG data from a subgroup of selected electrode channels.

2. The computer program product according to claim 1, wherein, Select the electrode channel from the available electrode channels that is closest to the location of the identified neural activity corresponding to the neurological disease.

3. The computer program product according to claim 1, wherein, Select from the available electrode channels an electrode channel that has the closest geometric match to the electrode arrangement of the target electrode.

4. The computer program product according to any one of claims 1 to 3, wherein, Step d) includes the following steps: d1) Calculate the linear combination of EEG data for the subgroup of the selected electrode channels. d2) The neurological disease detection algorithm is trained by using a linear combination of the calculated EEG data.

5. The computer program product according to any one of claims 1 to 3, wherein, Step d) includes the following steps: d1) Calculate the linear combination representing the bipolar or quadrupole electrode channels. d2) The neurological disease detection algorithm is trained by using a linear combination of the calculated EEG data.

6. The computer program product according to any one of claims 1 to 3, wherein, The neurological disease detection algorithm is an artificial intelligence algorithm.

7. The computer program product according to claim 6, wherein, The artificial intelligence algorithms include random forest, support vector machine, multilayer perceptron, convolutional neural network, and long short-term memory network.

8. The computer program product according to any one of claims 1 to 3, wherein, The computer program includes at least two training cycles of the neurological disease detection algorithm: e) In the first training cycle, the general training of the neurological disease detection algorithm is completed using EEG data from one or more patients. f) In the second training cycle, the neurological disease detection algorithm is trained in a patient-specific manner using only the EEG data of the patient to whom the neurological disease detection algorithm will be applied and / or using the EEG data of other patients with similar neurological disease attack patterns to the patient to whom the neurological disease detection algorithm will be applied.

9. The computer program product according to any one of claims 1 to 3, wherein, The computer program is configured to evaluate data tags assigned to the EEG data, which is input into the computer executing the computer program, wherein the data tags are used to select a subgroup of the electrode channels from the available electrode channels.

10. A method for programming an implantable neurostimulation device, the method comprising the following steps: g) Running the computer program included in the computer program product according to any one of claims 1 to 9 on a computer. h) The neurological disease detection algorithm trained by the computer program is programmed into the implantable neurostimulation device.

11. The method according to claim 10, wherein, The implantable neurostimulation device is a closed-loop neurostimulator, which is arranged to record EEG signals, calculate stimulation signals based on the recorded EEG signals, and output the stimulation signals.

12. The method according to claim 10 or 11, wherein, In step g), the computer program runs on an external computer that is not part of the implanted neurostimulation device.

13. A computer program product comprising a computer program in the form of a neurological disease detection algorithm for detecting neurological diseases based on EEG data, said neurological disease detection algorithm having been trained by or being trained by the computer program included in the computer program product according to any one of claims 1 to 9.

14. The computer program product according to claim 13, wherein, The computer program is configured to be implemented on a microcontroller.

15. The computer program product according to claim 13 or 14, wherein, The computer program is optimized to achieve the lowest power consumption.

16. The computer program product according to claim 13 or 14, wherein, The neurological disease detection algorithm used to detect neurological diseases is an artificial intelligence algorithm.

17. The computer program product according to claim 16, wherein, The artificial intelligence algorithms include random forest, support vector machine, multilayer perceptron, convolutional neural network, and long short-term memory network.

18. An implantable neurostimulation device for running a computer program included in a computer program product according to any one of claims 13 to 17.