A method and device for training a multi-label model using single-label data

By combining the Beta mixture model and the binary cross entropy loss function, a multi-label model is trained using single-label data, which solves the problem of large amount of manual labeling in deep network multi-label classification tasks and achieves fast startup and model optimization.

CN115758148BActive Publication Date: 2025-10-21XIAMEN MEIYABAIKE INFORMATION SECURITY RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211456763.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2025-10-21
Estimated Expiration
2042-11-21

AI Technical Summary

Technical Problem

Deep network training for multi-label classification tasks requires a large amount of manual labeling, which is costly. Existing technologies make it difficult to effectively use a small amount of labeled data to complete multi-label classification.

Method used

The Beta mixture model is used to determine whether unlabeled samples are negative samples, and the positive samples are enhanced through the binary cross entropy loss function. The multi-label model is trained using single-label data, including the dynamic extraction of initial positive samples, initial negative samples and unlabeled samples and loss function enhancement processing.

Benefits of technology

It effectively saves manual labeling costs, enables rapid startup and model optimization of multi-label classification tasks, and reduces training costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115758148B_ABST
    Figure CN115758148B_ABST
Patent Text Reader

Abstract

The application provides a method and device for training a multi-label model by using single-label data. The method comprises the following steps: S1, obtaining a multi-label data set, wherein the multi-label data set comprises initial positive samples, initial negative samples and unlabeled samples; S2, judging whether the unlabeled samples belong to negative samples based on a hybrid model, if yes, regarding the unlabeled samples as first negative samples, and forming a to-be-trained negative sample set by combining the first negative samples and the initial negative samples; S3, performing enhancement processing on the initial positive samples based on a binary cross-entropy loss function, and obtaining a to-be-trained positive sample set; and S4, training a neural network model based on the to-be-trained negative sample set and the to-be-trained positive sample set, and finally obtaining a multi-label model. The multi-label classification task can be trained by using a single-label data set, thereby effectively saving the manual marking cost, realizing quick start of the multi-label classification task in an actual project, and being beneficial to model optimization in the next step.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of deep learning technology, and specifically to a method and device for training a multi-label model using single-label data. Background Art

[0002] With the rapid development of mobile internet technology, snapping photos and sharing them online has become a new lifestyle habit. How to quickly triage online images is crucial for the next step in big data processing. However, in real life, it's common for a single image to contain multiple objects. Therefore, multi-label classification technology is needed to assign multiple labels to a single image. With recent advances in deep learning technology, using deep networks to accomplish this task has become a trend.

[0003] However, deep networks often require a large number of labeled samples. For multi-label classification tasks, a single image needs to be labeled with multiple categories, and the manual labeling workload is several times, or even dozens of times, that of single-label classification tasks. The ability to use a small amount of labeled data to complete the entire deep network learning process has broad application prospects.

[0004] In view of this, the present invention proposes a method and apparatus for training a multi-label model using single-label data, and completes a multi-label classification task using only a single-label dataset. Summary of the Invention

[0005] In order to solve technical problems such as the need for a large amount of manual labeling in multi-label classification tasks in deep network training multi-label models, this application provides a method and device for training multi-label models using single-label data to solve the above technical defects.

[0006] According to one aspect of the present invention, a method for training a multi-label model using single-label data is proposed, comprising the following steps:

[0007] S1. Obtain a multi-label dataset, which includes initial positive samples, initial negative samples, and unlabeled samples;

[0008] S2. Determine whether the unlabeled sample is a negative sample based on the hybrid model. If it is, the unlabeled sample is regarded as the first negative sample. The first negative sample and the initial negative sample form the negative sample set to be trained;

[0009] S3, performing enhancement processing on the initial positive samples based on the binary cross entropy loss function to obtain a positive sample set to be trained; and

[0010] S4. Train the neural network model based on the negative sample set to be trained and the positive sample set to be trained, and finally obtain a multi-label model.

[0011] In a specific embodiment, in step S2, whether the unlabeled sample is a negative sample is determined based on the hybrid model, and the probability calculation is performed using the following sub-steps:

[0012] S21. Use the Beta mixture model to calculate the probability that unlabeled samples in the multi-label dataset are negative samples, and normalize the loss function L used by the neural network. The specific expression is as follows:

[0013]

[0014] Among them, L represents the loss function used by the current neural network, λ k represents the corresponding mixing coefficient of each sub-distribution k in the mixture model, represents the Gamma function, α and β represent hyperparameters;

