Instance dependent part label learning method and device based on category enhancement

By generating enhanced samples and optimizing representation learning based on category enhancement, the problem of category confusion in instance-dependent partial label learning is solved, and the classification performance of the model in a weakly supervised environment is improved.

CN121835798APending Publication Date: 2026-04-10XI AN JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XI AN JIAOTONG UNIV
Filing Date
2025-12-30
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing instance-dependent partial label learning methods suffer from performance degradation when dealing with instance entanglement, especially mislabeling of similar class instances. Existing methods have failed to effectively solve the problem of class confusion.

Method used

A category-based augmentation approach is adopted, which generates augmented samples with defined categories through a pre-trained diffusion model, generates query and key representations using a query network and a key network, constructs a contrastive learning model, and optimizes the classification model through a weighted loss function to reduce category confusion.

Benefits of technology

It effectively extracts category-related features, reduces inter-category interference, improves the model's representation learning ability and classification accuracy under weak supervision, and alleviates the instance entanglement problem.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121835798A_ABST
    Figure CN121835798A_ABST
Patent Text Reader

Abstract

The invention discloses an instance dependency part label learning method and device based on category enhancement, and the method comprises the steps: firstly, carrying out the data enhancement of an instance through a category setting enhancement method, so as to generate a plurality of category setting enhancement samples; secondly, utilizing a query network and a key network to generate a query representation and a key representation for the enhanced sample so as to carry out distance measurement; then, by utilizing comparative learning and enhancing alignment of samples, category representation is optimized, so that intra-class dislocation is reduced; thirdly, introducing a label disambiguation module, rewarding and punishing categories with high confidence coefficients through a punishment mechanism and weighted loss of confusion labels, and further optimizing the classification performance; and finally, by optimizing a loss function of the model, under the combined action of a label disambiguation module and a representation learning module, the classification precision of the model is improved, and the instance entanglement problem is relieved. According to the method, the problem of instance entanglement is solved by cooperatively adjusting the intra-class and inter-class distances.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of partial label learning method, and particularly relates to an instance-dependent partial label learning method and device based on category enhancement. BACKGROUND

[0002] Partial label learning (PLL) is an important weakly supervised learning task, in which each training instance is associated with a set of candidate labels, and these labels often have uncertainty. Existing partial label learning methods usually assume that the labels in the candidate label set are independent, but in many practical scenarios, the labels between different categories will be confused, which will affect the accuracy of the classifier. In instance-dependent partial label learning (ID-PLL), the candidate label set is affected by the instance features, and there is an instance entanglement problem of high overlap of instance candidate sets, which leads to significant confusion between instances of different categories, especially instances of similar categories are more likely to misallocate labels, which poses a great challenge to classification performance. Under this background, how to avoid the misalignment between instances with overlapping candidate labels and reduce category confusion has become a key problem faced by partial label learning. In the prior art, many methods use strategies based on contrast learning, variational inference or Bayesian inference to align instances inferred as the same class or instances sharing candidate labels to enhance the representation, but these methods cannot effectively solve the negative effects of entangled instances, which share partially overlapping features and candidate labels. Emphasizing intra-class consistency without solving this entanglement may exacerbate category confusion.

[0003] Currently, there is no related patent that effectively solves the instance entanglement problem under the framework of instance-dependent partial label learning. Related weakly supervised learning and contrast learning invention patents are: Document 1: Weakly supervised learning method and device based on double work similarity measure (CN202310018356.7) Document 2: Large-scale multi-view tensor clustering method, device and equipment based on linear kernel (CN202510098250.1) Document 1 proposes a method of optimizing a neural network model using forward and reverse supervision signals. The method calculates the double work similarity measure between real image features and false image features, and updates the network parameters by taking the classification objective function as the optimization target, thereby improving the benchmark performance of the model in the tasks of noisy label learning, partial label learning and semi-supervised learning.

[0004] Reference 2 employs a linear kernel matrix for kernel alignment of multi-view data and utilizes Tensor Singular Value Decomposition (T-SVD) to minimize the kernel norm constraint, thereby optimizing the latent representation of the multi-view data and improving clustering accuracy. This method can improve the performance of multi-view clustering within an unsupervised learning framework, and is particularly suitable for data with multiple perspectives.

[0005] The aforementioned technical solutions still have certain limitations when dealing with instance-dependent partial label learning (ID-PLL). Most methods primarily focus on improving the model's performance in noisy label learning and partial label learning tasks, but do not consider the class confusion caused by overlapping candidate labels in instance-dependent cases. In instance-dependent partial label learning (ID-PLL), the candidate label set is influenced by instance features, resulting in instance entanglement with highly overlapping candidate sets, leading to significant confusion between instances of different categories. How to effectively align instances with overlapping candidate labels has become an urgent problem to be solved. Summary of the Invention

[0006] This invention provides a method and apparatus for instance-dependent partial label learning based on category enhancement, aiming to solve the instance entanglement problem by coordinating the adjustment of intra-class and inter-class distances. For intra-class regularization, a category-defined enhancement method is introduced to improve intra-class alignment. This strategy uses an image editing model to enhance the features corresponding to each candidate label, ensuring that the enhanced instance features are closely aligned with the target label, and the enhanced features of instances with the same target label will be aligned. For inter-class regularization, we make full use of non-entangled instances, as these instances are easier to distinguish and can provide a rejection signal for similar categories. Specifically, we propose a weighted penalty loss function that gives higher weights to labels with high confidence. In this process, for non-entangled instances that do not share labels with similar categories, their confidence in similar categories will be further reduced, helping them to move away from similar categories. Furthermore, during model training, the inherent class consistency will guide the remaining entangled instances to align with the optimized non-entangled instances, ultimately increasing inter-class distance and reducing class confusion.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: A category-enhanced instance-dependent partial label learning method includes: 1) Use a pre-trained diffusion model to augment instances to generate augmented samples with multiple class settings; 2) Generate query and key representations for augmented samples using query and key networks; 3) Construct a contrastive learning model consisting of a query network and a key network. The key network is updated by the momentum of the query network. Based on the query representation and the key representation, the model aligns and enhances the samples through contrastive learning to optimize the category representation. 4) After querying the network, a fully connected layer is added to form a classification model. A label disambiguation module is introduced. Through the penalty mechanism for confusing labels, the weighted loss rewards and punishes categories with high confidence, thereby further optimizing the performance of the classification model. 5) By jointly optimizing the contrastive learning and classification models, the classification accuracy of the model is improved and the instance entanglement problem is alleviated through the combined effect of the label disambiguation module and the representation learning module.

