Training method and equipment based on medical multi-view disease prediction model

By combining multi-view learning and meta-learning methods to process unbalanced medical data and dynamically adjust sample weights using multi-view characteristics, the problem of insufficient utilization of multi-view data in the existing technology is solved, and the accuracy and accuracy of disease prediction models are improved. Robust and suitable for clinical application.

CN117727464BActive Publication Date: 2024-10-01CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311575741.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2024-10-01
Estimated Expiration
2043-11-23

AI Technical Summary

Technical Problem

Existing technologies cannot fully utilize the multi-view characteristics when processing imbalanced medical data, resulting in limited accuracy and robustness of disease prediction models, especially in the early detection of rare diseases.

Method used

Using a method based on multi-view learning and meta-learning, a multi-view two-classification network is constructed through the view layer, view attention layer, view fusion layer and cross-view attention layer, combined with multi-layer fully connected layers, and uses meta-learning weight network dynamics Adjust sample weights to deal with imbalanced data sets.

Benefits of technology

It significantly improves the comprehensiveness and accuracy of the disease prediction model, enhances the ability to identify minority samples, improves the model's robustness and anti-noise capabilities, and provides an end-to-end efficient prediction process, suitable for clinical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117727464B_ABST
    Figure CN117727464B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of medical data processing, and in particular to a training method and device based on a medical multi-view disease prediction model. The present invention combines a multi-view representation learning method with an attention mechanism, and introduces an improved multi-view hierarchical attention mechanism to avoid the biased output of disease prediction caused by the existing multi-view representation learning method due to ignoring the importance difference between views; introduces an improved meta-learning weight network, uses the meta-learning weight network to replace the loss weight function, and adaptively adjusts the meta-learning weight network parameters through the classification loss and distance metric loss of the learning network, reduces the artificial setting of the sample weighting function hyperparameters, improves the classification accuracy of the minority class, and alleviates the influence of the traditional machine learning algorithm classification results biased towards the majority class.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the medical field, and in particular to a training method and device based on a medical multi-view disease prediction model. Background Art

[0002] In the medical field, especially in the field of disease detection, a large amount of medical data is being generated and accumulated. These data cover everything from genomics to imaging to electronic health records, forming multi-view medical data. Each view contains unique and valuable information about the patient's status. However, due to the imbalance of these data, traditional machine learning methods encounter significant challenges in processing these data. In particular, when minority class samples (such as rare diseases) are extremely scarce relative to majority class samples (such as common diseases), the performance of disease prediction models will be severely affected because they tend to ignore the characteristics of minority class samples.

[0003] The problem of unbalanced data is particularly prominent in the medical field. For example, in early cancer detection, the number of early cancer samples is far less than that of healthy samples, resulting in the model being unable to learn enough features to distinguish between healthy and diseased states. In addition, since each type of medical data has its own unique data distribution and feature set, the inconsistency between different data types also brings additional complexity to model training.

[0004] To overcome these problems, researchers have tried various techniques, such as resampling methods, which balance the dataset by artificially increasing the number of minority class samples or reducing the number of majority class samples. Although these methods can improve the recognition rate of minority classes to a certain extent, they often lead to overfitting or information loss. Another approach is to adopt cost-sensitive learning, which solves the imbalance problem by assigning different error costs to different classes, but this requires expert knowledge to set appropriate cost parameters and does not always work well in multi-view data environments.

[0005] In recent years, the concept of meta-learning has brought a new perspective to the processing of imbalanced medical data. By learning how to learn, meta-learning allows the model to adaptively adjust its learning strategy to cope with different data distributions and tasks. Especially on imbalanced data, meta-learning can assign a weight reflecting its importance to each sample through a dynamic weight adjustment mechanism, so that minority samples receive more attention.

[0006] However, most existing meta-learning methods have not fully utilized the multi-view characteristics of medical data. These methods usually learn models on a single view and do not consider the complementary information that may exist between different views. Multi-view learning provides a framework to exploit this complementarity. By integrating multiple types of medical data, we can more comprehensively understand the health status of patients.

[0007] In summary, existing methods either cannot adequately deal with the imbalanced data problem or do not fully utilize the multi-view characteristics of medical data. Therefore, there is an urgent need for a new method that can not only handle imbalanced medical data but also fully utilize the information in medical multi-view data to improve the accuracy and efficiency of disease prediction models. Summary of the invention

[0008] In view of the challenges of existing medical data processing technologies in processing unbalanced medical data, the present invention proposes an innovative training method and device based on a medical multi-view disease prediction model. By combining the advanced theories of multi-view learning and meta-learning, the scheme realizes in-depth mining and comprehensive analysis of medical data in various dimensions, effectively solves the problem of sample imbalance, and significantly improves the accuracy and robustness of the disease prediction model.

[0009] In a first aspect of the present invention, the present invention provides a training method based on a medical multi-view disease prediction model, the method comprising:

[0010] Acquire medical data, and pre-process the medical data to construct an unbalanced medical data set; the unbalanced medical data set includes minority medical samples and majority medical samples, and the unbalanced medical data set is divided into a metadata data set and a training data set;

[0011] Performing view division on the imbalanced medical data set according to sample feature types to obtain multi-view feature subsets; the multi-view feature subsets include a demographic continuous view feature subset, a demographic discrete view feature subset, a behavioral continuous view feature subset, a behavioral discrete view feature subset, a disease history continuous view feature subset, and a disease history discrete view feature subset;

[0012] The multi-view feature subset is input into the multi-view Figure 2 The classification network outputs the corresponding binary classification results through the view layer, view attention layer, view fusion layer, cross-view attention layer and multi-layer fully connected layer;

[0013] The binary classification results corresponding to the meta-data set are used to calculate the first classification loss through cross entropy, and the first classification loss is input into the meta-learning weight network, and the first weight of the first classification loss is calculated by using its multi-layer perceptron, and the meta-learning weight network parameters are adjusted by gradient through the product of the first weight and the first classification loss;

