Bipolar disorder auxiliary diagnosis method, system and product based on fNIRS data

By combining an improved Transformer variant with semi-supervised contrastive learning, this method addresses the issues of insufficient data augmentation and inadequate feature extraction in small-sample environments for bipolar disorder diagnosis. It achieves efficient and accurate bipolar disorder identification, improves the objectivity and consistency of diagnosis, and is suitable for adolescent screening and early intervention.

CN120636761BActive Publication Date: 2026-02-03WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510716116.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2026-02-03
Estimated Expiration
2045-05-30

AI Technical Summary

Technical Problem

Existing technologies for the auxiliary diagnosis of bipolar disorder suffer from problems such as unstable model performance in small-sample environments of fNIRS, insufficient data augmentation, inadequate feature extraction, and low utilization of unlabeled samples, leading to diagnostic delays and high misdiagnosis rates.

Method used

We employ an improved Transformer variant (PhaseFormer) combined with semi-supervised contrastive learning. By collecting fNIRS brain functional imaging data, performing preliminary preprocessing, and dividing the data into three segments according to the VFT paradigm, we extract features using a basic coding module and a cross-stage attention module. Combined with an end-to-end semi-supervised contrastive learning module, we optimize the model training process and improve discriminative ability and generalization performance.

Benefits of technology

It achieves efficient and accurate identification of bipolar disorder in complex clinical settings, reduces reliance on manual annotation, improves the objectivity and consistency of diagnosis, is suitable for early screening and precise intervention in adolescents, and enhances the robustness and generalizability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120636761B_ABST
    Figure CN120636761B_ABST
Patent Text Reader

Abstract

The application discloses a kind of bipolar mood disorder auxiliary diagnosis method, system and product based on fNIRS data, first acquisition fNIRS brain function imaging data, including rest, task and recovery three stages, and pre-processing, form mark data and unmarked data;Then the unmarked data is carried out data enhancement operation, generates two different views by one strong and one weak two data enhancements;Then the original mark data and the fNIRS time series data of enhanced unmarked data are divided into pre-task resting state, task state and post-task resting state three sections according to VFT paradigm, input encoder, extract the feature representation inside each stage and between each stage, fusion space-time feature, model interstage dynamic association;Finally, for the mark data, the extracted features are input into the classifier, and the classification result is output.The application provides a new technical path for mental illness intelligent screening, early intervention and personalized treatment, and has important scientific research value and wide clinical popularization potential.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of interdisciplinary technology of artificial intelligence and medicine, and relates to an auxiliary diagnostic method, system and product for bipolar disorder, specifically an auxiliary diagnostic method, system and product for bipolar disorder based on functional near-infrared spectroscopy (fNIRS) brain imaging data. Background Technology

[0002] Early identification and intervention of bipolar disorder (BD) are crucial for patient prognosis. However, current clinical diagnosis of BD primarily relies on subjective assessments by psychiatrists, limited by patient self-reports and scale evaluations, leading to diagnostic delays and high misdiagnosis rates. Therefore, there is an urgent need to develop objective and quantifiable auxiliary diagnostic techniques.

[0003] Functional near-infrared spectroscopy (fNIRS), as a non-invasive and highly portable brain imaging technique, has shown promising application prospects in the field of intelligent detection of mental illnesses in recent years. Existing research has demonstrated that fNIRS can effectively detect changes in brain activation patterns and functional connectivity in patients with schizophrenia, affective disorders, anxiety disorders, and personality disorders, providing objective evidence for clinical diagnosis. However, how to combine fNIRS technology with artificial intelligence to achieve efficient, rapid, and accurate identification of bipolar disorder, given the high heterogeneity of mental illness populations and the high cost of acquiring labeled data, remains a bottleneck problem that has not yet been overcome in the current technological field. Summary of the Invention

[0004] This invention aims to address the technical problems in existing intelligent auxiliary diagnosis of bipolar disorder, such as unstable model performance in small sample environments using fNIRS, insufficient data augmentation, inadequate feature extraction, and low utilization of unlabeled samples. It proposes an intelligent auxiliary diagnosis method, system, and product for bipolar disorder that combines an improved Transformer variant (PhaseFormer) with semi-supervised contrastive learning. Through systematic design and integration, it enhances the discrimination ability and generalization performance in complex clinical environments.

[0005] The technical solution adopted by the method of the present invention is: an auxiliary diagnostic method for bipolar disorder based on fNIRS data, comprising the following steps:

[0006] Step 1: Acquire fNIRS brain functional imaging data and perform preliminary preprocessing;

[0007] Step 2: Divide the preprocessed fNIRS time series data into three segments according to the VFT paradigm: pre-task quiet period Mission period and post-task quiet period The input encoder extracts feature representations within and between each stage of the pre-task resting state, task state, and post-task resting state. , and By integrating spatiotemporal features and modeling dynamic relationships between stages, deep features are obtained. ;

[0008] Step 3: Extracting deep features Input the classifier and output the classification result.

[0009] Preferably, in step 1, multi-channel functional near-infrared signals are acquired, including two indicators: HbO and HbR. The acquired raw signals are pre-processed, including noise reduction, drift shifting and standardization, to obtain high-quality cerebral blood flow change sequences.

[0010] Preferably, in step 2, the encoder includes a basic encoding module and a cross-stage attention module;

[0011] The basic encoding module first processes the input signals at each stage independently. The fNIRS signal at each stage first undergoes dimensionality unification through a feature transformation layer, and then is input into an encoder composed of multiple Transformer units. Each Transformer unit contains a self-attention mechanism layer, a layer normalization layer, a feedforward neural network, and a layer normalization layer connected in sequence. The inputs and outputs of the self-attention mechanism layer and the feedforward neural network are connected via residual connections to ensure training stability. The self-attention mechanism layer is responsible for capturing the temporal dependencies within the signal. During the calculation process, a standard attention weight formula is used to obtain temporal feature representations through the interaction of queries, keys, and values. The feedforward neural network is used to perform nonlinear transformations based on the self-attention mechanism layer to further enhance the expressive power of the features.

[0012] The cross-stage attention module employs a two-level attention mechanism to achieve progressive feature fusion; firstly, it utilizes the features of the task phase... As a query, based on resting period characteristics Using these as keys and values, a first-layer cross-attention mechanism is constructed, enabling the task phase to "review" the resting state and extract useful information. ;

[0013] ;

[0014] in, Indicates based on task period characteristics For query Query, pre-resting features The cross-attention module, constructed for keys and values, is computed in the following form:

[0015] ;

[0016] in Query and These are the key and the value, respectively. The dimension of the key vector is used for scaling. () Normalization operation;

[0017] This represents a random deactivation mechanism used to alleviate overfitting, which randomly masks the attention output according to a set retention rate. Presentation layer normalization operation;

[0018] After the task is completed, a second-layer attention mechanism is further constructed to address the characteristics of the recovery period. As a query, it integrates the results obtained from the previous stage of cross-modeling. As keys and values, this simulates the brain's process of "recalling" and integrating tasks during the recovery phase, outputting information. .

[0019] Preferably, in step 3, the classifier performs nonlinear transformation and feature learning through multiple neuron layers, and finally outputs a result to determine whether bipolar disorder exists.

[0020] Preferably, in step 2, the encoder is a trained encoder;

[0021] The training process includes the following sub-steps:

[0022] (1) Acquire fNIRS brain functional imaging data collected from multiple centers, including three stages: resting, task and recovery. Construct a standardized dataset and perform preliminary preprocessing to form labeled and unlabeled datasets.

[0023] (2) Perform data augmentation on unlabeled data, generating two different views through one strong and one weak data augmentation;

[0024] (3) The original labeled data and the enhanced unlabeled data of fNIRS time series data are divided into three segments according to the VFT paradigm: the pre-task quiet period Mission period and post-task quiet period The input encoder extracts feature representations within and between each stage of the pre-task resting state, task state, and post-task resting state. , and By integrating spatiotemporal features and modeling dynamic relationships between stages, deep features are obtained. ;

[0025] For labeled data, the extracted features are input into the classifier, and the classification result is output.

[0026] (4) The model is trained using an end-to-end semi-supervised contrastive learning module. The classification loss is applied to labeled samples, and the hierarchical contrastive loss across samples and time steps is applied to unlabeled samples to obtain a hybrid loss function to guide the training of the encoder and classifier.

[0027] During training, backpropagation is used to optimize the encoder network parameters, and the model is evaluated at specific training epochs.

[0028] Preferably, in step (2), the data augmentation operation includes weak augmentation and strong augmentation. The weak augmentation operation performs dynamic time distortion based on stage division, applies adjustable scaling or compression transformation to time segments of different stages, slightly adjusts the signal rhythm, and simulates individual differences in neural response speed. The strong augmentation operation performs local temporal rearrangement and noise injection. The local temporal rearrangement is to randomly shuffle the order of segments within a set time window to enhance the diversity of local time changes. The noise injection is to superimpose white noise or physiological signal noise to further enhance the generalization ability to external environmental interference.