[0008] A further improvement of this invention is that step 1) uses a pre-trained diffusion model to augment the instances to generate augmented samples with multiple class settings, including: A loss function is defined. It includes a pairwise distance loss to preserve the representation of similarity. A classification loss to ensure class consistency Then, using a diffusion-based instance editing method, with the category name as the editing instruction, the original instance is adjusted. Generate enhanced samples Ultimately, enhanced samples with multiple categories are obtained; specifically, the following steps are included: Step 1: Parse the input sample and obtain the candidate category set, given an instance. and its candidate tag set First, its features are extracted, and then its candidate category set is analyzed. ; Step 2: Enhanced sample generation using a diffusion-based instance editing method; employing a diffusion-based instance editing model. Edit the original instance according to the given editing instructions. Modify the code to generate enhanced samples that match the target category features; editing instructions are provided via functions. This function generates the target category. The mapping is its name; the final generation process is represented as That is, by using the instance editing model to edit the original instance based on the category name, an enhanced sample with a defined category is obtained; Step 3: Define the loss function The generation of enhanced samples is optimized; the loss consists of two computational parts: one is the distance loss used to maintain the similarity between the enhanced sample and the original instance. Secondly, it is used to ensure that the augmented samples conform to the target category. Classification loss At the same time, use hyperparameters Controlling the balance between the two types of losses; Step 4: Given partial label samples For each candidate category The generation process is repeated to eventually obtain an enhanced sample set. ,in It is to enhance the sample. It is its corresponding category label, where the total number of augmented samples It equals the number of candidate categories, and each candidate category can generate a corresponding augmented sample.

[0009] A further improvement of this invention is that step 2) generates query representations and key representations for the augmented samples using a query network and a key network, including: After generating augmented samples with defined categories, augmented samples are set for each category. The query view and key view are generated through different data transformation strategies; then, the query view and key view are input into the query network and key network respectively to generate the query representation and key representation; specifically, the following steps are included: Step 1: Generate query views and key views for the obtained augmented sample set; for each augmented sample... First, different random augmentation strategies are applied to generate query views. and key view ; Step 2: Extract feature representations using the query network and key network; convert the query view... Enter query network The query result indicates At the same time, the key view Input key network , obtain key representation Among them, querying the network The main body and classifier Sharing, and key networks The main body and confidence estimator shared.

[0010] A further improvement of this invention is that, in step 3), a contrastive learning model is constructed, consisting of a query network and a key network. The key network is updated by the momentum of the query network. Based on the query representation and the key representation, the samples are aligned and enhanced through contrastive learning to optimize the category representation, including: Based on the category-enhanced samples, a contrastive learning method is used to align their representations; specifically, a contrastive learning loss function is defined. Augmented samples generated from the same category label are considered positive sample pairs, where the weight of a positive sample pair is determined by the similarity between the augmented sample and its aligned sample. By aligning augmented samples from different categories, high-quality augmented samples receive higher weights, while the influence of low-quality samples is weakened. Furthermore, augmented samples from the same instance but different categories are considered hard-to-bear samples, thereby improving the model's ability to distinguish hard-to-bear samples and optimizing category boundaries. Specifically, this includes the following steps: Step 1: Define the contrastive learning loss for augmented samples based on their categories. This is used to optimize the representation alignment process; the contrastive loss is calculated by query representation. and key representation The similarity between samples is used to optimize and enhance the representation learning of the samples; Step 2: To further improve the quality control of augmented samples, a weighting factor is introduced. To adjust the contributions of different positive sample pairs; Step 3: Use a mini-batch training strategy, where each batch contains multiple instances of class-specific augmented samples; to stabilize training, the parameters of the key network are updated from the query network using a momentum update strategy, i.e. The weight is The result is updated using an exponential moving average.

[0011] A further improvement of this invention is that, in Step 1 of step 3), when calculating the contrast loss: To achieve enhanced sample alignment through category setting, a contrastive learning method is used to define the loss function. The mathematical expression for the loss function is as follows:

[0012] in, It is an enhanced sample The corresponding embedding representation of positive samples, and It is the set of key representations of all augmented samples; to ensure alignment of augmentations with class settings, the loss function is applied only to a subset of samples of the same class. Internal calculations ensure that augmented samples of the same class are placed close to each other; weighting factors Further adjustments are made to the contribution of different positive sample pairs in the optimization process; the value of this adjustment is determined by enhancing the similarity between the sample pairs. The similarity measure of the sample pairs is determined by the temperature parameter. control.

[0013] A further improvement of this invention is that, in Step 2 of step 3), when calculating the weights of positive sample pairs: To achieve category-specific learning, different positive samples do not contribute equally to the representation learning process; therefore, a weighting factor needs to be introduced. To control the influence of different positive sample pairs; the weight calculation formula is as follows:

[0014] in, and These are augmented samples and its positive samples Through confidence estimator The calculated logits embedding representation; They represent belonging to the same category The enhanced sample logits embedding set, while It is a temperature parameter that controls the contrast.