[0014] The binary classification results corresponding to the training data set are used to calculate the second classification loss through cross entropy, and the triplet loss is calculated using the cluster centroid. The second classification loss and the triplet loss are input into the meta-learning weight network with adjusted parameters, and the second weight of the second classification loss is output. The multi-view gradient is adjusted by multiplying the second weight by the second classification loss. Figure 2 Classification network parameters;

[0015] When the weighted sum of each loss function converges or reaches the preset number of iterations, the training is completed. Figure 2 Medical multi-view disease prediction model composed of classification network and meta-learning weight network.

[0016] In a second aspect of the present invention, the present invention further provides a training device based on a medical multi-view disease prediction model, the training device comprising:

[0017] A data acquisition module is used to acquire medical data and pre-process the medical data to construct an unbalanced medical data set; the unbalanced medical data set includes minority medical samples and majority medical samples, and the unbalanced medical data set is divided into a metadata data set and a training data set;

[0018] A view partitioning module is used to perform view partitioning on the unbalanced medical data set according to sample feature types to obtain multiple view feature subsets; the multiple view feature subsets include a demographic continuous view feature subset, a demographic discrete view feature subset, a behavioral continuous view feature subset, a behavioral discrete view feature subset, a disease history continuous view feature subset, and a disease history discrete view feature subset;

[0019] A feature classification module is used to input the multi-view feature subset into the multi-view Figure 2 The classification network outputs the corresponding binary classification results through the view layer, view attention layer, view fusion layer, cross-view attention layer and multi-layer fully connected layer;

[0020] A first training module is used to calculate a first classification loss using cross entropy for the binary classification results corresponding to the meta data set, and input the first classification loss into the meta-learning weight network, calculate a first weight of the first classification loss using its multi-layer perceptron, and adjust the parameters of the meta-learning weight network using a gradient by multiplying the first weight by the first classification loss;

[0021] The second training module is used to calculate the second classification loss of the binary classification results corresponding to the training data set through cross entropy, calculate the triplet loss using the cluster centroid, input the second classification loss and the triplet loss into the meta-learning weight network with adjusted parameters, output the second weight of the second classification loss, and adjust the multi-view gradient by the product of the second weight and the second classification loss. Figure 2 Classification network parameters;

[0022] The third training module is used to determine whether the weighted sum of each loss function converges or reaches a preset number of iterations. If it converges or reaches a preset number of iterations, the output is a multi-view Figure 2 Medical multi-view disease prediction model composed of classification network and meta-learning weight network.

[0023] In a third aspect of the present invention, the present invention further provides another training device based on a medical multi-view disease prediction model, the training device comprising a memory and a processor;

[0024] The memory is used to store program instructions;

[0025] The processor is used to call the program instruction, and when the program instruction is executed, is used to perform the following operations:

[0026] Acquire medical data, and pre-process the medical data to construct an unbalanced medical data set; the unbalanced medical data set includes minority medical samples and majority medical samples, and the unbalanced medical data set is divided into a metadata data set and a training data set;

[0027] Performing view division on the imbalanced medical data set according to sample feature types to obtain multi-view feature subsets; the multi-view feature subsets include a demographic continuous view feature subset, a demographic discrete view feature subset, a behavioral continuous view feature subset, a behavioral discrete view feature subset, a disease history continuous view feature subset, and a disease history discrete view feature subset;

[0028] The multi-view feature subset is input into the multi-view Figure 2 The classification network outputs the corresponding binary classification results through the view layer, view attention layer, view fusion layer, cross-view attention layer and multi-layer fully connected layer;

[0029] The binary classification results corresponding to the meta-data set are used to calculate the first classification loss through cross entropy, and the first classification loss is input into the meta-learning weight network, and the first weight of the first classification loss is calculated by using its multi-layer perceptron, and the meta-learning weight network parameters are adjusted by gradient through the product of the first weight and the first classification loss;

[0030] The binary classification results corresponding to the training data set are used to calculate the second classification loss through cross entropy, and the triplet loss is calculated using the cluster centroid. The second classification loss and the triplet loss are input into the meta-learning weight network with adjusted parameters, and the second weight of the second classification loss is output. The multi-view gradient is adjusted by multiplying the second weight by the second classification loss. Figure 2 Classification network parameters;

[0031] When the weighted sum of each loss function converges or reaches the preset number of iterations, the training is completed. Figure 2 Medical multi-view disease prediction model composed of classification network and meta-learning weight network.

[0032] Beneficial effects of the present invention:

[0033] (1) Improved comprehensiveness and accuracy: The present invention integrates multi-dimensional information of medical data, including demographics, living behavior, and disease history, through multi-view learning, thereby significantly improving the comprehensiveness and accuracy of the disease prediction model.

[0034] (2) Adaptive reweighting mechanism: With the help of meta-learning adaptive reweighting mechanism, the model can dynamically adjust the weights for different categories of medical samples, especially for the identification of minority samples, thereby enhancing the prediction model's ability to handle unbalanced medical samples.

[0035] (3) Enhanced robustness: The improved meta-learning and multi-view learning methods of the present invention enhance the robustness of the prediction model in the face of various challenges, such as interference from noisy data and imbalance in the number of samples.

[0036] (4) End-to-end prediction process: The present invention provides an end-to-end solution, from data preprocessing to the final prediction result output. The entire process is efficient and reliable, and is easy to quickly deploy and apply in clinical environments.

[0037] (5) Social value and application prospects: This method is not only technologically advanced, but also has significant social value. In particular, it can provide more accurate prediction results in the early prediction and estimation of rare and serious diseases and has broad application prospects.

