A Depression Recognition System Based on Electroencephalogram (EEG) Signals

By using a target recognition model based on dual-brain symmetry modeling and interactive simulation, the problems of low accuracy and poor adaptability in the diagnosis of depression have been solved, achieving high-precision depression recognition and improving the depth and accuracy of EEG data interpretation.

CN121489484BActive Publication Date: 2026-03-13YANGTZE RIVER DELTA GUOZHI (SHANGHAI) INTELLIGENT MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-13
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies for diagnosing depression suffer from high subjectivity, low accuracy, and poor adaptability. Traditional machine learning methods struggle to fully capture the subtle, high-dimensional features in EEG, while deep learning methods fail to incorporate the neurophysiological mechanisms of depression, resulting in low accuracy.

Method used

A target recognition model based on dual-brain symmetry modeling and dual-brain interaction simulation is adopted. Through data acquisition, preprocessing and intelligent recognition modules, it automatically captures the asymmetric features of brain regions and simulates brain region attention. It improves recognition accuracy by using bi-branch spatiotemporal feature extraction, spatiotemporal feature fusion and cross attention unit.

Benefits of technology

It achieves high-precision, reliable, and adaptable depression identification, significantly improving the depth and accuracy of EEG data interpretation and enhancing the objectivity and consistency of depression identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121489484B_ABST
    Figure CN121489484B_ABST
Patent Text Reader

Abstract

This invention discloses a depression recognition system based on electroencephalogram (EEG) signals, comprising: a data acquisition module for acquiring multi-channel EEG signals of a target object in a target state; a data processing module for preprocessing the multi-channel EEG signals to obtain the EEG signal to be identified; and an intelligent recognition module for identifying depression based on the EEG signal to be identified using a pre-trained target recognition model. The target recognition model includes a bi-branch spatiotemporal feature extraction unit, a spatiotemporal feature fusion unit, a cross-attention unit, and a classification unit. The bi-branch spatiotemporal feature extraction unit is used to extract spatiotemporal features from the left and right hemisphere EEG signals respectively. The spatiotemporal feature fusion unit is used to globally fuse features from multiple time periods in the left and right hemispheres. The cross-attention unit is used to determine the dependencies between the globally fused features of the left and right hemispheres based on a multi-head attention mechanism. This solution can improve the accuracy and reliability of depression recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a depression recognition system based on electroencephalogram (EEG) signals. Background Technology

[0002] Depression is a common chronic mental disorder with complex causes and a low recovery rate. Its main clinical symptoms include depressed mood, anxiety, insomnia, and cognitive impairment. Currently, the diagnosis of depression in clinical practice primarily relies on the Diagnostic and Statistical Manual of Mental Disorders (DSM) or the International Classification of Diseases (ICD) standards, and is completed through clinical interviews combined with patient self-reporting tools such as the Hamilton Depression Rating Scale and the Beck Depression Rating Scale. This diagnostic model has significant limitations, is highly subjective, and is easily influenced by multiple factors, including the physician's clinical experience, the patient's ability to express themselves and their cooperation, and subjective reporting bias.

[0003] Electroencephalography (EEG) is a non-invasive technique that records the electrophysiological activity of the cerebral cortex, containing a wealth of physiological and psychological information, and providing an objective quantitative means for monitoring the state of the nervous system (such as the auxiliary diagnosis of depression). However, due to its inherent complexity, dynamics, and nonlinearity, decoding depression-related brain activity from EEG is an extremely challenging task.

[0004] In depression identification scenarios, traditional machine learning methods require manual extraction of EEG features (such as spectral features, nonlinear features, and statistical features). This extraction process is complex and time-consuming, making it difficult to comprehensively capture subtle, high-dimensional features related to depression in the EEG, and easily missing key biomarkers. Furthermore, they are sensitive to changes in data distribution; when the EEG data acquisition equipment, parameters, or subject groups differ, the model struggles to adapt. Conventional deep learning methods (CNN, LSTM, TCN) fail to incorporate the neurophysiological mechanisms of depression (such as hemispheric asymmetry and spatial correlations between channels), making it difficult to focus on the core features associated with depression, resulting in low identification accuracy. Summary of the Invention

[0005] This invention provides a depression recognition system based on electroencephalogram (EEG) signals. It utilizes a target recognition model constructed based on binaural symmetry modeling and binaural interaction simulation to automatically capture asymmetric features of brain regions and simulate brain region attention to achieve high-precision depression recognition. This system can effectively improve the accuracy, reliability, and adaptability of depression recognition.

[0006] According to one aspect of the present invention, a depression recognition system based on electroencephalogram (EEG) signals is provided, the system comprising a data acquisition module, a data processing module, and an intelligent recognition module, wherein:

[0007] The data acquisition module is used to acquire multi-channel EEG signals of the target object in the target state; wherein, the target state includes an open-eye resting state and a closed-eye resting state, the multi-channel involves multiple brain functional areas, and the left hemisphere channels and the right hemisphere channels are symmetrically distributed;

[0008] The data processing module is used to preprocess the multi-channel EEG signals to obtain the EEG signals to be identified; wherein, the preprocessing includes reference correction, filtering and segmentation, and the EEG signals to be identified involve multiple target frequency bands, including the δ, θ, α, β and γ frequency bands;