[0015] S22, using the expectation maximization algorithm to learn the parameters of the beta mixture model;

[0016] S23. Obtain the probability of whether each sample i is suitable as a negative sample, expressed as:

[0017]

[0018] Among them, p(L i |k) represents the predicted probability value of the current neural network model of the i-th sample, p(k) = λ k , p(L) represents Formula 1.

[0019] In a specific embodiment, in step S23, the probability p(k|L i )>0.5, sample i is considered a negative sample, otherwise it is still considered an unlabeled sample.

[0020] In a specific embodiment, in step S3, the initial positive sample is enhanced based on the binary cross entropy loss function, which is expressed as:

[0021]

[0022] Among them, N represents the total number of categories, g(q y ) represents the weighting function, L pos Represents the loss of positive samples, L neg represents the loss of negative samples.

[0023] In a specific embodiment, it is characterized in that the expression of the weighting function is:

[0024] g(q y )=(αq y +β) γ

[0025] Among them, q y represents the proportion of positive samples in the current category, and α, β, and γ represent hyperparameters.

[0026] In a second aspect, the present application provides a device for training a multi-label model using single-label data, comprising the following modules:

[0027] An initial data acquisition module is used to acquire a multi-label dataset, where the multi-label dataset includes initial positive samples, initial negative samples, and unlabeled samples; and

[0028] A negative sample set dynamic extraction module determines whether an unlabeled sample is a negative sample based on a hybrid model. If so, the unlabeled sample is considered the first negative sample. The first negative sample and the initial negative sample form the negative sample set to be trained; and

[0029] A positive sample loss function enhancement module enhances the initial positive samples based on the binary cross entropy loss function to obtain a positive sample set to be trained; and

[0030] The neural network model training module trains the neural network model based on the negative sample set to be trained and the positive sample set to be trained, and finally obtains a multi-label model.

[0031] In a specific embodiment, in the negative sample set dynamic extraction module, whether an unlabeled sample is a negative sample is determined based on the hybrid model, and the probability calculation is performed using the following sub-steps:

[0032] S21. Use the Beta mixture model to calculate the probability that unlabeled samples in the multi-label dataset are negative samples, and normalize the loss function L used by the neural network. The specific expression is as follows:

[0033]

[0034] Among them, L represents the loss function used by the current neural network, λ k represents the corresponding mixing coefficient of each sub-distribution k in the mixture model, represents the Gamma function, α and β represent hyperparameters;

[0035] S22, using the expectation maximization algorithm to learn the parameters of the beta mixture model;

[0036] S23. Obtain the probability of whether each sample i is suitable as a negative sample, expressed as:

[0037]

[0038] Among them, p(L i |k) represents the predicted probability value of the current neural network model of the i-th sample, p(k) = λ k, p(L) represents Formula 1.

[0039] In a specific embodiment, in the positive sample loss function enhancement module, the initial positive sample is enhanced based on the binary cross entropy loss function, which is expressed as:

[0040]

[0041] Among them, N represents the total number of categories, g(q y ) represents the weighting function, L pos Represents the loss of positive samples, L neg represents the loss of negative samples.

[0042] In a specific embodiment, the expression of the weighting function is:

[0043] g(q y )=(αq y +β) γ

[0044] Among them, q y represents the proportion of positive samples in the current category, and α, β, and γ represent hyperparameters.

[0045] In a third aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any of the above methods is implemented.

[0046] Compared with the prior art, the present invention has the following advantages:

[0047] This paper proposes a new method that can use a single-label dataset to complete the training of multi-label classification tasks, effectively saving the cost of manual labeling. In actual projects, it can realize the rapid start of multi-label classification tasks and is also conducive to the next step of model optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Other features, objects and advantages of the present application will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0049] Figure 1 is a flow chart of a method for training a multi-label model using single-label data according to the present application;

[0050] Figure 2 is a schematic diagram of an apparatus for training a multi-label model using single-label data according to the present application;

[0051] Figure 3 It is a structural diagram of a computer system suitable for implementing the electronic device of the embodiment of the present application. DETAILED DESCRIPTION

[0052] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the relevant invention are shown in the accompanying drawings.

[0053] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0054] To facilitate understanding by those skilled in the art, the overall idea of ​​the method for training a multi-label model using single-label data in an embodiment of the present invention is introduced below.

[0055] For a specific image X in a multi-label dataset containing N label categories, its label where y c ∈{-1,0,1}, represents whether category c appears in image X {'1'}, does not appear {'-1'} or is unknown {'0'}.