[0015] A further improvement of this invention is that, in step 4), a fully connected layer is added after the query network to form a classification model, and a label disambiguation module is introduced. Through a penalty mechanism for confused labels, the weighted loss rewards and penalizes categories with high confidence, thereby further optimizing the performance of the classification model, including: Define candidate tag set and non-candidate label set The goal is to suppress high-confidence signals of non-candidate labels while enhancing the confidence supervision signal of candidate labels; firstly, candidate labels... Represented as a Dimensional indicator vector Then through a weighted loss function The optimization involves a loss function and normalized weights; specifically, the following steps are included: Step 1: Given partial label samples First, calculate the candidate category set. and the set of non-candidate categories ; Step 2: Use a classifier Calculate samples For all categories of logits output That is, sample In category The predicted score on this classifier With classifier Shared parameters; simultaneously, utilizing a confidence estimator Calculate the confidence score of the category ; Step 3: Define the class-based disambiguation loss to effectively eliminate class confusion:

[0016] in, It is a category In the indicator vector The value in the table indicates whether the category belongs to the candidate label set. , It is a loss term that controls the reward for candidate labels and the penalty for non-candidate labels; the loss term is calculated based on the category settings. Calculated using the following formula:

[0017] in, It is a binary loss function. It is a classifier The corresponding category in the calculated logits The score for candidate categories; The loss item is This encourages an increase in confidence; for non-candidate categories The loss item is This is used to suppress high-confidence outputs for error categories; Step 4: Calculate category weights To adjust the loss contribution and balance the loss contributions of different categories, normalized weights are introduced:

[0018] in, It is a confidence estimator The calculated logits value, It is a category The set of reference tags to which it belongs; if If it is a candidate category, then ;otherwise, .

[0019] A further improvement of this invention is that, in step 5), by jointly optimizing the contrastive learning and classification models, the classification accuracy of the model is improved and the instance entanglement problem is alleviated through the combined action of the label disambiguation module and the representation learning module, including: Final loss function Loss due to label disambiguation and contrastive learning loss The composition, specifically calculated as follows:

[0020] in, It is about balancing the importance weights of the two types of losses. The size of the candidate label set. It is an example In category Augmented samples are generated under specific conditions. The training process follows the self-distillation framework of the DIRK method. First, augmented samples with class settings are generated and the contrastive loss is calculated. Then, the label disambiguation loss is calculated, and finally, the two are combined to optimize the model. In addition, during training, two queues are used to store the key representation and its corresponding confidence, and momentum contrast is used to update it at each batch iteration to ensure training stability and the effectiveness of contrastive learning. Finally, the classifier is trained using this weighted loss. Output the classification result of the target instance.

[0021] A class-enhanced instance-dependent partial label learning device, comprising: The augmented sample generation unit uses a pre-trained diffusion model to augment instances to generate augmented samples with multiple class settings. The generation unit utilizes a query network and a key network to generate query representations and key representations for augmented samples; The category representation optimization unit constructs a contrastive learning model consisting of a query network and a key network. The key network is updated by the momentum of the query network. Based on the query representation and the key representation, the model aligns and enhances samples through contrastive learning to optimize the category representation. The class model performance optimization unit connects a fully connected layer after querying the network to form a classification model. It introduces a label disambiguation module and uses a penalty mechanism for confused labels to reward and penalize categories with high confidence through weighted loss, thereby further optimizing the classification model performance. The joint optimization unit improves the classification accuracy of the model and alleviates the instance entanglement problem by jointly optimizing the contrastive learning and classification models, with the combined effect of the label disambiguation module and the representation learning module.

[0022] A further improvement of this invention is that, in the augmented sample generation unit, a pre-trained diffusion model is used to augment the instances to generate augmented samples with multiple categories defined, including: A loss function is defined. It includes a pairwise distance loss to preserve the representation of similarity. A classification loss to ensure class consistency Then, using a diffusion-based instance editing method, with the category name as the editing instruction, the original instance is adjusted. Generate enhanced samples Ultimately, enhanced samples with multiple categories are obtained; specifically, the following steps are included: Step 1: Parse the input sample and obtain the candidate category set, given an instance. and its candidate tag set First, its features are extracted, and then its candidate category set is analyzed. ; Step 2: Enhanced sample generation using a diffusion-based instance editing method; employing a diffusion-based instance editing model. Edit the original instance according to the given editing instructions. Modify the code to generate enhanced samples that match the target category features; editing instructions are provided via functions. This function generates the target category. The mapping is its name; the final generation process is represented as That is, by using the instance editing model to edit the original instance based on the category name, an enhanced sample with a defined category is obtained; Step 3: Define the loss function The generation of enhanced samples is optimized; the loss consists of two computational parts: one is the distance loss used to maintain the similarity between the enhanced sample and the original instance. Secondly, it is used to ensure that the augmented samples conform to the target category. Classification loss At the same time, use hyperparameters Controlling the balance between the two types of losses; Step 4: Given partial label samples For each candidate category The generation process is repeated to eventually obtain an enhanced sample set. ,in It is to enhance the sample. It is its corresponding category label, where the total number of augmented samples It equals the number of candidate categories, and each candidate category can generate a corresponding augmented sample.

[0023] Compared with the prior art, the present invention has at least the following beneficial technical effects: (1) The category setting enhancement method proposed in this invention can effectively extract category-related features and reduce feature interference between categories. By using an instance editing method based on a diffusion model, enhanced samples with category settings are generated for each candidate category, enabling the model to make clearer feature comparisons between different categories. This enhancement method not only ensures the authenticity of the generated samples, but also effectively amplifies category features, enabling the model to learn reliable feature representations even in a weakly supervised environment.

[0024] (2) The contrastive learning-based augmented sample alignment mechanism significantly improves the model's representation learning ability. By constructing a query network and a key network, query representations and key representations are generated respectively, and contrastive loss is used to align augmented samples of the same class while widening the gap between samples of different classes. Furthermore, the momentum update strategy and dynamic negative sample queue enhance the stability of contrastive learning, ensuring that the model can effectively optimize class discrimination under weak supervision and reduce confusion between samples.

