A Depression Risk Assessment System for ALS Patients Based on Transfer Learning

Through a transfer learning-based system, combined with data acquisition and feature adaptation module, the problem of poor accuracy in the assessment of depression risk in ALS patients is solved, and a more objective and sensitive evaluation effect is achieved.

CN119361130BActive Publication Date: 2025-04-22PEKING UNIVERSITY THIRD HOSPITAL (THE THIRD CLINICAL MEDICAL SCHOOL OF PEKING UNIVERSITY) +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411896175.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-22
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

The prior art fails to effectively consider ALS disease factors when evaluating the risk of depression in patients with ALS, resulting in poor assessment accuracy.

Method used

A system based on transfer learning is adopted to extract the EEG data of ALS patients and classify depression risk through data collection, source domain depression risk assessment unit, target domain feature adaptation module and other components.

Benefits of technology

It improves the accuracy of depression assessment in ALS patients, can more objectively reflect brain function changes in ALS patients, reduces the dependence on subjective judgments, and provides more objective depression screening indicators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119361130B_ABST
    Figure CN119361130B_ABST
Patent Text Reader

Abstract

The present invention provides a system for assessing depression risk of ALS patients based on transfer learning, including: a data acquisition unit for collecting EEG data of ALS patients to be assessed; a source domain depression risk assessment unit, obtained based on pre-training of a sample set of EEG data of non-ALS patients, including a feature extraction module for extracting EEG features from the EEG data set and a depression risk classification module for predicting depression risk classification; a target domain feature adaptation module, arranged between the feature extraction module and the depression risk classification module, for screening and correcting the extracted EEG features of ALS patients to be assessed based on EEG feature data corresponding to the sample set of EEG data of non-ALS patients, and inputting the EEG features into the depression risk classification module to predict the depression risk of ALS patients to be assessed. The present invention solves the problem that the depression risk assessment in the prior art does not take into account the influence of ALS disease factors on depression judgment, resulting in poor accuracy in depression risk assessment for ALS patients.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of clinical medicine technology, and in particular relates to an ALS patient depression risk assessment system based on transfer learning. Background Art

[0002] Amyotrophic lateral sclerosis (ALS) is a highly disabling and lethal neurodegenerative disease that usually begins in middle age and manifests as muscle weakness and atrophy, slurred speech, and difficulty swallowing, ultimately leading to nutritional and respiratory failure and death. There is currently no effective treatment for the disease, and the average survival rate is only 3-5 years. About 50% of ALS patients are accompanied by depression and anxiety. Combined depression will further affect the patient's quality of life and even affect the prognosis of disease progression, so it is particularly important to identify depression in ALS patients.

[0003] Depression diagnosis is highly subjective and mainly relies on experienced specialists and patient symptoms, which can easily lead to misdiagnosis and delay further diagnosis and treatment. Although the current depression assessment system based on EEG features and neural network models has achieved good assessment results, due to the unique EEG features of ALS patients, the EEG model of the normal population is difficult to directly apply to the ALS patient group for depression identification, and it is difficult to obtain a large number of EEG data samples for ALS patients. Therefore, it is necessary to build a depression EEG prediction tool that can migrate the mature depression identification model to the ALS patient group. Summary of the invention

[0004] In view of the above analysis, the present invention aims to provide an ALS patient depression risk assessment system based on transfer learning, which is used to solve the problem that the depression risk assessment system in the prior art does not take into account the impact of ALS disease factors on depression judgment, resulting in poor accuracy in depression risk assessment for ALS patients.

[0005] The purpose of the present invention is mainly achieved through the following technical solutions:

[0006] The present invention provides an ALS patient depression risk assessment system based on transfer learning, the system comprising:

[0007] A data acquisition unit, used to collect EEG data of the ALS patient to be evaluated;

[0008] A source domain depression risk assessment unit, which is pre-trained based on a sample set of EEG data of non-ALS patients, and includes a feature extraction module for extracting EEG features from the EEG dataset and a depression risk classification module for classifying and predicting depression risk;

[0009] The target domain feature adaptation module is arranged between the feature extraction module and the depression risk classification module, and is obtained by migration training using a pre-constructed ALS patient EEG data sample set. It is used to screen and correct the extracted EEG features of the ALS patient to be evaluated based on the EEG feature data corresponding to the non-ALS patient EEG data sample set, and input the data into the depression risk classification module to predict the depression risk of the ALS patient to be evaluated.

[0010] Furthermore, before the feature extraction module, a data preprocessing unit is also included, which is used to preprocess the EEG data of the ALS patient to be evaluated by the following method:

[0011] Resampling, notching, removing power frequency, removing base drift, removing invalid high-frequency components and removing EEG artifacts on the collected EEG data of the ALS patient to be evaluated, to obtain EEG data after noise reduction;

[0012] Based on the amplitude of the EEG data in the EEG data sample set of the non-ALS patient, correcting the amplitude of the noise-reduced EEG data of the ALS patient to be evaluated using quartiles;