[0038] In summary, the present invention proposes a training method and device based on a medical multi-view disease prediction model, whose innovation, effectiveness and practicality will have a profound impact in the field of medical data analysis and disease prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly express the purpose, technical solutions and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings, in which:

[0040] Figure 1 A flow chart of a training method based on a medical multi-view disease prediction model according to an embodiment of the present invention;

[0041] Figure 2 The multi-viewing embodiment of the present invention Figure 2 Schematic diagram of classification network structure;

[0042] Figure 3Schematic diagram of the meta-learning weight network structure of an embodiment of the present invention. DETAILED DESCRIPTION

[0043] This embodiment, in conjunction with the accompanying drawings, describes in detail a specific implementation of a training method and device based on a medical multi-view disease prediction model. This embodiment aims to solve the problem of insufficient unbalanced data processing in the prior art, and improves classification performance through multi-view feature learning and meta-learning reweighting strategies. The following implementations are only some embodiments of the present invention. Based on these descriptions, those skilled in the art can derive other embodiments without involving creative work, and these embodiments also belong to the scope of protection of the present invention.

[0044] When faced with medical data analysis, especially in the context of imbalanced datasets, existing technologies often fail to effectively distinguish important features from minor features, leading to biases in classification decisions. This phenomenon is particularly evident in multi-view data processing. In addition, different feature dimensions such as demographics, behavior, and medical history are often simply mixed without fully considering their inherent connections and differences, further exacerbating the data imbalance problem.

[0045] In response to these challenges, the present invention proposes a training method and device based on a medical multi-view disease prediction model. This solution can not only effectively distinguish and fuse information from different feature dimensions, but also adaptively adjust the learning process through a meta-learning mechanism to specifically solve the problem of data imbalance.

[0046] In the present invention, data preprocessing is first performed, including cleaning, standardization and normalization, to ensure the quality of input data. Then, according to the attributes and properties of the features, we divide the features into different views, each view represents a set of related features. This step is to process each type of feature more carefully in the subsequent learning process.

[0047] Multi-view Figure 2 The classification network is the core of this method. It consists of multiple layers, each of which is optimized for the characteristics of its input data. The view layer is responsible for processing the original features of each view, the view attention layer strengthens the network's ability to focus on key features through the attention mechanism, and the view fusion layer is responsible for reasonably fusing information from different views. The cross-view attention layer further improves the integration effect of information between different views, and the multi-layer fully connected layer is responsible for the final classification decision.

[0048] In the optimization process, the meta-learning weight network plays a crucial role. By adjusting the network parameters based on the feedback from the meta-data set, the meta-learning mechanism enables the network to learn how to adjust the degree of importance attached to each category in the imbalanced data. This adaptive learning method significantly improves the network's ability to recognize minority class samples, thereby effectively alleviating the negative impact of data imbalance.

[0049] The implementation of the present invention can be carried out on different hardware platforms, including but not limited to independent servers, cloud computing platforms or other high-performance computing devices. On these platforms, different artificial intelligence algorithms, such as deep learning networks, optimization algorithms, etc., can be deployed to implement the method of the present invention. These algorithms can quickly learn and extract valuable information from massive amounts of medical data, support medical decision-making, and play an important role in actual medical data processing scenarios.

[0050] In an embodiment of the present invention, the training method based on the medical multi-view disease prediction model is as follows: Figure 1 As shown, the method first comprises the following steps:

[0051] Step S1: obtaining medical data, and preprocessing the medical data to construct an unbalanced medical data set; the unbalanced medical data set includes minority medical samples and majority medical samples, and the unbalanced medical data set is divided into a metadata data set and a training data set;

[0052] Step S2: performing view division on the unbalanced medical data set according to sample feature types to obtain multi-view feature subsets; the multi-view feature subsets include a demographic continuous view feature subset, a demographic discrete view feature subset, a behavioral continuous view feature subset, a behavioral discrete view feature subset, a disease history continuous view feature subset, and a disease history discrete view feature subset;

[0053] Step S3: Input the multi-view feature subset into the multi-view Figure 2 The classification network outputs the corresponding binary classification results through the view layer, view attention layer, view fusion layer, cross-view attention layer and multi-layer fully connected layer;

[0054] Step S4: Calculate the first classification loss of the binary classification results corresponding to the meta data set through cross entropy, and input the first classification loss into the meta-learning weight network, use its multi-layer perceptron to calculate the first weight of the first classification loss, and adjust the meta-learning weight network parameters by gradient through the product of the first weight and the first classification loss;

[0055] Step S5: Calculate the second classification loss of the binary classification results corresponding to the training data set through cross entropy, calculate the triplet loss using the cluster centroid, input the second classification loss and the triplet loss into the meta-learning weight network with adjusted parameters, output the second weight of the second classification loss, and adjust the multi-view gradient by the product of the second weight and the second classification loss. Figure 2 Classification network parameters;

[0056] Step S6: When the weighted sum of each loss function converges or reaches the preset number of iterations, the training is completed. Figure 2 Medical multi-view disease prediction model composed of classification network and meta-learning weight network.

[0057] In one embodiment, the above step S1 specifically includes:

[0058] Step S11: Select publicly available medical data and randomly undersample diseased samples therein to construct the unbalanced medical data set;

[0059] In the embodiment of the present invention, a public medical data set is selected as the research object, and medical samples that have been confirmed to be diseases are carefully selected from them, and a random undersampling strategy is implemented. This strategy aims to construct an unbalanced medical data set by reducing the number of diseased class samples, so as to simulate the data imbalance that often occurs in the real world.

[0060] Step S12: preprocessing the unbalanced medical data set, removing sample rows with missing values ​​and single-value feature columns, normalizing all feature columns of the unbalanced medical data set, and converting the unbalanced medical data set into structured tabular data as a sample set;

