A machine learning model training method for medical diagnosis and related apparatus

CN122907319APending Publication Date: 2026-10-13ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510387134.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0003]人工智能模型的训练往往需要高标准的标注数据进行有效支撑,才能较为准确的处理任务,当将人工智能模型应用于医学领域,由于医学数据往往涉及到高级的医学相关知识,现实世界中的情况往往是存在大量无标注的医学数据加上少量标注的医学数据,利用少量的医学标注数据直接进行模型训练,会使得模型存在严重的过拟合问题,过拟合会使得模型处理任务的准确率降低

Benefits of technology

[0025]与现有技术相比,本发明提供了一种用于医学诊断的机器学习模型训练方法,首先通过未标注的医学数据,对对比学习模型进行表征预训练,获得预训练完成的对比学习模型;通过对大量的无标签的医学数据对机器学习模型进行表征预训练,能够提取出大量未标注的医学数据的潜在特征表示,通过自监督对比学习,无需人工标注即可提取数据的潜在特征,显著减少对高额标注数据的依赖;然后通过构建包含目标编码器和线性层的机器学习模型,其中,所述目标编码器为预训练完成的对比学习模型的在线网络的编码器;通过构建新型机器学习模型,为后续少量的已标注医学数据参与模型训练提供前提和基础;最后利用已标注的医学数据,通过微调模型参数,对所述机器学习模型进行分类训练,其中,所述模型参数包括所述目标编码器的参数和所述线性层的参数,降低模型存在严重的过拟合问题,提高模型处理医学任务的准确率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122907319A_ABST
    Figure CN122907319A_ABST
Patent Text Reader

Abstract

The application discloses a machine learning model training method and related device for medical diagnosis, and belongs to the field of quantum computing, and the method comprises the following steps: performing representation pre-training on a contrast learning model through unlabeled medical data, and obtaining a pre-trained contrast learning model; a machine learning model comprising a target encoder and a linear layer is constructed, wherein the target encoder is an encoder of an online network of the pre-trained contrast learning model; and the machine learning model is subjected to classification training by fine-tuning model parameters through labeled medical data, wherein the model parameters comprise parameters of the target encoder and parameters of the linear layer; the application firstly performs representation pre-training on a large amount of unlabeled medical data, and then trains the constructed machine learning model through a small amount of labeled data, so that the overfitting problem of the model is reduced, and the accuracy of medical diagnosis is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of quantum computing technology, and in particular to a method and related apparatus for training machine learning models for medical diagnosis. Background Technology

[0002] Artificial intelligence models are systems built on data and algorithms to simulate human intelligent behavior in order to solve various complex problems. These models learn patterns and relationships in data and are able to perform tasks such as prediction, classification, and decision-making. When artificial intelligence models are applied to the medical field, they can quickly process and analyze medical imaging data, such as X-rays, CT scans, and MRI scans, to assist doctors in making more accurate diagnoses. They can also analyze large amounts of medical data to predict the risk of disease occurrence.

[0003] The training of artificial intelligence models often requires high-standard labeled data to effectively support them in order to process tasks relatively accurately. When artificial intelligence models are applied to the medical field, since medical data often involves advanced medical knowledge, the real world often has a large amount of unlabeled medical data plus a small amount of labeled medical data. Using a small amount of labeled medical data directly for model training will cause serious overfitting problems in the model, which will reduce the accuracy of the model in processing tasks. Summary of the Invention

[0004] The purpose of this invention is to provide a method and related apparatus for training machine learning models for medical diagnosis, aiming to improve the accuracy of the model in handling medical tasks.

[0005] One embodiment of the present invention provides a method for training a machine learning model for medical diagnosis, the method comprising:

[0006] By using unlabeled medical data, the contrastive learning model is pre-trained to obtain a pre-trained contrastive learning model.

[0007] Construct a machine learning model that includes a target encoder and a linear layer, wherein the target encoder is the encoder of an online network of a pre-trained contrastive learning model;