[0013] The amplitude-corrected EEG data is sliced ​​using the same time window and step size as those used in preprocessing the EEG data sample set of non-ALS patients to obtain multiple EEG data segments, which constitute the preprocessed ALS EEG data corresponding to the ALS patient to be evaluated.

[0014] Furthermore, the target domain feature adaptation module includes an adaptive feature aggregation module, a multi-head attention module and a feature adaptation module;

[0015] The adaptive feature aggregation module is used to perform feature distribution correction on the EEG feature data of the ALS patient to be evaluated based on the EEG feature data corresponding to the EEG data sample set of the non-ALS patient, and cluster the corrected EEG feature data of the ALS patient to be evaluated to screen and obtain valid ALS EEG feature data;

[0016] The multi-head attention module is used to extract features from the effective ALS EEG feature data obtained by screening to obtain feature data containing the relationship between features;

[0017] The feature adaptation module is used to perform feature mapping on the feature data including the relationship between features to obtain a feature distribution adapted to the depression risk classification module.

[0018] Furthermore, when the feature extraction module is used to perform feature extraction on multiple EEG data segments in the ALS EEG data of the ALS patient to be evaluated, multiple EEG feature data with the same number of feature categories and the same number of time slices as those corresponding to each EEG data segment in the EEG data sample set of non-ALS patients are obtained.

[0019] Furthermore, the adaptive feature aggregation module performs feature distribution correction on the EEG feature data of the ALS patient to be evaluated based on the EEG feature data corresponding to the EEG data sample set of the non-ALS patient by the following method:

[0020] Based on the EEG feature data corresponding to multiple patients in the EEG data sample set of non-ALS patients, the mean and standard deviation of the EEG feature data of each category are calculated on the full time slice;

[0021] The EEG feature data of the ALS patient to be evaluated are divided into feature groups according to feature categories, and the EEG feature data of each time slice of each EEG data segment in each feature group are subjected to feature distribution correction using the following formula:

[0022] ;

[0023] in, is the EEG feature of the t-th time slice after correction, is the EEG feature of ALS patients at the t-th time slice of the m-th feature before correction, is the mean value of the EEG feature of the mth feature in the EEG data sample set of non-ALS patients, The standard deviation of the mth feature in the EEG data sample set of non-ALS patients, M represents the maximum number of feature categories corresponding to each feature group, and N represents the number of time slices of each EEG data segment.

[0024] Furthermore, clustering the corrected EEG characteristic data of the ALS patient to be evaluated to screen and obtain effective ALS EEG characteristic data includes:

[0025] For each feature group, the cosine similarity between the feature data of each time slice and the feature data of other time slices is calculated respectively, and an adjacency matrix is ​​constructed based on the cosine similarity;

[0026] Constructing a Laplacian matrix based on the degree matrix of the adjacency matrix and normalizing it;

[0027] Based on the normalized Laplace matrix, a feature polynomial is constructed and solved to obtain a similarity reference value between each time slice and features of the same category of other time slices;

[0028] Arrange each similarity reference value from large to small, and calculate the gap between two adjacent similarity reference values ​​to obtain the kth similarity reference value that makes the gap the largest, and use k as the number of clusters;

[0029] Based on the cluster number k, the first k similarity reference values ​​are used as cluster center values, the corrected EEG feature data of the ALS patient to be evaluated are clustered, and a pooling operation is performed on all feature data in the cluster after clustering to screen out effective ALS EEG features.

[0030] Furthermore, the adjacency matrix is ​​expressed as:

[0031] ;

[0032] in, is the cosine similarity between the feature data of the i-th time slice and the feature data of the j-th time slice;

[0033] The cosine similarity is expressed as:

[0034] ;

[0035] Among them, i,j correspond to different time slices in each data segment, is the characteristic data of the i-th time slice, is the feature data of the j-th time slice.

[0036] Furthermore, the multi-head attention module is used to extract features from the screened effective ALS EEG feature data, including:

[0037] The effective ALS EEG feature data is multiplied by three weight matrices respectively to perform linear transformation, and the three linear transformation results are used as Query, Key and Value; the three weight matrices are obtained by learning;

[0038] Calculate the dot product of Query and Key to get the attention score, and normalize the attention score through softmax to get the attention weight;

[0039] The Value is weighted and summed using the attention weight to obtain feature data containing the relationship between features.

[0040] Furthermore, the feature adaptation module includes a plurality of fully connected layers arranged in sequence and an activation layer arranged after each fully connected layer;

[0041] The fully connected layer is used to perform linear transformation on the input feature data, mapping the ALS EEG feature data to the non-ALS EEG feature dimension;

[0042] The activation layer is used to perform nonlinear transformation on the EEG features that have been linearly transformed by the fully connected layer, so as to learn complex feature mapping and correct the feature distribution that is suitable for the depression risk classification module.

[0043] Furthermore, the quartiles are used to correct the amplitude of the noise-reduced EEG data of the ALS patient to be evaluated, which is expressed as:

[0044] ;

[0045] in, is the corrected EEG data, represents the EEG data of ALS patients, represents the EEG data in the EEG data sample set of non-ALS patients, is the quantile statistic.