[0009] The intelligent recognition module is used to identify depression based on the EEG signal to be identified using a pre-trained target recognition model to obtain the target recognition result. The target recognition model includes a dual-branch spatiotemporal feature extraction unit, a spatiotemporal feature fusion unit, a cross-attention unit, and a classification unit. The dual-branch spatiotemporal feature extraction unit is used to extract spatiotemporal features from the EEG signals of the left and right hemispheres, respectively. The spatiotemporal feature fusion unit is used to globally fuse the multi-period features of the left and right hemispheres. The cross-attention unit is used to determine the dependency relationship between the globally fused features of the left and right hemispheres based on a multi-head attention mechanism.

[0010] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0011] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the EEG-based depression recognition system according to any embodiment of the present invention.

[0012] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the depression recognition system based on electroencephalogram signals according to any embodiment of the present invention.

[0013] The technical solution of this invention includes a data acquisition module, a data processing module, an intelligent recognition module, and an analysis and display module. The data acquisition module acquires multi-channel EEG signals of a target object in a target state. The target state includes an open-eye resting state and a closed-eye resting state. The multi-channel signals involve multiple brain functional areas, and the left and right hemisphere channels are symmetrically distributed. The data processing module preprocesses the multi-channel EEG signals to obtain the EEG signal to be recognized. The preprocessing includes reference correction, filtering, and segmentation. The EEG signal to be recognized involves multiple target frequency bands, including δ, θ, α, β, and γ frequency bands. The intelligent recognition module is used to acquire multi-channel EEG signals based on pre-trained data. The target recognition model identifies depression based on the EEG signals to be identified. The model includes a bi-branch spatiotemporal feature extraction unit, a spatiotemporal feature fusion unit, a cross-attention unit, and a classification unit. The bi-branch spatiotemporal feature extraction unit extracts spatiotemporal features from the left and right hemisphere EEG signals respectively. The spatiotemporal feature fusion unit performs global fusion of multi-period features from the left and right hemispheres. The cross-attention unit determines the dependencies between the globally fused features of the left and right hemispheres based on a multi-head attention mechanism. The analysis and display module performs statistical analysis and diversified presentation based on the target recognition results. This technical solution, combining brain physiological mechanisms, constructs a target recognition model for depression identification through bi-brain symmetry modeling and bi-brain interaction simulation. It captures asymmetric features of brain regions and simulates brain region attention, thereby achieving high-precision automatic identification of depression. This significantly improves the depth, accuracy, and consistency of interpreting depression EEG data, enhancing the objectivity, reliability, and adaptability of depression identification.

[0014] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of a depression recognition system based on electroencephalogram (EEG) signals according to an embodiment of the present invention;

[0017] Figure 2 This is an illustrative diagram illustrating a paradigm for electroencephalogram (EEG) signal acquisition according to an embodiment of the present invention;

[0018] Figure 3 This is a schematic diagram of the operation of a data processing module according to an embodiment of the present invention;

[0019] Figure 4 This is a flowchart illustrating the overall workflow of a depression recognition system based on electroencephalogram (EEG) signals according to an embodiment of the present invention.

[0020] Figure 5 This is a schematic diagram of the structure of a target recognition model provided in an embodiment of the present invention;

[0021] Figure 6 This is a structural diagram of an encoder and decoder provided according to an embodiment of the present invention;

[0022] Figure 7 This is a schematic diagram of another depression recognition system based on electroencephalogram (EEG) signals provided according to an embodiment of the present invention;

[0023] Figure 8 This is a schematic diagram of another depression recognition system based on electroencephalogram (EEG) signals provided according to an embodiment of the present invention;

[0024] Figure 9 This is a schematic diagram of the structure of an electronic device that implements a depression recognition system based on electroencephalogram (EEG) signals according to an embodiment of the present invention. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first," "second," "target," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] Example 1

[0028] Figure 1 This is a schematic diagram of a depression recognition system based on electroencephalogram (EEG) signals provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where depression can be accurately recognized based on EEG signals. The depression recognition system based on EEG signals can be implemented in hardware and / or software and can be configured in an electronic device with data processing capabilities.

[0029] like Figure 1 As shown, the system includes: a data acquisition module, a data processing module, and an intelligent recognition module. The data acquisition module acquires multi-channel EEG signals of the target object in the target state; the target state includes an open-eye resting state and a closed-eye resting state. The multi-channel signals involve multiple brain functional areas, and the left and right hemisphere channels are symmetrically distributed. The data processing module preprocesses the multi-channel EEG signals to obtain the EEG signals to be recognized; the preprocessing includes reference correction, filtering, and segmentation. The EEG signals to be recognized involve multiple target frequency bands, including the δ, θ, α, β, and γ frequency bands. The intelligent recognition module... This method is used to identify depression based on a pre-trained target recognition model and obtain target recognition results. The target recognition model includes a bi-branch spatiotemporal feature extraction unit, a spatiotemporal feature fusion unit, a cross-attention unit, and a classification unit. The bi-branch spatiotemporal feature extraction unit is used to extract spatiotemporal features from the EEG signals of the left and right hemispheres, respectively. The spatiotemporal feature fusion unit is used to globally fuse the multi-period features of the left and right hemispheres. The cross-attention unit is used to determine the dependency between the globally fused features of the left and right hemispheres based on a multi-head attention mechanism.