[0061] In the embodiment of the present invention, targeted preprocessing operations are performed on the unbalanced medical data set, which includes two key steps: first, removing those sample rows with missing values ​​to ensure that each sample in the data set is complete; second, removing those single-value feature columns, which have no discernment for the learning algorithm. Then, all feature columns are normalized to eliminate the bias that may be caused by features of different magnitudes, and the unbalanced medical data set is converted into structured tabular data that is easy for machine learning algorithms to process.

[0062] Step S13: extract samples with uniform category distribution from the sample set as the metadata set, and divide the remaining samples into training data sets according to the same category distribution; of course, at this time, the remaining samples can also be divided into test data sets according to the same category distribution, and the test data sets can be used as a verification test for the multi-view disease prediction model of the present invention.

[0063] In the embodiment of the present invention, on the basis of ensuring data quality, 100 samples with uniform category distribution are further extracted from the sample set using random undersampling to construct a metadata set. This step is the key to the meta-learning strategy, because the metadata set will be used to tune the meta-learning model. The remaining samples are divided into training data sets and test data sets according to the principle of the same category distribution to ensure the representativeness of model training and the effectiveness of test evaluation.

[0064] In one embodiment, the above step S2 specifically includes:

[0065] Step S21: artificially divide the demographic, behavioral, and disease history characteristics according to the medical data set data dictionary to obtain a demographic characteristic subset, a behavioral characteristic subset, and a disease history characteristic subset;

[0066] In the embodiment of the present invention, demographic, behavioral, and disease history features are divided according to a data dictionary of a medical data set, which lists in detail all possible features and the categories they belong to. The data dictionary is created and maintained by professional medical and data management experts to ensure the accuracy and consistency of feature classification.

[0067] In an embodiment of the present invention, features related to the patient's demographics, such as age, gender, race, educational background, occupation, marital status, etc., are identified and extracted from the data dictionary to form a demographic feature subset. Features related to the patient's lifestyle and behavioral habits, such as eating habits, smoking and drinking conditions, exercise frequency, etc., are identified to form a behavioral feature subset. Based on the data dictionary, features related to the patient's past disease test results, treatment history, medication records, etc. are extracted to form a disease history feature subset.

[0068] Step S22: dividing continuous features into discrete features according to the median of the number of types of demographic, behavioral, and medical history features as a threshold;

[0069] In an embodiment of the present invention, the number of types of all features, that is, the number of possible unique values ​​for each feature, is calculated, and then the median of these number of types is found as a threshold. If the number of types of a feature is less than or equal to the median threshold, it is classified as a discrete feature; if it is greater than the threshold, it is identified as a continuous feature. The purpose of this method is to balance the number of continuous and discrete features, so that the multi-view learning algorithm can be applied more effectively when processing different types of data.

[0070] For the demographic feature subset, behavioral feature subset, and disease history feature subset, the median threshold is set to further divide a feature subset into two views. For a feature subset, when the number of types of a feature is greater than the threshold, it is divided into a continuous view, otherwise it is divided into a discrete view;

[0071] In the embodiment of the present invention, a median threshold is set for each feature subset, and the median threshold is used to determine whether the feature belongs to a continuous view or a discrete view. The specific operation is that for each feature subset of demography, behavior, and medical history, the number of types of each feature in the subset is checked. If the number of types of a feature exceeds the set threshold, then the feature is classified into a continuous view; if the number of types is less than or equal to the threshold, then the feature is classified into a discrete view. This step allows each original feature subset to be further decomposed into two more specific views, and the feature types within each view are consistent.

[0072] By further dividing the demographic feature subset, behavioral feature subset, and medical history feature subset into continuous and discrete views, the multi-view feature subset is obtained, including: a demographic continuous view feature subset, a demographic discrete view feature subset, a behavioral continuous view feature subset, a behavioral discrete view feature subset, a medical history continuous view feature subset, and a medical history discrete view feature subset.

[0073] In an embodiment of the present invention, the identified demographic, behavioral, and disease history feature subsets are further analyzed, wherein each feature is divided into continuous or discrete views based on whether the number of its types exceeds a preset threshold, thereby forming six subdivided view feature subsets: a demographic continuous view feature subset, a demographic discrete view feature subset, a behavioral continuous view feature subset, a behavioral discrete view feature subset, a disease history continuous view feature subset, and a disease history discrete view feature subset.

[0074] In one embodiment, the multi-view Figure 2 Classification network such as Figure 2 As shown, it includes view layer, view attention layer, view fusion layer, cross-view attention layer and multi-layer fully connected layer.

[0075] In one embodiment, the above step S3 specifically includes:

[0076] Step S31: Each subset of view features is processed separately through a view layer. In this layer, feature transformation is performed through a linear transformation (fully connected layer), batch normalization is enabled, and features are normalized after linear transformation. An activation function (ReLU) is applied to increase nonlinear transformation capabilities, improve model complexity and expression capabilities, and capture more medical feature details.

[0077] In this embodiment of the present invention, a view layer is used, which takes the dimension of the view feature subset as the number of input units and the number of output units is fixed to 20 dimensions. The fully connected layer is responsible for performing a linear transformation to map the input features to a new 20-dimensional feature space. Next, batch normalization is used to normalize each feature output by the fully connected layer in order to reduce internal covariate shift and improve the stability and convergence speed of model training. In order to provide the necessary nonlinearity, each feature is processed by the ReLU activation function to enhance the model's ability to capture nonlinear relationships in the data.

[0078] Step S32: weighting the output of each view layer through the view attention layer so that the network can focus on more important features in each view;

[0079] In the present example, the output of each view layer first passes through a view attention layer (linear layer), the weights of which are automatically learned through training to evaluate the importance of each feature. After this linear transformation, the Softmax function is used to calculate the attention scores, which reflect the relative contribution of each feature to the final prediction result. The importance of each feature is weighted by multiplying the attention score with the output of the view layer.