[0046] Beneficial effects of this technical solution:

[0047] 1. The present invention uses electroencephalogram examination to more objectively reflect the changes in brain function of ALS patients with depression, avoiding the important clinical pain points that are difficult to effectively identify simply through doctor's interviews and scale assessments for patients with insufficient self-awareness or denial of their condition. Compared with traditional methods, the present invention is more objective and sensitive, and greatly improves the accuracy of ALS depression assessment;

[0048] 2. The present invention proposes a feature migration method that can preserve the feature extraction advantages and classification accuracy of the original depression assessment model. By adjusting the feature distribution, the learning ability of the original depression assessment model is migrated to the depression assessment of ALS patients;

[0049] 3. The present invention establishes a target domain feature adaptation module to achieve feature correction and adaptively aggregate equivalent time slices on the basis of refining the temporal resolution, thereby achieving feature alignment with the source domain data;

[0050] 4. The present invention uses a multi-head attention module to simulate and extract the characteristics of different disease subtypes of ALS patients through the "multi-head" mechanism of the attention model, which can take into account the complexity of ALS disease;

[0051] 5. The present invention establishes a model from EEG data to depression assessment results based on deep learning, and can use a single probability value to evaluate the depression level of ALS patients, which can help doctors understand the patient's depression level more intuitively and assist in diagnosis.

[0052] Other features and advantages of the present invention will be described in the following description, and part of them will become obvious from the description, or will be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. In the entire drawings, the same reference symbols represent the same components;

[0054] Figure 1 is a schematic diagram of a depression risk assessment system for ALS patients based on transfer learning according to an embodiment of the present invention; DETAILED DESCRIPTION

[0055] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the implementation cases of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0056] One embodiment of the present invention provides a system for assessing the risk of depression in ALS patients based on transfer learning, such as Figure 1 As shown, the system includes:

[0057] A data acquisition unit, used to collect EEG data of the ALS patient to be evaluated;

[0058] A source domain depression risk assessment unit, which is pre-trained based on a sample set of EEG data of non-ALS patients, and includes a feature extraction module for extracting EEG features from the EEG dataset and a depression risk classification module for classifying and predicting depression risk;

[0059] The target domain feature adaptation module is arranged between the feature extraction module and the depression risk classification module, and is obtained by migration training using a pre-constructed ALS patient EEG data sample set. It is used to screen and correct the extracted EEG features of the ALS patient to be evaluated based on the EEG feature data corresponding to the non-ALS patient EEG data sample set, and input the data into the depression risk classification module to predict the depression risk of the ALS patient to be evaluated.

[0060] Specifically, electroencephalogram (EEG) is a commonly used measurement method for recording electrical activity generated by the cortex. Its non-invasive collection method is highly convenient and can be applied to patients of all ages. With the development of artificial intelligence and signal processing technology, EEG signal analysis technology is also constantly improving. In the diagnosis of depression, many researchers have used EEG features as an objective basis. However, since ALS patients have unique EEG characteristics of their own diseases, and the boundary between them and the EEG characteristics of depression is not clear, mature depression models cannot be used directly to assess the depression level of ALS patients. There is currently no mature technology for identifying depression in ALS patients. The present invention utilizes the existing source domain depression risk assessment unit, that is, a depression assessment model for a regular population trained using a source domain EEG data sample set (i.e., an EEG data sample set of regular patients other than ALS), and only uses a small amount of ALS patient EEG data, and migrates the trained source domain depression risk assessment unit to the depression assessment of ALS patients, preserving the accuracy of the original depression risk assessment model for depression, and providing an objective indicator for depression screening of ALS patients.

[0061] Preferably, the data acquisition unit of this embodiment uses a clinical standard EEG amplifier to collect EEG signals, with a sampling rate ranging from 200 to 1000 Hz and a channel value ranging from 16 to 32 channels.

[0062] After the EEG data of the ALS patient to be evaluated is collected, the data preprocessing unit is used to perform data preprocessing, which specifically includes:

[0063] Resampling, notching, removing power frequency, removing base drift, removing invalid high-frequency components and removing EEG artifacts on the collected EEG data of the ALS patient to be evaluated, to obtain EEG data after noise reduction;

[0064] Based on the amplitude of the EEG data in the EEG data sample set of the non-ALS patient, correcting the amplitude of the noise-reduced EEG data of the ALS patient to be evaluated using quartiles;

[0065] The amplitude-corrected EEG data is sliced ​​using the same time window and step size as those used in preprocessing the EEG data sample set of non-ALS patients to obtain multiple EEG data segments, which constitute the preprocessed ALS EEG data corresponding to the ALS patient to be evaluated.

[0066] More specifically, resampling is to remove the influence of the reference electrode position, reduce the volume conduction effect, and facilitate standardization and comparison. The EEG data needs to be re-referenced, and the reference methods include but are not limited to: average reference, ear-level reference, etc.;

[0067] To remove power frequency by notching, a notch filter (such as 50Hz) is designed to eliminate power frequency noise interference and obtain the EEG signal after removing the base drift.