[0025] (3) The label disambiguation strategy with inter-class regularization effectively alleviates the category ambiguity problem in some label learning processes and improves the classification accuracy of the model. This strategy strengthens the correctness signal of candidate categories during the optimization process by calculating the category confidence weights, while suppressing potentially erroneous non-candidate category signals. In this way, the model can actively adjust the category boundaries with limited supervision information to make them more consistent with the data distribution, reduce the misclassification rate, and improve its adaptability to weakly labeled data. Attached Figure Description

[0026] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0027] Figure 1 This is a flowchart of the overall framework.

[0028] Figure 2 This refers to the process of enhancing samples to a specific category.

[0029] Figure 3 This is the process of performing intra-class alignment on enhanced samples.

[0030] Figure 4 This describes the process of adjusting class boundaries for inter-class regularization.

[0031] Figure 5 This is a structural block diagram of an instance-dependent partial label learning device based on category enhancement according to the present invention. Detailed Implementation

[0032] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0033] In the description of this invention, it should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0034] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0035] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0036] The accompanying drawings illustrate various structural schematic diagrams according to embodiments disclosed in this invention. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.

[0037] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0038] Example 1 This invention provides a class-enhanced instance-dependent partial label learning method, comprising: 1) Use a pre-trained diffusion model to augment instances to generate augmented samples with multiple class settings; 2) Generate query and key representations for augmented samples using query and key networks; 3) Construct a contrastive learning model consisting of a query network and a key network. The key network is updated by the momentum of the query network. Based on the query representation and the key representation, the model aligns and enhances the samples through contrastive learning to optimize the category representation. 4) After querying the network, a fully connected layer is added to form a classification model. A label disambiguation module is introduced. Through the penalty mechanism for confusing labels, the weighted loss rewards and punishes categories with high confidence, thereby further optimizing the performance of the classification model. 5) By jointly optimizing the contrastive learning and classification models, the classification accuracy of the model is improved and the instance entanglement problem is alleviated through the combined effect of the label disambiguation module and the representation learning module.

[0039] In this embodiment, step 1) uses a pre-trained diffusion model to augment the instances to generate augmented samples with multiple class settings, including: A loss function is defined. It includes a pairwise distance loss to preserve the representation of similarity. A classification loss to ensure class consistency Then, using a diffusion-based instance editing method, with the category name as the editing instruction, the original instance is adjusted. Generate enhanced samples Ultimately, enhanced samples with multiple categories are obtained; specifically, the following steps are included: Step 1: Parse the input sample and obtain the candidate category set, given an instance. and its candidate tag set First, its features are extracted, and then its candidate category set is analyzed. ; Step 2: Enhanced sample generation using a diffusion-based instance editing method; employing a diffusion-based instance editing model. Edit the original instance according to the given editing instructions. Modify the code to generate enhanced samples that match the target category features; editing instructions are provided via functions. This function generates the target category. The mapping is its name; the final generation process is represented as That is, by using the instance editing model to edit the original instance based on the category name, an enhanced sample with a defined category is obtained; Step 3: Define the loss function The generation of enhanced samples is optimized; the loss consists of two computational parts: one is the distance loss used to maintain the similarity between the enhanced sample and the original instance. Secondly, it is used to ensure that the augmented samples conform to the target category. Classification loss At the same time, use hyperparameters Controlling the balance between the two types of losses; Step 4: Given partial label samples For each candidate category The generation process is repeated to eventually obtain an enhanced sample set. ,in It is to enhance the sample. It is its corresponding category label, where the total number of augmented samples It equals the number of candidate categories, and each candidate category can generate a corresponding augmented sample.

[0040] In this embodiment, step 2) generates query representations and key representations for the augmented samples using a query network and a key network, including: After generating augmented samples with defined categories, augmented samples are set for each category. Different data transformation strategies are used to generate query views and key views. These views are then input into the query network and key network, respectively, to generate query representations and key representations. In practice, the query network shares a backbone network and a classifier. The key network, on the other hand, shares a backbone network and a confidence estimator. ,and From the momentum update strategy To update, the specific steps include: Step 1: Generate query views and key views for the obtained augmented sample set; for each augmented sample... First, different random augmentation strategies are applied to generate query views. and key view ; Step 2: Extract feature representations using the query network and key network; convert the query view... Enter query network The query result indicates At the same time, the key view Input key network , obtain key representation Among them, querying the network The main body and classifier Sharing, and key networks The main body and confidence estimator This sharing ensures that each augmented sample corresponds to a query representation and a key representation, providing a foundation for subsequent comparative learning.

[0041] In this embodiment, step 3) constructs a contrastive learning model consisting of a query network and a key network. The key network is updated by the momentum of the query network. Based on the query representation and the key representation, the model aligns and enhances samples through contrastive learning to optimize the category representation, including: Based on the category-enhanced samples, a contrastive learning method is used to align their representations; specifically, a contrastive learning loss function is defined. Augmented samples generated from the same category label are considered positive sample pairs, where the weight of a positive sample pair is determined by the similarity between the augmented sample and its aligned sample. By aligning augmented samples from different categories, high-quality augmented samples receive higher weights, while the influence of low-quality samples is weakened. Furthermore, augmented samples from the same instance but different categories are considered hard-to-bear samples, thereby improving the model's ability to distinguish hard-to-bear samples and optimizing category boundaries. Specifically, this includes the following steps: Step 1: Define the contrastive learning loss for augmented samples based on their categories. This is used to optimize the representation alignment process; the contrastive loss is calculated by query representation. and key representation The similarity between samples is used to optimize and enhance the representation learning of the samples; Step 2: To further improve the quality control of augmented samples, a weighting factor is introduced. To adjust the contributions of different positive sample pairs; Step 3: Use a mini-batch training strategy, where each batch contains multiple instances of class-specific augmented samples; to stabilize training, the parameters of the key network are updated from the query network using a momentum update strategy, i.e. The weight is The results are updated using an exponential moving average (EMA). This strategy can effectively reduce gradient oscillations during training and improve the effectiveness of contrastive learning.