[0029] Preferably, the dynamic time warp based on stage division is assumed to be the original signal. The time range is The timeline is divided into three segments according to the task flow, and a time transformation function is defined for each segment. The overall time transformation function is expressed as:

[0030] ;

[0031] The final augmented samples are obtained by resampling on the new timeline, i.e.:

[0032] ;

[0033] in, , , These correspond to the time perturbation functions for the silent period, the task period, and the recovery period, respectively.

[0034] Preferably, in step 2, the encoder is a trained encoder;

[0035] During the training process, the training objective is defined as:

[0036] ;

[0037] in, This represents the deep features extracted from unlabeled data after weak and strong augmentation. These are prediction results for labeled samples. These are the real labels of the marked samples. Represents cross-entropy loss, Indicates hierarchical contrast loss. Hyperparameters used to control the relative importance of the two; This represents the network parameters of the encoder, used to extract cross-state feature representations from the input fNIRS brain function data; This represents the network parameters of the classifier, used to map the feature vector output by the encoder to the predicted category.

[0038] The technical solution adopted by the system of the present invention is: an auxiliary diagnostic system for bipolar disorder based on fNIRS data, comprising:

[0039] One or more processors;

[0040] A storage device for storing one or more programs, which, when executed by one or more processors, enable the one or more processors to implement the bipolar disorder auxiliary diagnostic method based on fNIRS data.

[0041] The technical solution adopted by the product of the present invention is: a bipolar disorder auxiliary diagnostic product based on fNIRS data, including computer program instructions, which, when the computer program instructions are run on a computer, cause the computer to execute the bipolar disorder auxiliary diagnostic method based on fNIRS data.

[0042] Compared with the prior art, the present invention has the following significant differences and technical advantages:

[0043] (1) Improved objectivity in diagnosis. Traditional brain imaging methods rely on subjective scale assessments, which are easily affected by the patient's condition and the doctor's experience. This invention is based on fNIRS brain imaging data and uses artificial intelligence to model the spatiotemporal characteristics of brain activity, eliminating subjective assessment bias and significantly improving the objectivity and consistency of diagnosis, especially suitable for early screening and precision intervention in adolescents.

[0044] (2) Breakthrough in Disease Differentiation. Existing fNIRS-based research on mental illnesses mainly focuses on depression detection, with a serious lack of research on bipolar disorder. However, the diagnosis of bipolar disorder is often more difficult because it has a high degree of symptom overlap with major depressive disorder (MDD) in the early differentiation (core symptoms such as depressed mood, loss of interest, and lack of energy), leading to a large number of potential BD individuals being misdiagnosed as MDD at the initial diagnosis stage. This invention is the first to achieve fNIRS-specific detection of bipolar disorder.

[0045] (3) High alignment with research paradigms. Existing fNIRS studies on mental illnesses do not align well with standardized research paradigms, making it difficult to deeply reveal disease-specific neural activity patterns. This invention combines the Verbal Fluency Test (VFT) paradigm and designs a phase-aware cross-temporal attention fusion module to effectively model the dynamic correlation between the three phases of rest, task execution, and recovery, capturing the functional change trajectory of the brain in different states, thereby more accurately characterizing disease-related neural representation features.

[0046] (4) Data efficiency optimization. Current research requires full labels and relies heavily on large-scale labeled data. However, in medical scenarios, especially in the field of mental illness, labeled data is extremely scarce and expensive to obtain. This invention introduces an end-to-end semi-supervised contrastive learning framework in fNIRS mental illness detection for the first time. By jointly optimizing classification loss and hierarchical contrastive loss, it effectively utilizes unlabeled samples, improves the model's discrimination performance under low-label conditions, significantly reduces reliance on manual annotation, and enhances the model's scalability and economy in practical applications.

[0047] (5) Sufficient clinical validation. Most existing studies focus on validation with small datasets and lack systematic evaluation in large-sample, complex clinical settings, which leads to doubts about the practical application value and generalization ability of the model. This invention conducts systematic evaluation and validation based on the largest known private dataset of adolescent fNIRS-VFT in the field, ensuring that the model has good robustness and generalization ability. Attached Figure Description