[0068] The purpose of removing the base drift is to eliminate the influence of data drift. The EEG signal is subjected to a high-pass filter to obtain the EEG signal after the base drift signal is removed. The high-pass filter frequency can be set to, for example, 1Hz.

[0069] Removing invalid high-frequency components: Most high-frequency components in EEG signals are noise and do not contain physiological or pathological significance. In this embodiment, a low-pass filter (such as 40 Hz) is designed to remove higher-frequency components to obtain a filtered EEG signal;

[0070] Use ICA to remove eye movement artifacts, ECG artifacts, and EMG artifacts: that is, by performing a linear transformation on the original signal and using the statistical technique of ICA, the signal is decomposed into several independent components, each of which represents a different source. By observing the characteristics of these components (such as waveform, frequency, and spatial distribution), the components of electrooculography, electrocardiography, or electromyography artifacts can be identified, and these components can be removed. Through inverse transformation, the EEG data with eye movement, ECG, and EMG interference removed can be obtained.

[0071] Furthermore, by setting the EEG duration (T) and the artifact threshold of the target observation time unit, the time points when the amplitude exceeds the threshold can be recorded, the remaining time points can be marked as non-artifact time, and the EEG segments with a continuous duration greater than T in the non-artifact time can be retained as a non-artifact segment set. The non-artifact segment set greater than T is divided with a step length of T. The step length can be set according to the task. The main purpose of this step is to remove large Bofu artifacts caused by human body jitter or poor contact of the equipment in the EEG data. In addition, through slicing processing, the EEG acquisition time with an irregular time length is determined to an estimated length, which can ensure consistency for subsequent feature extraction and facilitate model input.

[0072] Furthermore, the source data set (non-ALS EEG data set) is used to correct the EEG data of the target data set (ALS EEG data set), that is, by counting the amplitudes of the EEG data of the source data set and the target data set, recording the obtained statistics, and using quartiles to normalize the EEG of the target data set.

[0073] Specifically, since the source data set (i.e., the non-ALS EEG data sample set used to establish the source domain depression assessment model) and the target data (the EEG data of the ALS patients to be assessed) may come from different acquisition devices, affected by the design of the device amplifier, the amplitude distribution of the source data set signal and the target data set signal will be inconsistent; and due to the different scalp thickness and skin conductivity of the subjects, the amplitude of the signal will also be affected. In order to avoid the systematic error of the subsequent feature extraction results caused by the above reasons, the target data set needs to be corrected. Exemplarily, since signals in different frequency bands have different amplitude levels, for example, the amplitude of low-frequency (1-7Hz) signals is larger than that of medium- and high-frequency (8Hz to above) signals. The signal amplitude of the target data set can be corrected by frequency bands, and the signal can be decomposed into signals of several frequency bands using techniques such as frequency division filtering or wavelet transform. For the signal of each frequency band, the quartile normalization method can be used to correct the amplitude level of the signal, expressed as:

[0074] ;

[0075] in, is the corrected EEG data, represents the EEG data of ALS patients, represents the EEG data in the EEG data sample set of non-ALS patients, is the quantile statistic;

[0076] After correction, the original frequency band level is restored using the superposition method to obtain the amplitude-corrected EEG data.

[0077] In order to use the pre-trained feature extraction module to extract the same EEG features as those in the source domain from the ALS EEG data of the patient to be evaluated, the EEG data after amplitude correction can also be sliced ​​using the same time window and step size as those used in preprocessing the EEG data sample set of non-ALS patients (source domain EEG data sample set). Slicing is performed using a fixed time window length and step size to obtain multiple EEG data segments to constitute the ALS EEG data.

[0078] Further, for each EEG data segment, feature extraction is performed through the feature extraction module of the source domain depression risk assessment unit, that is, the feature extraction method consistent with the source model is used to divide the EEG data segment into multiple time slices, each time slice is the minimum time unit for feature extraction, and then the EEG features can be obtained through signal processing or deep learning models, and the extracted EEG features include: absolute, relative frequency band energy, amplitude connectivity and phase-locking value, etc. Exemplarily, if the signal processing method is used, the absolute and relative frequency band energy calculated after short-time Fourier transform, the amplitude connectivity can be obtained by calculating the correlation coefficient of the EEG data, and the phase-locking value can be obtained by calculating the phase of the signal, wherein the pipeline of all extraction processes needs to be consistent with the feature extraction method in the source model. If a deep learning-based method is used, the feature extraction module in the source model is directly used to extract features from multiple EEG data segments corresponding to the ALS patients to be evaluated, and multiple EEG feature data of the same number of categories and the same number of time slices corresponding to each EEG data segment in the EEG data sample set of non-ALS patients are obtained.

[0079] Furthermore, the target domain feature adaptation module includes an adaptive feature aggregation module, a multi-head attention module and a feature adaptation module;

[0080] The adaptive feature aggregation module is used to perform feature distribution correction on the EEG feature data of the ALS patient to be evaluated based on the EEG feature data corresponding to the EEG data sample set of the non-ALS patient, and cluster the corrected EEG feature data of the ALS patient to be evaluated to screen and obtain valid ALS EEG feature data;