[0080] Step S33: concatenate the outputs of all view attention layers to form a total feature vector that incorporates all view information;

[0081] In the example of the present invention, a view fusion layer is used to concatenate the outputs of all view attention layers according to the first dimension (i.e., the dimension of the feature vector) to form a total feature vector that integrates information from multiple views. This layer uses the output dimension of all view attention layers (20 dimensions) as the number of input units, and the number of output units is the sum of all input units, i.e., 120 dimensions. This fusion vector retains the important features in each view weighted by the attention mechanism, providing a comprehensive feature representation for subsequent classification tasks.

[0082] Step S34: weighting the fused feature vector using the cross-view attention layer. This step enables the network to evaluate the importance of features across different views.

[0083] In the present example, a linear layer is used, whose input and output units are the same, corresponding to the dimension of the fused feature vector. Through this linear layer, the importance score of each feature is calculated and normalized by the softmax function to obtain the importance weight of each feature relative to other features. Then, these weights are multiplied with the fused feature vector to emphasize more important features and suppress less important features.

[0084] Step S35: The weighted feature vector is further transformed and processed through three fully connected layers. Each layer includes a linear transformation, batch normalization, and ReLU activation function. Then, a fully connected layer is used to map the transformed features to the output space of the binary classification.

[0085] In this step, first, the weighted fused feature vector is mapped to a new feature space through a fully connected layer, and then batch normalization is applied to optimize the gradient flow and accelerate the convergence of the model. Next, the ReLU activation function is used to introduce nonlinear transformations to enhance the model's ability to capture complex features. This process is repeated three times, each time using a different dimension for feature conversion, and finally the processed features are mapped to two output units through a fully connected layer, corresponding to the two categories of the binary classification task. In an embodiment of the present invention, the number of input units and the number of output units of the first fully connected layer are 120 dimensions and 60 dimensions, respectively, the number of input units and the number of output units of the second fully connected layer are 60 dimensions and 40 dimensions, respectively, the number of input units and the number of output units of the third fully connected layer are 40 dimensions and 20 dimensions, respectively, and the number of input units and the number of output units of the last fully connected layer are 20 dimensions and 2 dimensions, respectively.

[0086] Step S36: Use the softmax function to process the output of the last layer to obtain the predicted probabilities of the two categories. Usually, the category with higher probability is selected as the final classification result.

[0087] In an embodiment of the present invention, after the final fully connected layer output, the model applies the Softmax function to normalize the original prediction score of each category and convert it into a probability value. The Softmax function ensures that the sum of all category probabilities is equal to 1, so that each probability represents the confidence of the model prediction that the sample belongs to the corresponding category. For a binary classification task, the output layer will generate two probability values, corresponding to two categories respectively. In implementation, the category with a higher probability value is selected as the final prediction result.

[0088] In one embodiment, the meta-learning weight network is as follows Figure 3 As shown, the meta-learning weight network mainly includes a three-layer perceptron structure. In one embodiment, the above step S4 specifically includes:

[0089] Step S41: Input the metadata set into the multi-view Figure 2 The classification network inputs the obtained binary cross entropy loss into the meta-learning weight network, uses its perceptron to calculate the weight, and adjusts the parameters of the meta-learning weight network by weighted gradient to obtain the adjusted meta-learning weight network.

[0090] In an embodiment of the present invention, the meta-learning weight network is implemented by a multi-layer perceptron (MLP) model, which is specifically defined as follows: the initial layer is a hidden layer that receives a 3D input and outputs to a hidden space of a set size; next, it is processed by a hidden layer that keeps the dimensions of the input and output unchanged; finally, the output of the hidden layer is mapped to a single output node by an output layer. Each hidden layer is followed by a ReLU activation function to provide nonlinear processing capabilities. During the training process, the cross entropy loss of the meta-data set is passed to the multi-layer perceptron, which processes the loss signal through its hidden layer and obtains an output value through the output layer. The output value is converted to the first weight by a sigmoid function. The parameters of the meta-learning weight network are optimized by back propagation and gradient descent, thereby obtaining an adjusted meta-learning weight network.

[0091] In the embodiment of the present invention, the first classification loss adopts a binary cross entropy loss, and its calculation formula is expressed as:

[0092] L CE =-[y i ·log(p i )+(1-y i )·log(1-p i )]

[0093] Among them, y i Indicates the category of sample i, the positive category is 1 and the negative category is 0. i Represents the probability that the sample is predicted to be a positive class, and such sample i refers to the sample in the metadata set.

[0094] In an embodiment of the present invention, the parameters of the meta-learning weight network can be adjusted by a gradient method through the weighted loss between the first classification loss and the first weight. This process is similar to conventional technology and will not be described in detail in the present invention.

[0095] In one embodiment, the above step S5 specifically includes:

[0096] S51: The training data set is passed through the multi-view Figure 2 The classification network outputs a binary classification result, calculates the classification loss through cross entropy, calculates the triplet loss using the cluster centroid of the training data set, calculates the category weight of the training data set, and inputs the three into the meta-learning weight network to adjust the multi-view Figure 2 Classify network parameters and get the adjusted multi-view Figure 2 Classification network;

[0097] In the embodiment of the present invention, a multi-view Figure 2The classification network processes the training dataset to produce binary classification results. These results are then used to calculate the classification loss through the cross-entropy loss function, which measures the difference between the probability distribution predicted by the network and the true label. In addition, in order to enhance the discriminative ability of the model, especially in the case of unbalanced datasets, the cluster centroids of the training dataset are used to calculate the triplet loss. This loss function aims to ensure that the representation of samples of the same type is closer, while the representation of samples of different types is more dispersed. At the same time, the calculated class weights are used to balance the importance of each class. This step is especially important for unbalanced datasets. Finally, the classification loss and triplet loss calculated above are combined and the final weighted loss value is obtained through the meta-learning weight network. The meta-learning weight network adjusts the weights based on the performance of the meta dataset in order to better generalize to unseen data. The weighted loss value is used to adjust the multi-view through the back-propagation algorithm. Figure 2 The parameters of the classification network are adjusted to optimize the performance of the network when dealing with imbalanced data, ensuring a more robust and accurate binary classification network in multi-view learning.