[0030] In this embodiment, the data acquisition module first uses a high-precision EEG acquisition device, following the international standard 10-20 system electrode placement method, to simultaneously acquire multi-channel EEG signals from the target subject in the target state. The target subject can be someone undergoing depression testing. The EEG acquisition device has a sampling rate of up to 256Hz, accurately capturing low-frequency (e.g., delta waves 0-4Hz, theta waves 4-8Hz), mid-frequency (e.g., alpha waves 8-13Hz), and high-frequency (e.g., beta waves 13-30Hz, gamma waves 30-50Hz) characteristics of EEG signals. The entire signal acquisition process is convenient and non-invasive; the subject only needs to wear a special EEG cap and complete 6 minutes of signal acquisition in a quiet state (e.g., 3 minutes of rest with eyes open and 3 minutes of rest with eyes closed). See [link to documentation]. Figure 2 During the test, the subjects were required to remain conscious and still, minimizing any obvious physical activity (including head, leg, and unnecessary eye movements), which significantly reduced the difficulty of their cooperation.

[0031] It should be noted that while EEG acquisition devices have a large number of channels to achieve whole-brain coverage, some channels are affected by factors such as skull attenuation and scalp impedance differences, resulting in a lower signal-to-noise ratio. Furthermore, redundant channels increase computational complexity. Therefore, this invention, combining the functional zoning characteristics of the international standard 10-20 system channels, selected 22 key channels, specifically including: frontal lobe (Fp1, Fp2, F3, F4, F7, F8, Fz), central lobe (C3, C4, Cz), parietal lobe (P3, P4, Pz, PO3, PO4), temporal lobe (T3, T4, T5, T6), and occipital lobe (O1, O2, Oz). The left hemisphere contains 11 channels: Fp1, F3, F7, C3, T3, T5, P3, PO3, O1, Fz, and Cz. The right hemisphere contains 11 channels: Fp2, F4, F8, C4, T4, T6, P4, PO4, O2, Pz, and Oz. The channels in the left and right hemispheres are symmetrically distributed.

[0032] Because raw EEG signals are susceptible to noise contamination such as power frequency interference, electromyography artifacts, and electrooculography artifacts, and also suffer from baseline drift caused by inter-channel potential differences, a data processing module is needed to preprocess the acquired multi-channel EEG signals to ensure data quality from the source, thus guaranteeing the reliability of subsequent processing and analysis. Optionally, the data processing module is specifically used for: performing reference correction on the multi-channel EEG signals based on a whole-brain average reference signal to obtain a first EEG signal; wherein the whole-brain average reference signal refers to the average value of the multi-channel EEG signals; performing bandpass filtering on the first EEG signal based on a target frequency range to obtain a second EEG signal; wherein the target frequency range is 1-40Hz; performing non-overlapping segmentation on the second EEG signal based on a target time length to obtain multiple EEG signal segments; and filtering the EEG signal segments according to the target frequency band using an IIR filter and then batch stacking them to obtain the EEG signal to be identified.

[0033] Figure 3 This is a schematic diagram of a data processing module provided by the present invention, wherein signal preprocessing includes reference correction and filtering. Specifically, as shown... Figure 3 As shown, firstly, the Common Average Reference (CAR) technique is used for reference correction, taking the average value of the EEG signals from all channels as the new reference. Then, the rereference signal of the i-th channel can be expressed as: .in, This represents the raw EEG signal of the i-th channel. The first EEG signal is the CAR-corrected EEG signal of the i-th channel. This represents the total number of channels. This is a whole-brain averaged reference signal. This invention, through whole-brain averaged reference correction, can significantly reduce inter-channel interference caused by reference point selection bias, thereby improving signal spatial consistency.