[0081] The multi-head attention module is used to extract features from the effective ALS EEG feature data obtained by screening, and obtain feature data containing the relationship between features;

[0082] The feature adaptation module is used to perform feature mapping on the feature data including the relationship between features to obtain a feature distribution adapted to the depression risk classification module.

[0083] Specifically, the adaptive feature aggregation module performs feature distribution correction on the EEG feature data of the ALS patient to be evaluated based on the EEG feature data corresponding to the EEG data sample set of the non-ALS patient by the following method:

[0084] Based on the EEG feature data corresponding to multiple patients in the EEG data sample set of non-ALS patients, the mean and standard deviation of each category of EEG feature data are calculated on the full time slice; among them, the EEG feature categories include relevant feature categories such as frequency band energy and connectivity. The EEG feature of each time slice of the ALS patient to be evaluated is expressed as:

[0085] , , where M represents the maximum number of feature categories in each feature group, and N represents the number of time slices of the sample. The corresponding mean of the source domain EEG feature data is expressed as:

[0086] ;

[0087] The standard deviation is expressed as ;

[0088] The EEG feature data of the ALS patient to be evaluated are divided into feature groups according to feature categories (e.g., absolute and relative frequency band energies are both features related to frequency band energy and are divided into one feature group, while amplitude connectivity and phase-locked values ​​are features related to connectivity and are divided into another feature group). The EEG feature data of each time slice of each EEG data segment in each feature group are subjected to feature distribution correction using the following formula:

[0089] , ;

[0090] in, is the EEG feature of the t-th time slice after correction, is the EEG feature of ALS patients at the t-th time slice of the m-th feature before correction, is the mean value of the EEG feature of the mth feature in the EEG data sample set of non-ALS patients, The standard deviation of the mth feature in the EEG data sample set of non-ALS patients, M represents the maximum number of feature categories corresponding to each feature group, and N represents the number of time slices of each EEG data segment. is the corrected EEG feature of the mth feature of the ALS patient in the tth time slice.

[0091] After feature distribution correction, the feature-corrected EEG feature data is obtained, which is expressed as:

[0092] ;

[0093] The rows of the matrix represent the time dimension, and the columns represent the feature dimension.

[0094] This embodiment realizes feature alignment of the EEG data of ALS patients to be evaluated through feature distribution correction. By calculating the distribution of source domain EEG features in their respective dimensions (feature categories), the target domain feature distribution is corrected for subsequent adaptive feature clustering, screening and merging ALS EEG features in the target domain that can match the source domain feature distribution. For the application field of this embodiment, ALS patients include several subtypes of ALS severity, and the use of feature grouping processing can adapt to the internal relationship of features of each ALS subtype from multiple angles. For each subtype, find features with advantageous performance, and then combine them into new features. The method of this embodiment can achieve better feature reorganization and reduce the problem of prediction errors caused by differences in feature distribution due to disease subtypes.

[0095] Furthermore, an adaptive feature aggregation module is established to determine the number of clusters by constructing an adjacency matrix, constructing a Laplace matrix, solving eigenvalues, finding the maximum gap, etc. After clustering, for each cluster, a pooling operation is used to merge the features of the subsets in the cluster.

[0096] The purpose of this step is to determine the dominant time clusters in the ALS EEG data and merge the time subsets of each cluster into representative features. The specific steps are as follows:

[0097] After correcting the EEG data, for each feature group, the cosine similarity between the feature data of each time slice and the feature data of other time slices is calculated, and an adjacency matrix is ​​constructed based on the cosine similarity.

[0098] The cosine similarity is expressed as:

[0099] ;

[0100] in, is the cosine similarity between the feature data of the i-th time slice and the feature data of the j-th time slice; is the characteristic data of the i-th time slice, is the feature data of the j-th time slice;

[0101] The adjacency matrix is ​​represented as: ;

[0102] Furthermore, constructing a Laplacian matrix based on the degree matrix of the adjacency matrix and normalizing it includes:

[0103] Compute the degree matrix of the adjacency matrix, Where D is a diagonal matrix, is the sum of the i-th row of the adjacency matrix A. The Laplace matrix is ​​calculated by L = D – A, and the Laplace matrix is ​​normalized using the following formula to obtain the normalized Laplace matrix :

[0104] ;

[0105] in Represents the identity matrix.

[0106] Furthermore, a feature polynomial is constructed based on the normalized Laplace matrix and solved to obtain a similarity reference value between each time slice and features of the same category of other time slices;

[0107] This embodiment uses Solving for Eigenvalues The main purpose of this step is to find a set of eigenvalues ,in is a scalar, serving as a reference value for the similarity between each time slice and the same category features of other time slices, that is, finding a representative of the similarity between each time slice and other time slices. , construct the characteristic polynomial:

[0108] ;

[0109] Solved , which is the similarity reference value of each time slice with the same category features of other time slices.

[0110] Further, each similarity reference value is arranged from large to small, and the gap between two adjacent similarity reference values ​​is calculated to obtain the kth similarity reference value that makes the gap the largest, and k is used as the number of clusters;

