An individualized classification method and system of seizure types based on hyper-dimensional computing
Through the hyperdimensional computing and channel embedding initialization module Chembed, a hyperdimensional vector is constructed, which solves the problem that individual differences are not taken into account in existing technologies, realizes efficient epileptic seizure type classification on real-time wearable devices, and supports personalized treatment.
Patent Information
- Application Number
- CN202411183359.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2044-08-27
AI Technical Summary
Existing methods for classifying epileptic seizure types fail to effectively consider individual differences, resulting in decreased classification accuracy and difficulty in application on real-time wearable devices. In addition, existing deep learning methods suffer from insufficient data volume.
A personalized epileptic seizure type classification method based on hyperdimensional computing was adopted. By constructing a hyperdimensional vector, combining channel basis vectors and eigenvectors, and using the patient's own partial seizure data to train the model, the subsequent seizure type was judged. A channel-embedded hyperdimensional basis vector initialization module, Chembed, was designed, taking into account the physiological structure of the brain and the electrode layout.
It improves the accuracy and efficiency of epileptic seizure type classification, is suitable for embedded devices, supports customized treatment, and enhances the ability to learn individual features under limited data.
Smart Images

Figure CN119157489B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of epileptic seizure type classification, and in particular to a method and system for classifying individualized patient epileptic seizure types based on hyperdimensional computing. Background Art
[0002] Epilepsy is a chronic neurological disease characterized by recurrent seizures. Epileptic seizures are caused by abnormal discharges of neurons in the brain, which prevents the central nervous system from maintaining a balance between excitation and inhibition of brain neurons, leading to transient functional impairments in the brain. To ensure that patients receive the best treatment, in addition to whether epilepsy is detected, it is crucial to correctly classify the type of epilepsy for each patient. This can help doctors predict the course of epileptic seizures, locate epileptic foci, and thus provide the most accurate epilepsy treatment. Due to the huge individual differences between epilepsy patients, it is urgent to classify individualized epileptic seizure types. Existing classifications of epilepsy seizure types often ignore the individual differences in epilepsy and often use deep learning methods to classify epileptic seizures. However, for individual patients, the amount of data is insufficient to support deep learning, so the accuracy of classification will also decrease, which is not conducive to doctors making customized treatments for the patient's specific condition.
[0003] In recent years, automated epilepsy detection algorithms based on electroencephalograms (EEGs) have emerged in large numbers. Deep learning-based convolutional neural networks and recurrent neural networks have achieved promising results in epilepsy detection. With the application of attention mechanisms, detection results have also improved. However, deep learning-based epilepsy detection algorithms often consume high power, making them difficult to apply to real-time epilepsy detection on wearable devices. A major challenge in real-time epilepsy detection on wearable devices is designing efficient frameworks that can improve recognition reliability while meeting the strict computational, memory, and power constraints of real-time embedded platforms. Furthermore, epilepsy detection is difficult because epileptic seizures are highly individualized and have diverse types. Therefore, multi-seizure type classification is crucial in epilepsy research, enabling personalized treatment plans and better seizure control. Grouping patients according to seizure type facilitates the selection of appropriate treatments and helps understand the mechanisms and characteristics of different seizure types, facilitating the development of targeted interventions. Summary of the Invention
[0004] In order to solve the problem of epileptic seizure type classification, especially the problem of personalized patient epileptic seizure type classification, that is, how to use the patient's own existing partial seizure data training model to determine the type of subsequent seizures of the patient, the present invention proposes a personalized epileptic seizure type classification method and system based on hyperdimensional computing.
[0005] The technical solution adopted by the present invention is as follows, comprising the following steps:
[0006] A method for individualized epileptic seizure type classification based on hyperdimensional computing, comprising:
[0007] Acquire multi-channel EEG signals of a patient to be classified during an epileptic seizure, and construct a hyperdimensional vector representing the patient to be classified; wherein the hyperdimensional vector is composed of channel basis vectors and eigenvectors of some channels in the multi-channel EEG signals, and the similarity between the channel basis vectors represents the physical relative position distance between the corresponding channels;
[0008] Calculating the similarity between the hyperdimensional vector representing the patient to be classified and the prototype vectors of each type of epileptic seizure, and determining the epileptic seizure type corresponding to the prototype vector with the highest similarity to the hyperdimensional vector representing the patient to be classified as the seizure type of the patient to be classified;
[0009] The prototype vectors of each type of epileptic seizure are constructed and obtained using a trainer based on a data set; the data set contains hyperdimensional vectors corresponding to multi-channel EEG signals during each historical epileptic seizure.
[0010] Furthermore, the channel basis vector is a binary super-dimensional vector.
[0011] Furthermore, the channel basis vector is constructed by the following method:
[0012] Combining the two-dimensional matrix, the propagation characteristics of EEG signals and the hemispheric characteristics of the brain, all channels used in multi-channel EEG signal acquisition are grouped, where the signal has high channel similarity within a group and low channel similarity between groups;
[0013] For the first channel of each group, a randomly initialized binary superdimensional vector is constructed as the corresponding channel basis vector. Then, each group flips numflips digits based on the channel basis vector of the previous channel in turn according to the distance to construct all channel basis vectors.
[0014] Further, the groups are divided into the following 5 groups:
[0015] (1) Left group from left frontal pole Fp1 to left occipital pole O1: ‘FP1-F7’, ‘F7-T3’, ‘T3-T5’, ‘T5-O1’;
[0016] (2) right-sided group from right frontal pole Fp to right occipital O2: ‘FP2-F8’, ‘F8-T4’, ‘T4-T6’, ‘T6-O2’;
[0017] (3) left central group from left frontal pole Fp1 to left occipital O1: ‘FP1-F3’, ‘F3-C3’, ‘C3-P3’, ‘P3-O1’;
[0018] (4) right central group from right frontal pole Fp2 to right occipital O2: ‘FP2-F4’, ‘F4-C4’, ‘C4-P4’, ‘P4-O2’;
[0019] (5) The central group passing through the left middle temporal T3, the left central C3, the central point Cz, the right central C4, and the right middle temporal T4: ‘T3-C3’, ‘C3-CZ’, ‘CZ-C4’, and ‘C4-T4’.
[0020] Furthermore, the channel basis vector is constructed by the following method:
[0021] Combining the two-dimensional matrix, the propagation characteristics of EEG signals, and the hemispheric characteristics of the brain, all channels used in multi-channel EEG signal acquisition are divided into five groups:
[0022] (1) Left group from left frontal pole Fp1 to left occipital pole O1: ‘FP1-F7’, ‘F7-T3’, ‘T3-T5’, ‘T5-O1’;
[0023] (2) right-sided group from right frontal pole Fp to right occipital O2: ‘FP2-F8’, ‘F8-T4’, ‘T4-T6’, ‘T6-O2’;
[0024] (3) left central group from left frontal pole Fp1 to left occipital O1: ‘FP1-F3’, ‘F3-C3’, ‘C3-P3’, ‘P3-O1’;
[0025] (4) right central group from right frontal pole Fp2 to right occipital O2: ‘FP2-F4’, ‘F4-C4’, ‘C4-P4’, ‘P4-O2’;
[0026] (5) central group passing through left middle temporal T3, left central C3, central point Cz, right central C4, and right middle temporal T4: ‘T3-C3’, ‘C3-CZ’, ‘CZ-C4’, ‘C4-T4’;
[0027] The first channels of the left group, right group and central group are randomly initialized as the first vectors of their corresponding groups; the first channels of the left central group and the right central group are respectively obtained by adding the channel basis vectors of the m channels closest to them, and then normalizing the sum vector by the majority voting threshold method to obtain the corresponding channel basis vector; if m is an even number, an additional super-dimensional vector is randomly generated and added to the channel basis vectors of the m channels as the final sum vector.
[0028] Furthermore, the numflips formula is as follows:
[0029] numflips=(HD_dim / α / (numch / group-1))
[0030] α indicates that the group only flips the 1 / α digits of the channel basis vector of the first channel, HD_dim refers to the dimension of the hyperdimensional vector, numch refers to the total number of channels, and group refers to the number of channel groups.
[0031] Furthermore, the feature vector is composed of a feature position vector and an eigenvalue vector, wherein the feature position vector is used to encode the position information of the corresponding feature in the feature vector, and the eigenvalue vector is a hyperdimensional vector constructed based on the eigenvalue of the EEG signal of the corresponding channel.
[0032] Furthermore, the feature vector is constructed based on the number of feature peaks of each channel of the multi-channel EEG signal.
[0033] Furthermore, before extracting the peak number of the EEG signal of each channel, the method further includes performing line thinning processing on the EEG signal of the channel.
[0034] Furthermore, the trainer consists of an accumulator and a judge. The accumulator adds the super-dimensional vectors of data samples belonging to the same class to their corresponding class vectors according to different attack types. After all the data are accumulated, the judge normalizes the total class vector obtained for each type, and the super-dimensional vector finally obtained is the prototype vector of each type.
[0035] A personalized epileptic seizure type classification system based on hyperdimensional computing, used to implement the personalized epileptic seizure type classification method based on hyperdimensional computing, comprising:
[0036] A data acquisition and preprocessing module acquires multi-channel EEG signals of the patient to be classified during an epileptic seizure and constructs a hyperdimensional vector representing the patient to be classified; wherein the hyperdimensional vector is composed of a channel basis vector and a eigenvector of each channel in the multi-channel EEG signal, the channel basis vector is a binary hyperdimensional vector, and the similarity between the channel basis vectors represents the physical relative position distance between the corresponding channels;
[0037] A classification module calculates the similarity between the hyperdimensional vector representing the patient to be classified and the prototype vectors of each type of epileptic seizure, and determines the epileptic seizure type corresponding to the prototype vector with the highest similarity to the hyperdimensional vector representing the patient to be classified as the seizure type of the patient to be classified; wherein the prototype vectors of each type of epileptic seizure are constructed and obtained using a trainer based on a data set; the data set contains several hyperdimensional vectors corresponding to epileptic seizure types.
[0038] A storage medium containing computer-executable instructions, which, when executed by a computer processor, implement the individualized epileptic seizure type classification method based on hyperdimensional computing.
[0039] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of a method for individualized epileptic seizure type classification based on hyperdimensional computing.
[0040] Compared with the existing technology, the advantages and effects of the present invention are:
[0041] (1) A personalized epileptic seizure type classification method based on hyperdimensional computing was proposed. This was the first study to investigate the use of epileptic seizure classification for individual patients. Hyperdimensional computing, which is highly applicable on embedded devices, was used to classify epileptic seizure types, which can help doctors provide customized treatment for patients.
[0042] (2) A new feature for classifying epileptic seizure types was designed: the DPP feature. In addition to significantly improving the classification accuracy in hyperdimensional computing models, the newly proposed feature can also improve the classification accuracy of common machine learning classifiers such as support vector machines and LightGBM.
[0043] (3) An initialization module Chembed based on the channel embedding hyperdimensional basis vector was designed. It combined the physiological position of the actual channel and embedded the physiological position characteristics into the hyperdimensional vector, effectively improving the classification accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 This is a flow chart of an epilepsy classification method according to an embodiment of the present invention;
[0045] Figure 2 This is an EEG segment image after preprocessing according to an embodiment of the present invention;
[0046] Figure 3 This is a schematic diagram of an EEG topological mapping method according to an embodiment of the present invention;
[0047] Figure 4 Schematic diagram of a method for generating channel basis vectors according to an embodiment of the present invention;
[0048] Figure 5 Schematic diagram of the DPP feature extraction process according to an embodiment of the present invention; DETAILED DESCRIPTION
[0049] Hyperdimensional computing (HD) is a computational framework based on randomly distributed representations, inspired by neuroscience. It enhances the symbolic and neural nature of computation by representing data in high-dimensional spaces. HD utilizes hyperdimensional vectors, typically exceeding 10,000 dimensions, to represent data. This not only improves the robustness and flexibility of data representation but also enables efficient computation of similarities between data. In recent years, HD has attracted significant interest in many fields, particularly in the biomedical field, where it has been applied to electrocardiogram (ECG) and electroencephalogram (EEG) error-correlated point detection, gesture recognition, and electromyography (EMG), offering a promising alternative to machine learning.
[0050] Although hyperdimensional computing has achieved remarkable results in epileptic seizure detection, existing research has mainly focused on distinguishing between epileptic seizures and non-seizure states, but has failed to fully consider the diversity and individual characteristics of epileptic seizure types. In particular, how to use only a small portion of each patient's data for training and effectively identify multiple types of epileptic seizures. The present invention aims to fill this gap and designs a channel embedding-based hyperdimensional vector initialization module (Chembed). This module uses a sophisticated channel basis vector initialization strategy, taking into account the three-dimensional ellipsoid shape of the brain and the physical layout of the electrodes, to successfully map the physiological structure of the brain and the physical distance of the electrodes into a similarity representation in the hyperdimensional space, allowing the characteristics of brain signal propagation and the inherent properties of the cerebral hemispheres to be captured. At the same time, combined with a carefully designed group flipping strategy, the model is able to learn more detailed and individualized epileptic seizure characteristics on a limited data set. This innovation provides a new perspective for the development of customized treatment strategies. It embeds novel elements in the existing technology system, while promoting the exploration of the field of epilepsy research and providing patients with more diverse treatment options.
[0051] The present invention will be further described below with reference to the accompanying drawings, including the basic principles, main features and advantages of the present invention. The following examples are intended to illustrate the present invention but are not intended to limit the scope of the present invention. The present invention may be subjected to various changes and modifications, all of which fall within the scope of protection of the present invention.
[0052] A specific embodiment of the present invention discloses a method for individualized epileptic seizure type classification based on hyperdimensional computing. The present invention constructs a channel basis vector that combines the physiological position of the actual channel, embeds the physiological position characteristics into the hyperdimensional vector representing the patient to be classified, and then judges the epileptic seizure type based on the similarity with various prototype vectors, such as Figure 1 As shown in the flowchart, it mainly includes two parts: the construction of various prototype vectors and the actual judgment of individualized epileptic seizure types based on various prototype vectors, as follows:
[0053] The construction of various prototype vectors includes the following steps:
[0054] 1. Data acquisition: constructing a dataset containing several hyperdimensional vectors corresponding to epileptic seizure types; specifically, the following sub-steps are included:
[0055] 1.1 Obtaining the sample set:
[0056] The Temple University Seizure Data Corpus (TUSZ), a publicly available dataset containing annotations of epileptic seizure types, is the Temple University Seizure Data Corpus (TUSZ). TUSZ is the only open-source EEG dataset with annotations for multiple seizure types. It contains over 30,000 clinical scalp EEG recordings collected since 2002 from ambulatory care units, intensive care units, emergency management units, emergency departments, and other various hospital centers. The raw EEG signals are multi-channel recordings, with the number of channels ranging from 20 to 128. The data were digitized using a 16-bit A / D converter, and the sample frequency range was from 250 Hz to 1024 Hz. The annotation team classified various seizure types based on EEG reports and preliminary analysis. Eight seizure types were annotated, and the list of seizure type labels is shown in Table 1. Due to the lack of the myoclonic seizure type (MYSZ) in the dataset, it was excluded from the seizure type selection in this example. A total of 55 patients with multiple seizure types were included in the data, with each patient having between two and five seizure types. The present invention uses this publicly available dataset to obtain the EEG signals and corresponding epileptic seizure labels of each epileptic seizure from these 55 patients and uses this as a sample set.
[0057] Table 1 Seizure type label list
[0058]
[0059]
[0060] 1.2 Sample set data preprocessing, including:
[0061] (1) Data resampling: The sampling frequencies of all EEG data in the TUSZ dataset are not the same, and include different sampling frequencies from 250 Hz to 1028 Hz. The data are uniformly resampled to 250 Hz.
[0062] (2) Use of montage: Montage refers to the rational and orderly arrangement of EEG channels. These channels are created to show the activity of the entire head and provide information on lateralization and localization. Common montages include unipolar montage and bipolar montage. The TUSZ dataset uses the 10-20 international standardized electrode placement method. The 10-20 system electrode placement method is the standard electrode placement method specified by the International Electroencephalography Association. The distance from the midpoint of the frontal pole to the root of the nose and the distance from the occipital point to the external occipital protuberance each account for 10% of the total length of this connection, and the remaining points are separated by 20% of the total length of this connection. Therefore, it is named the 10-20 system. This dataset adopts two different montage recording methods. Montage is a differential view of the data, providing the difference voltage between the electrode and the reference node. Average reference and linked ear reference are two different unipolar montages used in EEG recording. Average reference uses the average value of a certain number of electrodes as a reference, and linked ear reference uses a leading adapter to link the left and right ears. However, in the actual selection process, bipolar montage is often used because bipolar montage can reduce noise. Experiments have found that TCP is the most effective montage. Therefore, in the invention, the following is selected: Figure 3 The 20-lead bipolar montage shown are: 'FP1-F7', 'F7-T3', 'T3-T5', 'T5-O1', 'FP2-F8', 'F8-T4', 'T4-T6', 'T6-O2', 'T3-C3', 'C3-CZ', 'CZ-C4', 'C4-T4', 'FP1-F3', 'F3-C3', 'C3-P3', 'P3-O1', 'FP2-F4', 'F4-C4', 'C4-P4', 'P4-O2'. FP1, F7, T3, etc. represent standard EEG electrodes on the 10-20 system. The form similar to 'FP1-F7' represents the subtraction of the EEG data of two electrodes connected by '-'. The EEG electrodes obtained by subtraction are used as the EEG electrodes (channels) of the bipolar montage.
[0063] (3) Data slicing: Clipping training, also known as window method, is an important data preprocessing method that aims to generate more samples and improve the classification performance of the classifier. In the present invention, each seizure segment in the acquired sample set is sliced into 2s non-overlapping data segments. The 2s data size is selected based on the commonly used selection method in historical literature. The preprocessed EEG data is as follows Figure 2 shown.
[0064] 1.3 Training set and test set division
[0065] The present invention is directed to personalized epileptic seizure type classification. Therefore, the division of training sets and test sets is based on individual patients. For individualized patients, hyperdimensional computing can capture the characteristics of the signal through a small number of calculations. Therefore, only one seizure type from each patient needs to be selected as training. Specifically, hyperdimensional computing can obtain EEG seizure type data features from a small number of learnings, and randomly select one piece of data for each seizure type of each patient, slice the data as the training set, and slice the remaining seizure data segments as the test set data. This is to prevent the data in the training set from appearing in the test set and affecting the experimental classification results.
[0066] 1.4 Constructing a corresponding hyperdimensional vector based on each episode data segment slice, specifically including the following sub-steps:
[0067] 1.4.1 Constructing channel basis vectors
[0068] This is the highlight of this invention. The brain is a three-dimensional ellipsoid. Although the 10-20 electrodes clearly define the physical distance between electrodes, it is difficult to quantify and analyze. Therefore, this invention constructs a channel basis vector for each channel. The similarity between channel basis vectors represents the physical relative position distance between corresponding channels, thereby mapping the brain topology into a two-dimensional matrix and approximately mapping the distance between channels into two-dimensional space. In one embodiment, the method for constructing the above-mentioned channel basis vector is as follows: combining the two-dimensional matrix, the propagation characteristics of the EEG signal and the hemispheric characteristics of the brain, all channels are divided into several groups, and the group stipulates that: the signal channel similarity within the group is high, and the channel similarity between groups is low. For each group, the initialization vector of the first channel in the group is first determined as the first vector, that is, the channel basis vector of the first channel. The dimension of the initialization vector is set to 10,000 dimensions in the experiment. The generated channel basis vector is a binary super-dimensional vector (composed of 0 and 1). Based on this, it is preliminarily determined that the channel basis vectors between each group have a small similarity, which is consistent with the physical relative position distance between the corresponding channels between groups. A channel can be randomly selected as the first channel. In a preferred embodiment, they can be sorted from small to large according to their physical position size, for example, according to the position of the head from front to back, from left to right, or from back to front, from right to left, and the first one in the sort is selected as the first channel to facilitate the subsequent construction of the channel basis vector. Then, the first vector is flipped in a specified number of dimensions (from 0 to 1 or from 1 to 0). The number is determined based on the distance between the remaining channels in the group and the first channel. Based on this, it is further determined that the channel basis vectors in each group have a greater similarity, and the channel basis vectors between different groups have a smaller similarity, which is consistent with the physical relative position distance between the channels. Through this method, the physiological position characteristics of the actual channel are combined and embedded into the hyperdimensional vector. In a more specific embodiment, as shown in the following example, Figure 3Taking the 20-lead bipolar montage shown in the figure as an example, the specific steps are as follows: a. First, group the strategy, such as Figure 3 As shown, there are 5 groups in total: (1) The left group from the left frontal pole (Fp1) to the left occipital pole (O1): 'FP1-F7', 'F7-T3', 'T3-T5', 'T5-O1'. (2) The right group from the right frontal pole (Fp2) to the right occipital pole (O2): 'FP2-F8', 'F8-T4', 'T4-T6', 'T6-O2'. (3) The left central group from the left frontal pole (Fp1) to the left occipital pole (O1): 'FP1-F3', 'F3-C3', 'C3-P3', 'P3-O1'. (4) The right central group from the right frontal pole (Fp2) to the right occipital pole (O2): 'FP2-F4', 'F4-C4', 'C4-P4', 'P4-O2'. (5) Central group passing through the left middle temporal (T3), left central (C3), central point (Cz), right central (C4), and right middle temporal (T4): 'T3-C3', 'C3-CZ', 'CZ-C4', 'C4-T4'. According to literature reports, the FPz-Fz-Cz-Pz-Oz group is used less frequently, and there are already left groups, left central groups, right groups, and right central groups that can reflect the longitudinal propagation of EEG in the left and right hemispheres. Therefore, this group is not included in the grouping range. b. Flip strategy: First, the first channel of each group is randomly initialized as the first vector of their corresponding group. According to the characteristics of the hyperdimensional vector, the Hamming distance of the randomly initialized hyperdimensional vector is about 5000, which is approximately orthogonal, indicating that they are not similar. The remaining three channels after each group are based on the super-dimensional vector of the first channel. According to the distance from the first vector, the numflips digits of the previous channel vector are flipped in turn (the original 0 is flipped to 1, and the original 1 is flipped to 0). Specifically, according to the distance from the first vector, the second vector in the group is flipped numflips digits based on the first vector, the third vector in the group is flipped numflips digits based on the second vector in the group, and so on. Figure 4 As shown. The numflips formula is as follows:
[0069] numflips=(HD_dim / α / (numch / group-1))
[0070] Here, the number α indicates that the group only flips the 1 / α digits of the first vector to ensure maximum similarity within the group. Experiments were conducted with values of 2, 4, 8, and 16, and the optimal value was 4. HD_dim refers to the dimension of the hyperdimensional vector, which was set to 10,000 in the experiments. numch refers to the total number of channels, which was set to 20 in the experiments. group refers to the number of channel groups, which was set to 5 in this example. Table 2 shows the Hamming distance between the generated channel basis vectors and the first channel vector, which is as expected.
[0071] In another specific embodiment, the first channel of the left group, the right group and the central group are first randomly initialized as their corresponding group's first vector. Since the left central group and the right central group's originating channel are the same as the left group and the right group respectively, and are very close to the central point, according to the binding property of hyperdimensional vector, a (1, 10000) hyperdimensional vector is randomly generated, which is added to the FP1-Fz, T3-C3 channel base vector (randomly generated) that is close to the FP1-F3 channel base vector, the majority voting threshold method is set, and the sum vector is normalized to obtain the hyperdimensional vector of FP1-F3 as the channel base vector of the first channel of the left central group. This vector will be similar to the first three. Similarly, a (1, 10000) hyperdimensional vector is randomly generated, which is added to FP1-Fz, T3-C3 that is close to FP2-F4, the majority voting threshold method is set, and the sum vector is normalized to obtain the hyperdimensional vector of FP2-F4 as the channel base vector of the first channel of the right central group. The reason for generating a random vector is that for the addition of an odd number of hyperdimensional vectors, the majority vote can be used to normalize the calculation result. However, for an even number of vectors, this approach cannot be achieved. It is known that the addition as a binding operation, for addition, the last generated vector will be similar to all input vectors, so introducing a random vector can help reduce the bias generated by the addition of an even number of hyperdimensional vectors. After the initialization of the first channel of each group is completed, the remaining three channels of each group are obtained on the basis of the hyperdimensional vector of the first channel according to the distance from the position of the first vector. The position of the first vector is flipped numflips bit by bit on the basis of the previous channel vector to obtain the channel base vector of all channels.
[0072] 1.4.2 Constructing feature vectors;
[0073] The present invention is applicable to a combination of one or more features currently widely used in the binary classification of epileptic seizures, including mean absolute value, mean energy, standard deviation, ratio of absolute means of adjacent coefficients, skewness, kurtosis, etc. In a specific embodiment, the feature vector of the present invention is composed of a feature position vector and a feature value vector. The feature position vector is a combination of N randomly generated super-dimensional vectors IDi (1≤i≤N) to encode the position information of the corresponding feature in the feature vector, where N represents the feature type. Different feature types have different feature positions, and there is no specific relationship between them. Therefore, the feature position vector is randomly initialized. The feature value vector refers to a vector encoded with a specific feature value. According to the level of feature quantization, the similarity between the feature value vectors is set. The first level quantization and the last level quantization are the least similar. The intermediate quantization levels flip the dimension value of the first level quantization super-dimensional vector based on the distance. The first level quantization super-dimensional vector is randomly initialized. In this embodiment, the feature quantization level is set to the same size as the super-dimensional vector level, that is, 10000. Feature position vectors, eigenvalue vectors, and channel basis vectors are stored in the model's item memory (IM) to facilitate feature encoding. They can be viewed as a symbol table or dictionary of vectors defined in the system.
[0074] Table 2: Hamming distance between all channel basis vectors and the first channel basis vector
[0075]
[0076] In a specific implementation scheme, taking the number of peaks based on data slices as an example, the method for constructing the feature vector is as follows:
[0077] Step 1: DPP feature extraction: In order to simulate the process of doctors identifying epileptic seizures in EEG signals, the present invention extracts the number of signal peaks from the linearly simplified signal as the characteristic value of the signal segment, and names this new feature DPP. Specifically: the number of peaks of each channel of each data slice is obtained, and further quantified into a characteristic value vector; in a more specific embodiment, the Douglas-Peucker broken line thinning algorithm can be performed on the data before feature extraction to optimize the data. The original sequence is represented as a piecewise linear representation, small fluctuations are ignored, and data points reflecting the main characteristics of the signal are retained. Simulate the signal observed by the human eye. The Douglas-Peucker algorithm is an algorithm for broken line thinning, which simplifies the broken line by reducing the number of points on the broken line while keeping the overall shape of the broken line basically unchanged. The basic idea of the algorithm is to connect the first and last points of the broken line, and then calculate the distance from all points on the broken line to this straight line to find the maximum distance value dmax. If dmax is less than a given threshold DDD, all the middle points on the broken line are discarded; if dmax is greater than or equal to DDD, the point corresponding to dmax is retained, and the broken line is divided into two parts with this point as the boundary, and the method is repeated for these two parts. This process will continue until all dmax are less than DDD, at which time the broken line thinning is completed. The advantages of this algorithm include translation and rotation invariance, that is, the thinning result of the broken line does not depend on the specific position and direction of the broken line, but is only related to a given threshold. In this embodiment, the threshold is set to 10. After the Douglas-Peucker algorithm, the EEG signal is linearly simplified, and the most prominent part of the original data signal can be retained.
[0078] In this embodiment, the data has 20 channels in total, and each multi-dimensional EEG signal finally obtains a feature matrix of (20, 1). The specific process is as follows Figure 5 The upper left image represents the line thinning process, the star-shaped points represent the points selected by line thinning, the upper right image is the original image, the lower right image is the image after linear simplification, and the lower left image is the peak point selection.
[0079] Step 2: Using the proposed arithmetic operation, the initialized channel basis vectors and eigenvectors are combined to obtain vectors representing the data samples, known as record-based encoding. The eigenvector uses two types of hyperparameters: a feature position vector and an eigenvalue vector, representing the feature position and eigenvalue, respectively. The feature position vector encodes the feature position information by randomly generating N hyperdimensional vectors IDi (1≤i≤N). For the eigenvalue vector, its value is first normalized and discretized into a fixed number of bins, i.e., quantized into p levels. The eigenvalue vector L generates p hyperdimensional vectors based on the eigenvalues, also known as the level vector Li, where i represents the i-th level vector. Level vectors are correlated, with the first and last level vectors having the largest Hamming distance and the lowest similarity. This can be achieved by predefining the number of flip bits of the vectors to ensure correlation between the quantized vector levels. In this embodiment, p is selected as 10,000. Each discrete feature position vector is then bound to its eigenvalue vector to generate a eigenvector. The binding formula is shown below.
[0080]
[0081] Here H represents the generated feature vector, L represents the quantized feature value vector, and ID represents the feature position vector. Represents the eigenvalue vector at the feature position.
[0082] After the binding is completed, the bound feature vectors are bound to their corresponding channel basis vectors. The formula is as follows.
[0083]
[0084] E i ∈{E1,E2,...,E M},where 1≤i≤M
[0085] Here S represents the generated data sample vector, H represents the feature vector on each channel, E represents the channel basis vector, and M is the number of channels.
[0086] Finally, the total hyperdimensional vector is normalized in the same way as when the channel basis vector is initialized, that is, a majority voting method is used. If the value of the hyperdimensional vector dimension is greater than half of the number of channels, it is assigned a value of 1, otherwise it is assigned a value of 0.
[0087] 1.5 Model training, constructing prototype vectors for various epileptic seizure types:
[0088] After encoding is completed, the data is sent to the trainer for training. In this embodiment, the trainer is the same as the hyperdimensional calculation for binary classification, and is composed of an accumulator and a judge. The accumulator accumulates the data sample vectors belonging to the same class into their corresponding class vectors according to different attack types. After all the training data are accumulated, the judge normalizes the total class vector obtained for each type. The normalization method is the same as that during encoding, using the majority voting method. The final hyperdimensional vector is the prototype vector of each type, and is also the standard used to classify test data later. During training, the output vector of the encoder is stored in the associative memory (AM).
[0089] 2. Practical application: Determine the epileptic seizure type of the patient to be classified based on the similarity with various prototype vectors
[0090] Obtain multi-channel EEG signals of the patient to be classified during epileptic seizures, and use the same encoding method, that is, after feature extraction and feature encoding, construct a hyperdimensional vector representing the patient to be classified;
[0091] Calculate the similarity between the hyperdimensional vector representing the patient to be classified and the prototype vector of each type of epileptic seizure, and determine the epileptic seizure type of the prototype vector corresponding to the prototype vector with the highest similarity to the hyperdimensional vector representing the patient to be classified as the seizure type of the epileptic seizure of the patient to be classified; in a specific embodiment, cosine similarity or Hamming distance can be used to measure the similarity between it and the generated prototype vector, and the seizure type corresponding to the model vector with the highest similarity to the hyperdimensional vector of the data to be tested is determined to be the seizure type of the data to be tested.
[0092] In this embodiment, the Hamming distance is used. When the Hamming distance between two vectors is close to 0, they are similar, and close to 0.5, they are orthogonal or dissimilar. The normalized Hamming distance formula for two vectors A and B is shown below. d represents the vector dimension.
[0093]
[0094] Due to the imbalance in the number of data of various types of seizures, the present invention chooses to use the weightedF1 indicator as an evaluation indicator, and statistics the accuracy and precision of the classification results. As shown in Table 3, different features are classified according to the method of the present invention (hyperdimensional computing model, hyper), and compared with the commonly used machine learning models SVM and LIGHTGBM models. It can be found that, from the perspective of a single feature, the DPP feature has a higher F1 score than FFT and amptitude on each classifier, and the result of a single DPP feature is close to the Mav6 feature result of the six commonly used time series features combined, which proves the effectiveness of the DPP feature proposed by the present invention for the classification of epileptic seizure types. The F1 effect of the proposed hyperdimensional computing model is better than that of SVM and LIGHTGBM, indicating that the hyperdimensional computing of the present invention has great potential for classification of epileptic seizure types. Among them, Mav6 features are 6 features widely used in the binary classification of epileptic seizures, including average absolute value, average energy, standard deviation, ratio of absolute mean values of adjacent coefficients, skewness, and kurtosis. amptitude and FFT represent a time domain feature and a frequency domain feature, respectively.
[0095] Table 3: Comparison of the effects of the features used in different models with other features
[0096]
[0097] The initialization methods of 5 commonly used channel basis vectors are compared with the initialization method based on channel topology structure embedding chembed proposed in the present invention, as shown in Table 4. It can be seen that the F1 of the initialization method chembed based on channel topology structure embedding obtained the highest score, with an average increase of about 2 percentage points, which proves that this initialization method embeds physiological position characteristics into the hyperdimensional vector representing the patient to be classified, effectively improving the accuracy of judging the type of epileptic seizure. The five commonly used initialization methods are specifically introduced as follows: random represents random initialization; sandiwich represents randomly initializing a hyperdimensional vector for the first channel according to the input EEG data, and then randomly flipping the specified number of vector bits for each channel in the hyperdimensional vector; scalenorand represents randomizing a hyperdimensional vector for the first channel, and then sequentially flipping the specified number of vector bits according to the specified EEG order; groupscrand represents grouping EEG, using the same basis vector for the EEG in the same group, and randomly generating hyperdimensional vectors for EEG in different groups.
[0098] Table 4: Different channel basis vector initialization methods for DPP features
[0099]
[0100] Corresponding to the aforementioned embodiment of a personalized epileptic seizure type classification method based on hyperdimensional computing, the present invention also provides an embodiment of a personalized epileptic seizure type classification system based on hyperdimensional computing.
[0101] An embodiment of the present invention provides a personalized epileptic seizure type classification system based on hyperdimensional computing, comprising:
[0102] A data acquisition and preprocessing module is used to acquire multi-channel EEG signals of the patient to be classified during an epileptic seizure and construct a hyperdimensional vector representing the patient to be classified; wherein the hyperdimensional vector is composed of a channel basis vector and a eigenvector of each channel in the multi-channel EEG signal, the channel basis vector is a binary hyperdimensional vector, and the similarity between the channel basis vectors represents the physical relative position distance between the corresponding channels;
[0103] A classification module is used to calculate the similarity between the hyperdimensional vector representing the patient to be classified and the prototype vectors of various types of epileptic seizures, and determine the epileptic seizure type corresponding to the prototype vector with the highest similarity to the hyperdimensional vector representing the patient to be classified as the seizure type of the patient to be classified; wherein, the prototype vectors of various types of epileptic seizures are constructed and obtained using a trainer based on a data set; the data set contains several hyperdimensional vectors corresponding to epileptic seizure types.
[0104] Furthermore, the data acquisition and preprocessing module includes:
[0105] d1: Vector Initialization Module Chembed: This is the highlight of this invention. For superdimensional basis vector initialization, the present invention proposes a superdimensional vector initialization module based on channel embedding. This module incorporates the physiological location of the actual channel, embeds physiological location characteristics into the superdimensional vector, and converts the physical distance between channels into the similarity between basis vectors. Initialization vectors are designed based on the magnitude of the similarity. Feature position vectors are randomly initialized, as there is no relationship between the individual features. Eigenvalue vectors are initialized according to the feature quantization level.
[0106] d2: EEG feature extraction module: This module proposes a new feature based on linear simplification: Douglas-Peucker Peak (DPP). The processed EEG signal is linearly simplified using the classic Douglas-Peucker algorithm: the original sequence is piecewise linearly represented, small fluctuations are ignored, and data points reflecting the main characteristics of the signal are retained, simulating the signal observed by the human eye. The number of peaks in the simplified signal is then extracted as a feature of that segment. Linear simplification primarily relies on the frequency information of the signal, while the number of peaks is extracted based on the signal amplitude. The newly extracted DPP feature preserves the time-frequency information of the signal, facilitating signal classification.
[0107] d3: Feature encoding module: discretizes the features into different levels to form eigenvalue vectors, binds them with the generated feature position vectors and channel basis vectors, and generates a hyperdimensional vector of the EEG signal.
[0108] An embodiment of the present invention's individualized epileptic seizure type classification system based on hyperdimensional computing can be applied to any device with data processing capabilities, such as a computer or other device.
[0109] The device embodiments may be implemented through software, hardware, or a combination of software and hardware. Taking software implementation as an example, as a logically defined device, a processor of any device with data processing capabilities reads the corresponding computer program instructions from a non-volatile memory into the memory and executes them. From a hardware perspective, this includes a processor, memory, a network interface, and a non-volatile memory. In addition, any device with data processing capabilities in which the device in the embodiments is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.
[0110] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0111] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present invention. A person of ordinary skill in the art can understand and implement the present invention without inventive work.
[0112] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the method for individualized epileptic seizure type classification based on hyperdimensional computing in the above embodiment is implemented.
[0113] The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or memory. The computer-readable storage medium may also be any device with data processing capabilities, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capabilities and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and may also be used to temporarily store data that has been output or is to be output.
[0114] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications derived therefrom remain within the scope of protection of the present invention.
Claims
1. A personalized epileptic seizure type classification method based on hyperdimensional computing, characterized in that: include: Acquire multi-channel EEG signals of a patient to be classified during an epileptic seizure, and construct a hyperdimensional vector representing the patient to be classified; wherein the hyperdimensional vector is composed of channel basis vectors and eigenvectors of some channels in the multi-channel EEG signals, and the similarity between the channel basis vectors represents the physical relative position distance between the corresponding channels; Calculating the similarity between the hyperdimensional vector representing the patient to be classified and the prototype vectors of each type of epileptic seizure, and determining the epileptic seizure type corresponding to the prototype vector having the highest similarity to the hyperdimensional vector representing the patient to be classified as the seizure type of the patient to be classified; The prototype vectors of each type of epileptic seizure are constructed and obtained using a trainer based on a data set; the data set contains hyperdimensional vectors corresponding to multi-channel EEG signals during each historical epileptic seizure; The channel basis vector is a binary super-dimensional vector; the channel basis vector is constructed by the following method: Combining the two-dimensional matrix, the propagation characteristics of EEG signals and the hemispheric characteristics of the brain, all channels used in multi-channel EEG signal acquisition are grouped, where the signal has high channel similarity within a group and low channel similarity between groups; For the first channel of each group, a randomly initialized binary superdimensional vector is constructed as the corresponding channel basis vector. Then, each group flips numflips digits based on the channel basis vector of the previous channel in order of distance to construct all channel basis vectors. The numflips formula is as follows: numflips=(HD_dim / α / (numch / group-1)) α indicates that the group only flips the 1 / α digits of the channel basis vector of the first channel, HD_dim refers to the dimension of the hyperdimensional vector, numch refers to the total number of channels, and group refers to the number of channel groups.
2. The method according to claim 1, characterized in that All channels used in the multi-channel EEG signal acquisition are grouped into the following 5 groups: (1) Left group from left frontal pole Fp1 to left occipital pole O1: ‘FP1-F7’, ‘F7-T3’, ‘T3-T5’, ‘T5-O1’; (2) right-sided group from right frontal pole Fp to right occipital O2: ‘FP2-F8’, ‘F8-T4’, ‘T4-T6’, ‘T6-O2’; (3) left central group from left frontal pole Fp1 to left occipital O1: ‘FP1-F3’, ‘F3-C3’, ‘C3-P3’, ‘P3-O1’; (4) right central group from right frontal pole Fp2 to right occipital O2: ‘FP2-F4’, ‘F4-C4’, ‘C4-P4’, ‘P4-O2’; (5) The central group passing through the left middle temporal T3, the left central C3, the central point Cz, the right central C4, and the right middle temporal T4: ‘T3-C3’, ‘C3-CZ’, ‘CZ-C4’, and ‘C4-T4’.
3. The method according to claim 2, characterized in that The channel basis vector is constructed by the following method: The first channels of the left group, right group and central group are randomly initialized as their channel basis vectors and the first vectors of the corresponding groups; the first channels of the left central group and the right central group are respectively obtained by adding the channel basis vectors of the m channels closest to them, and then normalizing the sum vector by the majority voting threshold method to obtain the corresponding channel basis vector; if m is an even number, an additional super-dimensional vector is randomly generated and added to the channel basis vectors of the m channels as the final sum vector.
4. The method according to claim 1, wherein The feature vector is composed of a feature position vector and an eigenvalue vector, wherein the feature position vector is used to encode the position information of the corresponding feature in the feature vector, and the eigenvalue vector is a super-dimensional vector constructed based on the eigenvalue of the EEG signal of the corresponding channel.
5. The method according to claim 1, wherein The feature vector is constructed based on the number of feature peaks of each channel of the multi-channel EEG signal.
6. A personalized epileptic seizure type classification system based on hyperdimensional computing, characterized in that: A method for implementing the individualized epileptic seizure type classification method based on hyperdimensional computing according to any one of claims 1 to 5, comprising: A data acquisition and preprocessing module acquires multi-channel EEG signals of the patient to be classified during an epileptic seizure and constructs a hyperdimensional vector representing the patient to be classified; wherein the hyperdimensional vector is composed of a channel basis vector and a eigenvector of each channel in the multi-channel EEG signal, the channel basis vector is a binary hyperdimensional vector, and the similarity between the channel basis vectors represents the physical relative position distance between the corresponding channels; A classification module calculates the similarity between the hyperdimensional vector representing the patient to be classified and the prototype vectors of each type of epileptic seizure, and determines the epileptic seizure type corresponding to the prototype vector with the highest similarity to the hyperdimensional vector representing the patient to be classified as the seizure type of the patient to be classified; wherein the prototype vectors of each type of epileptic seizure are constructed and obtained using a trainer based on a data set; the data set contains several hyperdimensional vectors corresponding to epileptic seizure types.
7. A storage medium comprising computer-executable instructions, wherein when executed by a computer processor, the computer-executable instructions implement the method for individualized epileptic seizure type classification based on hyperdimensional computing as described in any one of claims 1 to 5.
8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method for individualized epileptic seizure type classification based on hyperdimensional computing as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Automatic detection method for electroencephalogram high-frequency oscillation signal of epilepsy patient
CN114532993A
Apparatus and method for determining of optimal eeg channel based on pso
KR1020140009715A