[0056] For a single-label dataset, the image X only has a positive label P X ={c|y c =1}, in the multi-label classification scenario, its negative label set Since the accuracy cannot be determined, it can only be regarded as an unlabeled label set. And its positive label P X It is incomplete. For labels other than the current labeled category, the image X can only be regarded as an unlabeled sample.

[0057] So how to get the unlabeled label set U X Obtaining useful information is crucial for the training of the entire multi-label classifier. Drawing on the unsupervised label correction algorithm in recent years, this application uses the unlabeled label set U X On the one hand, appropriate negative samples are extracted, and on the other hand, the contribution of known positive samples is enhanced in the calculation of the loss function to complete the training of the multi-label classification network.

[0058] Figure 1 The flowchart of the method of using single-label data to train a multi-label model in this application is shown in FIG. Figure 1 The method comprises the following steps:

[0059] S1. Obtain a multi-label dataset, which includes initial positive samples, initial negative samples, and unlabeled samples;

[0060] S2. Determine whether the unlabeled sample is a negative sample based on the hybrid model. If it is, the unlabeled sample is regarded as the first negative sample. The first negative sample and the initial negative sample form the negative sample set to be trained;

[0061] S3, performing enhancement processing on the initial positive samples based on the binary cross entropy loss function to obtain a positive sample set to be trained; and

[0062] S4. Train the neural network model based on the negative sample set to be trained and the positive sample set to be trained, and finally obtain a multi-label model.

[0063] The following is a detailed explanation of the dynamic extraction of negative sample sets and the loss function enhancement of positive samples.

[0064] 1. Dynamic extraction of negative sample sets

[0065] During the training process, the probability that the unlabeled samples in the data set belong to negative samples is calculated by using mixture models to dynamically extract the negative sample set to be trained. The mixture model of this application adopts the beta mixture model (BMM) and normalizes the loss function L so that L∈[0,1]. Its probability density function is expressed as follows:

[0066]

[0067] Among them, L represents the loss function used by the current neural network, λ k represents the corresponding mixing coefficient of each sub-distribution k in the mixture model, Γ(·) represents the Gamma function, and α and β represent hyperparameters.

[0068] This application uses the Expectation Maximization (EM) algorithm to learn the parameters of the Beta mixture model. Finally, the probability of whether each sample i is suitable as a negative sample of the current category label is:

[0069]

[0070] p(L i |k) represents the predicted probability value of the current neural network model of the i-th sample, p(k) = λ k , p(L) represents Formula 1.

[0071] In a batch training, if p(k|L i )>0.5, it is considered as the first negative sample, otherwise it is still considered as an unlabeled sample. The first negative sample and the initial negative sample form the negative sample set to be trained.

[0072] 2. Enhanced loss function for positive samples

[0073] Binary cross-entropy (BCE) is a commonly used loss function for multi-label classification. However, in some scenarios, the credibility of positive samples is higher than that of negative samples for each class of data label. Therefore, it is necessary to enhance the initial positive samples to improve their contribution, as shown below:

[0074]

[0075] Among them, N represents the total number of categories, L pos Represents the loss of positive samples, L neg Denotes the loss of negative samples, g(q y )=(αq y +β) γ is the weighting function, q y Indicates the proportion of positive samples in the current category. y There are two forms. The first one calculates the ratio of the number of positive samples in each category of the training set to the total number of training sets. Under this condition, q y It is fixed during the entire training process; the other is to calculate the ratio of the number of positive samples of each category in each mini-batch to the total number of samples of the current category. Under this condition, due to the uncertainty of the number of negative samples, q y It is automatically and dynamically adjusted during the training process. α, β, γ are the corresponding hyperparameters, preferably, α = -5.5, β = 6.5, γ = 1

[0076] This application proposes a new method that can use a single-label dataset to complete the training of multi-label classification tasks, effectively saving the cost of manual labeling. In actual projects, it can realize the rapid start of multi-label classification tasks and is also conducive to the next step of model optimization.

[0077] Further references Figure 2 As an implementation of the above method, the present application provides an embodiment of a device for training a multi-label model using single-label data. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices. The device 200 includes the following modules:

[0078] An initial data acquisition module 210 is configured to acquire a multi-label dataset, where the multi-label dataset includes initial positive samples, initial negative samples, and unlabeled samples; and

[0079] The negative sample set dynamic extraction module 220 determines whether the unlabeled sample is a negative sample based on the hybrid model. If it is, the unlabeled sample is regarded as the first negative sample. The first negative sample and the initial negative sample form the negative sample set to be trained; and