[0111] That is, arrange the obtained eigenvalues ​​in order from large to small, and use , calculate the gaps between eigenvalues, and obtain The largest k is used as the final number of clusters. Through this step, the difference in the eigenvalues ​​after sorting is used to determine the representative similarity categories between different time slices.

[0112] Furthermore, based on the number of clusters k, the previous k similarity reference values ​​are used as cluster center values, the EEG feature data of the corrected ALS patient to be evaluated are clustered, and all the feature data in the cluster after clustering are pooled and merged within the time cluster, that is, merged based on time. Before merging, a cluster is a matrix of (N, M), N represents time, and the dimension after merging is (1, M), and effective ALS EEG features are screened out; the pooling operation can be pooling methods such as mean, maximum, and minimum.

[0113] This embodiment uses a clustering method to screen out several dominant time clusters under the source domain feature distribution, and merges them within the time cluster to achieve the effect of feature screening and noise removal, so that the target domain EEG features used for classification prediction are more consistent with the distribution of source domain EEG features. First, the target domain distribution is corrected, and the corresponding target domain features are projected into the distribution of source domain features using the mean and variance of the source domain feature distribution, realizing the correction of the target domain EEG features based on the source domain EEG features; then, the similarity matrix of the features between time slices is constructed, and the similarity reference value is obtained by solving the matrix eigenvalues. Based on the maximum gap between the similarity reference values, the number of clusters K is determined, and the features of each cluster are merged after clustering based on the number of clusters K, thereby weakening the influence of the abnormal distribution of ALS EEG features.

[0114] Furthermore, a multi-head attention module is established, and the EEG feature data of each time slice after clustering is input into the multi-head attention module as query, key, and value through three linear transformations to extract the feature relationship in the target domain. It should be noted that the clustering operation of this embodiment is extracted by feature groups, and each feature group is equivalent to a "head". The linear transformation of the multi-head attention module is based on the result of each time cluster after clustering. The result of a time cluster is (1, M), and a linear transformation is performed to obtain (1, F(M)). F(m) represents the operation of linear transformation, and the results of the three linear transformations correspond to query, key, and value, respectively.

[0115] Since ALS patient EEG data has been proven to have a variety of heterogeneous (different from non-ALS) features, if the features are not transformed and directly sent to the depression risk classification module of the source depression assessment model for subsequent evaluation, the evaluation results will have a large deviation. Therefore, in order to make the extracted ALS EEG features better adapt to the classifier of the source model, this embodiment first uses a multi-head attention module as a feature relationship extraction module to learn features that are more useful for depression identification in ALS patient EEG data.

[0116] Specifically, the multi-head attention module passes the clustering result data through three learnable weight matrices based on each "head", where the matrix dimensions are (time cluster (i.e., number of clusters), number of feature categories), and obtains the Query, Key, and Value of the multi-head attention. The dot product of Query and Key is calculated to obtain the attention score, and the attention weight in the time cluster dimension is obtained after softmax. Based on the attention weight, the Value is weighted and summed to obtain a new feature. The new feature dimension is (time cluster, number of features), which is the same as the input dimension. That is, based on the attention mechanism, the feature relationship is extracted through the following formula to obtain a new feature:

[0117] ;

[0118] in, is the dimension of the key (K), which is used to scale the dot product to prevent the gradient from vanishing or exploding.

[0119] Finally, the outputs of all the "heads" are connected and then subjected to a linear transformation to obtain the final output.

[0120] The multi-head attention mechanism is a technique that allows the model to focus on different parts of the input and different representation subspaces at the same time. It does this by running multiple attentions in parallel, where the number of "heads" represents the number of attention mechanisms that are calculated in parallel. This can be understood as the model learning the internal relationship of features from different angles, achieving better feature reorganization, reducing differences in feature distribution due to disease subtypes, and improving the accuracy of depression risk assessment for ALS patients.

[0121] Furthermore, the output of the multi-head attention module is linearly transformed through the feature adaptation module, which consists of a fully connected layer with a nonlinear activation layer, so that the features of ALS can better adapt to the depression risk classification module of the source depression model.

[0122] Since the multi-head attention mechanism mainly focuses on the relationship between features, it is not enough to fully adapt to the new data distribution. In order to make up for the large distribution difference between the source domain (non-ALS) and the target domain (ALS), this step constructs a feature adaptation module. Specifically, one or more fully connected layers are first constructed to perform linear transformation on the input features. An activation layer, such as a RELU activation layer, can be introduced after each or several fully connected layers. In order to stabilize the distribution of features, a normalization layer can be added at the end of this module.

[0123] The feature adaptation module provides additional nonlinear transformations, enabling the model to learn more complex feature mappings and correct the feature distribution to better match the depression risk classification module of the source model.

[0124] It should be noted that the target domain feature adaptation module of this embodiment is obtained by performing migration training using a pre-constructed ALS patient EEG data sample set, wherein the ALS patient EEG data sample set includes EEG data of ALS depressed patients and ALS non-depressed patients, as well as labels of depressed patients and non-depressed patients corresponding to the EEG data;