[0042] In this embodiment, in Step 1 of step 3), when calculating the contrast loss: To achieve enhanced sample alignment through category setting, a contrastive learning method is used to define the loss function. The core idea of ​​this loss function is to improve class discrimination by maximizing the similarity between samples of the same class while minimizing the similarity between samples of different classes. The mathematical expression of the loss function is as follows:

[0043] in, It is an enhanced sample The corresponding embedding representation of positive samples, and It is the set of key representations of all augmented samples; to ensure alignment of augmentations with class settings, the loss function is applied only to a subset of samples of the same class. Internal calculations ensure that augmented samples of the same class are placed close to each other; weighting factors This is further used to adjust the contribution of different positive sample pairs in the optimization process, and its value is determined by the similarity between the enhanced sample pairs. This design can effectively improve the discriminative power of the category-defined enhanced samples while maintaining the stability of contrastive learning. The similarity measure of the sample pairs is determined by the temperature parameter. Controls make similar samples more closely resemble each other, and samples of different categories are easier to distinguish.

[0044] In this embodiment, in Step 2 of step 3), when calculating the weights of positive sample pairs: To achieve category-specific learning, different positive samples do not contribute equally to the representation learning process; therefore, a weighting factor needs to be introduced. To control the influence of different positive sample pairs; the weight calculation formula is as follows:

[0045] in, and These are augmented samples and its positive samples Through confidence estimator The calculated logits embedding representation; They represent belonging to the same category The enhanced sample logits embedding set, while This is the temperature parameter that controls the contrast. The function of this formula is to distribute the weights of different positive sample pairs through Softmax normalization, so that sample pairs with higher enhancement quality (i.e., samples whose enhancement features are more consistent with the target category) have a greater influence, while sample pairs with lower quality enhancement contribute less.

[0046] In this embodiment, step 4) involves connecting a fully connected layer to the query network to form a classification model, introducing a label disambiguation module, and further optimizing the classification model performance by rewarding and penalizing categories with high confidence through a penalty mechanism for confused labels and a weighted loss. This includes: Define candidate tag set and non-candidate label set The goal is to suppress high-confidence signals of non-candidate labels while enhancing the confidence supervision signal of candidate labels; firstly, candidate labels... Represented as a Dimensional indicator vector Then through a weighted loss function The optimization involves a loss function and normalized weights. Candidate labels with higher confidence are enhanced, while non-candidate labels with high confidence are penalized, thus reducing class confusion. This method uses non-candidate labels as anchors to push away instances unrelated to the true class, enhancing inter-class discriminability; specifically, it includes the following steps: Step 1: Given partial label samples First, calculate the candidate category set. and the set of non-candidate categories ; Step 2: Use a classifier Calculate samples For all categories of logits output That is, sample In category The predicted score on this classifier With classifier Shared parameters; simultaneously, utilizing a confidence estimator Calculate the confidence score of the category These confidence levels are used to calculate the weighted loss, enabling the model to dynamically adjust the contributions of different categories.

[0047] Step 3: Define the class-based disambiguation loss to effectively eliminate class confusion:

[0048] in, It is a category In the indicator vector The value in the table indicates whether the category belongs to the candidate label set. , It is a loss term that controls the reward for candidate labels and the penalty for non-candidate labels; the loss term is calculated based on the category settings. Calculated using the following formula:

[0049] in, It is a binary loss function. It is a classifier The corresponding category in the calculated logits The score for candidate categories; The loss item is This encourages an increase in confidence; for non-candidate categories The loss item is This is used to suppress high-confidence outputs for error categories; Step 4: Calculate category weights To adjust the loss contribution and balance the loss contributions of different categories, normalized weights are introduced:

[0050] in, It is a confidence estimator The calculated logits value, It is a category The set of reference tags to which it belongs; if If it is a candidate category, then ;otherwise, This normalization ensures that the model assigns higher weights to high-confidence categories, thereby enhancing the effectiveness of the supervision signal during the optimization process.

[0051] In this embodiment, step 5) improves the classification accuracy of the model and alleviates the instance entanglement problem by jointly optimizing the contrastive learning and classification models, with the combined effect of the label disambiguation module and the representation learning module. This includes: Final loss function Loss due to label disambiguation and contrastive learning loss The composition, specifically calculated as follows:

[0052] in, It is about balancing the importance weights of the two types of losses. The size of the candidate label set. It is an example In category Augmented samples are generated under specific conditions. The training process follows the self-distillation framework of the DIRK method. First, augmented samples with class settings are generated and the contrastive loss is calculated. Then, the label disambiguation loss is calculated, and finally, the two are combined to optimize the model. In addition, during training, two queues are used to store the key representation and its corresponding confidence, and momentum contrast is used to update it at each batch iteration to ensure training stability and the effectiveness of contrastive learning. Finally, the classifier is trained using this weighted loss. Output the classification result of the target instance.

[0053] Example 2 like Figure 1 As shown, the present invention provides an instance dependency partial label learning method based on category enhancement, comprising the following steps: S1. Sample augmentation based on diffusion models, including: For some labeled samples For each candidate category An instance editing method based on a diffusion model is applied, using the category name as the editing instruction to generate enhanced samples with defined categories. The entire enhancement process is constrained by optimizing the loss function, ensuring that the generated samples not only conform to the characteristics of the original instance but also possess the properties of the target class.