[0008] Using labeled medical data, the machine learning model is trained for classification by fine-tuning the model parameters, wherein the model parameters include the parameters of the target encoder and the parameters of the linear layer.

[0009] Optionally, the step of pre-training the contrastive learning model using unlabeled medical data to obtain a pre-trained contrastive learning model includes:

[0010] Data augmentation methods selected through probabilistic data augmentation techniques are used to process unlabeled medical data to obtain data-augmented medical data.

[0011] Using the unlabeled medical data and the data-enhanced medical data, the contrastive learning model is pre-trained to obtain a pre-trained contrastive learning model.

[0012] Optionally, the target encoder, the predictor in the online network, and the encoder in the target network of the contrastive learning model are all quantum-classical hybrid neural networks.

[0013] Optionally, the target encoder and the encoder in the target network include: parallel classical neural networks and quantum neural networks, and a fusion module for fusing the output of the classical neural network and the output of the quantum neural network.

[0014] Optionally, the predictor in the online network includes: parallel classical neural networks and quantum neural networks, a fusion module for fusing the outputs of the classical neural network and the quantum neural network, a batch normalization module, and a nonlinear transformation module for the activation function.

[0015] Optionally, the loss function used for pre-training the contrastive learning model is a symmetric loss function.

[0016] Optionally, when training the machine learning model for classification, different learning rates are set for the target encoder and the linear layer to update the corresponding parameters.

[0017] Optionally, the target encoder is further provided with a decay coefficient for adjusting the learning rate.

[0018] Another embodiment of the present invention provides a machine learning model training device for medical diagnosis, the device comprising:

[0019] The pre-training unit is used to pre-train the contrastive learning model using unlabeled medical data to obtain a pre-trained contrastive learning model.

[0020] A building unit is used to build a machine learning model that includes a target encoder and a linear layer, wherein the target encoder is the encoder of an online network of a pre-trained contrastive learning model;

[0021] The fine-tuning unit is used to perform classification training on the machine learning model by fine-tuning the model parameters using labeled medical data, wherein the model parameters include the parameters of the target encoder and the parameters of the linear layer.

[0022] Another embodiment of the present invention provides an electronic device, wherein the computer-readable storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, perform the methods described in any of the above embodiments.

[0023] Another embodiment of the present invention provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, perform the methods described in any of the above embodiments.

[0024] Another embodiment of the present invention provides a quantum computer operating system, which implements machine learning model training for medical diagnosis according to the method described in any of the above embodiments.

[0025] Compared with existing technologies, this invention provides a machine learning model training method for medical diagnosis. First, a contrastive learning model is pre-trained using unlabeled medical data to obtain a pre-trained contrastive learning model. By pre-training the machine learning model with a large amount of unlabeled medical data, latent feature representations of a large amount of unlabeled medical data can be extracted. Through self-supervised contrastive learning, latent features of the data can be extracted without manual annotation, significantly reducing the dependence on high-volume labeled data. Then, a machine learning model containing a target encoder and linear layers is constructed, where the target encoder is the encoder of the online network of the pre-trained contrastive learning model. This novel machine learning model provides the prerequisite and foundation for subsequent training with a small amount of labeled medical data. Finally, using labeled medical data, the machine learning model is trained for classification by fine-tuning the model parameters, where the model parameters include the parameters of the target encoder and the parameters of the linear layers. This reduces the serious overfitting problem of the model and improves the accuracy of the model in handling medical tasks. Attached Figure Description

[0026] Figure 1 This is a network block diagram of a machine learning model training system for medical diagnosis, provided as an embodiment of the present invention.

[0027] Figure 2 This is a flowchart illustrating a machine learning model training method for medical diagnosis, provided as an embodiment of the present invention.

[0028] Figure 3 This is a flowchart illustrating the training of a machine learning model for medical diagnosis, as provided in an embodiment of the present invention.