[0080] A positive sample loss function enhancement module 230 performs enhancement processing on the initial positive samples based on a binary cross entropy loss function to obtain a positive sample set to be trained; and

[0081] The neural network model training module 240 trains the neural network model based on the negative sample set to be trained and the positive sample set to be trained, and finally obtains a multi-label model.

[0082] In a specific embodiment, the negative sample set dynamic extraction module 220 determines whether an unlabeled sample is a negative sample based on the hybrid model, and specifically uses the following sub-steps to perform probability calculation:

[0083] S21. Use the Beta mixture model to calculate the probability that unlabeled samples in the multi-label dataset are negative samples, and normalize the loss function L used by the neural network. The specific expression is as follows:

[0084]

[0085]

[0086] Among them, L represents the loss function used by the current neural network, λ k represents the corresponding mixing coefficient of each sub-distribution k in the mixture model, represents the Gamma function, α and β represent hyperparameters;

[0087] S22, using the expectation maximization algorithm to learn the parameters of the beta mixture model;

[0088] S23. Obtain the probability of whether each sample i is suitable as a negative sample, expressed as:

[0089]

[0090] Among them, p(L i |k) represents the predicted probability value of the current neural network model of the i-th sample, p(k) = λ k , p(L) represents Formula 1.

[0091] In a specific embodiment, in the positive sample loss function enhancement module 230, the initial positive sample is enhanced based on the binary cross entropy loss function, which is expressed as:

[0092]

[0093] Among them, N represents the total number of categories, g(q y ) represents the weighting function, L pos Represents the loss of positive samples, L neg represents the loss of negative samples.

[0094] The expression of the weight function is:

[0095] g(q y )=(αq y +β) γ

[0096] Among them, q y represents the proportion of positive samples in the current category, and α, β, and γ represent hyperparameters.

[0097] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it implements any of the above methods.

[0098] Reference below Figure 3 , which shows a structural diagram of a computer system 300 suitable for implementing a terminal device or server of an embodiment of the present application. Figure 3 The terminal device or server shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0099] like Figure 3 As shown, computer system 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage unit 308 into a random access memory (RAM) 303. Various programs and data required for the operation of system 300 are also stored in RAM 303. CPU 301, ROM 302, and RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to bus 304.

[0100] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, and the like; an output section 307 including a liquid crystal display (LCD), a speaker, and the like; a storage section 308 including a hard disk and the like; and a communication section 309 including a network interface card such as a LAN card or a modem. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. Removable media 311, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 310 as needed, so that computer programs read therefrom can be installed into the storage section 308 as needed.

[0101] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 309, and / or installed from the removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, the above-mentioned functions defined in the method of the present application are executed. It should be noted that the computer-readable medium described in the present application can be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wire, optical cable, RF, or any suitable combination thereof.

[0102] Computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0103] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0104] The modules involved in the embodiments of the present application may be implemented in software or in hardware. The units described may also be provided in a processor. For example, they may be described as follows: a processor includes a receiving module, an acquisition module, a determination module, a calculation module, and a generation module. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the receiving unit may also be described as a "module that obtains preset, target user configuration information in response to determining that the verification request information includes a user name, a request time, a user signature code, and a client application code."

[0105] As another aspect, the present application also provides a computer-readable medium, which may be included in the server described in the above embodiment; or may exist independently and not be assembled into the server. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the server, the server: receives a verification request message sent by a client of a target user; in response to determining that the verification request message includes a user name, a request time, a user signature code, and a client application code, obtains preset configuration information of the target user, wherein the configuration information includes a preset user password corresponding to the user name; determines whether the verification request message is valid based on the request time, and in response to determining that it is valid, determines whether a preset storage area includes a user signature code; in response to determining that it is not included, stores the user signature code in a preset storage area, and calculates a server application code based on the user password, the request time, and the user signature code; in response to determining that the server application code matches the client application code, generates verification success information for indicating that the verification request is a legitimate request.

[0106] In addition, the computer-readable medium may be included in the terminal device described in the above embodiment, or may exist independently without being incorporated into the terminal device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the terminal device, the terminal device: obtains user information input by the target user, wherein the user information includes a user name and a user password; generates a user signature code representing the target user based on the user information; determines a request time; calculates a client application code based on the user password, the request time, and the user signature code; generates verification request information including the user name, the request time, the user signature code, and the client application code; and sends the verification request information to the server.