[0034] To remove the effects of power line interference, electromyographic noise (high frequency), and baseline drift (low frequency), this embodiment uses a third-order Butterworth filter set to a target frequency range of 1-40Hz to bandpass filter the first EEG signal to obtain the second EEG signal. Specifically, based on the target frequency range... ,take , Calculate the corresponding normalized frequency; see the formula. and ,in The sampling frequency is ; the designed digital domain transfer function is . , where the coefficient It is determined by the normalized frequency and the filter order (fixed at 3). For the numerator coefficients of the digital filter (coefficient length is...) ), The denominator coefficients of the digital filter (coefficient length is...) ),and Next, the target time length can be set to 2 seconds, and the second EEG signal can be segmented into 2-second non-overlapping segments (i.e., Figure 3 Multiple EEG signal segments can be obtained from the data slices in the data, and stable and clean EEG data segments can be obtained through outlier detection and removal.

[0035] Since different frequency bands of EEG signals correspond to specific neurophysiological mechanisms, in order to extract frequency band-specific features, based on the classic EEG signal segmentation criteria, IIR filters are used to sequentially apply bandpass filters of different frequency bands to the segmented EEG signal segments. (See [link to relevant documentation]). Figure 3 Frequency band decomposition yields five characteristic frequency bands: delta(δ) band (1-4Hz, associated with deep sleep and cognitive inhibition processes), theta(θ) band (4-8Hz, involved in learning, memory, and emotion regulation), alpha(α) band (8-13Hz, reflecting resting state and attention regulation), beta(β) band (13-30Hz, involved in motor control and executive functions), and gamma(γ) band (30-50Hz, involved in perceptual integration and higher cognitive processing). To quantify the characteristics of each frequency band, power spectral density (PSD) analysis can be used, implemented through discrete Fourier transform (DFT).

[0036] After frequency band decomposition, each EEG signal segment forms a time-domain signal matrix of "5 frequency bands × 22 key acquisition channels," which serves as input to the matching model. These matrices are then batch-stacked into a (batch, 5, 22, T) array, where T is the target time length, to provide standardized data support for subsequent feature extraction. It should be noted that the data processing module supports batch data processing and can automatically adapt to the data formats of different EEG acquisition devices, improving data processing efficiency.

[0037] Figure 4 This invention provides an overall workflow diagram of a depression recognition system based on electroencephalogram (EEG) signals. Figure 4 As shown, firstly, multi-channel EEG signals are collected from the target object under the target state. Then, the collected multi-channel EEG signals are preprocessed. Finally, the processed EEG signals are input into the algorithm model for depression identification and the identification results are output.

[0038] In this embodiment, inspired by the physiological mechanisms of the brain, the core neural characteristics of patients with depression (compared to healthy individuals, patients with depression often exhibit functional asymmetry, with relatively increased activity in the right frontal lobe and decreased activity in the left frontal lobe) are focused on. A target recognition model is constructed as the algorithm model through bihemispheric symmetry modeling and cross-hemispheric information interaction simulation. This model combines feature extraction, brain region simulation and partitioning, and module collaborative scheduling functions, aligning with the structural and functional symmetry of the brain to achieve automated and high-precision depression identification. The target recognition model includes a bi-branch spatiotemporal feature extraction unit, a spatiotemporal feature fusion unit, a cross-attention unit, and a classification unit. These modules work together to effectively analyze multi-channel EEG signals and accurately identify depression. Specifically, a dual-branch spatiotemporal feature extraction unit can extract spatiotemporal features from the EEG signals of the left and right hemisphere channels, including local frequency features and long-term temporal correlation features, thereby accurately capturing abnormal activity patterns in unilateral brain regions. A spatiotemporal feature fusion unit can globally fuse multi-period (including early and late) features of the left and right hemisphere channels, achieving multi-scale and multi-dimensional feature fusion. A cross-attention unit can measure the dependency between the global fusion features of the left and right hemisphere channels based on the multi-head attention mechanism, thereby simulating the cross-hemispheric information interaction process, accurately characterizing abnormal coupling in brain regions related to depression, and improving feature discriminative power.

[0039] In this embodiment, optionally, the dual-branch spatiotemporal feature extraction unit includes a first feature extraction unit and a second feature extraction unit. The first feature extraction unit is used to extract spatiotemporal features from the left hemisphere channel EEG signal, and the second feature extraction unit is used to extract spatiotemporal features from the right hemisphere channel EEG signal. The dual-branch spatiotemporal feature extraction unit is constructed based on spatial feature coding blocks and temporal feature coding blocks. The spatial feature coding blocks are used to achieve feature extraction in the spatial dimension, and the temporal feature coding blocks are used to achieve feature extraction in the temporal dimension. Correspondingly, the intelligent recognition module is used to: extract spatial features from the left hemisphere channel EEG signal using the spatial feature coding blocks of the first feature extraction unit to obtain a first spatial feature extraction unit. The system employs a first feature extraction unit to extract temporal features from the first spatial features after depthwise convolution using a temporal feature encoding block. These first spatiotemporal features are then processed sequentially through batch normalization, average pooling, depthwise separable convolution, and regularization to obtain the spatiotemporal features of the left hemisphere channel. A second spatial feature is extracted from the EEG signal of the right hemisphere channel using a spatial feature encoding block of a second feature extraction unit. The second spatiotemporal feature is then processed sequentially through batch normalization, average pooling, depthwise separable convolution, and regularization to obtain the spatiotemporal features of the right hemisphere channel. Optionally, the spatial feature encoding block is constructed based on two-dimensional convolution, batch normalization, ELU activation, and residual connections, while the temporal feature encoding block is constructed based on two-dimensional convolution, ReLU activation, regularization, and dilated causal convolution.

[0040] Figure 5 This is a schematic diagram of the target recognition model provided by the present invention. The left brain region branch represents the first feature extraction unit, the right brain region branch represents the second feature extraction unit, BSRBlock represents the early feature fusion unit, and the classification head represents the classification unit. The first and second feature extraction units have the same network structure, both including a spatial feature encoding block and a temporal feature encoding block. The spatial feature encoding block is constructed based on two-dimensional convolution (Conv2d), batch normalization (BN), ELU (Exponential Linear Unit) activation, and residual connections. The temporal feature encoding block is constructed based on two-dimensional convolution (Conv2d), ReLU (Rectified Linear Unit, i.e., ReLU in the diagram) activation, dropout, and dilated causal convolution (Dilated Causal Conv).

[0041] Specifically, such as Figure 5As shown, the left and right hemisphere EEG signals from the EEG signals to be identified are input into the input layers of the left and right brain regions, respectively. Spatiotemporal features are extracted based on spatial and temporal feature coding blocks. For the spatial feature coding blocks, spatial correlation features (such as signal coupling between the prefrontal and parietal lobes) of different brain regions are extracted through two-dimensional convolution. Batch normalization and ELU activation are used to enhance nonlinear expression. Residual connections are introduced to preserve weak pathological features of the EEG signals. Subsequently, lightweight depthwise convolution (Dv2d) is used to refine the spatial features of single brain region channels channel by channel, reducing computational cost while capturing signal anomalies in local brain regions. For the temporal feature encoding block, after the initial feature transformation is completed by two-dimensional convolution, ReLU activation and Dropout, the long-range temporal dependence of EEG signals is captured by dilated causal convolution (such as alpha wave rhythm abnormalities in patients with depression). Then, the temporal feature distribution is stabilized by batch normalization. The spatial dimension of brain regions is compressed by average pooling (AvgPool2d). The channel features of different brain regions are fused by depthwise separable convolution (Separable Conv2d). Finally, the spatiotemporal features of different brain regions are obtained by regularization (Dropout) to suppress overfitting and avoid EEG noise interference.

[0042] In this embodiment, optionally, the spatiotemporal feature fusion unit includes an early feature fusion unit and a late feature fusion unit; the early feature fusion unit includes a multi-scale one-dimensional convolutional layer, a batch normalization layer, and a max pooling layer, used to perform multi-scale fusion of the spatial features of the left hemisphere channel and the right hemisphere channel extracted by the dual-branch spatiotemporal feature extraction unit; the late feature fusion unit is used to perform global fusion of the spatiotemporal features of the left hemisphere channel and the right hemisphere channel extracted by the dual-branch spatiotemporal feature extraction unit and the spatial fusion features output by the early feature fusion unit.

[0043] like Figure 5As shown, after the dual-branch spatiotemporal feature extraction unit completes deep convolution, the intermediate features of the left and right brain regions are input into the early feature fusion unit (BSRBlock) to achieve preliminary alignment and splicing of fine-grained signal features from different brain regions. BSRBlock uses multi-size one-dimensional convolutions (e.g., Conv1d (1×3 / 1×8 / 1×11)) to capture multi-scale temporal rhythms of EEG signals (such as different periods of delta waves and theta waves), combined with small-kernel convolutions (e.g., Conv1d (1×2), not shown in the figure) to refine rhythmic features. Multi-scale fusion of "spatial association of brain regions - temporal rhythm changes" is then achieved through batch normalization (BN) and max pooling. Conv1d (1×5 / 1×16) in BSRBlock is only used for size alignment of the outputs of convolutions at different scales. Furthermore, the spatial fusion features output by BSRBlock are further integrated with the spatiotemporal features of the left and right hemisphere channels output by the dual-branch spatiotemporal feature extraction unit through the late feature fusion unit to generate global pathological features containing "differences between left and right brain regions - long-term temporal abnormalities", which can be used for the classification and identification of depression or the extraction of pathological indicators.

[0044] In this embodiment, optionally, the cross-attention unit is constructed based on positional encoding, multi-head attention mechanism, layer normalization, and feedforward network; correspondingly, the intelligent recognition module is also used to: perform positional encoding on the global fusion features output by the late feature fusion unit to obtain positional encoding information, and add the positional encoding information to the global fusion features to obtain positional encoding features; wherein, the positional encoding features include left hemisphere positional encoding features and right hemisphere positional encoding features; generate a query matrix based on the left hemisphere positional encoding features and generate a key matrix and a value matrix based on the right hemisphere positional encoding features, split the query matrix, key matrix, and value matrix by head dimension, calculate single-head attention for each head, and project all single-head attentions after concatenation to obtain multi-head attention; perform residual connection between multi-head attention and left hemisphere positional encoding features and then perform layer normalization to obtain cross-attention, and perform nonlinear transformation on cross-attention through feedforward network and then perform residual connection and layer normalization to obtain whole-brain interaction features.

[0045] It should be noted that, in addition to bibranchial symmetrical modeling (i.e., bibranch feature extraction), the core innovative design of this method lies in simulating cross-brain region information interaction to achieve targeted interaction and fusion of left-brain and right-brain features, capturing the key left-right hemisphere asymmetric correlation features for diagnosing depression. In the human brain, the corpus callosum transmits key signals between the left and right hemispheres through nerve fiber bundles. Depressed patients exhibit an asymmetric feature of "relatively enhanced activity in the right frontal lobe and weakened activity in the left frontal lobe." Based on this, this invention, using a cross-attention mechanism, transforms the global fusion features of the left hemisphere into a "query" and the global fusion features of the right hemisphere into "keys" and "values," calculates the correlation weights between the features of the left and right hemispheres, and then transmits high-value information based on these weights. This fusion solves the problem of "isolated channel features," for example, it can capture synergistic anomalies in different regions of the frontal lobe (such as decreased synchronicity of activity between the middle and right channels in the frontal lobe of depressed patients), transforming high-dimensional, multi-dimensional features into single, compact global discriminative features, which are directly input into the classifier to obtain classification probabilities.

[0046] Specifically, the global fusion features of the input cross-attention units need to be converted into vectors that the model can process. This is done through token embedding, mapping each token to a high-dimensional vector using a learnable embedding matrix. Assuming the input sequence length is L (when T=2s, the sampling rate is 256Hz, corresponding to L=512), and the token embedding dimension is... The input embedding matrix is ​​then... (B is the batch size). Since the Transformer has no loop structure, sequence order information needs to be injected through positional encoding. Position vectors (i.e., positional encoding information) are generated using sine and cosine functions. Adding positional encoding information to word embeddings yields inputs containing positional information (i.e., positional encoding features): The mathematical derivation is as follows: For the position encoding of the pos-th position (starting from 0) and the i-th dimension (starting from 0) in the sequence... : .in, That is, the corresponding frequency parameter is used for each dimension pair (even dimension + odd dimension).

[0047] Next, we will start with position-encoded features. Separate the left hemisphere position coding features from the middle and right hemisphere position coding features And calculate based on multi-head attention mechanism and Cross-attention between (see the process) Figure 5 (Criss-cross Attention in [the context of]). First, based on three learnable matrices... , and Based on the left hemisphere position coding features Generate a query matrix Q and encode features based on the right hemisphere location. Generate the key matrix K and value matrix V, see the formula: , and .in, , The focus is on extracting "pathological features of interest" from EEG (such as low-amplitude alpha waves in the left frontal lobe). The focus is on extracting "benchmark features for matching" (such as normal amplitude beta waves in the right frontal lobe). The focus is on extracting "effective features for weighted fusion" (such as cross-band coupling signals). This ensures both the "homology" of Q / K / V (originating from the same EEG segment) and "functional differentiation" through independent matrices, enabling precise capture of the multi-dimensional correlations of "to be queried - to be matched - to be weighted" in EEG signals.

[0048] Then, the query matrix Q, key matrix K, and value matrix V are split according to the head dimension, with each head having a dimension of... The following is an expression: , and .in, ; ,and , and Similarly, we can derive the following formula: Calculate the scaled dot product attention independently for each head as a single-head attention. ,in express The transpose of the expression. All single-head attentions are concatenated and then processed through a projection matrix. To obtain multi-head attention, please refer to the following formula: .in, This indicates a concatenation operation, and the concatenated dimension is... This aligns with the input dimension. This yields multidimensional features of the EEG signal. For stable training, it's necessary to perform layer normalization after residual connection between the multi-head attention and the left hemisphere position encoding features: .in, Representation layer normalization, This represents cross-attention. Then, it is processed through a feedforward network. Perform nonlinear transformation: Whole-brain interaction features were obtained through residual connections and layer normalization: .

[0049] For example, the above process can be implemented using an encoder and decoder structure (see [link to encoder and decoder structure]). Figure 6 The implementation consists of several layers. The encoder is composed of multiple stacked identical encoder layers. Each encoder layer includes multi-head self-attention and a feedforward network, all with residual connections and layer normalization. The decoder is composed of multiple stacked identical decoder layers. Each decoder layer includes masked multi-head self-attention, encoder-decoder attention (i.e., cross-attention, where Q comes from the decoder and K and V come from the encoder), and a feedforward network, all with residual connections and layer normalization. It's worth noting that the decoder layers additionally include masked multi-head attention to prevent the leakage of future position information. After generating Q, K, and V, a mask is used to shield future position information, preventing the model from "peeking" at the sequences that have not yet been generated.

[0050] In this embodiment, optionally, the intelligent recognition module is further configured to: determine the segment prediction risk probability and segment prediction confidence level corresponding to the whole-brain interaction features through the classification unit; integrate the segment prediction risk probabilities and segment prediction confidence levels respectively to obtain the corresponding comprehensive risk probability and comprehensive confidence level; compare the comprehensive risk probability with a preset threshold to determine the classification result; and determine the target recognition result based on the classification result and the comprehensive confidence level; wherein the classification result is depression or non-depression.

[0051] In this embodiment, after obtaining whole-brain interaction features through the cross-attention unit, depression can be identified based on these features using a classification unit. For example, the classification unit can be constructed based on fully connected layers and activation functions. It should be noted that because signal segmentation was performed in the sub-preprocessing stage, each EEG signal segment has corresponding whole-brain interaction features. In the classification and recognition stage, the core logic of segment-based prediction and aggregation-based recognition is used for depression identification. This method effectively captures dynamic abnormal patterns in EEG signals and improves the stability of the model's recognition. The specific process is as follows: First, the whole-brain interaction features corresponding to each EEG signal segment are independently predicted to obtain segment-level prediction results (including segment prediction risk probability and segment prediction confidence). Then, an attention-weighted aggregation strategy is used, combined with the feature saliency and temporal correlation of each segment, to integrate all segment-level prediction results to obtain a comprehensive prediction result (including comprehensive risk probability and comprehensive confidence). The comprehensive risk probability is then compared with a preset threshold (set according to actual needs) (its accuracy can reach over 85%). If the comprehensive risk probability is greater than the preset threshold, the classification result is determined to be depression; otherwise, the classification result is determined to be non-depression. Ultimately, the classification results and overall confidence scores can be output as target recognition results, thereby achieving automated and accurate identification of depression.

[0052] Verification has shown that this system achieves an accuracy rate of over 95% on the public datasets MODMA, HUSM, and Mumtaz, enabling a more accurate and comprehensive assessment of the mental health status of the population and providing strong support for the early detection and intervention of mental health problems such as depression.

[0053] The technical solution of this invention combines brain physiological mechanisms to construct a target recognition model for depression identification through bibrain symmetry modeling and bibrain interaction simulation. The target recognition model captures asymmetric features of brain regions and simulates brain region attention, thereby achieving high-precision automatic identification of depression. This significantly improves the depth, accuracy, and consistency of interpreting EEG data for depression, and enhances the objectivity, reliability, and adaptability of depression identification.

[0054] Example 2

[0055] Figure 7 This is a schematic diagram of a depression recognition system based on electroencephalogram (EEG) signals according to Embodiment 2 of the present invention. This embodiment is an optimization based on the above embodiment. Specifically, the optimization is as follows: the system further includes a model training module, which is used to perform supervised training of the model using a target loss function based on the target dataset to obtain a target recognition model.

[0056] In this embodiment, a target dataset and a target loss function can be pre-constructed. The target recognition model is then obtained through supervised training using the target dataset and the target loss function via the model training module. For example, EEG signals from patients with depression, healthy individuals, and patients with other mental illnesses can be used, and each signal can be manually labeled as tag information. A target dataset is then constructed based on the EEG signals of these three groups and their corresponding labels. Furthermore, to address the common problems of "sample imbalance" and "difficulty in identifying hard-to-classify samples" in depression EEG data, this embodiment specifically optimizes the loss calculation, constructing a target loss function based on Focal Loss (FL). A modulation factor is added to the weighted cross-entropy to reduce the weight of easily classified samples, as shown in the following formula: .in, This represents the probability that a sample is correctly classified; if the sample is a positive class and the prediction is... If so, it is easy to classify; if Then it becomes difficult to classify. When the classes are imbalanced (e.g., there are far more negative samples than positive samples, where the positive samples are depression samples), the model may tend to predict the majority class (the negative class). , The positive class weights (usually set as the proportion of negative samples to balance the differences in the number of classes) are used to solve the problem of imbalanced sample size. This is a focusing parameter used to control the intensity of the modulation factor.

[0057] During model training, 10-fold cross-validation was used, merging 9 folds of data from the target dataset into the training set and using the remaining 1 fold as the validation set; the batch size B was set to 300, and training was conducted for 100 epochs. Adam with a learning rate of 1e-3 was used as the optimizer, coupled with a cosine annealing learning rate scheduling strategy (T_max=16, minimum learning rate 0.3 times the initial learning rate); the target loss function was Focal Loss (…). , To address class imbalance and difficult sample issues, model performance is evaluated using precision, recall, and F1 score. Furthermore, the system supports online model updates, continuously incorporating new clinical data to iteratively optimize fragment segmentation strategies and aggregation weights, thereby constantly improving model analytical accuracy.

[0058] Example 3

[0059] Figure 8 This is a schematic diagram of a depression recognition system based on electroencephalogram (EEG) signals provided in Embodiment 3 of the present invention. This embodiment is an optimization based on the above embodiment. Specifically, the optimization is as follows: the system further includes an analysis and display module, which is used for statistical analysis and diversified display based on the target recognition results.

[0060] In this embodiment, to improve the readability and clinical applicability of the identification results, the analysis and display module can perform statistical analysis based on the target identification results and present the analysis results in diverse formats. For example, by combining the proportion of abnormal segments with clinical scale data, the severity of the condition can be divided into multiple levels: normal, mild, moderate, and severe. A structured report can be generated, including screening conclusions (whether the patient has depression), severity assessment (described by level), and core EEG feature abnormality indications. Brain topography can visually display the power distribution differences in various brain regions, helping doctors quickly locate abnormal brain regions. Feature trend analysis charts can be provided to support comparisons of EEG feature changes before and after treatment, assisting in evaluating treatment effectiveness.

[0061] Example 4

[0062] Figure 9A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0063] like Figure 9 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0064] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0065] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the module functions of a depression recognition system based on electroencephalogram (EEG) signals.