[0029] Figure 4 This is a schematic diagram of an encoder provided in an embodiment of the present invention.

[0030] Figure 5 This is a schematic diagram of the structure of a projector provided in an embodiment of the present invention.

[0031] Figure 6 This is a structural diagram of a machine learning model training device for medical diagnosis provided in an embodiment of the present invention.

[0032] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0033] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0034] Figure 1 This is a network block diagram of a machine learning model training system for medical diagnosis provided in an embodiment of the present invention. The machine learning model training system for medical diagnosis may include a network 110, a server 120, a wireless device 130, a client 140, storage 150, a classical computing unit 160, a quantum computing unit 170, and may also include additional memory, a classical processor, a quantum processor, and other devices (not shown).

[0035] Network 110 is a medium used to provide communication links between various devices and computers connected together within a machine learning model training system for medical diagnosis, including but not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The connection method can be wired, wireless communication links, or fiber optic cables.

[0036] Server 120, wireless device 130, and client 140 are conventional data processing systems that may contain data and application programs or software tools that perform conventional computational processes. Client 140 may be a personal computer or a network computer, so the data may also be provided by server 120. Wireless device 130 may be a smartphone, tablet, laptop, smart wearable device, etc. Storage unit 150 may include database 151, which can be configured to store data such as qubit parameters, quantum logic gate parameters, quantum circuits, and quantum programs.

[0037] The classical computing unit 160 (quantum computing unit 170) may include a classical processor 161 (quantum processor 171) for processing classical data (quantum data) and a memory 162 (memory 172) for storing classical data (quantum data). The classical data (quantum data) may be a boot file, an operating system image, and an application program 163 (application program 173). The application program 163 (application program 173) may be used to implement a quantum algorithm compiled by the machine learning model training method for medical diagnosis provided in the embodiments of the present invention.

[0038] Any data or information stored or generated in the classical computing unit 160 (quantum computing unit 170) can also be configured to be stored or generated in another classical (quantum) processing system in a similar manner, and any application executed therein can also be configured to be executed in another classical (quantum) processing system in a similar manner.

[0039] It should be noted that a true quantum computer has a hybrid structure, which includes at least... Figure 1 The system consists of two main parts: the classical computing unit 160, which is responsible for performing classical calculations and control; and the quantum computing unit 170, which is responsible for running quantum programs to achieve quantum computing.

[0040] The aforementioned classical computing unit 160 and quantum computing unit 170 can be integrated into a single device or distributed across two different devices. For example, a first device including the classical computing unit 160 runs a classical computer operating system, providing quantum application development tools and services, as well as the storage and network services required for quantum applications. Users develop quantum programs using the quantum application development tools and services on the second device, and send these quantum programs to a second device including the quantum computing unit 170 via the network services. The second device runs a quantum computer operating system, which parses and compiles the quantum program's code into instructions that the quantum processor 170 can recognize and execute. The quantum processor 170 then implements the quantum algorithm corresponding to the quantum program based on these instructions.

[0041] The computing units of the classic processor 161 within the classic computing unit 160 are based on CMOS transistors on a silicon chip. These computing units are not limited by time or coherence; that is, they are available at any time without time constraints. Furthermore, the number of such computing units in a silicon chip is sufficient; currently, a single classic processor 161 contains tens of thousands of computing units. Given this sufficient number and the fixed selectable computing logic of the CMOS transistors (e.g., AND logic), computational performance is achieved by combining a large number of CMOS transistors with a limited set of logic functions during operation.

[0042] In the quantum computing unit 170, the basic computing unit of the quantum processor 171 is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited by its available usage time and is not always readily available. Making full use of qubits within their available usage time is a key challenge in quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of its performance. Each qubit performs computational functions through on-demand configured logical functions. Given the limited number of qubits and the diverse logical functions available in quantum computing, such as Hadamard gates (H gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), X gates, RY gates, RZ gates, CNOT gates, CR gates, iSWAP gates, Tofoli gates, etc., quantum computing requires combining a limited number of qubits with diverse logical function combinations to achieve computational effects.

