Electroshock personalized efficacy prediction method based on double-condition hybrid expert network
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN UNIV
- Filing Date
- 2026-04-24
- Publication Date
- 2026-08-07
AI Technical Summary
这些方法在一定程度上推动了 ECT 智能分析的发展,但现有方法仍存在一些不足:一方面,部分方法仅关注脑电信号本身,忽视了年龄、性别等人口学差异对脑状态表征的影响;另一方面,部分方法虽然引入了刺激参数,但通常采用简单拼接或线性融合方式处理脑电特征与刺激条件,难以有效刻画不同患者脑状态与不同刺激剂量之间复杂的非线性“剂量-响应”关系
1)本发明同时选取 ECT 治疗过程中麻醉诱导后、电刺激释放前的多通道脑电信号、患者人口学基线信息以及刺激参数作为输入源数据,仅需经过滤波、标准化、编码和归一化等预处理即可输入模型得到最终的疗效预测结果,不需要依赖人工设计复杂特征,也不需要专家先验知识进行额外干预。
Smart Images

Figure CN122531623A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for predicting the efficacy of electroconvulsive therapy (ECT) based on electroencephalogram (EEG) signals. Specifically, it is a personalized ECT efficacy prediction method that combines convolutional self-attention coding networks, demographic conditional normalization mechanisms, and biconditional hybrid expert networks for individualized efficacy assessment and stimulation parameter recommendation. Background Technology
[0002] Electroconvulsive therapy (ECT) is a physical therapy method that induces generalized epileptic seizures by briefly stimulating the brain with electrical impulses under general anesthesia. It is primarily used to treat major depressive disorder, bipolar disorder, schizophrenia, catatonia, and some treatment-resistant mental illnesses. ECT has advantages such as rapid onset and definite efficacy, and is particularly suitable for patients with severe symptoms, high suicide risk, or poor response to drug therapy. Clinical practice shows that the therapeutic effect of ECT is closely related to the appropriateness of the stimulation parameters. Different patients exhibit significant differences in age, gender, brain function status, and epilepsy threshold; the same stimulation dose may produce completely different therapeutic responses in different individuals. If the stimulation parameters are set too low, it may fail to induce therapeutically significant seizures, resulting in ineffective treatment; if the stimulation parameters are set too high, it may increase the risk of adverse reactions such as cognitive impairment and memory disturbances. Therefore, accurately assessing the patient's brain state before treatment and predicting the efficacy based on stimulation parameters to achieve individualized dosage selection has become a key issue in the clinical application of ECT. During ECT (Electroconvulsive Therapy), the EEG signals after anesthesia induction and before electrical stimulation can reflect the patient's current brain function state to a certain extent and are closely related to whether a successful seizure can be induced. Meanwhile, the patient's demographic characteristics, such as age and gender, as well as external stimulation parameters, such as charge, frequency, and pulse width, also significantly influence the treatment outcome. Traditionally, the setting of ECT stimulation parameters relies primarily on physician experience, dose titration strategies, and manual observation and judgment during treatment. This approach not only depends on clinical experience but also struggles to fully quantify individual patient differences and complex stimulus-response relationships, easily leading to inaccurate parameter settings, thus affecting treatment efficacy and safety. Furthermore, repeated trial-and-error stimulation increases treatment time, patient burden, and clinical resource consumption. Therefore, establishing a method that can automatically predict efficacy and assist in parameter recommendation before treatment is of great significance.
[0003] In recent years, many scholars have conducted research on the prediction of ECT efficacy, and the relevant methods can be broadly divided into two categories: methods based on feature engineering and classifiers, and methods based on deep learning. Classifier-based methods typically extract artificially designed features such as power spectrum, time-frequency features, and nonlinear dynamic features from EEG signals, and then use models such as support vector machines, random forests, and logistic regression for classification and prediction. Deep learning-based methods typically use convolutional neural networks, recurrent neural networks, or attention networks to automatically learn feature representations directly from EEG signals to improve predictive performance. These methods have promoted the development of intelligent ECT analysis to some extent, but existing methods still have some shortcomings: on the one hand, some methods only focus on the EEG signal itself, ignoring the influence of demographic differences such as age and gender on brain state representation; on the other hand, although some methods introduce stimulation parameters, they usually use simple splicing or linear fusion to process EEG features and stimulation conditions, making it difficult to effectively characterize the complex nonlinear "dose-response" relationship between different patient brain states and different stimulation doses. Furthermore, existing automated prediction methods still face certain challenges in terms of cross-subject generalization ability, individualized modeling ability, and clinical usability, and are still insufficient to meet the needs of individualized ECT treatment decisions in practice. Summary of the Invention
[0004] To address the aforementioned issues, this invention proposes a personalized efficacy prediction method for electroconvulsive therapy (ECT) based on a dual-condition hybrid expert network. This method aims to accurately predict whether a single stimulation during ECT treatment can successfully induce an effective seizure and further support the recommendation of individualized stimulation parameters.
[0005] To achieve the above objectives, the present invention employs the following method: Multichannel EEG signals were extracted from ECT treatment records after anesthesia induction and before electrical stimulation release. Patient demographic baseline information and stimulation parameters for the current treatment were simultaneously extracted to construct a multimodal input sample for a single treatment. Then, the EEG signals, demographic information, and stimulation parameters were preprocessed to improve the consistency and comparability between different modalities. Next, a patient perception feature extraction module was designed, inputting the processed EEG signals into a convolutional self-attention encoding network. An adaptive layer normalization mechanism based on demographic conditionation was used to dynamically calibrate the feature distribution of each layer of the network, thereby obtaining a representation of the patient's brain state. Further, a dual-conditional interactive routing module was designed, inputting the patient's brain state representation and stimulation parameters into a gating network. Activation weights of multiple expert networks were dynamically allocated, and the predicted probability of successful induction of the treatment was obtained through shared linear heads and weighted aggregation. Finally, during the model deployment phase, the candidate stimulation parameter space was traversed, and the stimulation scheme with the minimum charge was selected under the premise of meeting the success rate threshold, thereby achieving individualized efficacy assessment and stimulation parameter recommendation in electroconvulsive therapy.
[0006] The personalized efficacy prediction method for electroconvulsive therapy based on a dual-condition hybrid expert network provided by this invention includes the following steps: Step 1: Extract multi-channel EEG signals after anesthesia induction and before electrical stimulation release, patient baseline demographic characteristics, and stimulation parameters for the current treatment from ECT treatment records, and construct multimodal input samples for a single treatment. Step 2: Preprocess the multimodal input samples to obtain normalized demographic features and stimulus parameter vectors; Step 3: Input the processed EEG signals and demographic features into the patient perception feature extraction module, use a convolutional self-attention coding network to extract a high-dimensional representation of the patient's brain state, and use an adaptive layer normalization mechanism based on demographic conditions to dynamically calibrate the feature distribution of each layer of the network to obtain the representation of the patient's brain state. Step 4: Input the patient's brain state representation and stimulus parameter vector into the dual-condition interactive routing module. Activation weights of each expert network are dynamically calculated through a dual-condition gating network. The outputs of multiple expert networks are weighted and aggregated to obtain the probability of successful induction of this treatment. Step 5: Based on the predicted output, output the efficacy prediction results, and in the model deployment stage, traverse the candidate stimulation parameter space, screen the stimulation levels that meet the success rate threshold, and give individualized recommended stimulation schemes according to the principle of minimum energy.
[0007] Furthermore, in step 1, constructing multimodal input samples specifically includes: Step 1.1: Extract multi-channel EEG signals from the clinical ECT EEG monitoring device after anesthesia induction and before electrical stimulation release. As core input data characterizing the patient's transient brain physiological state; Step 1.2: Extract the patient's baseline demographic characteristics The demographic characteristics include at least age and sex, which are used to assist the model in calibrating physiological baseline differences between different patients; Step 1.3: Extract the external stimulation parameters for the current treatment, including charge quantity, pulse frequency, and pulse width, to form a stimulation parameter vector. ; Step 1.4: Combine the pre-treatment multichannel EEG signals, demographic characteristics, and stimulation parameters to form an input sample for the model. This is used for subsequent training and prediction.
[0008] Furthermore, in step 2, the preprocessing of the multimodal input samples specifically includes: Step 2.1: For the EEG signal, a bandpass filter is used to remove low-frequency baseline drift and high-frequency electromyographic noise, and the filtered signal is Z-score normalized. Step 2.2: The standardized EEG signal is segmented into non-overlapping segments of a preset duration and stacked to form an input tensor. ,in Indicates the number of brainwave channels. Indicates the sampling time length; Step 2.3: For demographic information, age is standardized using Z-score, and gender is encoded using 0 / 1. Step 2.4: For the stimulus parameters, the Min-Max normalization method is used to map them to... interval; Step 2.5: The processed EEG tensor, demographic vector, and stimulus parameter vector s are used as model inputs to form standardized multimodal samples.
[0009] Furthermore, in step 3, the perceptual feature extraction module specifically includes: Step 3.1: Input the multi-channel EEG signal processed in Step 2 into the feature extraction module of the convolutional self-attention coding network. Use the convolutional structure to extract local spatiotemporal features and use the multi-head self-attention structure to model long-range temporal dependencies. The convolutional self-attention coding network includes a front-end convolutional block, a slice labeling and embedding module, and multiple stacked coding layers. The front-end convolutional block includes a one-dimensional convolutional layer, a batch normalization layer, an activation function, a max pooling layer, and a Dropout layer. The coding layers include normalization, multi-head attention, residual connection, re-normalization, feedforward network, and residual connection. Step 3.2: In the normalization node of the convolutional self-attention encoding network module, an adaptive layer normalization mechanism (AdaLN) for demographic conditionalization is introduced to encode demographic features into conditional vectors. And dynamically generate the scaling factor and offset factor required for normalization; Step 3.3, the formula for calculating AdaLN is:
[0010] in Input features for the current layer, and These represent the characteristic mean and standard deviation, respectively. This represents element-wise multiplication. and For the condition vector Dynamically generated scaling and translation parameters; Step 3.4: Dynamically calibrate the characteristic distribution of patients of different ages and genders through the AdaLN mechanism described above; Step 3.5: After passing through a multi-layer patient-perception convolutional self-attention encoding network, the output feature sequence is aggregated into a fixed-dimensional vector using global average pooling to obtain a representation of the patient's brain state. .
[0011] Furthermore, in step 4, the specific steps of the dual-condition interactive routing module include: Step 4.1: Construct an expert database containing multiple expert networks. ,in For the number of experts; Step 4.2: Each expert network employs a bottleneck residual adapter structure, with the patient's brain state representation as its input. , No. The output expression for each expert is:
[0012] in, This indicates the patient's brain state. Indicates the input feature dimension. express The output characteristics of an expert network For a dimension reduction matrix, For an upgraded matrix, It is a non-linear activation function. Indicates the bottleneck dimension, and ; Step 4.3: Through the bottleneck residual adapter structure, each expert network learns specific response patterns under different stimulus intensities and different patient brain states.
[0013] Furthermore, in step 4, the specific steps for calculating the biconditional gating network and the prediction probability include: Step 4.4: Characterize the patient's brain state. With stimulus parameter vector The components are then spliced together to form a gating network input; Step 4.5: Calculate the expert activation weight vector using a biconditional gating network. Its expression is:
[0014] in This represents a vector concatenation operation. and These are the learnable parameters of the gated network. For the normalized weight vector, Indicates the number of expert networks. Each component in the equation represents the activation weight of the corresponding expert network. Step 4.6: Map each expert's output to the corresponding expert-level log-odds value using a shared binary classification head. The expression is as follows:
[0015] in, For the first The output characteristics of an expert and To share binary classification head parameters, For the first The expert-level logarithmic probability value corresponding to each expert; Step 4.7: Weight all expert outputs according to the gating weights to obtain the final log-odds value, which is expressed as:
[0016] in, For the first The activation weight of each expert For the first The expert-level logarithmic odds value of an expert. This represents the final log-odds value after weighted aggregation; Step 4.8: Input the final log-odds value into the Sigmoid function, which outputs the probability of successful induction, expressed as:
[0017] Step 4.9, based on the stated success probability of induction The predicted efficacy of this treatment is obtained by comparing it with a set threshold, where the predicted result belongs to a binary classification set. 0 indicates that the induction failed, and 1 indicates that the induction was successful.
[0018] Furthermore, in step 5, the specific steps for model training and label definition include: Step 5.1: Using the duration of EEG episodes as the criterion for judging efficacy, label the training samples. Step 5.2: Mark samples with an EEG monitoring showing a seizure duration greater than 0 seconds as successfully induced, and mark samples with a seizure duration of 0 seconds or that fail to induce a seizure as unsuccessfully induced; Step 5.3: Input the standardized multimodal input samples obtained in Step 2 and the labels obtained in Step 5.2 into the network for end-to-end training. Use the binary cross-entropy loss function to optimize the parameters of the patient perception feature extraction module, the biconditional gating network and the expert network. Step 5.4 improves the model's accuracy and generalization ability for predicting individualized ECT efficacy by jointly learning the coupling relationship between patient brain state, demographic information and stimulation parameters.
[0019] Furthermore, in step 5, the specific steps for recommending individualized stimulus parameters include: Step 5.5, Define the candidate stimulus parameter space This space consists of multiple clinically permissible stimulation levels; Step 5.6: Fix the patient's brain state representation and demographic baseline information, and sequentially traverse the parameter space. Each candidate stimulus parameter in And calculate the corresponding probability of prediction success:
[0020] in, Represents the candidate stimulus parameter space. Representing parameter space One of the candidate stimulus parameters configurations, This represents the electroencephalogram (EEG) signals and candidate stimulation parameters of a given patient before treatment. Under these conditions, the model predicts the probability of successful induction of the desired therapeutic effect. Step 5.7, Set the clinical success rate threshold In all satisfied Among the candidate stimulation parameters, the stimulation protocol with the smallest charge is selected as the final recommended dose, and its expression is:
[0021] in, Indicates the clinical success rate threshold. Indicates candidate stimulus parameter configuration The corresponding charge amount, This indicates the final recommended stimulation parameter configuration. This indicates that the constraints are met.
[0022] Of all the candidate stimulus parameter configurations, the one that minimizes the charge is selected as the output. Step 5.8: If the prediction success probability of all candidate stimulus parameters is lower than the threshold, a high-risk warning message is output to prompt the doctor to further assess the patient's condition or adjust the treatment strategy.
[0023] The present invention also provides a personalized electroconvulsive therapy (ECT) efficacy prediction system based on a dual-condition hybrid expert network, comprising a processor and a memory. The memory is used to store program instructions, and the processor is used to call the program instructions in the memory to execute the ECT efficacy prediction method based on a dual-condition hybrid expert network as described in the above technical solution.
[0024] The present invention also provides a computer-readable storage medium, including a readable storage medium on which a computer program is stored, wherein when the computer program is executed, it implements the method for predicting the personalized efficacy of electroconvulsive therapy based on a dual-condition hybrid expert network as described in the above technical solution.
[0025] This invention has the following positive effects and characteristics: 1) This invention simultaneously selects multi-channel EEG signals after anesthesia induction and before electrical stimulation release during ECT treatment, patient demographic baseline information, and stimulation parameters as input source data. Only preprocessing such as filtering, standardization, encoding, and normalization is required before inputting the data into the model to obtain the final efficacy prediction result. It does not rely on manually designed complex features or require additional intervention from expert prior knowledge.
[0026] 2) This invention addresses the significant individual differences among patients in terms of age, gender, and brain function status by introducing a demographically conditional adaptive layer normalization mechanism to dynamically modulate the EEG feature extraction process. This enhances the model's ability to adapt to differences in physiological baselines across subjects, thereby improving its generalization performance and individualized modeling capabilities in efficacy prediction tasks.
[0027] 3) In response to the complex nonlinear relationship between “patient brain state, stimulation parameters and treatment results” in ECT efficacy prediction, this invention inputs the patient brain state representation and stimulation parameters into a dual-condition gating network and designs a hybrid expert structure to dynamically model the response patterns under different stimulation conditions. This allows the model to pay more attention to the feature combinations that are more important to the prediction results, thereby improving the prediction accuracy and further supporting the recommendation of individualized stimulation parameters with the minimum effective dose. Attached Figure Description
[0028] Figure 1 This is an overall structural diagram of an example of the present invention.
[0029] Figure 2 This is a diagram of the structure of a convolutional self-attention encoding network. Detailed Implementation
[0030] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The illustrative embodiments and descriptions are for explaining the present invention only and are not intended to limit the present invention.
[0031] This invention provides a personalized efficacy prediction method for electroconvulsive therapy (ECT) based on a dual-condition hybrid expert network, the specific steps of which include: Step 1: Extract multichannel EEG signals from ECT treatment records after anesthesia induction and before electrical stimulation release. Patient baseline demographic characteristics and the stimulation parameters for this treatment And construct multimodal input samples for a single treatment. ; Step 2 involves preprocessing the multimodal input samples obtained in Step 1. This includes filtering, standardizing, and slicing the EEG signals, and numerically encoding and normalizing the demographic features and stimulus parameters to obtain normalized vectors of demographic features and stimulus parameters. ; Step 3: Input the processed EEG signals and demographic features from Step 2 into the patient perception feature extraction module. Use a convolutional self-attention coding network to extract a high-dimensional representation of the patient's brain state, and dynamically calibrate the feature distribution of each layer of the network through an adaptive layer normalization mechanism based on demographic conditions to obtain the patient's brain state representation. ; Step 4: Characterize the patient's brain state obtained in Step 3. Compared with the stimulus parameter vector obtained in step 2 The inputs are fed into a dual-condition interactive routing module, where the activation weights of each expert network are dynamically calculated using a dual-condition gating network. The outputs of multiple expert networks are then weighted and aggregated to obtain the probability of successful treatment induction. ; Step 5, based on the predicted probability obtained in Step 4 The system outputs the efficacy prediction results and, during the model deployment phase, traverses the candidate stimulation parameter space to select stimulation levels that meet the success rate threshold, and provides individualized recommended stimulation schemes according to the principle of minimum energy.
[0032] In step 1 above, the construction of multimodal input samples includes the following specific steps: Step 1.1: Extract multi-channel EEG signals from the clinical ECT EEG monitoring device after anesthesia induction and before electrical stimulation release, as the core input data characterizing the patient's transient brain physiological state; Step 1.2: Extract the patient's baseline demographic characteristics, which include at least age and sex, to assist the model in calibrating physiological baseline differences between different patients; Step 1.3: Extract the external stimulation parameters for the current treatment, including charge quantity, pulse frequency, and pulse width, to form a stimulation parameter vector. In this invention ; Step 1.4: Combine the pre-treatment multichannel EEG signals, demographic characteristics, and stimulation parameters into an input sample for the model. This is used for subsequent training and prediction.
[0033] This invention employs a multimodal input sample construction approach, rather than relying solely on a single EEG signal for efficacy prediction. Its aim is to more comprehensively reflect the key factors influencing the efficacy of ECT treatment. Pre-treatment EEG signals characterize the patient's current brain function state and are crucial for determining whether they are easily induced to have effective seizures by external stimuli. Demographic characteristics such as age and gender reflect, to some extent, differences in the patient's physiological baseline; patients of different ages and genders typically exhibit differences in EEG distribution, epilepsy threshold, and sensitivity to electrical stimulation. Stimulation parameters directly determine the intensity of external intervention and are external conditions affecting efficacy outcomes. By combining these three factors into a unified input sample, subsequent models can simultaneously consider "patient state factors" and "stimulation condition factors" at the single-treatment level, thus providing a data foundation for achieving more clinically accurate individualized efficacy prediction.
[0034] In step 2 above, the multimodal input samples are preprocessed, and the specific steps include: Step 2.1: For EEG signals, a bandpass filter is used to remove low-frequency baseline drift and high-frequency electromyographic noise, and the filtered signal is Z-score normalized to reduce the differences in EEG amplitude among different patients. Step 2.2: The standardized EEG signal is segmented into non-overlapping segments of a preset duration and stacked to form an input tensor. ,in Indicates the number of brainwave channels. The sampling time is indicated, and the preset time is preferably 1s to 4s, and in a specific embodiment it is 2s; Step 2.3: For demographic information, age is standardized using Z-score, and gender is encoded using 0 / 1. Step 2.4: For the stimulus parameters, map them to the appropriate values using the Min-Max normalization method. An interval, its expression is:
[0035] in These are the original stimulus parameters. and These are the minimum and maximum values of the stimulus parameters, respectively. Step 2.5: Use the processed EEG tensor, demographic vector, and stimulus parameter vector as model input to form standardized multimodal samples.
[0036] In this invention, targeted preprocessing of different modal inputs is a crucial step in ensuring the stability of subsequent joint modeling. EEG signals are high-dimensional continuous temporal data, easily affected by the acquisition environment, individual differences, and noise artifacts; therefore, they require unified processing through filtering, standardization, and slicing. Demographic information is low-dimensional structured data, with numerical ranges and representations differing significantly from EEG signals; it needs to be encoded and standardized to map to a numerical space suitable for network processing. Stimulus parameters also have different dimensions and value ranges; without normalization, inconsistencies in numerical scales can easily occur when jointly modeling with EEG features, thus affecting the stability of parameter updates during model training. Through the above preprocessing operations, the EEG tensor, demographic vector, and stimulus parameter vector can form a unified, standardized, and comparable multimodal sample representation at the input stage, thereby improving the model's efficiency in fusing multi-source heterogeneous information.
[0037] In step 3 above, a patient perception feature extraction module is designed, the specific steps of which include: Step 3.1: Input the multi-channel EEG signal processed in Step 2 into the feature extraction module of the convolutional self-attention coding network. Local spatiotemporal features are extracted using the convolutional structure, and long-range temporal dependencies are modeled using a multi-head self-attention structure. The convolutional self-attention coding network includes a front-end convolutional block, a slice labeling and embedding module, and multiple stacked coding layers. The front-end convolutional block sequentially includes a one-dimensional convolutional layer, a batch normalization layer, an activation function, a max-pooling layer, and a Dropout layer. The coding layers sequentially include normalization, multi-head attention, residual connections, re-normalization, a feedforward network, and residual connections. Step 3.2: Introduce the AdaLN adaptive layer normalization mechanism for demographic conditionalization into the normalization node of the convolutional self-attention coding network module. This encodes demographic features into conditional vectors and dynamically generates the scaling and offset factors required for normalization. Specifically, the normalization node is located before the multi-head attention sub-layer and the feedforward network sub-layer in each coding layer. Step 3.3: The formula for calculating AdaLN is:
[0038] in Input features for the current layer, and These represent the characteristic mean and standard deviation, respectively. This represents element-wise multiplication. and For the condition vector Dynamically generated scaling and translation parameters; Step 3.4: Through the AdaLN mechanism described above, the characteristic distribution of patients of different ages and genders is dynamically calibrated to mitigate the characteristic distribution shift caused by differences in physiological baselines across subjects; Step 3.5: After passing through a multi-layer patient-perception convolutional self-attention encoding network, the output feature sequence is aggregated into a fixed-dimensional vector using global average pooling to obtain a representation of the patient's brain state. .
[0039] In this invention, the patient perception feature extraction module not only performs the function of EEG feature encoding but also the function of cross-individual physiological difference calibration. Traditional methods, when processing pre-treatment EEG, typically only directly input the EEG sequences of different patients into a unified network for feature extraction, without fully considering the modulating effects of demographic factors such as age and gender on EEG distribution and neural excitability. This easily leads to the model learning features that reflect more of the group average pattern, which is not conducive to accurately representing the individualized brain state of a specific patient. This invention introduces the AdaLN mechanism into the convolutional self-attention encoding network, allowing demographic conditional information to continuously participate in feature modulation in the network's multi-layer normalization nodes, thereby improving the extracted brain state representation. It is no longer a uniform representation obtained by directly encoding raw EEG data, but an individualized representation that incorporates patient baseline differences. This representation can more accurately reflect the patient's true neurological state before the current treatment, providing a more reliable input basis for subsequent dual-conditional routing and efficacy prediction.
[0040] In step 4 above, the two-condition interactive routing module is designed, and its specific steps include: Step 4.1: Construct an expert database containing multiple expert networks ,in The number of experts is specified. The expert network preferably employs a bottleneck residual adapter structure as its implementation to maintain parameter efficiency and reduce the risk of overfitting under conditions of small sample clinical data. Step 4.2: Each expert network employs a bottleneck residual adapter structure, with the patient's brain state representation as its input. The bottleneck residual adapter structure consists of dimensionality reduction projection, nonlinear activation, and dimensionality increase projection, used to learn specific response patterns under different stimulus intensities and different patient brain states with fewer parameters. The output expression for each expert is:
[0041] in, This indicates the patient's brain state. Indicates the input feature dimension. express The output characteristics of an expert network For the first A dimensionality reduction matrix from an expert is used to compress the high-dimensional patient brain state features into a low-dimensional bottleneck space. For the first An expert-level upscaling matrix is used to map bottleneck features back to the original feature dimensions. It is a non-linear activation function. Represents the bottleneck dimension, and satisfies D. The aforementioned and All of these are trainable parameters learned by the optimizer during the end-to-end training process.
[0042] Step 4.3: Through the bottleneck residual structure, each expert network can learn specific response patterns under different stimulus intensities and different patient brain states with fewer parameters.
[0043] Step 4, the specific steps for calculating the biconditional gating network and the prediction probability include: Step 4.4: Characterizing the patient's brain state With stimulus parameter vector The components are then spliced together to form a gating network input; Step 4.5: Calculate the expert activation weight vector using a biconditional gating network. Its expression is:
[0044] in This represents a vector concatenation operation. and These are the learnable parameters of the gated network. For the normalized weight vector, Indicates the number of expert networks. Each component in the equation represents the activation weight of the corresponding expert network. Step 4.6: Map the output of each expert to the corresponding expert-level log-odds value using a shared binary classification head. The expression is as follows:
[0045] in, For the first The output characteristics of an expert and To share binary classification head parameters, For the first The expert-level logarithmic probability value corresponding to each expert; Step 4.7: Weight all expert outputs according to the gating weights to obtain the final log-odds value, which is expressed as:
[0046] in, For the first The activation weight of each expert For the first The expert-level logarithmic odds value of an expert. This represents the final log-odds value after weighted aggregation.
[0047] Step 4.8: Input the final logit into the Sigmoid function, which outputs the probability of successful induction, expressed as follows:
[0048] Step 4.9: Based on the stated success probability of induction The predicted efficacy of this treatment is obtained by comparing it with a set threshold, where the predicted result belongs to a binary classification set. 0 indicates that the induction failed, and 1 indicates that the induction was successful.
[0049] The core of the dual-condition interactive routing module designed in this invention lies not in simply increasing the number of expert networks, but in representing the patient's brain state. With stimulus parameter vector The combined input of these factors enables the gating network to dynamically select more suitable expert combinations for different samples. Because the stimulus-response relationship in ECT treatment has significant non-linear characteristics, the same stimulus dose may correspond to completely different induced outcomes in different patients, and the efficacy probability of the same patient may also show significant changes under different stimulus parameters. Therefore, using only a single classifier or simply splicing features is often insufficient to fully characterize this complex relationship. This invention learns response patterns under different conditions through an expert database, and then a dual-conditional gating network jointly determines the expert weights based on the current sample's state and the stimulus, enabling the model to achieve more fine-grained conditional predictions while keeping the number of parameters controllable. In other words, this module essentially achieves dynamic modeling of the complex mapping relationship between "patient brain state—stimulation conditions—therapeutic outcome," thereby improving the accuracy and clinical applicability of the prediction results.
[0050] In step 5 above, the design of the model training and individualized stimulus parameter recommendation module includes the following specific steps: Step 5.1: Based on the clinical ECT treatment guidelines and expert consensus, the training samples were labeled and assigned using the duration of EEG episodes as the criterion for efficacy evaluation. Step 5.2: Mark samples with seizure duration greater than 0 seconds as successfully induced, and mark samples with seizure duration equal to 0 seconds or that fail to induce a seizure as unsuccessfully induced; Step 5.3: Input the standardized multimodal input samples obtained in Step 2 and the labels obtained in Step 5.2 into the network for end-to-end training, and use the binary cross-entropy loss function to optimize the parameters of the patient perception feature extraction module, the biconditional gating network and the expert network; Step 5.4: Improve the accuracy and generalization ability of the model for predicting individualized efficacy of ECT by jointly learning the coupling relationship between patient brain state, demographic information and stimulation parameters.
[0051] Step 5, the specific steps for recommending individualized stimulus parameters, include: Step 5.5: Define the candidate stimulus parameter space This space consists of multiple clinically permissible stimulation levels; Step 5.6: Fix the patient's brain state representation and demographic baseline information, and sequentially traverse the parameter space. Each candidate stimulus parameter in And calculate the corresponding probability of prediction success:
[0052] in, Represents the candidate stimulus parameter space. Representing parameter space One of the candidate stimulus parameters configurations, This represents the electroencephalogram (EEG) signals and candidate stimulation parameters of a given patient before treatment. Under these conditions, the model predicts the probability of successful induction of this treatment.
[0053] Step 5.7: Set clinical success rate threshold In all satisfied Among the candidate stimulation parameters, the stimulation protocol with the smallest charge is selected as the final recommended dose, and its expression is:
[0054] in, Indicates the clinical success rate threshold. Indicates candidate stimulus parameter configuration The corresponding charge amount, This indicates the final recommended stimulation parameter configuration. This indicates that the constraints are met.
[0055] Of all the candidate stimulus parameter configurations, the one that minimizes the charge is selected as the output.
[0056] Step 5.8: If the prediction success probability of all candidate stimulus parameters is lower than the threshold, a high-risk warning message is output to prompt the doctor to further assess the patient's condition or adjust the treatment strategy.
[0057] The application value of this invention lies not only in its binary prediction of the success of a single treatment but also in its ability to provide clinical recommendations for individualized stimulation parameters. In traditional ECT treatment, the setting of stimulation parameters often relies on empirical titration or gradual trial-and-error adjustments. While this approach can achieve individualization to some extent, it usually requires multiple attempts to approach the appropriate dose, increasing clinical workload and potentially subjecting patients to unnecessary stimulation burden. This invention, by fixing the patient's brain state representation and demographic baseline information during the model deployment phase and traversing the candidate stimulation parameter space, predicts the probability of induction success at different stimulation levels. This allows for the priority selection of the stimulation protocol with the lowest energy while meeting clinical success rate requirements. This strategy helps reduce the risk of overstimulation while ensuring treatment effectiveness and provides physicians with quantifiable and interpretable auxiliary decision-making information. For patients with an overall low predicted success probability, this invention can also output high-risk warning information, prompting clinicians to further assess the patient's condition, adjust the anesthesia plan, or revise the stimulation strategy, thereby improving the safety and precision of the treatment process.
[0058] To further illustrate the technical means adopted and the effects achieved in this invention, the following description is provided in conjunction with the accompanying drawings and specific embodiments: The first part is multimodal data extraction and preprocessing: 1. Multichannel EEG signals were extracted from ECT treatment records after anesthesia induction and before electrical stimulation release, and patient demographic information and stimulation parameters were extracted simultaneously. The demographic information mainly included age and sex, while the stimulation parameters mainly included charge, frequency, and pulse width. This stage of EEG reflects the patient's immediate brain function under anesthesia and is closely related to the successful induction of an effective seizure; therefore, it is used as the core input signal of this invention.
[0059] 2. To improve the stability of model training and the consistency between different modalities, this example preprocesses the original data. For the EEG signal, a fourth-order Butterworth bandpass filter is first used to remove low-frequency baseline drift and high-frequency noise, followed by Z-score normalization. The normalized signal is then divided into 2-second non-overlapping segments, which are stacked to form the model input tensor. In this example, the EEG input tensor can be represented as... ,in Indicates the number of brainwave channels. This represents the duration of time. For demographic information, age is Z-score normalized, and gender is encoded using 0 / 1. For stimulus parameters, Min-Max normalization is used to map them to... The interval is adjusted to reduce the impact of different units on network training. After the above processing, the EEG signals, demographic information, and stimulus parameters together constitute the multimodal input samples of this invention.
[0060] The second part is the model structure design: 1. A dual-condition hybrid expert network framework for predicting individualized ECT treatment efficacy was designed. For example... Figure 1 As shown, the framework mainly includes an EEG feature extraction branch, a demographic information encoding branch, a stimulus parameter encoding branch, an adapter expert library, a gating network, a shared linear head, and a weighted aggregation module. EEG signals are first input into a convolutional self-attention encoding network to extract a high-dimensional representation of the patient's brain state. Age and gender information are mapped by a demographic encoder to generate dynamic parameters required for conditional normalization at each layer. Stimulus parameters are mapped into stimulus conditional vectors by the encoder and input into the gating network along with the patient's brain state representation to dynamically generate expert activation weights. Multiple adapter experts conditionally model the current input, and after the shared linear head outputs expert-level prediction results, weighted aggregation yields the final efficacy prediction result.
[0061] 2. A convolutional self-attention encoding network was designed. For example... Figure 2 As shown, this module first uses a front-end convolutional block to extract local temporal features from the EEG signal. This convolutional block sequentially includes a one-dimensional convolutional layer, a batch normalization layer, an activation function, a max-pooling layer, and a Dropout layer, used to enhance local pattern extraction capabilities and reduce the length of the original sequence. Subsequently, the convolutional output is fed into a slice labeling and embedding module, mapping continuous temporal features into a token sequence suitable for self-attention modeling. Afterward, global dependency modeling is completed through multiple stacked encoding layers. Each encoding layer includes conditional normalization, multi-head attention, residual connections, further conditional normalization, a feedforward network, and residual connections. Unlike traditional fixed normalization, this invention introduces an AdaLN mechanism in each normalization node, generating dynamically adjustable parameters through a demographic encoder. and The feature distribution of different patients is scaled and translated, so that the network can adaptively calibrate the EEG features according to age and gender differences, thus mitigating the distribution offset problem caused by differences in physiological baselines across subjects.
[0062] 3. A dual-condition interactive routing module was designed. For example... Figure 1As shown, the patient brain state representation output from the convolutional self-attention encoding network and the stimulus condition vector output from the stimulus parameter encoder are jointly input into the gating network. The gating network dynamically generates expert weights based on the interaction between these two types of information. The expert database consists of multiple lightweight adapter experts, each used to model specific dose-response patterns under different patient brain states and different combinations of stimulus intensities. The outputs of multiple experts are first mapped to expert-level predictions through a shared linear head, and then weighted and aggregated according to the gating weights to finally output a prediction of whether the current ECT treatment can successfully induce an effective seizure. This structure avoids the problem of traditional simple splicing methods failing to adequately characterize complex nonlinear relationships, improving the accuracy and interpretability of individualized efficacy prediction.
[0063] The third part is the training and testing of the model: In this example, an end-to-end approach is used to train the proposed model. All samples are divided into training, validation, and test sets according to the principle of subject independence. A stratified grouped five-fold cross-validation strategy is used for training and testing to ensure that subjects do not overlap between different folds, thereby more objectively evaluating the model's generalization performance in heterogeneous clinical populations. During training, this example uses the AdamW optimizer to update the model parameters, with the weight decay coefficient set to... The initial learning rate is set to The learning rate is dynamically adjusted using a cosine annealing strategy, with a batch size of 32 and a maximum training epoch of 100. To prevent overfitting, an early stopping mechanism is introduced during training: training is terminated early if the validation set loss does not decrease within 15 consecutive epochs, and the optimal model parameters are saved. During the testing phase, the model outputs the probability of successfully inducing an effective seizure given the current brain state and stimulation parameters, and provides a binary classification prediction based on a set threshold. Furthermore, during the model deployment phase, under fixed patient brain state and demographic information, the success probability at different stimulation levels can be calculated by traversing the candidate stimulation parameter space, thus providing a basis for individualized stimulation parameter recommendations for clinical practice.
[0064] Through the above training and testing process, the experimental results further demonstrate the effectiveness of the present invention. The personalized electroconvulsive therapy (ECT) efficacy prediction method based on a dual-condition hybrid expert network proposed in this invention has achieved good application results in the ECT efficacy prediction task. In comparative experiments with EEGNet, ShallowConvNet, ResNet, and the dedicated baseline ECTNet, the method of this invention achieved the best results in the three core indicators of accuracy, F1-score, and AUC-ROC, reaching 74.22%, 79.58%, and 0.8162, respectively. This indicates that the present invention can more effectively characterize the complex nonlinear dose-response relationship between the patient's brain state and stimulation parameters.
[0065] Secondly, embodiments of the present invention also provide a personalized electroconvulsive therapy (ECT) efficacy prediction system based on a dual-condition hybrid expert network, including a processor and a memory. The memory is used to store program instructions, and the processor is used to call the program instructions in the memory to execute the ECT efficacy prediction method based on a dual-condition hybrid expert network as described in the above technical solution.
[0066] Thirdly, embodiments of the present invention also provide a computer-readable storage medium, including a readable storage medium on which a computer program is stored, wherein when the computer program is executed, it implements the personalized electroconvulsive therapy efficacy prediction method based on a dual-condition hybrid expert network as described in the above technical solution.
[0067] The embodiments described above are merely examples of implementation methods of the present invention. While the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements are all within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A personalized efficacy prediction method for electroconvulsive therapy based on a dual-condition hybrid expert network, characterized in that, Includes the following steps: Step 1: Extract multi-channel EEG signals after anesthesia induction and before electrical stimulation release, patient baseline demographic characteristics, and stimulation parameters for the current treatment from ECT treatment records, and construct multimodal input samples for a single treatment. Step 2: Preprocess the multimodal input samples to obtain normalized demographic features and stimulus parameter vectors; Step 3: Input the processed EEG signals and demographic features into the patient perception feature extraction module, use a convolutional self-attention coding network to extract a high-dimensional representation of the patient's brain state, and use an adaptive layer normalization mechanism based on demographic conditions to dynamically calibrate the feature distribution of each layer of the network to obtain the representation of the patient's brain state. Step 4: Input the patient's brain state representation and stimulus parameter vector into the dual-condition interactive routing module. Activation weights of each expert network are dynamically calculated through a dual-condition gating network. The outputs of multiple expert networks are weighted and aggregated to obtain the probability of successful induction of this treatment. Step 5: Based on the predicted output, output the efficacy prediction results, and in the model deployment stage, traverse the candidate stimulation parameter space, screen the stimulation levels that meet the success rate threshold, and give individualized recommended stimulation schemes according to the principle of minimum energy.
2. The personalized efficacy prediction method for electroconvulsive therapy based on a dual-condition hybrid expert network according to claim 1, characterized in that: Step 1, constructing multimodal input samples specifically includes: Step 1.1: Extract multi-channel EEG signals from the clinical ECT EEG monitoring device after anesthesia induction and before electrical stimulation release. As core input data characterizing the patient's transient brain physiological state; Step 1.2: Extract the patient's baseline demographic characteristics The demographic characteristics include at least age and sex, which are used to assist the model in calibrating physiological baseline differences between different patients; Step 1.3: Extract the external stimulation parameters for the current treatment, including charge quantity, pulse frequency, and pulse width, to form a stimulation parameter vector. ; Step 1.4: Combine the pre-treatment multichannel EEG signals, demographic characteristics, and stimulation parameters to form an input sample for the model. This is used for subsequent training and prediction.
3. The personalized efficacy prediction method for electroconvulsive therapy based on a dual-condition hybrid expert network according to claim 1, characterized in that: Step 2, the preprocessing of the multimodal input samples specifically includes: Step 2.1: For the EEG signal, a bandpass filter is used to remove low-frequency baseline drift and high-frequency electromyographic noise, and the filtered signal is Z-score normalized. Step 2.2: The standardized EEG signal is segmented into non-overlapping segments of a preset duration and stacked to form an input tensor. ,in Indicates the number of brainwave channels. Indicates the sampling time length; Step 2.3: For demographic information, age is standardized using Z-score, and gender is encoded using 0 / 1. Step 2.4: For the stimulus parameters, the Min-Max normalization method is used to map them to... interval; Step 2.5: The processed EEG tensor, demographic vector, and stimulus parameter vector s are used as model inputs to form standardized multimodal samples.
4. The personalized efficacy prediction method for electroconvulsive therapy based on a dual-condition hybrid expert network according to claim 1, characterized in that: In step 3, the perceptual feature extraction module specifically includes: Step 3.1: Input the multi-channel EEG signal processed in Step 2 into the feature extraction module of the convolutional self-attention coding network. Use the convolutional structure to extract local spatiotemporal features and use the multi-head self-attention structure to model long-range temporal dependencies. The convolutional self-attention coding network includes a front-end convolutional block, a slice labeling and embedding module, and multiple stacked coding layers. The front-end convolutional block includes a one-dimensional convolutional layer, a batch normalization layer, an activation function, a max pooling layer, and a Dropout layer. The coding layers include normalization, multi-head attention, residual connection, re-normalization, feedforward network, and residual connection. Step 3.2: In the normalization node of the convolutional self-attention encoding network module, an adaptive layer normalization mechanism (AdaLN) for demographic conditionalization is introduced to encode demographic features into conditional vectors. And dynamically generate the scaling factor and offset factor required for normalization; Step 3.3, the formula for calculating AdaLN is: in Input features for the current layer, and These represent the characteristic mean and standard deviation, respectively. This represents element-wise multiplication. and For the condition vector Dynamically generated scaling and translation parameters; Step 3.4: Dynamically calibrate the characteristic distribution of patients of different ages and genders through the AdaLN mechanism described above; Step 3.5: After passing through a multi-layer patient-perception convolutional self-attention encoding network, the output feature sequence is aggregated into a fixed-dimensional vector using global average pooling to obtain a representation of the patient's brain state. .
5. The personalized efficacy prediction method for electroconvulsive therapy based on a dual-condition hybrid expert network according to claim 1, characterized in that: Step 4, the specific steps of the two-condition interactive routing module include: Step 4.1: Construct an expert database containing multiple expert networks. ,in For the number of experts; Step 4.2: Each expert network employs a bottleneck residual adapter structure, with the patient's brain state representation as its input. , No. The output expression for each expert is: in, This indicates the patient's brain state. Indicates the input feature dimension. express The output characteristics of an expert network For a dimension reduction matrix, For an upgraded matrix, It is a non-linear activation function. Indicates the bottleneck dimension, and ; Step 4.3: Through the bottleneck residual adapter structure, each expert network learns specific response patterns under different stimulus intensities and different patient brain states.
6. The method for predicting the personalized efficacy of electroconvulsive therapy based on a dual-condition hybrid expert network according to claim 1, characterized in that: Step 4, the specific steps for calculating the biconditional gating network and the prediction probability include: Step 4.4: Characterize the patient's brain state With stimulus parameter vector The components are then spliced together to form a gating network input; Step 4.5: Calculate the expert activation weight vector using a biconditional gating network. Its expression is: in This represents a vector concatenation operation. and These are the learnable parameters of the gated network. For the normalized weight vector, Indicates the number of expert networks. Each component in the equation represents the activation weight of the corresponding expert network. Step 4.6: Map each expert's output to the corresponding expert-level log-odds value using a shared binary classification head. The expression is as follows: in, For the first The output characteristics of an expert and To share binary classification head parameters, For the first The expert-level logarithmic probability value corresponding to each expert; Step 4.7: Weight all expert outputs according to the gating weights to obtain the final log-odds value, which is expressed as: in, For the first The activation weight of each expert For the first The expert-level logarithmic odds value of an expert. This represents the final log-odds value after weighted aggregation; Step 4.8: Input the final log-odds value into the Sigmoid function, which outputs the probability of successful induction, expressed as: Step 4.9, based on the stated success probability of induction The predicted efficacy of this treatment is obtained by comparing it with a set threshold, where the predicted result belongs to a binary classification set. 0 indicates that the induction failed, and 1 indicates that the induction was successful.
7. The method for predicting the personalized efficacy of electroconvulsive therapy based on a dual-condition hybrid expert network according to claim 1, characterized in that: Step 5, the specific steps for model training and label definition include: Step 5.1: Using the duration of EEG episodes as the criterion for judging efficacy, label the training samples. Step 5.2: Mark samples with an EEG monitoring showing a seizure duration greater than 0 seconds as successfully induced, and mark samples with a seizure duration of 0 seconds or that fail to induce a seizure as unsuccessfully induced; Step 5.3: Input the standardized multimodal input samples obtained in Step 2 and the labels obtained in Step 5.2 into the network for end-to-end training. Use the binary cross-entropy loss function to optimize the parameters of the patient perception feature extraction module, the biconditional gating network and the expert network. Step 5.4 improves the model's accuracy and generalization ability for predicting individualized ECT efficacy by jointly learning the coupling relationship between patient brain state, demographic information and stimulation parameters.
8. The personalized efficacy prediction method for electroconvulsive therapy based on a dual-condition hybrid expert network according to claim 1, characterized in that: Step 5, the specific steps for recommending individualized stimulus parameters, include: Step 5.5, Define the candidate stimulus parameter space This space consists of multiple clinically permissible stimulation levels; Step 5.6: Fix the patient's brain state representation and demographic baseline information, and sequentially traverse the parameter space. Each candidate stimulus parameter in And calculate the corresponding probability of prediction success: in, Represents the candidate stimulus parameter space. Representing parameter space One of the candidate stimulus parameters configurations, This represents the electroencephalogram (EEG) signals and candidate stimulation parameters of a given patient before treatment. Under these conditions, the model predicts the probability of successful induction of the desired therapeutic effect. Step 5.7, Set the clinical success rate threshold In all satisfied Among the candidate stimulation parameters, the stimulation protocol with the smallest charge is selected as the final recommended dose, and its expression is: in, Indicates the clinical success rate threshold. Indicates candidate stimulus parameter configuration The corresponding charge amount, This indicates the final recommended stimulation parameter configuration. This indicates that the constraints are met. Of all the candidate stimulus parameter configurations, the one that minimizes the charge is selected as the output. Step 5.8: If the prediction success probability of all candidate stimulus parameters is lower than the threshold, a high-risk warning message is output to prompt the doctor to further assess the patient's condition or adjust the treatment strategy.
9. A personalized electroconvulsive therapy (ECT) treatment prediction system based on a dual-condition hybrid expert network, characterized in that: It includes a processor and a memory, the memory being used to store program instructions, and the processor being used to call the program instructions in the memory to execute the personalized electroconvulsive therapy efficacy prediction method based on a dual-condition hybrid expert network as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, It includes a readable storage medium on which a computer program is stored, and when the computer program is executed, it implements the personalized electroconvulsive therapy efficacy prediction method based on a dual-condition hybrid expert network as described in any one of claims 1-8.