[0098] Among them, the calculation formula of the second classification loss is expressed as:

[0099]

[0100] Among them, y i Indicates the category of sample i, the positive category is 1 and the negative category is 0. i represents the probability of a sample being predicted as a positive class, and such sample i refers to a sample in the training data set. S52: The cluster centroids of the training data set are obtained by using the K-means clustering algorithm on the majority class samples and minority class samples in the training data set respectively. The centroid of each cluster is iteratively calculated and updated to minimize the intra-cluster variance. If we denote the centroid of the i-th cluster as μ i , then its calculation formula is expressed as:

[0101]

[0102] Where S i is the sample set in the ith cluster, |S i | is the set S i The number of sample points in S, x is i The sample points in .

[0103] The goal of the K-means clustering is to minimize the sum of the squares of the distances from all points to their cluster centroids, which can be expressed as:

[0104]

[0105] Where k is the number of clusters, S iis the sample set in the i-th cluster, x is the sample point, μ i is the centroid of the ith cluster.

[0106] In this step, the K-means clustering algorithm is used to perform cluster analysis on the majority class samples and minority class samples in the training data set to determine their respective cluster centroids. This process is completed through iterative optimization, and the goal is to minimize the sum of squares of the distances from each sample to the centroid of the cluster to which it belongs, as a measure of the intra-cluster variance. Specifically, for each category, a set of cluster centroids is initialized, and then the distance between each sample and the current centroid is calculated to assign the sample to the cluster represented by the nearest centroid. Subsequently, the centroid of each cluster is updated to the mean position of all samples in the cluster. In an embodiment of the present invention, the number of clusters of the majority class samples in the training data set is set to 4, and the number of clusters of the minority class samples is set to 2.

[0107] S53: The triplet loss uses the centroid of the minority class sample cluster as the anchor point, the other minority class centroids as positive examples, and the centroid of the majority class sample cluster as negative examples. The calculation formula is expressed as:

[0108]

[0109] Among them, L triplet is the total triplet loss, T is the number of triplet pairs, x t_all are all the centroids in the minority class, serving as anchor points; x t_+ is the centroid of the same type of the t-th triplet pair except the anchor point, which is used as a positive example; x t_- is the majority class centroid of the t-th triplet pair, which is taken as the negative example; d(·) represents the feature distance between two samples; margin is a hyperparameter that defines how different the distance between the anchor point and the positive example and the distance between the anchor point and the negative example should be.

[0110] In this embodiment of the present invention, the input of the meta-learning weight network is expressed as:

[0111]

[0112] in, represents the second classification loss of the i-th sample of the training dataset, represents the triplet loss of the i-th sample of the training dataset;

[0113] The output of the meta-learned weight network is represented as:

[0114] w i =MetaNet(I (i) )

[0115] Among them, MetaNet represents the meta-learning weight network, which generates a weight for each sample based on the input loss and category weight.

[0116] Different from the traditional technology, the present invention feeds the second classification loss and the triplet loss into the meta-learning weight network with adjusted parameters. By learning the second classification loss and the triplet loss of each sample, the weight of each sample can be output, and the multi-view gradient is adjusted by the weight. Figure 2 The parameters of the classification network, where the back propagation formula is expressed as:

[0117]

[0118] Among them, θ f Indicates multi-view Figure 2 The weight parameters of the classification network, ← represents the update symbol of back propagation, α represents the step size of parameter learning, is the second classification loss of the i-th sample in the training dataset, w i is the loss weight of the i-th sample in the training dataset obtained by the meta-learning weight network.

[0119] In a preferred embodiment of the present invention, the present invention can also send the category weights of the training data set into the meta-learning weight network for learning. The sampling ratio of the unbalanced medical data can be learned through the category weights of the training data set, so that the second weight outputted in the end is more accurate. The category weight calculation formula of the training data set is expressed as:

[0120]

[0121] Among them, w j is the jth class weight, T is the total number of samples in the training set, n j is the number of samples in the jth class, and 2 represents the number of categories. Since the present invention involves a binary classification problem, the number here is 2.

[0122] In one embodiment, the above step S6 specifically includes:

[0123] When the weighted sum of each loss function converges or reaches the preset number of iterations, the training is completed. Figure 2 Medical multi-view disease prediction model composed of classification network and meta-learning weight network.

[0124] In a preferred embodiment of the present invention, a test data set or medical data to be tested is input into a trained multi-view meta-learning weight network, the network is configured in evaluation mode, and forward propagation is performed to obtain the classification result of the imbalanced medical data;

[0125] In the embodiment of the present invention, the trained multi-view meta-learning weight network is first configured as the evaluation mode, and forward propagation is performed to obtain the classification results of the test data set. In this process, the receiver operating characteristic curve (ROCcurve) is used to calculate the true positive rate (tpr) and the false positive rate (fpr), and the Youden's Jstatistic is obtained by their difference to determine the optimal threshold. This optimal threshold is applied to classify the output probability to obtain the classification result of the unbalanced medical test data set.

[0126] The loss and accuracy indicators are calculated according to the classification results of the imbalanced medical data, the optimal threshold is determined through the ROC curve, the classification threshold is adjusted and the adjusted performance indicators are calculated.

[0127] In an embodiment of the present invention, based on the classification results of the unbalanced medical test data set, performance indicators such as accuracy and recall are calculated, and these indicators are output to evaluate the performance of the model on the unbalanced data.