[0066] In some embodiments, the functions of each module of the EEG-based depression recognition system can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the functions of each module in the EEG-based depression recognition system described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the functions of each module in the EEG-based depression recognition system by any other suitable means (e.g., by means of firmware).

[0067] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0068] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0069] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0070] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0071] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0072] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0073] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0074] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A depression recognition system based on electroencephalogram (EEG) signals, characterized in that, The system includes a data acquisition module, a data processing module, and an intelligent recognition module, wherein: The data acquisition module is used to acquire multi-channel EEG signals of the target object in the target state; wherein, the target state includes an open-eye resting state and a closed-eye resting state, the multi-channel involves multiple brain functional areas, and the left hemisphere channels and the right hemisphere channels are symmetrically distributed; The data processing module is used to preprocess the multi-channel EEG signals to obtain the EEG signals to be identified; wherein, the preprocessing includes reference correction, filtering and segmentation, and the EEG signals to be identified involve multiple target frequency bands, including the δ, θ, α, β and γ frequency bands; The intelligent recognition module is used to identify depression based on the EEG signal to be identified using a pre-trained target recognition model. The target recognition model includes a dual-branch spatiotemporal feature extraction unit, a spatiotemporal feature fusion unit, a cross-attention unit, and a classification unit. The dual-branch spatiotemporal feature extraction unit is used to extract spatiotemporal features from the EEG signals of the left and right hemispheres, respectively. The spatiotemporal feature fusion unit is used to globally fuse multi-period features from the left and right hemispheres. The cross-attention unit is used to determine the left and right hemispheres based on a multi-head attention mechanism. The global fusion features are related to the dependencies between them; the spatiotemporal feature fusion unit includes an early feature fusion unit and a late feature fusion unit; the early feature fusion unit is used to perform multi-scale fusion of the spatial features of the left and right hemisphere channels extracted by the dual-branch spatiotemporal feature extraction unit, and the late feature fusion unit is used to perform global fusion of the spatiotemporal features of the left and right hemisphere channels extracted by the dual-branch spatiotemporal feature extraction unit and the spatial fusion features output by the early feature fusion unit; the cross-attention unit is constructed based on position encoding, multi-head attention mechanism, layer normalization and feedforward network; The intelligent recognition module is also used for: The global fusion features output by the late feature fusion unit are positionally encoded to obtain positional encoding information, and the positional encoding information is added to the global fusion features to obtain positional encoding features; wherein, the positional encoding features include left hemisphere positional encoding features and right hemisphere positional encoding features; A query matrix is ​​generated based on the left hemisphere position encoding features, and a key matrix and a value matrix are generated based on the right hemisphere position encoding features. The query matrix, key matrix, and value matrix are split by head dimension, and single-head attention is calculated for each head. All single-head attention is concatenated and projected to obtain multi-head attention. After residual connection of the multi-head attention and the left hemisphere position encoding features, the cross attention is obtained through layer normalization. The cross attention is then nonlinearly transformed through a feedforward network and then residually connected and layer normalized to obtain the whole-brain interaction features.