[0043] Based on these differences, the design of classical logic functions applied to CMOS transistors and the design of quantum logic functions applied to qubits are significantly and fundamentally different. The design of classical logic functions applied to CMOS transistors does not need to consider the individuality of CMOS transistors. For example, the representation of a CMOS transistor in a silicon chip is its individual identifier, location, and usable time of each CMOS transistor. Therefore, classical algorithms composed of classical logic functions only express the operational relationship of the algorithm, not the algorithm's dependence on individual CMOS transistors.

[0044] Quantum logic functions applied to qubits need to consider the individuality of each qubit, such as its position within the quantum chip, its relationship with surrounding qubits, and the duration of its usable time. Therefore, quantum algorithms composed of quantum logic functions not only express the computational relationships within the algorithm but also its dependence on the individual qubits.

[0045] A quantum chip can include qubits and channels for controlling them. Quantum logic gates are implemented using analog signals. Different combinations of analog signals are applied to the qubits through these channels, thereby creating quantum circuits with different functions to process data. Therefore, the design of quantum logic functions in the qubits (including the design of whether qubits are used and the design of the efficiency of each qubit) is crucial for improving the computational performance of quantum computers and requires special design. This is the unique characteristic of quantum algorithms based on quantum logic functions, and it is fundamentally and significantly different from classical algorithms based on classical logic functions. The aforementioned design considerations for qubits are technical problems that ordinary computing devices do not need to consider or address.

[0046] In the field of quantum computing, artificial intelligence models are systems built on data and algorithms to simulate human intelligent behavior in order to solve various complex problems. These models can perform tasks such as prediction, classification, and decision-making by learning patterns and relationships in data. When artificial intelligence models are applied to the medical field, they can quickly process and analyze medical imaging data, such as X-rays, CT scans, and MRI scans, to assist doctors in making more accurate diagnoses. They can also analyze large amounts of medical data to predict the risk of disease occurrence.

[0047] The training of artificial intelligence models often requires high-standard labeled data to effectively support them in order to process tasks relatively accurately. When artificial intelligence models are applied to the medical field, since medical data often involves advanced medical knowledge, the real world often has a large amount of unlabeled medical data plus a small amount of labeled medical data. Using a small amount of labeled medical data directly for model training will cause serious overfitting problems in the model, which will reduce the accuracy of the model in processing tasks.

[0048] Therefore, the urgent technical problem to be solved is to propose a new training method to reduce the overfitting problem of the model and improve the accuracy of the model in handling medical tasks.

[0049] See Figure 2 , Figure 2 A method for training a machine learning model for medical diagnosis, provided in an embodiment of the present invention, includes the following steps:

[0050] Step S201: Using unlabeled medical data, perform representation pre-training on the contrastive learning model to obtain a pre-trained contrastive learning model.

[0051] Unlabeled medical data refers to a large amount of medical data that is not labeled, including medical imaging data or medical signal data.

[0052] Specifically, the contrastive learning model is pre-trained using a large amount of unlabeled medical data to obtain a pre-trained contrastive learning model.

[0053] For example, see Figure 3 , Figure 3 This invention provides a specific flowchart for training a machine learning model for medical diagnosis, wherein... Figure 3 The upper part is the contrastive learning model framework, which includes an online network and a target network.

[0054] Step S202: Construct a machine learning model that includes a target encoder and a linear layer, wherein the target encoder is the encoder of an online network of a pre-trained contrastive learning model.

[0055] Specifically, the contrastive learning model obtained in step S201 is added to a linear layer to form a machine learning model.

[0056] For example, see Figure 3 , Figure 3 The lower part is a machine learning model composed of the encoder and linear layer obtained in step S201 above.