[0048] The technical solutions of the present invention will be further illustrated below using embodiments and specific implementation methods. In addition, some accompanying drawings are used in the description of the technical solutions. Those skilled in the art can obtain other drawings and the intent of the present invention from these drawings without any creative effort.

[0049] Figure 1 This is a schematic diagram of the method principle framework of an embodiment of the present invention.

[0050] Figure 2This is a diagram of the encoder network structure in an embodiment of the present invention;

[0051] Figure 3 This is a flowchart of the encoder training process according to an embodiment of the present invention. Detailed Implementation

[0052] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0053] This invention proposes an intelligent auxiliary diagnostic method for bipolar disorder (BD) based on an improved Transformer variant (PhaseFormer) combined with semi-supervised contrastive learning. It aims to address the shortcomings of existing methods, such as insufficient data augmentation in small-sample fNIRS environments, inadequate feature extraction, and low utilization of unlabeled samples. Through systematic design and integration, this method enhances the model's discriminative ability and generalization performance in complex clinical settings.

[0054] Please see Figure 1 This embodiment provides an auxiliary diagnostic method for bipolar disorder based on fNIRS data, which includes the following steps:

[0055] Step 1: Acquire fNIRS brain functional imaging data and perform preliminary preprocessing;

[0056] In one implementation, multi-channel functional near-infrared signals, including two indicators, HbO and HbR, are acquired at a frequency of 20 Hz. The acquired raw signals are pre-processed, including noise reduction, drift shifting, and standardization (for labeled data, the data is matched with labels) to obtain a high-quality cerebral blood flow change sequence.

[0057] Step 2: Divide the preprocessed fNIRS time series data into three segments according to the VFT paradigm: pre-task quiet period Mission period and post-task quiet period The input encoder extracts feature representations within and between each stage of the pre-task resting state, task state, and post-task resting state. , and By integrating spatiotemporal features and modeling dynamic relationships between stages, deep features are obtained. ;

[0058] In one implementation, the data is first divided into three segments (pre-task quiet period, task period, and post-task quiet period) according to the VFT paradigm. Then, the features of each of the three segments are fed into the PhaseFormer encoder, and for each complete fNIRS data, the corresponding deep spatial features are obtained.

[0059] In one implementation, please see Figure 2 The encoder includes a basic encoding module and a cross-stage attention module.

[0060] In the basic encoding module, the network first processes the input signals of each stage independently. The fNIRS signal of each stage first passes through a feature transformation layer to unify its dimensions, and then is input into an encoder composed of multiple Transformer units. Each Transformer unit contains two core components: a self-attention mechanism and a feedforward neural network. Layer normalization and residual connections ensure training stability. The self-attention mechanism is responsible for capturing the temporal dependencies within the signal. During the calculation, a standard attention weight formula is used, and temporal feature representations are obtained through the interaction of queries, keys, and values. The feedforward neural network then performs nonlinear transformations on this basis to further enhance the expressive power of the features. This hierarchical processing approach enables the network to extract feature patterns for the resting period, the task period, and the post-task resting period separately, laying the foundation for subsequent cross-stage fusion.

[0061] The cross-stage attention module is the core innovation of this network, aiming to establish dynamic connections between different cognitive stages. This module employs a two-level attention mechanism to achieve progressive feature fusion. First, it utilizes the features of the task-stage phase... As a query, based on resting period characteristics Using these as keys and values, a first-layer cross-attention mechanism is constructed, enabling the task phase to "review" the resting state and extract useful information. ;

[0062] ;

[0063] in, Indicates based on task period characteristics For query, pre-resting features The cross-attention module, constructed for both keys and values, is computed as follows:

[0064] ;

[0065] in Query and These are the key and the value, respectively. The dimension of the key vector is used for scaling. () Normalization operation.

[0066] This represents a random deactivation mechanism used to alleviate overfitting, which randomly masks the attention output according to a set retention rate. The representation layer normalization operation standardizes the attention residual results and the original input, thereby improving training stability.

[0067] After the task is completed, a second-layer attention mechanism is further constructed to address the characteristics of the recovery period. As a query, it integrates the results obtained from the previous stage of cross-modeling. As keys and values, this simulates the brain's process of "recalling" and integrating tasks during the recovery phase, outputting information.

[0068] .

[0069] By using cross-stage interaction, the temporal correlation between the rest period, the task period, and the post-task rest period can be effectively captured, thereby achieving accurate identification of emotional states.