[0128] In order to verify the effectiveness of the medical multi-view disease prediction model disclosed in the present invention, this embodiment uses two public cancer datasets for comparative experiments, and the data information is shown in Table 1. The first dataset is from the National Lung Screening Trial (NLST), which contains clinical information from different participants. The second dataset is the gastric cancer dataset, which focuses on clinical case information of gastric cancer patients.

[0129] Table 1 Medical dataset information

[0130]

[0131] Based on the above two public cancer datasets, the medical multi-view disease prediction model proposed in this invention, abbreviated as MVMW-net, is compared with the basic method DNN, the meta-weighted network method MW-net proposed in the document Proc. Neural Inf. Process. Syst., 2019, "Meta-Weight-Net: Learning an Explicit Mapping For Sample Weighting", and the multi-view representation learning method AWM-DNN proposed in the document Inf. Sci., vol. 596, pp. 380-394, 2022, "Multi-view representation learning with Kolmogorov-Smirnov to predict default based on imbalanced and complex dataset".

[0132] In the embodiment of the present invention, experiments were conducted multiple times with different imbalance rates on two data sets, where MW-net used two indicators, accuracy and recall, to evaluate the performance of the algorithm, where accuracy is the proportion of correctly classified test data in all test data; recall is the proportion of positive data correctly identified by the model in all actual positive data. The experimental results are shown in Table 2.

[0133] Table 2 Precision (%) and recall (%) on unbalanced medical datasets

[0134]

[0135]

[0136] It can be seen that MVMW-net has the highest classification accuracy on the "NLST" and "GastricCancer" datasets. As the imbalance rate decreases, the accuracy and recall of MVMW-net are significantly improved compared with DNN, AWM-DNN, and MW-net, which shows that it has a strong ability to process imbalanced data. This is because the MVMW-net algorithm is not only more scientific in view division than the AWM-DNN algorithm, but also adds a hierarchical attention mechanism; and MVMW-net has also improved on the basis of the meta-weighted network of MW-net, and additionally incorporated the distance loss information and category weight information of the samples, so as to obtain a better representation of samples of different categories and pay more attention to samples of minority categories.

[0137] In summary, MVMW-net has good classification prediction performance and has broad application prospects.

[0138] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, which may include: ROM, RAM, disk or CD, etc.

[0139] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A training method based on medical multi-view disease prediction model, It is characterized in that The method comprises: Acquire medical data, and pre-process the medical data to construct an unbalanced medical data set; the unbalanced medical data set includes minority medical samples and majority medical samples, and the unbalanced medical data set is divided into a metadata data set and a training data set; Performing view division on the imbalanced medical data set according to sample feature types to obtain multi-view feature subsets; the multi-view feature subsets include a demographic continuous view feature subset, a demographic discrete view feature subset, a behavioral continuous view feature subset, a behavioral discrete view feature subset, a disease history continuous view feature subset, and a disease history discrete view feature subset; Input the multi-view feature subset into a multi-view binary classification network, and output a corresponding binary classification result through a view layer, a view attention layer, a view fusion layer, a cross-view attention layer, and a multi-layer fully connected layer; The binary classification results corresponding to the meta-data set are used to calculate the first classification loss through cross entropy, and the first classification loss is input into the meta-learning weight network, and the first weight of the first classification loss is calculated by using its multi-layer perceptron, and the meta-learning weight network parameters are adjusted by gradient through the product of the first weight and the first classification loss; The binary classification results corresponding to the training data set are used to calculate the second classification loss by cross entropy, the triplet loss is calculated by using the cluster centroid, the second classification loss and the triplet loss are input into the meta-learning weight network with adjusted parameters, and the second weight of the second classification loss is outputted, and the multi-view binary classification network parameters are adjusted by gradient through the product of the second weight and the second classification loss; The calculation method of the triplet loss includes taking the centroid of the minority class sample cluster as the anchor point, the centroid of the remaining minority class samples as the positive example, and the centroid of the majority class sample cluster as the negative example, which is expressed as: Among them, L triplet is the total triplet loss, T is the number of triplet pairs, x t_all are all the centroids in the minority class, serving as anchor points; x t_+ is the centroid of the same type of the t-th triplet pair except the anchor point, which is used as a positive example; x t_- is the majority class centroid of the t-th triplet pair, which is taken as the negative example; d(·) represents the feature distance between two samples; margin is a hyperparameter that defines how much the distance between the anchor point and the positive example should differ from the distance between the anchor point and the negative example; The second classification loss and the triplet loss are input into the meta-learning weight network with adjusted parameters, and the second weight of the second classification loss is output. The input of the meta-learning weight network is represented as: in, represents the second classification loss of the i-th sample of the training data set, represents the triplet loss of the i-th sample of the training dataset; The output of the meta-learned weight network is represented as: In i =MetaNet(I (i) ) Among them, w i is the loss weight of the i-th sample in the training dataset obtained by the meta-learning weight network. MetaNet represents the meta-learning weight network, which generates a weight for each sample based on the input loss and category weight; The back propagation calculation formula for adjusting the parameters of the multi-view binary classification network by gradient by multiplying the second weight by the second classification loss is expressed as: Among them, θ f represents the weight parameter of the multi-view binary classification network, and α represents the step size of parameter learning; When the weighted sum of each loss function converges or reaches the preset number of iterations, the medical multi-view disease prediction model consisting of a multi-view binary classification network and a meta-learning weight network is trained.

2. A training method based on a medical multi-view disease prediction model according to claim 1, It is characterized in that Preprocessing the unbalanced medical data includes randomly under-sampling susceptible samples from the acquired medical samples to construct an unbalanced medical data set; preprocessing the unbalanced medical data to remove sample rows with missing values ​​and single-value feature columns, normalizing all feature columns of the unbalanced medical data set, removing single-value feature operations and normalization operations, and converting the medical data into structured tabular data as a medical sample set; extracting samples with uniform category distribution from the medical sample set as the metadata set, and dividing the remaining samples into training data sets according to the same category distribution.