[0057] Step S203: Using labeled medical data, the machine learning model is trained for classification by fine-tuning the model parameters, wherein the model parameters include the parameters of the target encoder and the parameters of the linear layer.

[0058] The labeled medical data here refers to small sample medical data, that is, a small amount of labeled medical image data or a small amount of labeled medical signal data.

[0059] Specifically, using a small amount of labeled medical data, the machine learning model constructed in step S202 is trained for classification to fine-tune the parameters and obtain a machine learning model for medical diagnosis.

[0060] In summary, this invention provides a machine learning model training method for medical diagnosis. First, a contrastive learning model is pre-trained using unlabeled medical data to obtain a pre-trained contrastive learning model. By pre-training the machine learning model with a large amount of unlabeled medical data, latent feature representations of a large amount of unlabeled medical data can be extracted. Through self-supervised contrastive learning, latent features of the data can be extracted without manual annotation, significantly reducing the dependence on high-volume labeled data. Then, a machine learning model containing a target encoder and linear layers is constructed, where the target encoder is the encoder of the online network of the pre-trained contrastive learning model. This novel machine learning model provides the prerequisite and foundation for subsequent training with a small amount of labeled medical data. Finally, using labeled medical data, the machine learning model is trained for classification by fine-tuning the model parameters, where the model parameters include the parameters of the target encoder and the parameters of the linear layers. This reduces the serious overfitting problem of the model and improves the accuracy of the model in handling medical tasks.

[0061] In one embodiment of the present invention, the step of performing representation pre-training on the contrastive learning model using unlabeled medical data to obtain a pre-trained contrastive learning model includes:

[0062] Data augmentation methods selected through probabilistic data augmentation techniques are used to process unlabeled medical data, resulting in data-augmented medical data.

[0063] Data augmentation refers to generating new data samples by performing a series of transformations on the original data (such as rotation, scaling, cropping, color adjustment, adding noise, etc.). These new samples have similar characteristics to the original data, but are not exactly the same.

[0064] Probabilistic data augmentation refers to the use of different probabilities to obtain any different data augmentation method to augment unlabeled medical data.

[0065] Specifically, by using probabilistic augmentation techniques to select data augmentation methods, unlabeled medical data is processed to obtain data-augmented medical data.

[0066] For example, different probabilities of using random noise addition methods can be set to obtain any different data augmentation method. Data augmentation processing is performed on medical signal data in unlabeled medical data to obtain data augmented medical signal data. The data augmentation methods here can include data jitter, data scaling, and data amplitude distortion. Assuming that during the data augmentation process, one of the above three noise addition methods is randomly selected, that is, the probability of each noise addition method being selected is P1, P2, P3, and P1+P2+P3=1. If P1 and P2 are set to 0.25 and P3 is set to 0.5, then the probability of randomly selecting amplitude distortion is relatively high.

[0067] In summary, contrastive learning-based data augmentation methods, by constructing diverse sample pairs, guide the model to generate consistent representations of different forms of the same entity, focusing on the essential features of the data, thereby improving the generalization ability of the representation.

[0068] In one embodiment of the present invention, the target encoder, the predictor in the online network, and the encoder in the target network of the contrastive learning model are all quantum-classical hybrid neural networks.

[0069] Specifically, the contrastive learning model framework of this invention includes a target network and an online network. The encoder in the target network and the encoder and predictor in the online network are both implemented based on quantum classical hybrid neural networks for feature extraction.

[0070] In summary, quantum computing has potential efficiency advantages when processing large-scale data. By applying quantum-classical hybrid neural networks to the representation pre-training and fine-tuning stages of contrastive learning models, the training process can be accelerated to some extent. Especially when dealing with large-scale unlabeled medical data, quantum-classical hybrid neural networks can perform feature learning and model updates more efficiently, thereby shortening training time and improving training efficiency. Quantum-classical hybrid neural networks can better handle the complexity of multimodal data. Through the advantages of quantum computing, the model can more effectively integrate data features from different modalities, thereby improving the model's adaptability and processing ability to complex medical data.