[0054] like Figure 2 As shown, the specific steps for sample augmentation based on the diffusion model are as follows: S1-1: Parse the input sample and obtain the candidate category set, given a partial label sample. First, its features are extracted, and then its candidate category set is analyzed. ; S1-2: Instance editing method based on diffusion model Using category names as editing instructions, input samples can be processed. Modify the category settings to generate enhanced samples. .in, It is a mapping function that maps categories Convert it to its name and use it as input instructions for editing the model, so that the generated augmented samples have a category. Features; S1-3: Calculate the category-specific enhancement loss and optimize the generation process. During the enhancement sample generation process, optimize the following loss function to constrain the generation results:

[0055] in, It is a distance loss used to maintain the similarity between the augmented sample and the original sample representation. It is used to ensure that the augmented sample conforms to the category. Classification loss, This is a hyperparameter used to balance the two. By minimizing this loss, the generated augmented samples retain information from the original samples while effectively highlighting the class. Features; S1-4: Form a category-defined enhanced sample set for each candidate category. Repeat the above generation process to finally obtain the enhanced sample set. Each of them It is for categories The generated category-enhanced samples are used for subsequent contrastive learning and category disambiguation steps.

[0056] S2. Perform intra-class alignment on the augmented samples, including: For each augmented sample Generate query views through different data transformations. and key view Then, by querying the network respectively. Hejian Network Calculate query representation and key representation Furthermore, a query-key contrastive learning framework was constructed. In this process, contrastive loss was used. Optimization is performed to make augmented samples of the same category closer together, while widening the gap between samples of different categories.

[0057] like Figure 3 As shown, the specific steps for performing intra-class alignment on the enhanced samples are as follows: S2-1: Set up augmented samples for each category Query views are generated using different random augmentation strategies. and key view ; S2-2: Query view Enter query network Calculate query representation At the same time, the key view Input key network Calculation key representation ; S2-3: Calculate the contrastive loss To align augmented samples of the same category:

[0058] in, It is a set of key representations of augmented samples of the same category. These are the calculated sample pair weights. It is a temperature parameter.

[0059] S2-4: Optimize the key network using a momentum update strategy, querying the network during each update. Then, a momentum update strategy is used on the key network. Update This ensures that the key network gradually absorbs changes in the query network during training, making the training more stable.

[0060] S3. Inter-class regularization methods for label disambiguation, including: First, define the candidate category set. Non-candidate category set The confidence score for each class is calculated based on the logits output of the classifier. Then, a weighted loss function is constructed. By assigning higher weights to candidate categories and suppressing non-candidate categories, the model's classification of categories can be adjusted.

[0061] like Figure 4 As shown, the inter-class regularization method performs label disambiguation, and the specific steps are as follows: S3-1: Given partial label samples First, calculate the candidate category set. and the set of non-candidate categories ,in It is the complete set of all possible categories. It is the set of candidate categories for the samples, and Represents all not included The categories in the table are used for subsequent category exclusion and disambiguation calculations.

[0062] S3-2: Using a classifier Calculate samples For all categories of logits output, , It is a sample In category The predicted score is calculated using a confidence estimator. Calculate the confidence score of the category These confidence levels are used to calculate the weighted loss, enabling the model to dynamically adjust the contributions of different categories.

[0063] S3-3: Calculate the disambiguation loss Optimize the class discrimination ability of the model, where the class loss term The calculation method is as follows The category weight calculation method is as follows .

[0064] Example 3 like Figure 5 As shown, the present invention provides an instance-dependent partial label learning device based on category enhancement, comprising: The augmented sample generation unit uses a pre-trained diffusion model to augment instances to generate augmented samples with multiple class settings. The generation unit utilizes a query network and a key network to generate query representations and key representations for augmented samples; The category representation optimization unit constructs a contrastive learning model consisting of a query network and a key network. The key network is updated by the momentum of the query network. Based on the query representation and the key representation, the model aligns and enhances samples through contrastive learning to optimize the category representation. The class model performance optimization unit connects a fully connected layer after querying the network to form a classification model. It introduces a label disambiguation module and uses a penalty mechanism for confused labels to reward and penalize categories with high confidence through weighted loss, thereby further optimizing the classification model performance. The joint optimization unit improves the classification accuracy of the model and alleviates the instance entanglement problem by jointly optimizing the contrastive learning and classification models, with the combined effect of the label disambiguation module and the representation learning module.

[0065] In the augmented sample generation unit of this embodiment, a pre-trained diffusion model is used to augment the instances to generate augmented samples with multiple categories defined, including: A loss function is defined. It includes a pairwise distance loss to preserve the representation of similarity. A classification loss to ensure class consistency Then, using a diffusion-based instance editing method, with the category name as the editing instruction, the original instance is adjusted. Generate enhanced samples Ultimately, enhanced samples with multiple categories are obtained; specifically, the following steps are included: Step 1: Parse the input sample and obtain the candidate category set, given an instance. and its candidate tag set First, its features are extracted, and then its candidate category set is analyzed. ; Step 2: Enhanced sample generation using a diffusion-based instance editing method; employing a diffusion-based instance editing model. Edit the original instance according to the given editing instructions. Modify the code to generate enhanced samples that match the target category features; editing instructions are provided via functions. This function generates the target category. The mapping is its name; the final generation process is represented as That is, by using the instance editing model to edit the original instance based on the category name, an enhanced sample with a defined category is obtained; Step 3: Define the loss function The generation of enhanced samples is optimized; the loss consists of two computational parts: one is the distance loss used to maintain the similarity between the enhanced sample and the original instance. Secondly, it is used to ensure that the augmented samples conform to the target category. Classification loss At the same time, use hyperparameters Controlling the balance between the two types of losses; Step 4: Given partial label samples For each candidate category The generation process is repeated to eventually obtain an enhanced sample set. ,in It is to enhance the sample. It is its corresponding category label, where the total number of augmented samples It equals the number of candidate categories, and each candidate category can generate a corresponding augmented sample.