3. A training method based on a medical multi-view disease prediction model according to claim 1, It is characterized in that The imbalanced medical data set is divided into views according to the sample feature type, and the obtained multi-view feature subsets specifically include: According to the medical data set data dictionary, the demographic, behavioral, and medical history characteristics are artificially divided to obtain the demographic characteristic subset, behavioral characteristic subset, and medical history characteristic subset; Continuous features and discrete features are divided according to the median number of types of demographic, behavioral, and medical history features as the threshold, and the demographic continuous view feature subset, demographic discrete view feature subset, behavioral continuous view feature subset, behavioral discrete view feature subset, medical history continuous view feature subset, and medical history discrete view feature subset are obtained.

4. The training method based on the medical multi-view disease prediction model according to claim 1, It is characterized in that The multi-view feature subset is input into the multi-view binary classification network, and the corresponding binary classification results are obtained through the view layer, view attention layer, view fusion layer, cross-view attention layer and multi-layer fully connected layer. Specifically, the following are the results: Each view feature subset is processed separately through a view layer, in which the features are transformed through a linear transformation layer, the features are normalized after the linear transformation, and an activation function is applied to output the feature view; The feature views output by each view layer are weighted through the view attention layer to obtain weighted feature views; Use the view fusion layer to concatenate the weighted feature views output by all view layers after being processed by the view attention layer to form a total feature vector that integrates all view information; Using the cross-view attention layer to weight the fused total feature vector, and output a weighted feature vector; The weighted feature vector is transformed and processed through three fully connected layers, mapped to the output space of binary classification, and the binary classification feature vector is output; Use the softmax function to process the binary feature vector to obtain the predicted probability of the view feature subset in the two categories.

5. The training method based on the medical multi-view disease prediction model according to claim 1, It is characterized in that The cluster centroid is calculated by using the K-means clustering algorithm on the majority medical samples and the minority medical samples in the training data set, respectively. The goal of the K-means clustering is to minimize the sum of the squares of the distances from all points to their cluster centroids. The centroid of each cluster is iteratively calculated and updated to minimize the intra-cluster variance. The calculation formula of the cluster centroid is expressed as: Among them, μ i represents the centroid of the ith cluster, S i is the set of medical samples in the ith cluster, |S i | is the set S i The number of sample points in S, x is i The sample points in .

6. A training device based on a medical multi-view disease prediction model, It is characterized in that The training equipment comprises: A data acquisition module is used to acquire medical data and pre-process the medical data to construct an unbalanced medical data set; the unbalanced medical data set includes minority medical samples and majority medical samples, and the unbalanced medical data set is divided into a metadata data set and a training data set; A view partitioning module is used to perform view partitioning on the unbalanced medical data set according to sample feature types to obtain multiple view feature subsets; the multiple view feature subsets include a demographic continuous view feature subset, a demographic discrete view feature subset, a behavioral continuous view feature subset, a behavioral discrete view feature subset, a disease history continuous view feature subset, and a disease history discrete view feature subset; A feature classification module, used for inputting the multi-view feature subset into a multi-view binary classification network, and outputting corresponding binary classification results through a view layer, a view attention layer, a view fusion layer, a cross-view attention layer and a multi-layer fully connected layer; A first training module is used to calculate a first classification loss using cross entropy for the binary classification results corresponding to the meta data set, and input the first classification loss into the meta-learning weight network, calculate a first weight of the first classification loss using its multi-layer perceptron, and adjust the parameters of the meta-learning weight network using a gradient by multiplying the first weight by the first classification loss; A second training module is used to calculate a second classification loss by using cross entropy for the binary classification results corresponding to the training data set, calculate a triplet loss by using cluster centroids, input the second classification loss and the triplet loss into a meta-learning weight network with adjusted parameters, output a second weight of the second classification loss, and adjust the multi-view binary classification network parameters by gradient by multiplying the second weight by the second classification loss; The calculation method of the triplet loss includes taking the centroid of the minority class sample cluster as the anchor point, the centroid of the remaining minority class samples as the positive example, and the centroid of the majority class sample cluster as the negative example, which is expressed as: Among them, L triplet is the total triplet loss, T is the number of triplet pairs, x t_all are all the centroids in the minority class, serving as anchor points; x t_+ is the centroid of the same type of the t-th triplet pair except the anchor point, which is used as a positive example; x t_- is the majority class centroid of the t-th triplet pair, which is taken as the negative example; d(·) represents the feature distance between two samples; margin is a hyperparameter that defines how much the distance between the anchor point and the positive example should differ from the distance between the anchor point and the negative example; The second classification loss and the triplet loss are input into the meta-learning weight network with adjusted parameters, and the second weight of the second classification loss is output. The input of the meta-learning weight network is represented as: in, represents the second classification loss of the i-th sample of the training data set, represents the triplet loss of the i-th sample of the training dataset; The output of the meta-learned weight network is represented as: In i =MetaNet(I (i) ) Among them, w i is the loss weight of the i-th sample in the training dataset obtained by the meta-learning weight network. MetaNet represents the meta-learning weight network, which generates a weight for each sample based on the input loss and category weight; The back propagation calculation formula for adjusting the parameters of the multi-view binary classification network by gradient by multiplying the second weight by the second classification loss is expressed as: Among them, θ f represents the weight parameter of the multi-view binary classification network, and α represents the step size of parameter learning; The third training module is used to determine whether the weighted sum of each loss function converges or reaches a preset number of iterations. If it converges or reaches the preset number of iterations, a medical multi-view disease prediction model composed of a multi-view binary classification network and a meta-learning weight network is output.