[0071] In one embodiment of the present invention, the target encoder and the encoder in the target network include: a parallel classical neural network and a quantum neural network, and a fusion module for fusing the output of the classical neural network and the output of the quantum neural network.

[0072] Specifically, the target encoder of the online network in the contrastive learning model framework of the present invention, and the encoder in the target network include parallel classical neural networks and quantum neural networks, wherein the output results of the classical neural network and the output results of the quantum neural network are fused to obtain a fusion module.

[0073] For example, see Figure 4 , Figure 4 The present invention provides a schematic diagram of the structure of an encoder. The specific implementation process is as follows: unlabeled medical data is input into a classical neural network and a quantum neural network to extract classical features and quantum features respectively, and then the classical features and quantum features are weighted and summed to obtain a weighted fusion result.

[0074] In summary, contrastive learning relies on a large amount of data augmentation and comparison of positive and negative samples. The traditional training process is computationally expensive, while quantum algorithms can achieve exponential speedup in specific tasks, reducing pre-training time.

[0075] In one embodiment of the present invention, the predictor in the online network includes: a parallel classical neural network and a quantum neural network, a fusion module for fusing the outputs of the classical neural network and the quantum neural network, a batch normalization module, and a nonlinear transformation module for the activation function.

[0076] Specifically, in this application, the implementation of the predictor of the online network includes a fusion module obtained by weighted summation of the outputs of the classical neural network and the quantum neural network in parallel, a batch normalization processing module, and a nonlinear transformation module for the activation function.

[0077] For example, see Figure 5 , Figure 5 The present invention provides a schematic diagram of the structure of a predictor. The specific implementation process is as follows: the predictor receives the output result of the projector as input data and inputs it into the predictor. Features are extracted through a quantum classical hybrid neural network, and further processed by a batch normalization module and nonlinear transformation by the ReLU nonlinear activation function. Features are then further extracted through the quantum classical hybrid neural network to output the predictor's output result.

[0078] In one embodiment of the present invention, the loss function used for pre-training the contrastive learning model is a symmetric loss function.

[0079] Specifically, in this application, unlabeled medical data is input into a contrastive learning model to obtain the output of the online network of the contrastive learning model and the output of the target network. Based on the output of the online network and the output of the target network, a first loss function is constructed. It should be emphasized that the first loss function here is a symmetric loss function.

[0080] For example, the symmetric loss function is obtained by alternately inputting unlabeled medical data and data-augmented unlabeled medical data into the online network and target network of the contrastive learning model. First, the output results of the online network and the target network are obtained, and a loss function loss1 is constructed based on the output results of the online network and the target network. Second, the output results of the online network and the target network are obtained, and another loss function loss2 is constructed based on the output results of the online network and the target network. The sum of loss1 and loss2 is used as the first loss function, i.e., the symmetric loss function.

[0081] In summary, symmetric loss functions are commonly used in contrastive learning to more effectively measure the similarity between positive and negative sample pairs. During representation pre-training, using a symmetric loss function ensures that the model's learned feature representations better capture the inherent structure and semantic information of the data. This symmetric loss function can simultaneously optimize the similarity of positive sample pairs and the dissimilarity of negative sample pairs, thereby improving the model's representation learning quality. In medical diagnostic tasks, data often contains noise and uncertainty. By symmetrically processing positive and negative sample pairs, the symmetric loss function makes the model more robust during training, reduces the interference of noisy data on model training, and improves the model's adaptability to data changes. Especially when using unlabeled data for pre-training, the symmetric loss function can better guide the model to learn robust feature representations.

[0082] In one embodiment of the present invention, when performing classification training on the machine learning model, different learning rates are set for the target encoder and the linear layer to update the corresponding parameters.