[0066] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the scope of the invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0067] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be appropriately combined to form other embodiments that can be understood by those skilled in the art. The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.

Claims

1. A method for learning instance-dependent partial labels based on category enhancement, characterized in that, include: 1) Use a pre-trained diffusion model to augment instances to generate augmented samples with multiple class settings; 2) Generate query and key representations for augmented samples using query and key networks; 3) Construct a contrastive learning model consisting of a query network and a key network. The key network is updated by the momentum of the query network. Based on the query representation and the key representation, the model aligns and enhances the samples through contrastive learning to optimize the category representation. 4) After querying the network, a fully connected layer is added to form a classification model. A label disambiguation module is introduced. Through the penalty mechanism for confusing labels, the weighted loss rewards and punishes categories with high confidence, thereby further optimizing the performance of the classification model. 5) By jointly optimizing the contrastive learning and classification models, the classification accuracy of the model is improved and the instance entanglement problem is alleviated through the combined effect of the label disambiguation module and the representation learning module.

2. The instance dependency partial label learning method based on category enhancement according to claim 1, characterized in that, Step 1) Use a pre-trained diffusion model to augment the instances to generate augmented samples with multiple class settings, including: A loss function is defined. It includes a pairwise distance loss to preserve the representation of similarity. A classification loss to ensure class consistency Then, using a diffusion-based instance editing method, with the category name as the editing instruction, the original instance is adjusted. Generate enhanced samples Ultimately, enhanced samples with multiple categories are obtained; specifically, the following steps are included: Step 1: Parse the input sample and obtain the candidate category set, given an instance. and its candidate tag set First, its features are extracted, and then its candidate category set is analyzed. ; Step 2: Enhanced sample generation using a diffusion-based instance editing method; employing a diffusion-based instance editing model. Edit the original instance according to the given editing instructions. Modify the code to generate enhanced samples that match the target category features; editing instructions are provided via functions. This function generates the target category. The mapping is its name; the final generation process is represented as That is, by using the instance editing model to edit the original instance based on the category name, an enhanced sample with a defined category is obtained; Step 3: Define the loss function The generation of enhanced samples is optimized; the loss consists of two computational parts: one is the distance loss used to maintain the similarity between the enhanced sample and the original instance. Secondly, it is used to ensure that the augmented samples conform to the target category. Classification loss At the same time, use hyperparameters Controlling the balance between the two types of losses; Step 4: Given partial label samples For each candidate category The generation process is repeated to eventually obtain an enhanced sample set. ,in It is to enhance the sample. It is its corresponding category label, where the total number of augmented samples It equals the number of candidate categories, and each candidate category can generate a corresponding augmented sample.

3. The instance dependency partial label learning method based on category enhancement according to claim 2, characterized in that, Step 2) Generate query and key representations for the augmented samples using the query network and key network, including: After generating augmented samples with defined categories, augmented samples are set for each category. The query view and key view are generated through different data transformation strategies; then, the query view and key view are input into the query network and key network respectively to generate the query representation and key representation; specifically, the following steps are included: Step 1: Generate query views and key views for the obtained augmented sample set; for each augmented sample... First, different random augmentation strategies are applied to generate query views. and key view ; Step 2: Extract feature representations using the query network and key network; convert the query view... Enter query network The query result indicates At the same time, the key view Input key network , obtain key representation Among them, querying the network The main body and classifier Sharing, and key networks The main body and confidence estimator shared.

4. The instance dependency partial label learning method based on category enhancement according to claim 3, characterized in that, Step 3) Construct a contrastive learning model consisting of a query network and a key network. The key network is updated by the momentum of the query network. Based on the query representation and the key representation, the model aligns and enhances samples through contrastive learning to optimize the category representation, including: Based on the category-enhanced samples, a contrastive learning method is used to align their representations; specifically, a contrastive learning loss function is defined. Augmented samples generated from the same category label are considered positive sample pairs, where the weight of a positive sample pair is determined by the similarity between the augmented sample and its aligned sample. By aligning augmented samples from different categories, high-quality augmented samples receive higher weights, while the influence of low-quality samples is weakened. Furthermore, augmented samples from the same instance but different categories are considered hard-to-bear samples, thereby improving the model's ability to distinguish hard-to-bear samples and optimizing category boundaries. Specifically, this includes the following steps: Step 1: Define the contrastive learning loss for augmented samples based on their categories. This is used to optimize the representation alignment process; the contrastive loss is calculated by query representation. and key representation The similarity between samples is used to optimize and enhance the representation learning of the samples; Step 2: To further improve the quality control of augmented samples, a weighting factor is introduced. To adjust the contributions of different positive sample pairs; Step 3: Use a mini-batch training strategy, where each batch contains multiple instances of class-specific augmented samples; to stabilize training, the parameters of the key network are updated from the query network using a momentum update strategy, i.e. The weight is The result is updated using an exponential moving average.

5. The instance dependency partial label learning method based on category enhancement according to claim 4, characterized in that, In Step 1 of Step 3), when calculating the contrast loss: To achieve enhanced sample alignment through category setting, a contrastive learning method is used to define the loss function. The mathematical expression for the loss function is as follows: in, It is an enhanced sample The corresponding embedding representation of positive samples, and It is the set of key representations of all augmented samples; to ensure alignment of augmentations with class settings, the loss function is applied only to a subset of samples of the same class. Internal calculations ensure that augmented samples of the same class are placed close to each other; weighting factors Further adjustments are made to the contribution of different positive sample pairs in the optimization process; the value of this adjustment is determined by enhancing the similarity between the sample pairs. The similarity measure of the sample pairs is determined by the temperature parameter. control.

