Multi-label data missing label prediction method and device and computer equipment
By using neural network models for cyclic prediction in multi-task learning, the problem of low prediction performance of missing tags in multi-task learning is solved, and efficient prediction of drug missing tags for multi-task data is achieved.
Patent Information
- Application Number
- CN202510081688.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In multitasking learning, prior art has difficulty effectively dealing with partial or completely missing tags, resulting in a significant decline in model performance in the face of missing tags.
A missing tag prediction method for multi-label data is adopted. By obtaining the missing tags in the drug analysis dataset, the neural network model is used to make cyclic predictions until the model converges, thereby achieving accurate prediction of the missing tags of multi-label data.
This method can achieve efficient prediction of drug missing tags for multi-label data without additional training data under condition limitations, improving the prediction performance of missing tags in multi-task learning.
Smart Images

Figure CN119513582A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine learning technology, and in particular to a method, device and computer equipment for predicting missing labels for multi-label data. Background Art
[0002] In the field of machine learning, especially multi-task learning, algorithms are often designed to learn two related tasks simultaneously to improve the generalization ability of the model and reduce the required labeled data. This learning method is very useful in many practical applications, such as predicting the effect and toxicity of a drug simultaneously in drug analysis, or identifying objects and scenes in an image simultaneously in image recognition.
[0003] However, real-world data is often imperfect, especially during experiments or data collection, where some labels may be missing. For example, in drug analysis, due to experimental limitations and cost reasons, it may not be possible to obtain both the effect and toxicity labels of different drugs at the same time. This incompletely labeled data poses a challenge to traditional multi-task learning methods. Summary of the invention
[0004] Based on this, it is necessary to provide a missing label prediction method, device and computer equipment for multi-label data that can accurately predict the missing labels of multi-label data in order to solve the above technical problems.
[0005] In a first aspect, the present application provides a method for predicting missing labels for multi-label data, the method comprising: Acquire a drug analysis data set; the drug analysis data set includes multi-label data with at least one drug missing label; Obtaining missing labels for drugs in the multi-label data; If the drug missing label of the multi-label data includes a first missing label and a second missing label, obtaining a first common feature between the first missing label and the second missing label; initializing the first missing label and the second missing label to obtain a first initial value corresponding to the first missing label and a second initial value corresponding to the second missing label; Inputting the first initial value, the second initial value, and the first common feature into a neural network model, and outputting a first predicted value corresponding to the first initial value and a second predicted value corresponding to the second initial value; The first prediction value and the second prediction value are re-input into the neural network model, and cyclic prediction is performed until the neural network model converges, and a first prediction result of the first missing label and a second prediction result of the second missing label are output.
[0006] In one embodiment, if the missing drug labels of the multi-label data include a first missing label or a second missing label, a known drug label of the multi-label data is obtained; a second common feature between the known drug label and the first missing label or the second missing label is obtained; the second common feature and the known drug label are input into the neural network model, and a first prediction result of the first missing label or a second prediction result of the second missing label is output.
[0007] In one embodiment, the neural network model includes: a shared bottom layer, a dual feedback module, a hybrid gate module, and a task tower module; the first initial value, the second initial value, and the first common feature are input into the neural network model, and the first predicted value corresponding to the first initial value and the second predicted value corresponding to the second initial value are outputted, including: Inputting the first common feature into the shared bottom layer for replication and feature extraction, and outputting a plurality of first feature vectors; Input the multiple first feature vectors into the hybrid gate module for unified calculation and weighted summation, and output to obtain a first fusion feature; Inputting the first initial value into the dual feedback module for vector conversion, and outputting a corresponding first embedding vector; and inputting the second initial value into the dual feedback module for vector conversion, and outputting a corresponding second embedding vector; The first fused feature, the first embedded vector and the second embedded vector are input into the task tower module for label prediction; wherein the task tower module performs prediction calculation on the first fused feature and the first embedded vector, and outputs a second predicted value corresponding to the second initial value; and performs prediction calculation on the first fused feature and the second embedded vector, and outputs a first predicted value corresponding to the first initial value.
[0008] In one embodiment, the step of inputting the second common feature and the known drug label into the fully trained neural network model and outputting a first prediction result of the first missing label or a second prediction result of the second missing label comprises: Inputting the second common feature into the shared bottom layer for replication and feature extraction, and outputting a plurality of second feature vectors; Input the multiple second feature vectors into the hybrid gate module for unified calculation and weighted summation, and output to obtain a second fusion feature; If the missing drug label is the second missing label, the known drug label is input into the dual feedback module for vector conversion, and the third embedding vector is obtained as output; if the missing drug label is the first missing label, the known drug label is input into the dual feedback module for vector conversion, and the fourth embedding vector is obtained as output; The second fused feature and the third embedded vector are input into the task tower module for label prediction, or the second fused feature and the fourth embedded vector are input into the task tower module for label prediction; wherein the task tower module performs a prediction calculation on the second fused feature and the third embedded vector, and outputs a prediction result of the second missing label; or performs a prediction calculation on the second fused feature and the fourth embedded vector, and outputs a prediction result of the first missing label.
[0009] In one of the embodiments, the shared bottom layer includes a first vector embedding layer and a plurality of sub-expert networks connected to the first vector embedding layer; The first vector embedding layer is used to receive the first common feature for vector conversion, and copy the first feature result of the vector conversion multiple times, and input them into each of the sub-expert networks respectively, or receive the second common feature for vector conversion, and copy the second feature result of the vector conversion multiple times, and input them into each of the sub-expert networks respectively; each of the sub-expert networks performs feature extraction on the first feature result, and outputs the multiple first feature vectors, or performs feature extraction on the second feature result, and outputs the multiple second feature vectors; The hybrid door module includes a first door control unit and a second door control unit; The first gating unit and the second gating unit are respectively used to uniformly calculate and weighted sum the multiple first feature vectors to output the first fusion feature, or to uniformly calculate and weighted sum the multiple second feature vectors to output the second fusion feature.
[0010] In one of the embodiments, the dual feedback module includes a second vector embedding layer and a third vector embedding layer; The second vector embedding layer is used to receive the first initial value corresponding to the first missing label for vector conversion, and output the first embedding vector, or when the drug missing label of the multi-label data is the second missing label, receive the known drug label for vector conversion, and output the third embedding vector; The third vector embedding layer is used to receive the second initial value corresponding to the second missing label for vector conversion, and output the second embedded vector, or when the drug missing label of the multi-label data is the first missing label, receive the known drug label for vector conversion, and output the fourth embedded vector.
[0011] In one embodiment, the task tower module includes a first task tower and a second task tower; The first task tower is used to receive the first fused feature and the second embedded vector to perform prediction calculation, and output a first predicted value corresponding to the first initial value, or receive the second fused feature and the fourth embedded vector, and output a prediction result of the first missing label; The second task tower is used to receive the first fused feature and the first embedded vector for prediction calculation, and output a second predicted value corresponding to the second initial value, or receive the second fused feature and the third embedded vector, and output a prediction result of the second missing label.
[0012] In one embodiment, the training method of the neural network model includes: Constructing an initial multi-layer neural network; the initial multi-layer neural network includes a shared bottom layer with randomly set network parameters, a dual feedback module, a hybrid gate module, and a task tower module; Acquire a missing label training set for drug analysis, wherein the missing label training set includes at least one multi-label sample, and the multi-label sample includes at least one known sample label; Acquire sample common features between sample labels of the multi-label samples; Input the sample common features and the known sample labels of each multi-label sample into the initial multi-layer neural network, and output the corresponding predicted sample labels; According to the predicted sample label and the known sample label of each multi-label sample, the accuracy loss value and the probability distribution loss value of the initial multi-layer neural network are calculated, and according to the accuracy loss value and the probability distribution loss value, the network parameters of each module of the initial multi-layer neural network are adjusted until the initial multi-layer neural network converges to obtain the fully trained neural network model.
[0013] In a second aspect, the present application also provides a missing label prediction device for multi-label data, comprising: A data acquisition module, used to acquire a data set for a target task; the data set includes at least one multi-label data with a missing label; A type judgment module, used to obtain the missing labels of the multi-label data, and judge the label missing type of the multi-label data according to the missing labels; A label prediction module is used for, if the missing labels of the multi-label data include a first missing label and a second missing label, then the multi-label data is of the first label missing type, initializing the first missing label and the second missing label to obtain a first initial value corresponding to the first missing label and a second initial value corresponding to the second missing label; obtaining a first common feature between the first missing label and the second missing label; inputting the first initial value, the second initial value and the first common feature into a fully trained neural network model, and outputting a first prediction result for the first missing label and a second prediction result for the second missing label.
[0014] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps corresponding to the method described in the first aspect when executing the computer program.
[0015] The missing label prediction method, device and computer equipment for multi-label data are as follows: obtaining a drug analysis data set; the drug analysis data set includes at least one multi-label data with a missing drug label; obtaining the missing drug label of the multi-label data; if the missing drug label of the multi-label data includes a first missing label and a second missing label, obtaining a first common feature between the first missing label and the second missing label; initializing the first missing label and the second missing label to obtain a first initial value corresponding to the first missing label and a second initial value corresponding to the second missing label; inputting the first initial value, the second initial value and the first common feature into a neural network model, and outputting a first predicted value corresponding to the first initial value and a second predicted value corresponding to the second initial value; re-inputting the first predicted value and the second predicted value into the neural network model for cyclic prediction until the neural network model converges, and outputting a first predicted result of the first missing label and a second predicted result of the second missing label, thereby realizing accurate prediction of missing drug labels for multi-label data in the multi-task learning process, and the neural network model can realize efficient prediction of missing drug labels for multi-label data without additional training data when data is scarce due to conditional restrictions. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions.
[0017] Figure 1 A diagram showing an application environment of a missing label prediction method for multi-label data in one embodiment; Figure 2 A schematic diagram of a process flow of a missing label prediction method for multi-label data in one embodiment; Figure 3 A schematic diagram of the structure of a neural network model in one embodiment; Figure 4 A schematic diagram of the structure of a neural network model in another embodiment; Figure 5 It is a structural block diagram of a missing label prediction device for multi-label data in one embodiment. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0019] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. The terms "first", "second", "third" and the like involved in the present application are merely used to distinguish similar objects and do not represent a specific ordering of the objects.
[0020] The missing label prediction method for multi-label data provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.
[0021] On server 104, a drug analysis data set is obtained; the drug analysis data set includes at least one multi-label data with a drug missing label; the drug missing label of the multi-label data is obtained; if the drug missing label of the multi-label data includes a first missing label and a second missing label, a first common feature between the first missing label and the second missing label is obtained; the first missing label and the second missing label are initialized to obtain a first initial value corresponding to the first missing label and a second initial value corresponding to the second missing label; the first initial value, the second initial value and the first common feature are input into a fully trained neural network model, and a first predicted value corresponding to the first initial value and a second predicted value corresponding to the second initial value are output; the first predicted value and the second predicted value are re-input into the neural network model for cyclic prediction until the neural network model converges, and a first predicted result of the first missing label and a second predicted result of the second missing label are output, thereby achieving accurate prediction of missing labels of multi-label data in the multi-task learning process, and when data is scarce due to experimental conditions, accurate prediction of missing labels of multi-label data can be achieved without additional training data.
[0022] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0023] Based on the background technology, the applicant found that traditional network models usually assume that the labels of all tasks are available during training in multi-task learning methods or dual learning methods. These methods learn the relationship between tasks by sharing feature representations, but their performance will drop significantly when faced with partially or completely missing labels. The current mainstream method is to use matrix decomposition, generative adversarial networks, generative large models and other methods to complete the missing labels of data in the data set before formal training, but it separates the data calculation process of the entire missing label completion from the multi-task learning or dual learning process of the traditional network model, and cannot fuse the information of task features and labels, which limits the prediction performance of the traditional network model for missing labels in multi-task learning or dual learning.
[0024] Based on this, in an exemplary embodiment, Figure 2As shown in the figure, a missing label prediction method for multi-label data is provided. Figure 1 The server side in is taken as an example to illustrate, including the following steps 201 to 205.
[0025] Step 201, obtaining a drug analysis data set; the drug analysis data set includes at least one multi-label data with a drug missing label.
[0026] Specifically, the drug analysis data set includes different drug data, each of which is multi-label data, and the labels of the multi-label data include but are not limited to efficacy labels and toxicity labels, etc. Each label corresponds to a value. If the value corresponding to any label does not exist, it means that the multi-label data lacks the label, and the label is the drug missing label of the multi-label data.
[0027] Step 202: Obtain the drug missing label of the multi-label data.
[0028] Step 203: If the drug missing label of the multi-label data includes a first missing label and a second missing label, obtain a first common feature between the first missing label and the second missing label; initialize the first missing label and the second missing label to obtain a first initial value corresponding to the first missing label and a second initial value corresponding to the second missing label.
[0029] Specifically, multi-task learning is usually designed to learn two related tasks. In this application, if it is assumed that the pharmacodynamic label and toxicity label of the label required for the drug analysis data set, then the pharmacodynamic label and the toxicity label are two related tasks for this multi-task learning. At this time, if the missing drug labels of the multi-label data include a first missing label and a second missing label, that is, both the pharmacodynamic label and the toxicity label are missing, then the first common feature between the first missing label and the second missing label is obtained, and the first missing label and the second missing label are initialized with the compromise result as the guide, and the first initial value corresponding to the first missing label and the second initial value corresponding to the second missing label are obtained. For example, assuming that the value range of the numerical value corresponding to the label is [0, 1], then the first initial value and the second initial value of the first missing label and the second missing label initialized with the compromise result as the guide are both 0.5.
[0030] Step 204: input the first initial value, the second initial value, and the first common feature into a neural network model, and output a first predicted value corresponding to the first initial value and a second predicted value corresponding to the second initial value.
[0031] Step 205: re-input the first prediction value and the second prediction value into the neural network model, perform cyclic prediction until the neural network model converges, and output a first prediction result of the first missing label and a second prediction result of the second missing label.
[0032] Specifically, the present application constructs a neural network model for multi-task learning. Compared with the traditional network model of multi-task learning, the neural network model constructed in the present application includes a shared bottom layer, a dual feedback module, a hybrid gate module, and a task tower module. During the early training of the neural network model, different training processes are used according to the different missing types of labels of multi-label samples in the training set, such as the type of missing one label or the type of missing two labels, to train the neural network model until convergence and save the optimal model parameters and evaluation accuracy.
[0033] In step 204 to step 205, since both labels of the drug data for multi-task learning are missing, the first initial value, the second initial value and the first common feature are input into the neural network model, and the first predicted value corresponding to the first initial value and the second predicted value corresponding to the second initial value are output. The first predicted value and the second predicted value are then re-input into the neural network model for cyclic prediction until the neural network model converges, and the first prediction result of the first missing label and the second prediction result of the second missing label are output. The condition for the convergence of the neural network model is that the update change of the predicted value of the first missing label and the predicted value of the second missing label output after K consecutive rounds of cyclic prediction is less than , or the number of cycles reaches the preset number of steps, which enables accurate prediction of missing drug labels when both relevant labels of drug data are missing.
[0034] In the missing label prediction method for multi-label data, a drug analysis data set is obtained; the drug analysis data set includes at least one multi-label data with a missing drug label; the missing drug label of the multi-label data is obtained; if the missing drug label of the multi-label data includes a first missing label and a second missing label, a first common feature between the first missing label and the second missing label is obtained; the first missing label and the second missing label are initialized to obtain a first initial value corresponding to the first missing label and a second initial value corresponding to the second missing label; the first initial value, the second initial value and the first common feature are input into a neural network model, and a first predicted value corresponding to the first initial value and a second predicted value corresponding to the second initial value are output; the first predicted value and the second predicted value are re-input into the neural network model for cyclic prediction until the neural network model converges, and a first predicted result of the first missing label and a second predicted result of the second missing label are output, thereby achieving accurate prediction of missing drug labels for multi-label data in the multi-task learning process, and the neural network model can achieve efficient prediction of missing drug labels for multi-label data without additional training data when data is scarce due to conditional restrictions.
[0035] In one embodiment, the method also includes: step 206, if the missing drug label of the multi-label data includes a first missing label or a second missing label, obtaining a known drug label of the multi-label data; obtaining a second common feature between the known drug label and the first missing label or the second missing label; inputting the second common feature and the known drug label into the neural network model, and outputting a first prediction result of the first missing label or a second prediction result of the second missing label.
[0036] In detail, when only a single label is missing during multi-task learning of a certain multi-label data, for example, only the efficacy label is missing or only the toxicity label is missing, then the known drug labels of the multi-label data are obtained. Assuming that the first missing label is the efficacy label, the toxicity label is a known drug label, and there is no second missing label, then the second common feature between the known drug label and the first missing label is obtained, that is, the second common feature between the first missing label and the toxicity label is obtained; the second common feature and the toxicity label are input into the neural network model, and the first prediction result of the efficacy label is obtained as output.
[0037] In this embodiment, since there is only one drug missing label in the multi-label data, the second common feature between the known drug label and the single drug missing label is obtained, and the second common feature and the known drug label are input into the neural network model for direct reasoning to obtain the prediction result of the drug missing label.
[0038] In an exemplary embodiment, the neural network model is as follows: Figure 3 As shown, it includes a shared bottom layer 10, a dual feedback module 20, a hybrid gate module 30 and a task tower module 40. Step 204 inputs the first initial value, the second initial value and the first common feature into the neural network model, and outputs a first predicted value corresponding to the first initial value and a second predicted value corresponding to the second initial value, specifically including the following steps 301 to 304. Among them: Step 301: input the first common feature into the shared bottom layer for replication and feature extraction, and output a plurality of first feature vectors.
[0039] Step 302: Input the multiple first feature vectors into the hybrid gate module for unified calculation and weighted summation, and output a first fusion feature.
[0040] Step 303: input the first initial value into the dual feedback module for vector conversion, and output a corresponding first embedded vector; and input the second initial value into the dual feedback module for vector conversion, and output a corresponding second embedded vector.
[0041] Step 304: input the first fused feature, the first embedding vector and the second embedding vector into the task tower module for label prediction; wherein the task tower module performs a prediction calculation on the first fused feature and the first embedding vector, and outputs a second prediction value corresponding to the second initial value; and performs a prediction calculation on the first fused feature and the second embedding vector, and outputs a first prediction value corresponding to the first initial value.
[0042] After step 304, the first prediction value corresponding to the first initial value and the second prediction value corresponding to the second initial value are re-input into the dual feedback module 20 for vector conversion, and the first embedding vector and the second embedding vector for a new round of prediction are output and input into the task tower module 40 together with the first fusion feature to predict the prediction value of the first missing label and the prediction value of the second missing label of a new round until the neural network model converges, and the loop prediction is terminated, and the first prediction result of the first missing label and the second prediction result of the second missing label are output.
[0043] In this embodiment, through the shared bottom layer, dual feedback module, hybrid gate module and task tower module of the neural network model, label loop prediction is performed when two relevant labels are missing during multi-task learning, thereby improving the accuracy of label prediction.
[0044] Furthermore, in step 206, the second common feature and the known drug label are input into the well-trained neural network model, and the first prediction result of the first missing label or the second prediction result of the second missing label is output, which specifically includes the following steps 401 to 404. Among them: Step 401: input the second common feature into the shared bottom layer for replication and feature extraction, and output a plurality of second feature vectors.
[0045] Step 402: Input the plurality of second feature vectors into the hybrid gate module for unified calculation and weighted summation, and output a second fusion feature.
[0046] Step 403: If the missing drug label is the second missing label, the known drug label is input into the dual feedback module for vector conversion, and the third embedding vector is obtained as output; if the missing drug label is the first missing label, the known drug label is input into the dual feedback module for vector conversion, and the fourth embedding vector is obtained as output.
[0047] Step 404: input the second fused feature and the third embedded vector into the task tower module for label prediction, or input the second fused feature and the fourth embedded vector into the task tower module for label prediction; wherein the task tower module performs a prediction calculation on the second fused feature and the third embedded vector, and outputs a prediction result of the first missing label; or performs a prediction calculation on the second fused feature and the fourth embedded vector, and outputs a prediction result of the second missing label.
[0048] In this embodiment, through the shared bottom layer, dual feedback module, hybrid gate module and task tower module of the neural network model, the missing label is directly predicted in the case where there is a single missing label between two related labels during multi-task learning, thereby improving the accuracy of missing label prediction.
[0049] Preferably, if Figure 4 As shown, another neural network model is provided, wherein the shared bottom layer 10 includes a first vector embedding layer and a plurality of sub-expert networks connected to the first vector embedding layer. The hybrid gate module 30 includes a first gating unit and a second gating unit. The dual feedback module 20 includes a second vector embedding layer and a third vector embedding layer. The task tower module 40 includes a first task tower and a second task tower.
[0050] The first vector embedding layer is used to receive the first common feature for vector conversion, and replicate the first feature result of the vector conversion multiple times, and input them into each of the sub-expert networks respectively, or receive the second common feature for vector conversion, and replicate the second feature result of the vector conversion multiple times, and input them into each of the sub-expert networks respectively. Each of the sub-expert networks performs feature extraction on the first feature result, and outputs the multiple first feature vectors, or performs feature extraction on the second feature result, and outputs the multiple second feature vectors.
[0051] The first gating unit and the second gating unit are respectively used to uniformly calculate and weighted sum the multiple first feature vectors to output the first fusion feature, or to uniformly calculate and weighted sum the multiple second feature vectors to output the second fusion feature.
[0052] The second vector embedding layer is used to receive the first initial value corresponding to the first missing label for vector conversion, and output the first embedding vector, or when the drug missing label of the multi-label data is the second missing label, receive the known drug label for vector conversion, and output the third embedding vector.
[0053] The third vector embedding layer is used to receive the second initial value corresponding to the second missing label for vector conversion, and output the second embedded vector, or when the drug missing label of the multi-label data is the first missing label, receive the known drug label for vector conversion, and output the fourth embedded vector.
[0054] The first task tower is used to receive the first fused feature and the second embedded vector for prediction calculation, and output a first predicted value corresponding to the first initial value, or receive the second fused feature and the fourth embedded vector, and output a prediction result of the first missing label.
[0055] The second task tower is used to receive the first fused feature and the first embedded vector for prediction calculation, and output a second predicted value corresponding to the second initial value, or receive the second fused feature and the third embedded vector, and output a prediction result of the second missing label.
[0056] In one embodiment, there is provided a Figure 4 The training method of the neural network model shown in FIG. 1 specifically includes the following contents: Step 501, constructing an initial multi-layer neural network; the initial multi-layer neural network includes a shared bottom layer with randomly set network parameters, a dual feedback module, a hybrid gate module and a task tower module.
[0057] The number of sub-expert networks sharing the bottom layer can be set according to actual needs. After the initial multi-layer neural network is constructed, the training cycle, training batch and learning rate of the network need to be set.
[0058] Step 502: Obtain a missing label training set for drug analysis, wherein the missing label training set includes at least one multi-label sample, and the multi-label sample includes at least one known sample label.
[0059] Step 503: Acquire sample common features between sample labels of the multi-label samples.
[0060] Step 504: input the sample common features and the known sample labels of each multi-label sample into the initial multi-layer neural network, and output the corresponding predicted sample labels.
[0061] Step 505, according to the predicted sample label and the known sample label of each multi-label sample, calculate the accuracy loss value and the probability distribution loss value of the initial multi-layer neural network, and according to the accuracy loss value and the probability distribution loss value, adjust the network parameters of each module of the initial multi-layer neural network until the initial multi-layer neural network converges to obtain the fully trained neural network model.
[0062] Specifically, the training set is sampled in a single cycle for multiple times, and different training processes are entered according to the label missing type of a single multi-label sample randomly sampled. In steps 503 to 505, if there are two known sample labels for the multi-label sample input for this training, supervised learning is performed on the neural network, and the common features of the samples and the two known sample labels are input into the initial multi-layer neural network, and the corresponding two predicted sample labels are output; based on the true values of the two known sample labels and the predicted values of the two predicted sample labels, the first loss function guided by accuracy is calculated, and the gradient descent method is used to calculate the backpropagation gradient and update the network parameters of all modules in the initial multi-layer neural network.
[0063] In addition, the sample probability distributions of the two predicted sample labels are calculated respectively, and the true probability distribution of each of the known sample labels in the missing label training set is calculated; based on the sample probability distribution and the true probability distribution, a second loss function guided by the Bayesian theorem is calculated, and the gradient descent method is used to calculate the backpropagation gradient and update the network parameters of all modules in the initial multi-layer neural network to realize the probabilistic dual learning of the neural network.
[0064] If there is a single known sample label for the multi-label samples input for this training, structural dual learning is performed on the neural network, and the common features of the samples and the single known sample label are input into the initial multi-layer neural network, and a predicted sample label of another unknown sample label is output; the predicted sample label of the other unknown sample label and the common features of the samples are input into the initial multi-layer neural network, and a single predicted sample label of the single known sample label is output; based on the single known sample label and the single predicted sample label, a third accuracy-oriented loss function is calculated, and the gradient descent method is used to calculate the backpropagation gradient and update the network parameters of the corresponding module in the initial multi-layer neural network.
[0065] For example, if a single known sample label is a drug efficacy label y1, and an unknown sample label is a toxicity label y2, then in the first step, the sample common feature X and the drug efficacy label y1 are input, and the predicted sample label of the toxicity label y2 is calculated and output through the shared bottom layer 10, the first gating unit in the hybrid gate module 30, the second vector embedding layer of the dual feedback module 20, and the second task tower of the task tower module 40. The second step is to use the predicted sample label of the toxicity label y2 Instead of the real label of the toxicity label y2, the third vector embedding layer of the dual feedback module is input to make the sample common feature X and the predicted sample label of the toxicity label y2 After the shared bottom layer 10, the second gating unit in the hybrid gate module 30, the third vector embedding layer of the dual feedback module 20, and the first task tower of the task tower module 40, the predicted sample label of the output drug efficacy label y1 is calculated. In the third step, the accuracy-oriented loss function is calculated based on the true label of the efficacy label y1, the gradient descent method is used to calculate the backpropagation gradient, and the network parameters of the corresponding modules in the second step are updated, including the shared bottom layer 10, the second gating unit in the hybrid gate module 30, the third vector embedding layer of the dual feedback module 20, and the first task tower of the task tower module 40.
[0066] For another example, if a single known sample label is a toxicity label y2 and an unknown sample label is a pharmacodynamic label y1, then in the first step, the sample common feature X and the toxicity label y2 are input, and the predicted sample label of the pharmacodynamic label y1 is calculated and output through the shared bottom layer 10, the second gating unit in the hybrid gate module 30, the third vector embedding layer of the dual feedback module 20, and the first task tower of the task tower module 40. The second step is to use the predicted sample label of the efficacy label y1 Instead of the real label of the efficacy label y1, the second vector embedding layer of the dual feedback module is input, so that the sample common feature X and the predicted sample label of the efficacy label y1 After the shared bottom layer 10, the first gating unit in the hybrid gate module 30, the second vector embedding layer of the dual feedback module 20, and the second task tower of the task tower module 40, a single predicted sample label of the output toxicity label y2 is calculated. In the third step, the accuracy-oriented loss function is calculated based on the true label of the single toxic label y2, and the backpropagation gradient is calculated using the gradient descent method to update the network parameters of the corresponding modules in the second step, including the shared bottom layer 10, the first gating unit in the hybrid gate module 30, the second vector embedding layer of the dual feedback module 20, and the second task tower of the task tower module 40.
[0067] The training is continued until the initial multi-layer neural network meets the training termination condition and converges, and the optimal model parameters and evaluation accuracy are saved to obtain the fully trained neural network model. The training termination condition is that the cumulative change of the validation set loss after M consecutive steps is less than , or the total number of training steps reaches N steps.
[0068] In a preferred embodiment, a missing label prediction method for multi-label data is provided, which is applied in Figure 4 In the neural network model shown, the missing label prediction of drug data on efficacy labels and toxicity labels is performed through multi-task learning, specifically including the following: Step 601 : Acquire a drug analysis data set, wherein the drug analysis data set includes at least one multi-label data with a drug missing label.
[0069] Step 602: randomly select a multi-label data from the drug analysis data set to obtain the missing labels of the drugs in the multi-label data.
[0070] Step 603, determining whether the missing drug label includes the efficacy label y1 and / or the toxicity label y2. If it includes the efficacy label y1 and the toxicity label y2, executing step 604; if it includes the efficacy label y1 or the toxicity label y2, executing step 605.
[0071] Step 604, alternating reasoning: the first step is to initialize the efficacy label y1 and the toxicity label y2 based on the compromise result, obtain the first initial value of the efficacy label y1 and the second initial value of the toxicity label y2, and obtain the first common feature X1 between the efficacy label y1 and the toxicity label y2; the second step is to input the first initial value of the efficacy label y1, the second initial value of the toxicity label y2, and the first common feature X1 into the neural network model, and calculate and output the first predicted value of the efficacy label y1 and the second predicted value of the toxicity label y2 for a new round of prediction through each module in the model; the third step is to input the first predicted value of the efficacy label y1 and the second predicted value of the toxicity label y2 for a new round of prediction, and the first common feature X1 into the neural network model, and repeat the second step multiple times until the cumulative output of K consecutive rounds is , Update changes less than , or the total number of steps reaches N, the loop is terminated and the prediction results of the last cycle of the efficacy label y1 and the toxicity label y2 are output.
[0072] Step 605, direct reasoning: obtain the second common feature X2 between the efficacy label y1 and the toxicity label y2. If the drug missing label is the efficacy label y1, it means that the toxicity label y2 is a known drug label. The second common feature X2 and the toxicity label y2 are input into the neural network model, and the prediction result of the efficacy label y1 is calculated and output through the shared bottom layer 10, the second gating unit in the hybrid gate module 30, the third vector embedding layer of the dual feedback module 20, and the first task tower of the task tower module 40. .
[0073] If the missing drug label is the toxicity label y1, it means that the efficacy label y2 is a known drug label. The second common feature X2 and the efficacy label y1 are input into the neural network model, and the prediction result of the toxicity label y2 is calculated and output through the shared bottom layer 10, the first gate control unit in the hybrid gate module 30, the second vector embedding layer of the dual feedback module 20, and the second task tower of the task tower module 40. .
[0074] Step 606, determining whether all multi-label data in the drug analysis data set have been predicted, if so, then ending the prediction and outputting a drug analysis data set with all labels known.
[0075] Step 607 , saving the drug analysis data set with all known labels and visualizing the results.
[0076] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.
[0077] Based on the same inventive concept, the embodiment of the present application also provides a missing label prediction device for multi-label data for implementing the missing label prediction method for multi-label data involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the missing label prediction device for multi-label data provided below can refer to the limitations of the missing label prediction method for multi-label data above, and will not be repeated here.
[0078] In one embodiment, Figure 5 As shown, a missing label prediction device for multi-label data is provided, comprising: a data acquisition module 50, a type judgment module 51 and a label prediction module 52, wherein: The data acquisition module 50 is used to acquire a data set for a target task; the data set includes at least one multi-label data with a missing label.
[0079] The type determination module 51 is used to obtain the missing labels of the multi-label data and determine the label missing type of the multi-label data according to the missing labels.
[0080] A label prediction module 52 is used for, if the missing labels of the multi-label data include a first missing label and a second missing label, then the multi-label data is of the first label missing type, initializing the first missing label and the second missing label to obtain a first initial value corresponding to the first missing label and a second initial value corresponding to the second missing label; obtaining a first common feature between the first missing label and the second missing label; inputting the first initial value, the second initial value and the first common feature into a fully trained neural network model, and outputting a first prediction result for the first missing label and a second prediction result for the second missing label.
[0081] In one embodiment, the label prediction module 52 is also used to: if the drug missing label of the multi-label data includes a first missing label or a second missing label, obtain a known drug label of the multi-label data; obtain a second common feature between the known drug label and the first missing label or the second missing label; input the second common feature and the known drug label into the neural network model, and output a first prediction result of the first missing label or a second prediction result of the second missing label.
[0082] In one embodiment, the label prediction module 52 is also used to: input the first common feature into the shared bottom layer for replication and feature extraction, and output multiple first feature vectors; input the multiple first feature vectors into the mixed gate module for unified calculation and weighted summation, and output a first fused feature; input the first initial value into the dual feedback module for vector conversion, and output a corresponding first embedding vector, and input the second initial value into the dual feedback module for vector conversion, and output a corresponding second embedding vector; input the first fused feature, the first embedding vector and the second embedding vector into the task tower module for label prediction; wherein the task tower module performs prediction calculation on the first fused feature and the first embedding vector, and outputs a second prediction value corresponding to the second initial value; performs prediction calculation on the first fused feature and the second embedding vector, and outputs a first prediction value corresponding to the first initial value.
[0083] In one embodiment, the label prediction module 52 is also used to: input the second common feature into the shared bottom layer for replication and feature extraction, and output multiple second feature vectors; input the multiple second feature vectors into the hybrid gate module for unified calculation and weighted summation, and output a second fusion feature; if the drug missing label is the second missing label, input the known drug label into the dual feedback module for vector conversion, and output a third embedding vector; if the drug missing label is the first missing label, input the known drug label into the dual feedback module for vector conversion, and output a fourth embedding vector; input the second fusion feature and the third embedding vector into the task tower module for label prediction, or input the second fusion feature and the fourth embedding vector into the task tower module for label prediction; wherein the task tower module performs prediction calculation on the second fusion feature and the third embedding vector, and outputs a prediction result of the second missing label; or performs prediction calculation on the second fusion feature and the fourth embedding vector, and outputs a prediction result of the first missing label.
[0084] In one embodiment, the device also includes a model building module, which is used to: construct an initial multi-layer neural network; the initial multi-layer neural network includes a shared bottom layer, a dual feedback module, a hybrid gate module and a task tower module with randomly set network parameters; obtain a missing label training set for drug analysis, the missing label training set includes at least one multi-label sample, and the multi-label sample includes at least one known sample label; obtain sample common features between sample labels of the multi-label samples; input the sample common features and the known sample labels of each multi-label sample into the initial multi-layer neural network, and output the corresponding predicted sample labels; calculate the accuracy loss value and probability distribution loss value of the initial multi-layer neural network based on the predicted sample labels and the known sample labels of each multi-label sample, and adjust the network parameters of each module of the initial multi-layer neural network based on the accuracy loss value and the probability distribution loss value until the initial multi-layer neural network converges to obtain the fully trained neural network model.
[0085] Each module in the missing label prediction device for multi-label data can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0086] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, steps corresponding to the missing label prediction method for multi-label data described in the above embodiments are implemented.
[0087] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps corresponding to the missing label prediction method for multi-label data described in the above embodiments are implemented.
[0088] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps corresponding to the missing label prediction method for multi-label data described in the above embodiments.
[0089] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0090] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0091] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A missing label prediction method for multi-label data, characterized in that: The method comprises: Acquire a drug analysis data set; the drug analysis data set includes multi-label data with at least one drug missing label; Obtaining missing labels for drugs in the multi-label data; If the drug missing label of the multi-label data includes a first missing label and a second missing label, obtaining a first common feature between the first missing label and the second missing label; initializing the first missing label and the second missing label to obtain a first initial value corresponding to the first missing label and a second initial value corresponding to the second missing label; Inputting the first initial value, the second initial value, and the first common feature into a neural network model, and outputting a first predicted value corresponding to the first initial value and a second predicted value corresponding to the second initial value; The first prediction value and the second prediction value are re-input into the neural network model, and cyclic prediction is performed until the neural network model converges, and a first prediction result of the first missing label and a second prediction result of the second missing label are output.
2. The missing label prediction method for multi-label data according to claim 1, characterized in that: If the missing drug label of the multi-label data includes the first missing label or the second missing label, obtaining a known drug label of the multi-label data; Acquire a second common feature between the known drug label and the first missing label or the second missing label; The second common feature and the known drug label are input into the neural network model, and a first prediction result of the first missing label or a second prediction result of the second missing label is obtained as an output.
3. The missing label prediction method for multi-label data according to claim 2, characterized in that: The neural network model includes: a shared bottom layer, a dual feedback module, a hybrid gate module and a task tower module; the first initial value, the second initial value and the first common feature are input into the neural network model, and the first predicted value corresponding to the first initial value and the second predicted value corresponding to the second initial value are outputted, including: Inputting the first common feature into the shared bottom layer for replication and feature extraction, and outputting a plurality of first feature vectors; Input the multiple first feature vectors into the hybrid gate module for unified calculation and weighted summation, and output to obtain a first fusion feature; Inputting the first initial value into the dual feedback module for vector conversion, and outputting a corresponding first embedding vector; and inputting the second initial value into the dual feedback module for vector conversion, and outputting a corresponding second embedding vector; The first fused feature, the first embedded vector and the second embedded vector are input into the task tower module for label prediction; wherein the task tower module performs prediction calculation on the first fused feature and the first embedded vector, and outputs a second predicted value corresponding to the second initial value; and performs prediction calculation on the first fused feature and the second embedded vector, and outputs a first predicted value corresponding to the first initial value.
4. The missing label prediction method for multi-label data according to claim 3, characterized in that: The step of inputting the second common feature and the known drug label into the fully trained neural network model and outputting a first prediction result of the first missing label or a second prediction result of the second missing label comprises: Inputting the second common feature into the shared bottom layer for replication and feature extraction, and outputting a plurality of second feature vectors; Input the multiple second feature vectors into the hybrid gate module for unified calculation and weighted summation, and output to obtain a second fusion feature; If the missing drug label is the second missing label, the known drug label is input into the dual feedback module for vector conversion, and the third embedding vector is obtained as output; if the missing drug label is the first missing label, the known drug label is input into the dual feedback module for vector conversion, and the fourth embedding vector is obtained as output; The second fused feature and the third embedded vector are input into the task tower module for label prediction, or the second fused feature and the fourth embedded vector are input into the task tower module for label prediction; wherein the task tower module performs a prediction calculation on the second fused feature and the third embedded vector, and outputs a prediction result of the second missing label; or performs a prediction calculation on the second fused feature and the fourth embedded vector, and outputs a prediction result of the first missing label.
5. The missing label prediction method for multi-label data according to claim 4, characterized in that: The shared bottom layer includes a first vector embedding layer and a plurality of sub-expert networks connected to the first vector embedding layer; The first vector embedding layer is used to receive the first common feature for vector conversion, and copy the first feature result of the vector conversion multiple times, and input them into each of the sub-expert networks respectively, or receive the second common feature for vector conversion, and copy the second feature result of the vector conversion multiple times, and input them into each of the sub-expert networks respectively; each of the sub-expert networks performs feature extraction on the first feature result, and outputs the multiple first feature vectors, or performs feature extraction on the second feature result, and outputs the multiple second feature vectors; The hybrid door module includes a first door control unit and a second door control unit; The first gating unit and the second gating unit are respectively used to uniformly calculate and weighted sum the multiple first feature vectors to output the first fusion feature, or to uniformly calculate and weighted sum the multiple second feature vectors to output the second fusion feature.
6. The missing label prediction method for multi-label data according to claim 5, characterized in that: The dual feedback module includes a second vector embedding layer and a third vector embedding layer; The second vector embedding layer is used to receive the first initial value corresponding to the first missing label for vector conversion, and output the first embedding vector, or when the drug missing label of the multi-label data is the second missing label, receive the known drug label for vector conversion, and output the third embedding vector; The third vector embedding layer is used to receive the second initial value corresponding to the second missing label for vector conversion, and output the second embedded vector, or when the drug missing label of the multi-label data is the first missing label, receive the known drug label for vector conversion, and output the fourth embedded vector.
7. The missing label prediction method for multi-label data according to claim 6, characterized in that: The task tower module includes a first task tower and a second task tower; The first task tower is used to receive the first fused feature and the second embedded vector to perform prediction calculation, and output a first predicted value corresponding to the first initial value, or receive the second fused feature and the fourth embedded vector, and output a prediction result of the first missing label; The second task tower is used to receive the first fused feature and the first embedded vector for prediction calculation, and output a second predicted value corresponding to the second initial value, or receive the second fused feature and the third embedded vector, and output a prediction result of the second missing label.
8. The missing label prediction method for multi-label data according to claim 2, characterized in that: The training method of the neural network model includes: Constructing an initial multi-layer neural network; the initial multi-layer neural network includes a shared bottom layer with randomly set network parameters, a dual feedback module, a hybrid gate module, and a task tower module; Acquire a missing label training set for drug analysis, wherein the missing label training set includes at least one multi-label sample, and the multi-label sample includes at least one known sample label; Acquire sample common features between sample labels of the multi-label samples; Input the sample common features and the known sample labels of each multi-label sample into the initial multi-layer neural network, and output the corresponding predicted sample labels; According to the predicted sample label and the known sample label of each multi-label sample, the accuracy loss value and the probability distribution loss value of the initial multi-layer neural network are calculated, and according to the accuracy loss value and the probability distribution loss value, the network parameters of each module of the initial multi-layer neural network are adjusted until the initial multi-layer neural network converges to obtain the fully trained neural network model.
9. A missing label prediction device for multi-label data, characterized in that: The device comprises: A data acquisition module, used to acquire a data set for a target task; the data set includes at least one multi-label data with a missing label; A type judgment module, used to obtain the missing labels of the multi-label data, and judge the label missing type of the multi-label data according to the missing labels; A label prediction module is used for, if the missing labels of the multi-label data include a first missing label and a second missing label, then the multi-label data is of the first label missing type, initializing the first missing label and the second missing label to obtain a first initial value corresponding to the first missing label and a second initial value corresponding to the second missing label; obtaining a first common feature between the first missing label and the second missing label; inputting the first initial value, the second initial value and the first common feature into a fully trained neural network model, and outputting a first prediction result for the first missing label and a second prediction result for the second missing label.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Multi-label learning method, device and equipment based on sample missing label enhancement
CN116777006A
Recommendation method and apparatus, and training method and apparatus
WO2023221928A1
Cited By
Description text generation-based missing multi-label image identification method and device
CN120708227A