2. The system according to claim 1, characterized in that, The dual-branch spatiotemporal feature extraction unit includes a first feature extraction unit and a second feature extraction unit. The first feature extraction unit is used to extract spatiotemporal features from the EEG signals of the left hemisphere channel, and the second feature extraction unit is used to extract spatiotemporal features from the EEG signals of the right hemisphere channel. The dual-branch spatiotemporal feature extraction unit is constructed based on spatial feature coding blocks and temporal feature coding blocks. The spatial feature coding blocks are used to achieve feature extraction in the spatial dimension, and the temporal feature coding blocks are used to achieve feature extraction in the temporal dimension. Accordingly, the intelligent recognition module is used for: The first spatial feature is obtained by extracting spatial features from the left hemisphere channel EEG signal through the spatial feature encoding block of the first feature extraction unit; The first spatiotemporal feature is obtained by extracting the temporal features of the first spatial feature after depth convolution through the temporal feature encoding block of the first feature extraction unit. The first spatiotemporal features are sequentially processed through batch normalization, average pooling, depthwise separable convolution, and regularization to obtain the spatiotemporal features of the left hemisphere channel. The second spatial feature is obtained by extracting spatial features from the right hemisphere channel EEG signal through the spatial feature encoding block of the second feature extraction unit; The second spatiotemporal feature is obtained by extracting the temporal features of the second spatial feature after depth convolution through the temporal feature encoding block of the second feature extraction unit. The second spatiotemporal feature is sequentially processed through batch normalization, average pooling, depthwise separable convolution, and regularization to obtain the spatiotemporal feature of the right hemisphere channel.