[0125] During the transfer training, the target domain feature adaptation module freezes the parameters of some fully connected layers in the feature extraction module and the depression risk classification module; and optimizes the parameters of some fully connected layers in the target domain feature adaptation module and the depression risk classification module using a cross entropy loss function;

[0126] Specifically, the depression risk classification module of this embodiment directly uses the classification part of the source depression classification model, or fine-tunes the latter layers of the classifier to obtain the depression risk assessment result. This embodiment uses cross entropy as the loss function for subsequent parameter optimization, and the loss function is as follows:

[0127] ;

[0128] in, is a label. is the prediction result of the model.

[0129] Since the feature adaptation module can make the feature space of the target domain (ALS patients) more compatible with the feature space of non-ALS patients, the classifier part only uses the classifier part of the source depression classification model to output the evaluation result, or only fine-tunes the latter few layers of the source classifier to achieve depression evaluation in the target domain. The present invention uses cross-entropy loss to achieve the optimization goal of model parameters, which can encourage the model to output predictions that are closer to the distribution of the annotated labels, impose a larger penalty on wrong predictions, and prompt the model to learn the correct classification faster. The evaluation task of this embodiment contains only two types of labels, and the cross-entropy loss can be simplified to binary cross-entropy, which is expressed by the following formula:

[0130] ;

[0131] in, To mark the label, is the probability that the model predicts the positive class.

[0132] During model training, the ALS patient EEG data sample set was divided into a training set and a validation set, and the parameters of the first few fully connected layers of the feature extraction module and the depression risk classification module were frozen. During the training process, only the parameters of the last few layers of the multi-head attention module, feature adaptation module, and depression risk classification module were updated. The optimization goal was to minimize the cross entropy loss, and the optimal model was determined by the performance of the model in the validation set.

[0133] In this embodiment, only the target domain data (ALS sample data) is used for model training. The modules whose parameters need to be updated include: the multi-head attention module, the feature adaptation module and the parameters of the last few layers of the depression risk classification module. The rest of the model is frozen. The feature extractor is frozen because this part has been fully trained in the source model and has certain feature extraction advantages. Therefore, only the combination and distribution of features are adjusted by training the multi-head attention module and the feature adaptation module to adapt to the depression classification of ALS patients. Taking into account that the adjusted features may still differ from the source feature distribution, in the classifier part of the model, the parameter optimization of the last few layers of the depression risk classification module is opened to adapt to the new depression classification task.

[0134] In summary, the embodiment of the present invention provides a system for assessing the risk of depression in ALS patients based on transfer learning, and constructs a method for migrating a mature depression assessment model to ALS patients. While maintaining the original model's ability to extract depression features, the features are not affected by ALS symptoms, and can be applied to the depression assessment of ALS patients. The present invention uses a migration method to construct an adaptive feature aggregation module and a multi-head attention module to screen and correct effective EEG features, learn and extract the complex relationship of the features of ALS patients from multiple angles, and adjust the feature distribution to match the established depression risk classification module by constructing a special adaptation layer. The present invention can use only a small amount of ALS patient data to migrate the trained depression model to the depression assessment of ALS patients, preserve the accuracy of the original depression assessment model for depression risk assessment, and provide an objective indicator for depression screening of ALS patients. An objective evaluation method for assessing the depressive state of ALS patients that does not rely on subjective judgment is realized; for non-psychiatric professionals, the objective indicator can be used to judge the depressive state of ALS patients.

[0135] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0136] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A depression risk assessment system for ALS patients based on transfer learning, characterized in that: include: A data acquisition unit, used to collect EEG data of the ALS patient to be evaluated; A source domain depression risk assessment unit, which is pre-trained based on a sample set of EEG data of non-ALS patients, and includes a feature extraction module for extracting EEG features from the EEG dataset and a depression risk classification module for classifying and predicting depression risk; The target domain feature adaptation module is arranged between the feature extraction module and the depression risk classification module, and is obtained by migration training using a pre-constructed ALS patient EEG data sample set, and is used to screen and correct the extracted EEG features of the ALS patient to be evaluated based on the EEG feature data corresponding to the non-ALS patient EEG data sample set, and input the EEG features into the depression risk classification module to predict the depression risk of the ALS patient to be evaluated; the target domain feature adaptation module includes an adaptive feature aggregation module, a multi-head attention module and a feature adaptation module; The adaptive feature aggregation module is used to perform feature distribution correction on the EEG feature data of the ALS patient to be evaluated based on the EEG feature data corresponding to the EEG data sample set of the non-ALS patient, and cluster the corrected EEG feature data of the ALS patient to be evaluated to screen and obtain valid ALS EEG feature data; The multi-head attention module is used to extract features from the effective ALS EEG feature data obtained by screening to obtain feature data containing the relationship between features; The feature adaptation module is used to perform feature mapping on the feature data including the relationship between features to obtain a feature distribution adapted to the depression risk classification module; When the feature extraction module is used to extract features from multiple EEG data segments in the ALS EEG data of the ALS patient to be evaluated, multiple EEG feature data of the same number of feature categories and the same number of time slices as those corresponding to each EEG data segment in the EEG data sample set of the non-ALS patient are obtained; The adaptive feature aggregation module performs feature distribution correction on the EEG feature data of the ALS patient to be evaluated based on the EEG feature data corresponding to the EEG data sample set of the non-ALS patient by the following method: Based on the EEG feature data corresponding to multiple patients in the EEG data sample set of non-ALS patients, the mean and standard deviation of the EEG feature data of each category are calculated on the full time slice; The EEG feature data of the ALS patient to be evaluated are divided into feature groups according to feature categories, and the EEG feature data of each time slice of each EEG data segment in each feature group are subjected to feature distribution correction using the following formula: ; in, is the EEG feature of the t-th time slice after correction, To correct the EEG features of ALS patients with the mth feature of the tth time slice, is the mean value of the EEG feature of the mth feature in the EEG data sample set of non-ALS patients, is the standard deviation of the mth feature in the EEG data sample set of non-ALS patients, M represents the maximum number of feature categories corresponding to each feature group, N represents the number of time slices of each EEG data segment, is the corrected EEG feature of the mth feature of the ALS patient in the tth time slice.