[0070] Step 3: Extracting deep features Input the classifier and output the classification result.

[0071] In one implementation, the classifier performs nonlinear transformation and feature learning through multiple neuron layers, and finally outputs a result to determine whether bipolar disorder exists, and if it is bipolar disorder, to determine which subtype it belongs to.

[0072] In one implementation, please see Figure 3 The encoder in question is a trained encoder;

[0073] The training process includes the following sub-steps:

[0074] (1) Acquire multi-center fNIRS brain functional imaging data, including three stages: resting, task (VFT) and recovery. Construct a standardized dataset and perform preliminary preprocessing (motor artifact removal, baseline calibration, etc.) to form labeled and unlabeled datasets. Divide the original dataset into training set, validation set and test set.

[0075] In one implementation, based on the Verbal Fluency Test (VFT) paradigm, functional near-infrared spectroscopy (fNIRS) is used to collect brain activity data from subjects. The data is then labeled, with label types including healthy control group, bipolar I, and bipolar II. The collected data undergoes preprocessing, including artifact correction, noise and drift removal, and the optical density signal is converted into changes in oxyhemoglobin (HbO) and deoxyhemoglobin (HbR) concentrations. Subsequently, oxyhemoglobin data is used as the primary training data.

[0076] (2) Perform data augmentation on unlabeled data, generating two different views through one strong and one weak data augmentation;

[0077] In one implementation, the data augmentation operation includes weak augmentation and strong augmentation.

[0078] I. Weak Enhancement: Personalized Time Warp;

[0079] Based on the cognitive and physiological characteristics of different stages of VFT, time perturbations of different intensities are set to ensure that time deformation can both enhance dynamic changes and maintain the structural stability of the resting state.

[0080] Let the original signal be The time range is The timeline is divided into three segments according to the task flow, and a time transformation function is defined for each segment. The overall time transformation function is expressed as:

[0081] ;

[0082] The final augmented samples are obtained by resampling on the new timeline, i.e.:

[0083] ;

[0084] in, , , These correspond to the time perturbation functions for the quiet period, the task period, and the recovery period, respectively. A larger perturbation amplitude is set for the task period to introduce richer temporal variation samples; while a smaller perturbation amplitude is used for the quiet period to maintain the basic form of the resting state.

[0085] II. Strong Enhancement: Noise Injection + Segment Rearrangement;

[0086] Specifically, noise injection introduces small perturbations that conform to a Gaussian distribution into the original fNIRS data, helping the model learn to ignore small noise interference and focus on stable, discriminative feature structures, thereby improving the model's robustness and generalization ability in practical applications.

[0087] In addition, by combining segment rearrangement operations to perturb the order of data segments, the robustness of the model is further enhanced.

[0088] (3) The original labeled data and the enhanced unlabeled data of fNIRS time series data are divided into three segments according to the VFT paradigm: the pre-task quiet period Mission period and post-task quiet period The input encoder extracts feature representations within and between each stage of the pre-task resting state, task state, and post-task resting state. , and By integrating spatiotemporal features and modeling dynamic relationships between stages, deep features are obtained. ;

[0089] For labeled data, the extracted features are input into the classifier, and the classification result is output.

[0090] (4) The model is trained using an end-to-end semi-supervised contrastive learning module. The classification loss is applied to labeled samples and the hierarchical contrastive loss across samples and time steps is applied to unlabeled samples to obtain a hybrid loss function to guide the training of the encoder and classifier.

[0091] During training, backpropagation is used to optimize the encoder network parameters, and the model is evaluated at specific training epochs.

[0092] During training, the model's discriminative ability and generalization performance are improved by jointly optimizing the classification loss (for training on labeled samples) and the hierarchical contrastive loss (for enhancing feature structure using unlabeled samples). The training objective is defined as:

[0093] ;

[0094] in, This represents the deep features extracted from unlabeled data after weak augmentation and strong augmentation. These are prediction results for labeled samples. It is the true label of the labeled sample, indicating Cross-entropy loss, Indicates hierarchical contrast loss. Hyperparameters used to control the relative importance of the two; The network parameters of the encoder are mainly used to extract cross-state feature representations from the input fNIRS brain function data; This represents the network parameters of the classifier, used to map the feature vector output by the encoder to the predicted category.

[0095] The core idea of ​​this method is to integrate supervised and unsupervised signals in order to make full use of the limited labeled data and the large amount of unlabeled data.