3. The system according to claim 2, characterized in that, The spatial feature encoding block is constructed based on two-dimensional convolution, batch normalization, ELU activation, and residual connections, while the temporal feature encoding block is constructed based on two-dimensional convolution, ReLU activation, regularization, and dilated causal convolution.

4. The system according to claim 2 or 3, characterized in that, The early feature fusion unit includes a multi-scale one-dimensional convolutional layer, a batch normalization layer, and a max pooling layer.

5. The system according to claim 1, characterized in that, The intelligent recognition module is also used for: The classification unit is used to determine the segment prediction risk probability and segment prediction confidence level corresponding to the whole brain interaction feature; The predicted risk probabilities and predicted confidence levels of all the segments are integrated to obtain the corresponding comprehensive risk probabilities and comprehensive confidence levels; The comprehensive risk probability is compared with a preset threshold to determine the classification result, and the target identification result is determined based on the classification result and the comprehensive confidence level; wherein, the classification result is either depressed or not depressed.

6. The system according to any one of claims 1-3, characterized in that, The data processing module is specifically used for: The first EEG signal is obtained by performing reference correction on the multi-channel EEG signal based on the whole-brain average reference signal; wherein, the whole-brain average reference signal refers to the average value of the multi-channel EEG signal; The first EEG signal is bandpass filtered based on a target frequency range to obtain a second EEG signal; wherein, the target frequency range is 1-40Hz. Based on the target time length, the second EEG signal is segmented without overlap to obtain multiple EEG signal segments; The EEG signal segments are filtered according to the target frequency band using an IIR filter and then stacked in batches to obtain the EEG signal to be identified.

7. The system according to any one of claims 1-3, characterized in that, The system also includes a model training module, which is used to perform supervised training of the model based on the target dataset using a target loss function to obtain a target recognition model.

8. The system according to claim 7, characterized in that, The target dataset is constructed based on EEG signals from patients with depression, healthy individuals, and patients with other mental illnesses. The target loss function is constructed based on focusing loss.

9. The system according to any one of claims 1-3, characterized in that, The system also includes an analysis and display module, which is used to perform statistical analysis and diversified display based on the target recognition results.

Citation Information

Patent Citations

  • Depression electroencephalogram classification method based on double-branch fusion model

    CN114881089A

  • Smell-induced EEG emotion recognition method and system based on space-time stratified attention mechanism

    CN120509411A