[0083] The learning rate is a parameter of the optimization algorithm that controls the magnitude of the model parameters update in each iteration. Its function can be compared to "adjusting the step size of the parameters".

[0084] Specifically, when training a constructed machine learning model for classification, different learning rates are set for the target encoder and the linear layer to update the corresponding parameters.

[0085] For example, in this application, the learning rate of the pre-trained model is set to 0.1x and the learning rate of the linear layer is set to 1x.

[0086] In summary, by setting a low learning rate for the pre-trained model to prevent the destruction of the general features learned during pre-training and to protect the representational ability of the pre-trained model, by setting a high learning rate for the linear layer to accelerate parameter updates, the model can make full use of limited samples to quickly fit the task requirements and achieve rapid convergence through a high learning rate.

[0087] In one embodiment of the present invention, the target encoder is further provided with a decay coefficient for adjusting the learning rate.

[0088] Specifically, when setting the learning rate for pre-training, the decay coefficient of the learning rate can be adjusted by using a step decay method.

[0089] In summary, by gradually reducing the learning rate, allowing for fine-tuning in the early stages to adapt to the task, and locking in parameter stability in the later stages, the problem of model overfitting can be avoided.

[0090] See Figure 6 , Figure 6 This invention provides a machine learning model training device for medical diagnosis, comprising a pre-training unit 601, a construction unit 602, and a fine-tuning unit 603, wherein:

[0091] The pre-training unit 601 is used to pre-train the contrastive learning model using unlabeled medical data to obtain a pre-trained contrastive learning model.

[0092] Specifically, the step of pre-training the contrastive learning model using unlabeled medical data to obtain a pre-trained contrastive learning model includes:

[0093] Data augmentation methods selected through probabilistic data augmentation techniques are used to process unlabeled medical data and obtain augmented medical data.

[0094] Using the unlabeled medical data and the enhanced medical data, the contrastive learning model is pre-trained to obtain a pre-trained contrastive learning model.

[0095] Specifically, the loss function used for pre-training the contrastive learning model is a symmetric loss function.

[0096] The construction unit 602 is used to construct a machine learning model that includes a target encoder and a linear layer, wherein the target encoder is the encoder of an online network of a pre-trained contrastive learning model.

[0097] Specifically, the target encoder, the predictor in the online network, and the encoder in the target network of the contrastive learning model are all quantum-classical hybrid neural networks.

[0098] Specifically, the target encoder and the encoder in the target network include: parallel classical neural networks and quantum neural networks, and a fusion module for fusing the outputs of the classical neural network and the quantum neural network.

[0099] Specifically, the predictor in the online network includes: parallel classical neural networks and quantum neural networks, a fusion module for fusing the outputs of the classical neural networks and the quantum neural networks, a batch normalization module, and a nonlinear transformation module for the activation function.

[0100] The fine-tuning unit 603 is used to perform classification training on the machine learning model by fine-tuning the model parameters using labeled medical data, wherein the model parameters include the parameters of the target encoder and the parameters of the linear layer.

[0101] Specifically, when training the machine learning model for classification, different learning rates are set for the target encoder and the linear layer to update the corresponding parameters.

[0102] Specifically, the target encoder is also equipped with a decay coefficient for adjusting the learning rate.

[0103] The specific functions and effects of the aforementioned machine learning model training device for medical diagnosis can be explained by referring to other embodiments in this specification, and will not be repeated here. Each module in the machine learning model training device for medical diagnosis can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in a computer device in hardware form, or it can be stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0104] Please see Figure 7This specification also provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the machine learning model training method for medical diagnosis described in any of the above embodiments. Please refer to [link to documentation]. Figure 7 The electronic device can be a classical computer or a quantum computer.

[0105] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, causes the computer to perform machine learning model training for medical diagnosis according to any of the above embodiments.