2. The ALS patient depression risk assessment system based on transfer learning according to claim 1, characterized in that: Before the feature extraction module, a data preprocessing unit is also included, which is used to preprocess the EEG data of the ALS patient to be evaluated by the following method: Resampling, notching, removing power frequency, removing base drift, removing invalid high-frequency components and removing EEG artifacts on the collected EEG data of the ALS patient to be evaluated, to obtain EEG data after noise reduction; Based on the amplitude of the EEG data in the EEG data sample set of the non-ALS patient, correcting the amplitude of the noise-reduced EEG data of the ALS patient to be evaluated using quartiles; The amplitude-corrected EEG data is sliced ​​using the same time window and step size as those used in preprocessing the EEG data sample set of non-ALS patients to obtain multiple EEG data segments, which constitute the preprocessed ALS EEG data corresponding to the ALS patient to be evaluated.

3. The ALS patient depression risk assessment system based on transfer learning according to claim 1, characterized in that: The corrected EEG characteristic data of the ALS patient to be evaluated are clustered to screen and obtain effective ALS EEG characteristic data, including: For each feature group, the cosine similarity between the feature data of each time slice and the feature data of other time slices is calculated respectively, and an adjacency matrix is ​​constructed based on the cosine similarity; Constructing a Laplacian matrix based on the degree matrix of the adjacency matrix and normalizing it; Based on the normalized Laplace matrix, a feature polynomial is constructed and solved to obtain a similarity reference value between each time slice and features of the same category of other time slices; Arrange each similarity reference value from large to small, and calculate the gap between two adjacent similarity reference values ​​to obtain the kth similarity reference value that makes the gap the largest, and use k as the number of clusters; Based on the cluster number k, the first k similarity reference values ​​are used as cluster center values, the corrected EEG feature data of the ALS patient to be evaluated are clustered, and a pooling operation is performed on all feature data in the cluster after clustering to screen out effective ALS EEG features.

4. The ALS patient depression risk assessment system based on transfer learning according to claim 3 is characterized in that: The adjacency matrix is ​​expressed as: ; in, is the cosine similarity between the feature data of the i-th time slice and the feature data of the j-th time slice; The cosine similarity is expressed as: ; in, is the characteristic data of the i-th time slice, is the feature data of the j-th time slice.

5. The ALS patient depression risk assessment system based on transfer learning according to claim 1, characterized in that: The multi-head attention module is used to extract features from the screened effective ALS EEG feature data, including: The effective ALS EEG feature data is multiplied by three weight matrices respectively to perform linear transformation, and the three linear transformation results are used as Query, Key and Value; the three weight matrices are obtained by learning; Calculate the dot product of Query and Key to get the attention score, and normalize the attention score through softmax to get the attention weight; The Value is weighted and summed using the attention weight to obtain feature data containing the relationship between features.

6. The ALS patient depression risk assessment system based on transfer learning according to claim 1, characterized in that: The feature adaptation module includes a plurality of fully connected layers arranged in sequence and an activation layer arranged after each fully connected layer; The fully connected layer is used to perform linear transformation on the input feature data, mapping the ALS EEG feature data to the non-ALS EEG feature dimension; The activation layer is used to perform nonlinear transformation on the EEG features that have been linearly transformed by the fully connected layer, so as to learn complex feature mapping and correct the feature distribution that is suitable for the depression risk classification module.

7. The ALS patient depression risk assessment system based on transfer learning according to claim 2, characterized in that: The quartiles are used to correct the amplitude of the noise-reduced EEG data of the ALS patient to be evaluated, which is expressed as: ; in, is the corrected EEG data, represents the EEG data of ALS patients, represents the EEG data in the EEG data sample set of non-ALS patients, is the quantile statistic.

Citation Information

Patent Citations

  • Depression classification method based on self-supervised learning and transfer learning

    CN113255734A

  • Non-contact anxiety and depression screening method for pulmonary nodule patients

    CN117457201A