6. The instance dependency partial label learning method based on category enhancement according to claim 4, characterized in that, In Step 2 of Step 3), when calculating the weights of positive sample pairs: To achieve category-specific learning, different positive samples do not contribute equally to the representation learning process; therefore, a weighting factor needs to be introduced. To control the influence of different positive sample pairs; the weight calculation formula is as follows: in, and These are augmented samples and its positive samples Through confidence estimator The calculated logits embedding representation; They represent belonging to the same category The enhanced sample logits embedding set, while It is a temperature parameter that controls the contrast.

7. The instance dependency partial label learning method based on category enhancement according to claim 4, characterized in that, Step 4) After querying the network, a fully connected layer is added to form a classification model. A label disambiguation module is introduced. Through a penalty mechanism for confused labels, the weighted loss rewards and penalizes categories with high confidence, further optimizing the classification model performance, including: Define candidate tag set and non-candidate label set The goal is to suppress high-confidence signals of non-candidate labels while enhancing the confidence supervision signal of candidate labels; firstly, candidate labels... Represented as a Dimensional indicator vector Then through a weighted loss function The optimization involves a loss function and normalized weights; specifically, the following steps are included: Step 1: Given partial label samples First, calculate the candidate category set. and the set of non-candidate categories ; Step 2: Use a classifier Calculate samples For all categories of logits output That is, sample In category The predicted score on this classifier With classifier Shared parameters; simultaneously, utilizing a confidence estimator Calculate the confidence score of the category ; Step 3: Define the class-based disambiguation loss to effectively eliminate class confusion: in, It is a category In the indicator vector The value in the table indicates whether the category belongs to the candidate label set. , It is a loss term that controls the reward for candidate labels and the penalty for non-candidate labels; the loss term is calculated based on the category settings. Calculated using the following formula: in, It is a binary loss function. It is a classifier The corresponding category in the calculated logits The score for candidate categories; The loss item is This encourages an increase in confidence; for non-candidate categories The loss item is This is used to suppress high-confidence outputs for error categories; Step 4: Calculate category weights To adjust the loss contribution and balance the loss contributions of different categories, normalized weights are introduced: in, It is a confidence estimator The calculated logits value, It is a category The set of reference tags to which it belongs; if If it is a candidate category, then ;otherwise, .

8. The instance dependency partial label learning method based on category enhancement according to claim 7, characterized in that, Step 5) By jointly optimizing the contrastive learning and classification models, and through the combined efforts of the label disambiguation module and the representation learning module, the classification accuracy of the model is improved, and the instance entanglement problem is alleviated, including: Final loss function Loss due to label disambiguation and contrastive learning loss The composition, specifically calculated as follows: in, It is about balancing the importance weights of the two types of losses. The size of the candidate label set. It is an example In category Augmented samples are generated under specific conditions. The training process follows the self-distillation framework of the DIRK method. First, augmented samples with class settings are generated and the contrastive loss is calculated. Then, the label disambiguation loss is calculated, and finally, the two are combined to optimize the model. In addition, during training, two queues are used to store the key representation and its corresponding confidence, and momentum contrast is used to update it at each batch iteration to ensure training stability and the effectiveness of contrastive learning. Finally, the classifier is trained using this weighted loss. Output the classification result of the target instance.

9. A class-enhanced instance-dependent partial label learning device, characterized in that, include: The augmented sample generation unit uses a pre-trained diffusion model to augment instances to generate augmented samples with multiple class settings. The generation unit utilizes a query network and a key network to generate query representations and key representations for augmented samples; The category representation optimization unit constructs a contrastive learning model consisting of a query network and a key network. The key network is updated by the momentum of the query network. Based on the query representation and the key representation, the model aligns and enhances samples through contrastive learning to optimize the category representation. The class model performance optimization unit connects a fully connected layer after querying the network to form a classification model. It introduces a label disambiguation module and uses a penalty mechanism for confused labels to reward and penalize categories with high confidence through weighted loss, thereby further optimizing the classification model performance. The joint optimization unit improves the classification accuracy of the model and alleviates the instance entanglement problem by jointly optimizing the contrastive learning and classification models, with the combined effect of the label disambiguation module and the representation learning module.

10. The instance-dependent partial label learning device based on category enhancement according to claim 9, characterized in that, In the augmented sample generation unit, a pre-trained diffusion model is used to augment instances to generate augmented samples with multiple class settings, including: A loss function is defined. It includes a pairwise distance loss to preserve the representation of similarity. A classification loss to ensure class consistency Then, using a diffusion-based instance editing method, with the category name as the editing instruction, the original instance is adjusted. Generate enhanced samples Ultimately, enhanced samples with multiple categories are obtained; specifically, the following steps are included: Step 1: Parse the input sample and obtain the candidate category set, given an instance. and its candidate tag set First, its features are extracted, and then its candidate category set is analyzed. ; Step 2: Enhanced sample generation using a diffusion-based instance editing method; employing a diffusion-based instance editing model. Edit the original instance according to the given editing instructions. Modify the code to generate enhanced samples that match the target category features; editing instructions are provided via functions. This function generates the target category. The mapping is its name; the final generation process is represented as That is, by using the instance editing model to edit the original instance based on the category name, an enhanced sample with a defined category is obtained; Step 3: Define the loss function The generation of enhanced samples is optimized; the loss consists of two computational parts: one is the distance loss used to maintain the similarity between the enhanced sample and the original instance. Secondly, it is used to ensure that the augmented samples conform to the target category. Classification loss At the same time, use hyperparameters Controlling the balance between the two types of losses; Step 4: Given partial label samples For each candidate category The generation process is repeated to eventually obtain an enhanced sample set. ,in It is to enhance the sample. It is its corresponding category label, where the total number of augmented samples It equals the number of candidate categories, and each candidate category can generate a corresponding augmented sample.

Citation Information

Patent Citations

  • Weak supervised learning method and device based on duplex similarity measurement

    CN116258924A

  • Large-scale multi-view tensor clustering method, device and apparatus based on linear kernel

    CN119540589B