[0106] This invention also provides a quantum computer operating system, which implements machine learning model training for medical diagnosis according to any of the above-described method embodiments provided in this invention.

[0107] It is understood that the specific examples in this specification are only intended to help those skilled in the art better understand the implementation methods described herein, and are not intended to limit the scope of the invention.

[0108] It is understood that in the various embodiments of this specification, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not limit the implementation process of the embodiments of this specification in any way.

[0109] It is understood that the various implementation methods described in this specification can be implemented individually or in combination, and the implementation methods in this specification are not limited in this respect.

[0110] Unless otherwise stated, all technical and scientific terms used in the embodiments of this specification have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this specification. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in the embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0111] It is understood that the processor in the embodiments of this specification can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this specification can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0112] It is understood that the memory in the embodiments of this specification may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0113] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this specification.

[0114] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the aforementioned method implementations, and will not be repeated here.

[0115] In the several embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0116] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0117] In addition, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0118] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this specification, in essence, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0119] The above description is merely a specific embodiment of this specification, but the scope of protection of this invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this specification should be included within the scope of protection of this specification. Therefore, the scope of protection of this invention should be determined by the scope of the claims.

Claims

1. A method for training a machine learning model for medical diagnosis, characterized in that, The method includes: By using unlabeled medical data, the contrastive learning model is pre-trained to obtain a pre-trained contrastive learning model. Construct a machine learning model that includes a target encoder and a linear layer, wherein the target encoder is the encoder of an online network of a pre-trained contrastive learning model; Using labeled medical data, the machine learning model is trained for classification by fine-tuning the model parameters, wherein the model parameters include the parameters of the target encoder and the parameters of the linear layer.

2. The method according to claim 1, characterized in that, The process of pre-training a contrastive learning model using unlabeled medical data to obtain a pre-trained contrastive learning model includes: Data augmentation methods selected through probabilistic data augmentation techniques are used to process unlabeled medical data to obtain data-augmented medical data. Using the unlabeled medical data and the data-enhanced medical data, the contrastive learning model is pre-trained to obtain a pre-trained contrastive learning model.

3. The method according to claim 1, characterized in that, The target encoder, the predictor in the online network, and the encoder in the target network of the contrastive learning model are all quantum-classical hybrid neural networks.

4. The method according to claim 3, characterized in that, The target encoder and the encoder in the target network include: a parallel classical neural network and a quantum neural network, and a fusion module that fuses the output of the classical neural network and the output of the quantum neural network.

5. The method according to claim 3, characterized in that, The predictor in the online network includes: parallel classical neural networks and quantum neural networks, a fusion module for fusing the outputs of the classical neural networks and the quantum neural networks, a batch normalization module, and a nonlinear transformation module for the activation function.

6. The method according to claim 1, characterized in that, The loss function used for pre-training the contrastive learning model is a symmetric loss function.

7. The method according to claim 1, characterized in that, When training the machine learning model for classification, different learning rates are set for the target encoder and the linear layer to update the corresponding parameters.

8. The method according to claim 7, characterized in that, The target encoder is also equipped with a decay coefficient for adjusting the learning rate.

9. A machine learning model training device for medical diagnosis, characterized in that, The device includes: The pre-training unit is used to pre-train the contrastive learning model using unlabeled medical data to obtain a pre-trained contrastive learning model. A building unit is used to build a machine learning model that includes a target encoder and a linear layer, wherein the target encoder is the encoder of an online network of a pre-trained contrastive learning model; The fine-tuning unit is used to perform classification training on the machine learning model by fine-tuning the model parameters using labeled medical data, wherein the model parameters include the parameters of the target encoder and the parameters of the linear layer.

10. An electronic device, characterized in that, include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to invoke the computer program to execute the method as described in claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, perform the method as described in claims 1-8.

12. A quantum computer operating system, characterized in that, The quantum computer operating system implements the training of machine learning models for medical diagnosis according to any one of claims 1-8.