[0107] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned inventive concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A method for training a multi-label model using single-label data, characterized in that: The following steps are involved: S1. Obtain a multi-label dataset, where the multi-label dataset includes initial positive samples, initial negative samples, and unlabeled samples; S2. Determine whether the unlabeled sample is a negative sample based on the hybrid model. If it is, treat the unlabeled sample as a first negative sample. The first negative sample and the initial negative sample constitute a negative sample set to be trained. Determine whether the unlabeled sample is a negative sample based on the hybrid model by performing probability calculation using the following sub-steps: S21. Use the Beta mixture model to calculate the probability that the unlabeled samples in the multi-label dataset are negative samples, and normalize the loss function L used by the neural network. The specific expression is as follows: Among them, L represents the loss function used by the current neural network, λ k represents the corresponding mixing coefficient of each sub-distribution k in the mixture model, Γ(·) represents the Gamma function, and α and β represent hyperparameters; S22, using an expectation-maximization algorithm to learn parameters of the beta mixture model; S23. Obtain the probability of whether each sample i is suitable as a negative sample, expressed as: Among them, p(L i |k) represents the predicted probability value of the current neural network model of the i-th sample, p(k)=λ k , p(L) represents formula 1; S3. Enhance the initial positive samples based on a binary cross entropy loss function to obtain a set of positive samples to be trained. The enhancement process of the initial positive samples based on a binary cross entropy loss function is expressed as: Among them, N represents the total number of categories, g(q y ) represents the weighting function, L pos Represents the loss of positive samples, L neg represents the loss of negative samples; S4. Training a neural network model based on the negative sample set to be trained and the positive sample set to be trained, and finally obtaining a multi-label model.

2. The method for training a multi-label model using single-label data according to claim 1, characterized in that: In step S23, the probability p(k|L i )>0.5, the sample i is considered to be a negative sample, otherwise it is still considered an unlabeled sample.

3. The method for training a multi-label model using single-label data according to claim 2, characterized in that: The expression of the weighting function is: g(q y )=(αq y +β) γ Among them, q y represents the proportion of positive samples in the current category, and α, β, and γ represent hyperparameters.

4. A device for training a multi-label model using single-label data, characterized in that: Includes the following modules: An initial data acquisition module is used to acquire a multi-label dataset, wherein the multi-label dataset includes initial positive samples, initial negative samples, and unlabeled samples; as well as The negative sample set dynamic extraction module determines whether the unlabeled sample is a negative sample based on the hybrid model. If it is, the unlabeled sample is regarded as the first negative sample. The first negative sample and the initial negative sample constitute the negative sample set to be trained. In the negative sample set dynamic extraction module, whether the unlabeled sample is a negative sample is determined based on the hybrid model. Specifically, the following sub-steps are used to perform probability calculation: S21. Use the Beta mixture model to calculate the probability that the unlabeled samples in the multi-label dataset are negative samples, and normalize the loss function L used by the neural network. The specific expression is as follows: Among them, L represents the loss function used by the current neural network, λ k represents the corresponding mixing coefficient of each sub-distribution k in the mixture model, Γ(·) represents the Gamma function, and α and β represent hyperparameters; S22, using an expectation-maximization algorithm to learn parameters of the beta mixture model; S23. Obtain the probability of whether each sample i is suitable as a negative sample, expressed as: Among them, p(L i |k) represents the predicted probability value of the current neural network model of the i-th sample, p(k)=λ k , p(L) represents formula 1; The positive sample loss function enhancement module performs enhancement processing on the initial positive sample based on the binary cross entropy loss function to obtain a positive sample set to be trained; in the positive sample loss function enhancement module, the initial positive sample is enhanced based on the binary cross entropy loss function, and the expression is: Among them, N represents the total number of categories, g(q y ) represents the weighting function, L pos Represents the loss of positive samples, L neg represents the loss of negative samples; The neural network model training module trains the neural network model based on the negative sample set to be trained and the positive sample set to be trained, and finally obtains a multi-label model.

5. The device for training a multi-label model using single-label data according to claim 4, characterized in that The expression of the weighting function is: g(q y )=(αq y +β) γ Among them, q y represents the proportion of positive samples in the current category, and α, β, and γ represent hyperparameters.

6. A computer-readable storage medium, wherein a computer program is stored in the medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Machine learning-based model optimization method and device and computer readable storage medium

    CN114548257A

  • Image multi-label classification method and device and related product

    CN115205606A