[0096] During training, network parameters are optimized through backpropagation, and the model is evaluated at specific training epochs. In this embodiment, the model's performance evaluation relies on four commonly used metrics: Accuracy, Precision, Recall, and F1-Scrore.

[0097] (5) Input the test dataset into the trained model and obtain the corresponding evaluation index to reflect the overall performance of the model.

[0098] This embodiment also provides an auxiliary diagnostic system for bipolar disorder based on fNIRS data, including:

[0099] One or more processors;

[0100] A storage device for storing one or more programs, which, when executed by one or more processors, enable the one or more processors to implement the bipolar disorder auxiliary diagnostic method based on fNIRS data.

[0101] This embodiment also provides an auxiliary diagnostic product for bipolar disorder based on fNIRS data, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the auxiliary diagnostic method for bipolar disorder based on fNIRS data.

[0102] The invention will be further illustrated below through specific experiments.

[0103] This experiment used functional near-infrared spectroscopy (fNIRS) data from a speech fluency test developed by Wuhan University People's Hospital for experimental verification. The entire data acquisition process was completed with the assistance, monitoring, and quality control of professional psychologists to ensure the scientific and clinical reliability of the data. In the experiment, all subjects used the same fNIRS acquisition device and configuration. This device contained 53 channels, and the data acquisition frequency was 20Hz.

[0104] After the experimental environment and equipment were prepared, the subjects adjusted to a suitable examination posture and correctly wore the near-infrared device. Before the test, researchers confirmed that the subjects fully understood the test task and remained relaxed. The verbal fluency test lasted 120 seconds and was divided into three phases: a silent period (5 seconds), a task execution period (60 seconds), and a post-task silent period (55 seconds). During the task period, the subjects had to complete a word-building task every 15 seconds, for a total of four times. Example words included "white," "sky," "home," and "flower." After the test, near-infrared data samples of shape (120 × 20, 53) were collected for each subject, where 120 is the total test duration (in seconds), 20 is the sampling frequency (i.e., 20 samples per second), and 53 is the number of channels. After acquiring the raw near-infrared data, appropriate preprocessing operations were performed for subsequent analysis.

[0105] The dataset information is shown in Table 1:

[0106] Table 1

[0107]

[0108] Table 2 summarizes the performance of the proposed system on multiple evaluation metrics under different ratios of unlabeled to labeled data (1:1, 7:3, 8:2, 9:1).

[0109] Table 2

[0110]

[0111] Table 3 summarizes the experimental results of the classic Transformer variant under the same experimental settings.

[0112] Table 3

[0113]

[0114] [1]Liu Y, Hu T, Zhang H, et al. itransformer: Inverted transformers are effective for time series forecasting[J]. arXiv preprint arXiv:2310.06625, 2023.

[0115] [2]Liu Y, Wu H, Wang J, et al. Non-stationary transformers: Exploringthe stationarity in time series forecasting[J]. Advances in neuralinformation processing systems, 2022, 35: 9881-9893.

[0116] [3]Kitaev N, Kaiser Ł, Levskaya A. Reformer: The efficienttransformer[J]. arXiv preprint arXiv:2001.04451, 2020.

[0117] [4]Wu H, Xu J, Wang J, et al. Autoformer: Decomposition transformerswith auto-correlation for long-term series forecasting[J]. Advances in neuralinformation processing systems, 2021, 34: 22419-22430.

[0118] [5]Vaswani A, Shazeer N, Parmar N, et al. Attention is all you need[J]. Advances in neural information processing systems, 2017, 30.

[0119] [6]Zhang Y, Yan J. Crossformer: Transformer utilizing cross-dimensiondependency for multivariate time series forecasting[C] / / The eleventhinternational conference on learning representations. 2023.

[0120] [7]Wang Y, Huang N, Li T, et al. Medformer: A multi-granularitypatching transformer for medical time-series classification[J]. arXivpreprint arXiv:2405.19363, 2024.

[0121] [8]Zhou T, Ma Z, Wen Q, et al. Fedformer: Frequency enhanceddecomposed transformer for long-term series forecasting[C] / / Internationalconference on machine learning. PMLR, 2022: 27268-27286.

[0122] [9]Zhou H, Zhang S, Peng J, et al. Informer: Beyond efficienttransformer for long sequence time-series forecasting[C] / / Proceedings of the AAAI conference on artificial intelligence. 2021, 35(12): 11106-11115.

[0123] In summary, the experiments verified that, under conditions of limited labeled data, the reasonable utilization of unlabeled data can effectively reduce the reliance on manual annotation. However, when the proportion of unlabeled data is too high (e.g., 9:1), the model performance slightly decreases, possibly due to the dilution of the supervision signal or the introduction of noise. Therefore, in practical applications, it is recommended to adopt a more balanced annotation configuration, such as 1:1, to achieve a better trade-off between performance and resource utilization. Furthermore, even with a high proportion of unlabeled data, the model maintains relatively stable performance, further demonstrating the practicality and generalization ability of the proposed method in low-supervision scenarios.

[0124] This invention proposes an intelligent auxiliary diagnostic method, system, and product for bipolar disorder (BD) based on the Transformer architecture and semi-supervised contrastive learning. By introducing personalized data augmentation mechanisms, cross-temporal feature modeling modules, and end-to-end semi-supervised learning optimization strategies, this invention achieves efficient and accurate bipolar disorder identification in real-world clinical environments characterized by scarce labeled samples and high data heterogeneity. It effectively improves the accuracy, stability, and generalization ability of bipolar disorder diagnosis, making it suitable for screening adolescents for bipolar disorder, early intervention, and medical decision support scenarios in resource-constrained areas. This provides an innovative solution for intelligent diagnosis of mental illnesses.

[0125] This invention not only expands the application boundaries of combining fNIRS brain imaging with deep learning in the detection of mental illnesses, but also provides a new technical path for intelligent screening, early intervention and personalized treatment of mental illnesses, which has important scientific research value and broad clinical application potential.

[0126] It should be understood that the embodiments described above are only some, not all, of the embodiments of the present invention. Furthermore, the technical features of the various embodiments or individual embodiments provided by the present invention can be arbitrarily combined to form feasible technical solutions. Such combinations are not constrained by the order of steps and / or structural composition patterns, but must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0127] It should be understood that the above description of the preferred embodiments is quite detailed, but it should not be considered as a limitation on the scope of protection of this invention. Those skilled in the art, under the guidance of this invention, can make substitutions or modifications without departing from the scope of protection of the claims of this invention, and all such substitutions or modifications fall within the scope of protection of this invention. The scope of protection of this invention should be determined by the appended claims.

Claims

1. A method for auxiliary diagnosis of bipolar disorder based on fNIRS data, characterized in that, Includes the following steps: Step 1: Acquire fNIRS brain functional imaging data and perform preliminary preprocessing; Step 2: Divide the preprocessed fNIRS time series data into three segments according to the VFT paradigm: pre-task quiet period Mission period and post-task quiet period The input encoder extracts feature representations within and between each stage of the pre-task resting state, task state, and post-task resting state. , and By integrating spatiotemporal features and modeling dynamic relationships between stages, deep features are obtained. ; The encoder includes a basic encoding module and a cross-stage attention module; The basic encoding module first processes the input signals at each stage independently. The fNIRS signal at each stage first undergoes dimensionality unification through a feature transformation layer, and then is input into an encoder composed of multiple Transformer units. Each Transformer unit contains a self-attention mechanism layer, a layer normalization layer, a feedforward neural network, and a layer normalization layer connected in sequence. The input and output of the self-attention mechanism layer and the feedforward neural network are connected through residual connections to ensure training stability. The self-attention mechanism layer is responsible for capturing the temporal dependencies within the signal. During the calculation process, a standard attention weight formula is used, and temporal feature representation is obtained through the interaction of queries, keys, and values. The feedforward neural network is used to perform nonlinear transformations based on the self-attention mechanism layer to further enhance the expressive power of features; The cross-stage attention module employs a two-level attention mechanism to achieve progressive feature fusion; firstly, it utilizes the features of the task phase... As a query, based on resting period characteristics Using these as keys and values, a first-layer cross-attention mechanism is constructed, enabling the task phase to "review" the resting state and extract useful information. ; ; in, Indicates based on task period characteristics For query Query, pre-resting features The cross-attention module, constructed for keys and values, is computed in the following form: ; in Query and These are the key and the value, respectively. The dimension of the key vector is used for scaling. () Normalization operation; This represents a random deactivation mechanism used to alleviate overfitting, which randomly masks the attention output according to a set retention rate. Presentation layer normalization operation; After the task is completed, a second-layer attention mechanism is further constructed to address the characteristics of the recovery period. As a query, it integrates the results obtained from the previous stage of cross-modeling. As keys and values, this simulates the brain's process of "recalling" and integrating tasks during the recovery phase, outputting information. ; Step 3: Extracting deep features Input the classifier and output the classification result.

2. The method for auxiliary diagnosis of bipolar disorder based on fNIRS data according to claim 1, characterized in that: In step 1, multi-channel functional near-infrared signals are acquired, including two indicators: HbO and HbR. The acquired raw signals are pre-processed, including noise reduction, drift shifting and standardization, to obtain high-quality cerebral blood flow change sequences.

3. The method for auxiliary diagnosis of bipolar disorder based on fNIRS data according to claim 1, characterized in that: In step 3, the classifier performs nonlinear transformation and feature learning through multiple neuron layers, and finally outputs a result to determine whether bipolar disorder exists.

4. The auxiliary diagnostic method for bipolar disorder based on fNIRS data according to any one of claims 1-3, characterized in that: In step 2, the encoder is a trained encoder; The training process includes the following sub-steps: (1) Acquire fNIRS brain functional imaging data collected from multiple centers, including three stages: resting, task and recovery. Construct a standardized dataset and perform preliminary preprocessing to form labeled and unlabeled datasets. (2) Perform data augmentation on unlabeled data, generating two different views through one strong and one weak data augmentation; (3) The original labeled data and the enhanced unlabeled data of fNIRS time series data are divided into three segments according to the VFT paradigm: the pre-task quiet period Mission period and post-task quiet period The input encoder extracts feature representations within and between each stage of the pre-task resting state, task state, and post-task resting state. , and By integrating spatiotemporal features and modeling dynamic relationships between stages, deep features are obtained. ; For labeled data, the extracted features are input into the classifier, and the classification result is output. (4) The model is trained using an end-to-end semi-supervised contrastive learning module. The classification loss is applied to labeled samples, and the hierarchical contrastive loss across samples and time steps is applied to unlabeled samples to obtain a hybrid loss function to guide the training of the encoder and classifier. During training, backpropagation is used to optimize the encoder network parameters, and the model is evaluated at specific training epochs.

5. The method for auxiliary diagnosis of bipolar disorder based on fNIRS data according to claim 4, characterized in that: In step (2), the data augmentation operation includes weak augmentation operation and strong augmentation operation; the weak augmentation operation is a dynamic time warp based on stage division, which applies adjustable scaling or compression transformation to time segments of different stages, slightly adjusts the signal rhythm, and simulates the differences in individual neural response speed; the strong augmentation operation is a local temporal rearrangement and noise injection operation; the local temporal rearrangement is to randomly shuffle the order of segments within a set time window to enhance the diversity of local time changes; The noise injection involves superimposing white noise or physiological signal noise to further enhance the generalization ability to external environmental interference.

6. The method for auxiliary diagnosis of bipolar disorder based on fNIRS data according to claim 5, characterized in that: The dynamic time warp based on stage division, assuming the original signal is... The time range is The timeline is divided into three segments according to the task flow, and a time transformation function is defined for each segment. The overall time transformation function is expressed as: ; The final augmented samples are obtained by resampling on the new timeline, i.e.: ; in, , , These correspond to the time perturbation functions for the silent period, the task period, and the recovery period, respectively.

7. The auxiliary diagnostic method for bipolar disorder based on fNIRS data according to any one of claims 1-3, characterized in that: In step 2, the encoder is a trained encoder; During the training process, the training objective is defined as: ; in, This represents the deep features extracted from unlabeled data after weak and strong augmentation. These are prediction results for labeled samples. These are the real labels of the marked samples. Represents cross-entropy loss, Indicates hierarchical contrast loss. Hyperparameters used to control the relative importance of the two; This represents the network parameters of the encoder, used to extract cross-state feature representations from the input fNIRS brain function data; This represents the network parameters of the classifier, used to map the feature vector output by the encoder to the predicted category.

8. A bipolar disorder auxiliary diagnostic system based on fNIRS data, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the bipolar disorder auxiliary diagnostic method based on fNIRS data as described in any one of claims 1 to 7.

9. A bipolar disorder auxiliary diagnostic product based on fNIRS data, comprising computer program instructions, characterized in that: When the computer program instructions are executed on a computer, the computer performs the bipolar disorder auxiliary diagnostic method based on fNIRS data as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Cognitive state classification method based on EEG-fNIRS deep fusion of feature decoupling

    CN119397339A

  • Semi-supervised speech imagination intention decoding method based on electroencephalogram collaborative clustering

    CN119557677A