Imbalanced Label Distribution Learning Method Based on Asymmetric Momentum Optimization

By adopting an asymmetric momentum optimization mechanism in the imbalance label distribution learning network and setting independent momentum buffer variables and momentum coefficients, the gradient conflict problem is solved, the training stability and prediction accuracy of the model are improved, and predictions that are closer to the true label distribution are achieved.

CN120387494BActive Publication Date: 2025-09-02QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)

Patent Information

Application Number
CN202510883930.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-09-02
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

During the training process, the existing imbalance label distribution learning network cannot obtain a model with better parameters, and cannot predict a predicted label distribution close to the true label distribution.

Method used

The asymmetric momentum optimization method is adopted to set independent momentum buffer variables and momentum coefficients for dominant and auxiliary losses. The network parameters are updated during the training process through the asymmetric momentum optimization mechanism, and combined with inter-layer alignment loss, feature and marker distribution alignment loss, feature and marker similarity matrix alignment loss, and marker distribution prediction supervision loss, to enhance the training stability and robustness of the network.

Benefits of technology

The training convergence and robustness of the imbalance label distribution learning network is improved, and the predicted label distribution close to the real label distribution can be predicted more accurately, reducing the error of the existing methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387494B_ABST
    Figure CN120387494B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for learning an unbalanced labeled distribution based on asymmetric momentum optimization, and relates to the technical field of machine learning. The present application sets a dominant momentum buffer variable and a dominant loss momentum coefficient for the dominant loss, and sets an auxiliary momentum buffer variable and an auxiliary loss momentum coefficient for the auxiliary loss. During the training process of the unbalanced labeled distribution learning network, the network parameter θ in the next epoch is updated according to the dominant momentum buffer variable, the dominant loss momentum coefficient, the auxiliary momentum buffer variable, and the auxiliary loss momentum coefficient in the current epoch. The method described in the present application can effectively ensure that the momentum buffer variables of the dominant loss and the auxiliary loss do not interfere with each other during the update process, and controls the dominance of the momentum buffer variable of the dominant loss in the gradient update by setting the dominant loss momentum coefficient to be greater than the auxiliary loss momentum coefficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning technology, and in particular to an unbalanced label distribution learning method based on asymmetric momentum optimization. Background Art

[0002] Existing methods for alleviating imbalanced label distribution learning networks usually adopt a distribution alignment strategy, which usually includes multiple losses. When training the imbalanced label distribution learning network, the total loss function composed of different losses usually has a gradient conflict problem between different losses during the convergence process. This will result in the inability to obtain an imbalanced label distribution learning network model with better parameters, and further result in the imbalanced label distribution learning network model being unable to predict a predicted label distribution that is closer to the true label distribution. For this reason, the applicant has designed an imbalanced label distribution learning method based on asymmetric momentum optimization. Summary of the Invention

[0003] In order to solve the above-mentioned deficiencies in the prior art, this application proposes an unbalanced label distribution learning method based on momentum optimization.

[0004] A method for learning imbalanced label distribution based on asymmetric momentum optimization, comprising the following steps:

[0005] S1. Construct an unbalanced label distribution learning network including a feature encoder, a full label encoder, and a decoder, wherein the outputs of the feature encoder and the full label encoder are connected to the input of the decoder; wherein the full label encoder obtains a global label distribution based on the label distribution of the input unbalanced label distribution learning network;

[0006] S2. Calculate the total optimization loss of the imbalanced label distribution learning network; the total optimization loss includes inter-layer alignment loss, feature and label distribution alignment loss, feature and label similarity matrix alignment loss, and label distribution prediction supervision loss;

[0007] S3. Train the imbalanced label distribution learning network based on the training set and the total optimization loss to obtain a network model;

[0008] In step S3, a dominant momentum buffer variable and a dominant loss momentum coefficient are set for the dominant loss, and an auxiliary momentum buffer variable and an auxiliary loss momentum coefficient are set for the auxiliary loss. Then, during the training process, the network parameter θ in the next epoch is updated according to the dominant momentum buffer variable, the dominant loss momentum coefficient, the auxiliary momentum buffer variable, and the auxiliary loss momentum coefficient in the current epoch; wherein the dominant loss is the label distribution prediction supervision loss, and the auxiliary losses include the inter-layer alignment loss, the feature and label distribution alignment loss, and the feature and label similarity matrix alignment loss;

[0009] S4. Obtain the feature vector and label distribution based on the imbalanced data set to be predicted, and then input the feature vector and label distribution into the network model for forward propagation once to obtain the predicted label distribution and the true label distribution.

[0010] Preferably, in step S2, the inter-layer alignment loss refers to the inter-layer alignment loss between the feature encoder and the full-label encoder.

[0011] Preferably, in step S2, the inter-layer alignment loss is obtained as follows:

[0012] Extract the distribution parameters of the i-th coding layer in the feature encoder and the i-th coding layer in the full-label encoder in the latent representation space; use the output results of each pair of corresponding coding layers in the feature encoder and the full-label encoder as the input for the KL divergence calculation to obtain the distribution alignment loss of each corresponding coding layer, and accumulate the distribution alignment loss of each layer to obtain the inter-layer alignment loss. In this application, the inter-layer alignment loss is used to constrain the structural consistency of the encoding paths of the feature encoder and the full-label encoder in the latent representation space, effectively improving the inter-layer alignment effect of the output results of each corresponding coding layer of the feature encoder and the full-label encoder, thereby enhancing the unbalanced label distribution learning network's ability to model the structural relationship between the input feature vector and the label distribution, so that the unbalanced label distribution learning network can predict a predicted label distribution that is closer to the true label distribution.

[0013] Preferably, step S3 includes the following steps: inputting the feature vector in the training set into the feature encoder, and inputting the label distribution in the training set into the full label encoder, forward propagation, calculating the total optimization loss of the unbalanced label distribution learning network, and performing back propagation under the guidance of the total optimization loss, updating the weight parameters of the unbalanced label distribution learning network, and in the process of updating the weight parameters of the unbalanced label distribution learning network, according to the dominant momentum buffer variable, the dominant loss momentum coefficient, the auxiliary momentum buffer variable and the auxiliary loss momentum coefficient in the current epoch, the network parameter θ in the next epoch is updated, and the training of one training segment is completed after iterating 300 epochs to obtain an unbalanced label distribution learning network model. In the process of training the unbalanced label distribution learning network in this application, a total of 10 training segments are trained, thereby obtaining 10 unbalanced label distribution learning network models.

[0014] Preferably, in step S3, when the next epoch is the t-th epoch, the network parameter θ in the training process of the t-th epoch is updated according to the dominant momentum buffer variable, the dominant loss momentum coefficient, the auxiliary momentum buffer variable, and the auxiliary loss momentum coefficient in the training process of the t-1-th epoch, specifically including the following steps:

[0015] a) Update the dominant momentum buffer variable during the t-1th epoch training process based on the dominant loss momentum coefficient and the gradient of the dominant loss and the dominant momentum buffer variable during the t-1th epoch training process;

[0016] b) Update the auxiliary momentum buffer variable during the t-1th epoch training process based on the auxiliary loss momentum coefficient and the gradient of the auxiliary loss and the leading momentum buffer variable during the t-1th epoch training process;

[0017] c) Update the network parameters θ during the t-th epoch training process based on the network parameters θ during the t-1th epoch training process and the dominant momentum buffer variables and auxiliary momentum buffer variables during the tth epoch training process.

[0018] Preferably, the leading loss momentum coefficient is greater than the auxiliary loss momentum coefficient.

[0019] Preferably, in step S4, the unbalanced data set to be predicted is a data set containing text data.

[0020] Preferably, in step S4, the predicted dataset is one of a Movie dataset, a SCUT-FBP dataset, an Emotion6 dataset, a FlickrLDL dataset, a RAF-ML dataset, and a Natural Scene dataset.

[0021] Preferably, step S4 includes the following steps: obtaining feature vectors and label distributions based on the imbalanced data set to be predicted, and then inputting the feature vectors and label distributions into the 10 imbalanced label distribution learning network models obtained in step S3 for forward propagation once, and outputting 10 predicted label distributions and 10 corresponding true label distributions.

[0022] Compared with the prior art, the beneficial technical effects of the present invention are:

[0023] In the method described in the present application, an asymmetric momentum optimization mechanism is used to set an independent dominant momentum buffer variable and a dominant loss momentum coefficient for the dominant loss, and an independent auxiliary momentum buffer variable and an auxiliary loss momentum coefficient are set for the auxiliary loss. Then, during the training process, the network parameter θ in the next epoch is updated according to the dominant momentum buffer variable, the dominant loss momentum coefficient, the auxiliary momentum buffer variable, and the auxiliary loss momentum coefficient in the current epoch. The above setting enables the present application to effectively ensure that the momentum buffer variables of the dominant loss and the auxiliary loss do not interfere with each other during the update process, and control the dominance of the momentum buffer variable of the dominant loss in the gradient update by setting the dominant loss momentum coefficient to be greater than the auxiliary loss momentum coefficient. Moreover, During the back propagation process, it can also effectively realize the smooth adjustment of the momentum buffer variables of the dominant loss and the auxiliary loss during the gradient update process, effectively suppress the gradient fluctuation of the momentum buffer variables of the dominant loss and the auxiliary loss during the gradient update process, and enhance the stability of the optimization process of the momentum buffer variables of the dominant loss and the auxiliary loss. It helps to improve the convergence and robustness of the overall training process of the imbalanced label distribution learning network, especially in the scenario of collaborative optimization of different loss terms. It shows higher training stability and obtains an imbalanced label distribution learning network model with better parameters, so that when the imbalanced label distribution learning network model obtained by this application is used to predict the unbalanced data set, it can predict a predicted label distribution that is closer to the true label distribution;

[0024] In addition, this application also uses the output results of each pair of corresponding encoding layers in the feature encoder and the full label encoder as the input of the KL divergence calculation to obtain the distribution alignment loss of each layer corresponding to the encoding layer, and accumulates the distribution alignment loss of each layer to obtain the inter-layer alignment loss L lenc_alig ;Inter-layer alignment loss L lenc_alig It is used to constrain the structural consistency of the encoding paths of the feature encoder and the fully labeled encoder in the latent representation space, effectively improving the inter-layer alignment effect of the output results of each encoding layer of the feature encoder and the fully labeled encoder, thereby enhancing the modeling ability of the imbalanced label distribution learning network on the structural relationship between the input feature vector and the label distribution, so that the imbalanced label distribution learning network can predict a predicted label distribution that is closer to the true label distribution.

[0025] The test shows that on the Movie dataset (imbalance coefficient is 11.01), the final error obtained by the method described in this application is reduced by 7.42% compared with the DILDL method; on the SCUT-FBP dataset (imbalance coefficient is 19.37), the final error obtained by the method described in this application is reduced by 16.06% compared with the DILDL method; on the Emotion6 dataset (imbalance coefficient is 10.46), the final error obtained by the method described in this application is reduced by 9.93% compared with the DILDL method; on the FlickrLDL dataset (imbalance coefficient is 57.12), the final error obtained by the method described in this application is reduced by 8.24% compared with the DILDL method; on the RAF-ML dataset (imbalance coefficient is 30.33), the final error obtained by the method described in this application is reduced by 9.47% compared with the DILDL method; on the Natural The final error obtained by the method described in this application on the Scene dataset (imbalance coefficient is 10.74) is reduced by 8.75% compared with the DILDL method; this shows that the predicted label distribution predicted by the method described in this application is indeed significantly closer to the true label distribution than that predicted by the DILDL method. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1. Network structure diagram of the imbalanced label distribution learning network in this application. DETAILED DESCRIPTION

[0027] Example 1:

[0028] A method for learning an unbalanced labeled distribution based on asymmetric momentum optimization is provided. The method for predicting an unbalanced dataset based on momentum optimization predicts an unbalanced dataset, namely a Movie dataset, and includes the following steps:

[0029] S1. Construct an unbalanced label distribution learning network. The unbalanced label distribution learning network includes a feature encoder, a full label encoder and a decoder. The outputs of the feature encoder and the full label encoder are connected to the input of the decoder, such as Figure 1 As shown; In this application, the structure of the feature encoder is consistent with that of the full-label encoder, and both are the same as the encoder structure disclosed in the paper "Imbalanced Label Distribution Learning";

[0030] In this application, the feature encoder obtains the feature encoding representation based on the feature vector of the input imbalanced label distribution learning network; the full label encoder obtains the global label distribution based on the label distribution of the input imbalanced label distribution learning network; the decoder is used to decode the feature encoding representation and the global label distribution respectively to obtain the predicted label distribution and the true label distribution; wherein the predicted label distribution is the output result of the imbalanced label distribution learning network; specifically:

[0031] The feature encoder encodes the input feature vector and maps the encoded feature vector to the potential representation space to obtain a feature encoding representation consisting of the mean and variance (μ feature ,σ feature ), where μ feature represents the mean of the feature encoding representation, σ feature represents the variance of the feature encoding representation;

[0032] The full-label encoder encodes the input label distribution as a whole and maps the encoded label distribution into the potential representation space to learn the feature representation of the global label distribution and obtain the global label distribution (μ label ,σ label ), μ label represents the mean of the marker distribution, σ label represents the mean of the marker distribution;

[0033] The decoder decodes the feature encoding representation output by the feature encoder to obtain the predicted label distribution, and decodes the global label distribution output by the full label encoder to obtain the true label distribution.

[0034] S2. Calculate the total optimization loss of the imbalanced labeled distribution learning network L total ; In this application, the total optimization loss of the imbalanced label distribution learning network L total Including inter-layer alignment loss L lenc_alig , feature and label distribution alignment loss L alig1 , feature and label similarity matrix alignment loss L alig2 and the labeled distribution prediction supervision loss L pre , used to jointly guide the feature and label association, structural consistency and distribution fitting ability in the learning task of imbalanced labeled distribution learning network;

[0035] In this application, the total optimization loss L total The calculation method is as shown in formula (1):

[0036] L total =α L alig1 +β L alig2 +λ L lenc-alig + L pre (1)

[0037] In formula (1), α, β, and λ are all balance parameters used to adjust the degree of influence of the imbalanced label distribution learning network during the training process. In this embodiment 1, α is set to 0.1, β is set to 0.2, and λ is set to 0.1.

[0038] In this application, the inter-layer alignment loss L lenc_alig Refers to calculating the inter-layer alignment loss between the feature encoder and the fully labeled encoder L lenc_alig , L lenc_alig The way to obtain is as follows:

[0039] The distribution parameters of the i-th encoding layer in the feature encoder and the i-th encoding layer in the full-label encoder in the latent representation space are respectively denoted as ( , )and( , ), where i represents the i-th encoding layer in the feature encoder or the i-th encoding layer in the full-label encoder; the output results of each pair of corresponding encoding layers in the feature encoder and the full-label encoder are used as the input of the KL divergence calculation to obtain the distribution alignment loss of each corresponding encoding layer, and the distribution alignment loss of each layer is accumulated to obtain the inter-layer alignment loss L lenc_alig ;Inter-layer alignment loss L lenc_alig It is used to constrain the structural consistency of the encoding paths of the feature encoder and the fully labeled encoder in the latent representation space, effectively improving the inter-layer alignment effect of the output results of each encoding layer of the feature encoder and the fully labeled encoder, thereby enhancing the modeling ability of the imbalanced label distribution learning network on the structural relationship between the input feature vector and the label distribution, so that the imbalanced label distribution learning network can predict a predicted label distribution that is closer to the true label distribution.

[0040] In this application, the feature encoding output by the feature encoder is represented by (μ feature ,σ feature ) and the global label distribution (μ label ,σ label) Use KL divergence to calculate the feature and label distribution alignment loss L alig1 The method disclosed in ZL202510450586.X uses KL divergence to calculate the alignment loss of the dominant marker distribution information by feature encoding representation and dominant marker distribution. L alig 1 is that the global label distribution (μ label ,σ label ) replaces the dominant marker distribution in ZL202510450586.X; the feature and marker distribution alignment loss in this application L alig1 The feature encoding representation (μ feature ,σ feature ) and the global label distribution (μ label ,σ label ) are closer in the latent representation space.

[0041] In this application, the feature and label similarity matrix alignment loss is calculated L alig2 The method is the same as that disclosed in ZL202510450586.X for calculating the similarity matrix alignment loss L between features and markup representations. alig 3 is the same; the feature and label similarity matrix alignment loss constructed in this application L alig2 It is used to further improve the structural consistency of feature and tag representation in the latent representation space.

[0042] In this application, the label distribution prediction supervision loss is calculated L pre The method is the same as that disclosed in ZL202510450586.X to calculate the alignment loss L between the predicted label distribution and the true label distribution. alig 4 in the same way; in this application, the label distribution prediction supervision loss L pre The KL divergence is used to calculate the difference between the predicted label distribution output by the decoder and the true label distribution. The above loss setting can effectively constrain the predicted label distribution output by the decoder to be closer to the true label distribution, so that the predicted label distribution and the true label distribution are effectively aligned, effectively improving the distribution fitting ability of the imbalanced label distribution learning network in learning tasks.

[0043] S3. Obtain a training set and a test set, and train the imbalanced label distribution learning network for 10 training segments based on the training set and the total optimization loss to obtain 10 imbalanced label distribution learning network models, including the following steps:

[0044] S3-1. Obtaining training and test sets includes the following specific steps:

[0045] S3-1-1. Obtain the original dataset, which is the Movie dataset. The Movie dataset, from the paper "Label Distribution Learning," is a user-rating dataset for movies. It contains textually labeled data for each movie, such as genre, user reviews, and rating tags. The dataset includes 7,755 movies and 54,242,292 rating records from 478,656 users (data sourced from Netflix, with ratings ranging from 1 to 5 stars, across five rating scales). In the Movie dataset, the rating tag distribution for each movie is textual data, derived from the percentage of users voting on each rating scale. Feature extraction is based on metadata, including dimensions such as genre, director, actor, country, and budget. Categorical attributes are converted to binary vectors. The resulting feature vector extracted from each movie is 1,869-dimensional. The original dataset contains 7,755 feature vectors and five label distributions.

[0046] S3-1-2. Use the ten-fold cross-validation method to divide the original data set into 10 subsets, 9 of which include 775 feature vectors and their corresponding label distributions, and the remaining subset includes 780 feature vectors and their corresponding label distributions; in the process of training the unbalanced label distribution learning network in this application, 10 training segments are required, each training segment includes a training process of 300 epochs, and in each training segment, 9 subsets are selected as training sets, and the remaining subset is used as a test set. In the 10 training segments of this application, the selected test sets are different.

[0047] S3-2, the feature vector in the training set is input into the feature encoder, and the label distribution in the training set is input into the full label encoder, forward propagation is performed, the total optimization loss of the imbalanced label distribution learning network is calculated, and back propagation is performed under the guidance of the total optimization loss to update the weight parameters of the imbalanced label distribution learning network. In the process of updating the weight parameters of the imbalanced label distribution learning network, the network parameters θ in the next epoch are updated according to the dominant momentum buffer variable, dominant loss momentum coefficient, auxiliary momentum buffer variable and auxiliary loss momentum coefficient in the current epoch. After iterating 300 epochs, the training of one training segment is completed to obtain an imbalanced label distribution learning network model. In this application, in the process of training the imbalanced label distribution learning network, a total of 10 training segments are trained, thereby obtaining 10 imbalanced label distribution learning network models. In order to ensure that the model can converge stably during training, the learning rate is set to 0.001 and the batch size is set to 50, which not only ensures high training efficiency but also helps the network fully learn the data features. In this application, the asymmetric momentum optimization mechanism is combined with the setting of learning rate and batch size to ensure the convergence speed while avoiding training instability caused by excessive or insufficient gradient updates.

[0048] This application is to predict the supervised loss of the label distribution L pre is considered as the dominant loss, and other losses (other losses include inter-layer alignment loss L lenc_alig , feature and label distribution alignment loss L alig1 and feature and label similarity matrix alignment loss L alig2 ) is regarded as an auxiliary loss. During the training process of the imbalanced labeled distribution learning network, the present application adopts an asymmetric momentum optimization mechanism for the dominant loss and the auxiliary loss, that is, an independent dominant momentum buffer variable and a momentum coefficient of the dominant loss are set for the dominant loss, and the dominant loss momentum coefficient is referred to as the dominant loss momentum coefficient, and an independent auxiliary momentum buffer variable and an auxiliary loss momentum coefficient are set for the auxiliary loss, and the auxiliary loss momentum coefficient is referred to as the auxiliary loss momentum coefficient. Then, during the training process, the network parameter θ in the next epoch is updated according to the dominant momentum buffer variable, the dominant loss momentum coefficient, the auxiliary momentum buffer variable and the auxiliary loss momentum coefficient in the current epoch. Taking the next epoch as the t-th epoch as an example, the updating method of the network parameter θ during the training process of the t-th epoch includes the following steps:

[0049] a) Based on the dominant loss momentum coefficient , the gradient of the dominant loss during the t-1th epoch training process And the dominant momentum buffer variable in the t-1th epoch training process updates the dominant momentum buffer variable in the first momentum buffer during the t-1th epoch training process , update the dominant momentum buffer variable in the first momentum buffer during the t-1th epoch training process The method is shown in formula (2), and the first momentum buffer is regarded as the dominant momentum buffer;

[0050] (2)

[0051] In formula (2), represents the dominant loss momentum coefficient, represents the dominant momentum buffer variable during the t-1th epoch training process, represents the dominant momentum buffer variable during the t-th epoch training process, Represents the gradient of the dominant loss during the t-1th epoch training process;

[0052] b) Based on auxiliary loss momentum coefficient , the gradient of the auxiliary loss during the t-1th epoch training process And the dominant momentum buffer variable in the t-1th epoch training process updates the auxiliary momentum buffer variable in the second momentum buffer in the t-1th epoch training process , update the dominant momentum buffer variable in the first momentum buffer during the t-1th epoch training process The method is shown in formula (3), and the second momentum buffer is regarded as an auxiliary momentum buffer;

[0053] (3)

[0054] In formula (3), represents the auxiliary loss momentum coefficient, Represents the auxiliary momentum buffer variable during the t-1th epoch training process, represents the auxiliary momentum buffer variable during the t-th epoch training process, Represents the gradient of the auxiliary loss during the t-1th epoch training process. In this application, during the training process of the same epoch, the auxiliary momentum buffer variable of all auxiliary losses are also the same; and in the training process of all epochs, the dominant loss momentum coefficient is fixed, auxiliary loss momentum coefficient is also fixed, and the auxiliary loss momentum coefficient of all auxiliary losses The values ​​are the same, and The value is greater than To achieve the optimal direction control of the dominant loss, in this embodiment, the dominant loss momentum coefficient The value is 0.95, the auxiliary loss momentum coefficient is 0.85;

[0055] c) Based on the network parameters θ during the t-1th epoch training process and the dominant momentum buffer variable during the tth epoch training process And the auxiliary momentum buffer variable during the t-th epoch training process Update the network parameter θ during the t-th epoch training process, define the network parameter θ during the t-th epoch training process as θ', and update the calculation method of θ' as described in formula (4):

[0056] (4)

[0057] In formula (4), γ is the learning rate, θ is the network parameter in the t-1th epoch training process, and The calculation method for updating the network parameter θ during the tth epoch training process reflects the joint influence of the dominant momentum buffer variable and the auxiliary momentum buffer variable on the current network parameter update. In this application, α, β, and λ are essentially manually set hyperparameters, and the network parameter θ is the parameter learned and updated during the training of the imbalanced label distribution learning network.

[0058] In this application, the above-mentioned asymmetric momentum optimization mechanism adopts the dominant loss to promote parameter changes with higher update weights during training, while the gradient of the auxiliary loss is assisted by adjustment under the action of smaller momentum, thereby effectively avoiding gradient conflicts, improving the stability of the unbalanced label distribution learning network training, and improving the learning effect of the unbalanced label distribution learning network on the unbalanced label distribution data set, so that when the unbalanced label distribution learning network model obtained by this application is used to predict the unbalanced data set, a predicted label distribution that is closer to the true label distribution can be predicted. In this application, the asymmetric momentum optimization mechanism ensures the efficiency and stability of the optimization process by using param_group or hook for lightweight deployment in mainstream deep learning frameworks (such as PyTorch).

[0059] The asymmetric momentum optimization mechanism adopted in this application sets an independent dominant momentum buffer variable and a dominant loss momentum coefficient for the dominant loss, and sets an independent auxiliary momentum buffer variable and an auxiliary loss momentum coefficient for the auxiliary loss. Then, during the training process, the network parameter θ in the next epoch is updated according to the dominant momentum buffer variable, the dominant loss momentum coefficient, the auxiliary momentum buffer variable and the auxiliary loss momentum coefficient in the current epoch. The above setting enables this application to effectively ensure that the momentum buffer variables of the dominant loss and the auxiliary loss do not interfere with each other during the update process, and controls the dominance of the momentum buffer variable of the dominant loss in the gradient update by setting the dominant loss momentum coefficient to be greater than the auxiliary loss momentum coefficient. Moreover, in the reverse During the propagation process, it can also effectively realize the smooth adjustment of the momentum buffer variables of the dominant loss and auxiliary loss in the gradient update process, effectively suppress the gradient fluctuation of the momentum buffer variables of the dominant loss and auxiliary loss in the gradient update process, and enhance the stability of the optimization process of the momentum buffer variables of the dominant loss and auxiliary loss. It helps to improve the convergence and robustness of the overall training process of the unbalanced label distribution learning network, especially in the scenario of collaborative optimization of different loss terms, it shows higher training stability, and obtains an unbalanced label distribution learning network model with better parameters, so that when using the unbalanced label distribution learning network model obtained in this application to predict an unbalanced data set, it can predict a predicted label distribution that is closer to the true label distribution.

[0060] S4. Based on the unbalanced dataset with an uneven distribution of movie rating labels to be predicted, feature vectors and label distributions are obtained. The feature vectors and label distributions are then fed into the 10 imbalanced label distribution learning network models obtained in step S3 and forward propagated once, outputting 10 predicted label distributions and their corresponding 10 true label distributions. An imbalanced dataset refers to a dataset with an uneven distribution of movie rating labels. The method for obtaining feature vectors and label distributions based on the unbalanced dataset with an uneven distribution of movie rating labels in this application is the same as the method for obtaining feature vectors and label distributions described in Section A.1.1 Description of Datasets • Movie (movie rating) in the paper "Imbalanced Label Distribution Learning." In this application, since the predicted label distribution output by the decoder includes movie ratings, existing movie recommendation systems (such as those publicly available from MovieLens and Netflix Prize) can predict movie ratings based on these 10 predicted label distributions, thereby recommending movies with higher predicted ratings to users.

[0061] test:

[0062] The method described in this application (referred to as Ours method in Table 1) is compared with the existing SA-BFGS method (from Xin Geng's paper "Label Distribution Learning"), the EDLRL method (from Xiuyi Jia et al.'s paper "Facial Emotion Distribution Learning by Exploiting Low-Rank Label Correlations Locally"), the LDLSF method (from Tingting Ren et al.'s paper "Label Distribution Learning with Label-Specific Features"), the LDL-LCLR method (from Tingting Ren et al.'s paper "Label Distribution Learning with Label Correlationsvia Low-Rank Approximation"), the Adam-LDL-SCL method (from Xiuyi Jia et al.'s paper "Label Distribution Learning with Label Correlations on Local Samples"), the LDL-LDM method (from Jing Wang et al.'s paper "Label Distribution Learning by Exploiting Label Distribution Manifold"), the OFR-FL method (from Tsung-Yi Lin et al.'s paper "FocalLoss for Dense Object Detection”), OFR-CB method (from Tsung-Yi Lin et al.’s paper “Focal Loss for Dense Object Detection”), OFR-DB method (from Tsung-Yi Lin et al.’s paper “Focal Loss for Dense Object Detection”), RDA method (from Xingyu Zhao et al.’s paper “Imbalanced Label Distribution Learning”), and DILDL method (from ZL202510450586.Unbalanced distribution learning methods, such as the "unbalanced label distribution learning method based on decoupled operations" disclosed by X, were tested using the same testing strategy. The test results are shown in Table 1. The testing strategy adopted in this application is as follows: testing is performed based on the test sets and corresponding unbalanced label distribution learning network models from 10 training segments. The Chebyshev distance method is used to calculate the Chebyshev distance between the predicted label distribution output by each unbalanced label distribution learning network model and the true label distribution. These Chebyshev distances are then averaged to obtain the average Chebyshev distance. The absolute value of the difference between each Chebyshev distance value and the average Chebyshev distance is then calculated. The maximum absolute value is taken as the fluctuation error. This fluctuation error is then added to the average Chebyshev distance to obtain the final error, which reflects the difference between the predicted label distribution and the true label distribution.

[0063] Example 2:

[0064] Compared with the first embodiment, the second embodiment differs from the first embodiment in that:

[0065] 1) The imbalanced dataset used in Example 2 is the SCUT-FBP dataset. The SCUT-FBP dataset used in this application is consistent with the SCUT-FBP dataset published in the paper "SCUT-FBP: A Benchmark Dataset for Facial Beauty Perception." The SCUT-FBP dataset focuses on facial beauty perception research and contains text annotations for facial images. These annotations include information such as gender, age, and facial beauty ratings, as well as descriptiveness. In this dataset, multiple annotators subjectively rate each image's facial beauty, with ratings ranging from 1 to 5. The descriptiveness is calculated based on the proportion of each rating in the annotations.

[0066] 2) In step S3-1-2 of the second embodiment, the subset is obtained by dividing the original data set into 10 subsets using a ten-fold cross validation method, each subset including 3600 feature vectors and their corresponding label distributions.

[0067] In Example 2, the method described in the present application is tested with the same testing strategy as the existing unbalanced label distribution learning methods such as the SA-BFGS method, EDLRL method, LDLSF method, LDL-LCLR method, Adam-LDL-SCL method, LDL-LDM method, OFR-FL method, OFR-CB method, OFR-DB method, RDA method and DILDL method. The test results are shown in Table 1.

[0068] Example 3:

[0069] Compared with the first embodiment, the third embodiment differs from the first embodiment in that:

[0070] 2) The unbalanced dataset used in Example 3 is the Emotion6 dataset; the Emotion6 dataset is consistent with the Emotion6 dataset published in the paper "Amixed bag of emotions: Model, predict, and transfer emotion distributions". Emotion6 contains text annotation data formed by the subjective emotional reactions of human observers when viewing images. The text annotation data covers seven emotion categories (i.e., anger, disgust, joy, fear, sadness, surprise, and neutral) and their corresponding descriptiveness. For each image, multiple annotators select the emotion category based on their subjective emotional judgment. The descriptiveness is ultimately calculated based on the voting ratio of each emotion category.

[0071] 2) In step S3-1-2 of the third embodiment, the subset is obtained by dividing the original data set into 10 subsets using a ten-fold cross validation method, each subset including 1782 feature vectors and their corresponding label distributions.

[0072] In Example 3, the method described in the present application is tested with the existing imbalanced distribution learning methods such as the SA-BFGS method, EDLRL method, LDLSF method, LDL-LCLR method, Adam-LDL-SCL method, LDL-LDM method, OFR-FL method, OFR-CB method, OFR-DB method, RDA method and DILDL method using the same testing strategy. The test results are shown in Table 1.

[0073] Example 4:

[0074] Compared with the first embodiment, the fourth embodiment differs from the first embodiment in that:

[0075] 1) The imbalanced dataset used in Example 4 is the Flickr LDL dataset, which is consistent with the Flickr LDL dataset published in the paper "Learning Visual Sentiment Distributions via Augmented Conditional Probability Neural Network." The Flickr LDL dataset contains text annotation data representing subjective emotional responses of human observers when viewing images. This text annotation data includes annotation information for eight emotion categories (awe, disgust, fear, amusement, sadness, satisfaction, excitement, and anger) and their corresponding descriptiveness. For each image, multiple annotators select an emotion category, and the descriptiveness is calculated based on the vote percentage for each emotion category.

[0076] 2) In step S3-1-2 of the fourth embodiment, the subset is obtained by dividing the original data set into 10 subsets using a ten-fold cross validation method, each subset including 10035 feature vectors and their corresponding label distributions.

[0077] In Example 4, the method described in the present application is tested with the same testing strategy as the existing unbalanced label distribution learning methods such as the SA-BFGS method, EDLRL method, LDLSF method, LDL-LCLR method, Adam-LDL-SCL method, LDL-LDM method, OFR-FL method, OFR-CB method, OFR-DB method, RDA method and DILDL method. The test results are shown in Table 1.

[0078] Embodiment 5:

[0079] Compared with the first embodiment, the fifth embodiment differs from the first embodiment in that:

[0080] 1) The imbalanced dataset used in Example 5 is the RAF-ML dataset; the RAF-ML dataset is consistent with the RAF-ML dataset published in the paper "Blended Emotion in-the-Wild: Multi-label Facial Expression Recognition Using Crowdsourced Annotations and Deep Locality Feature Learning." The RAF-ML dataset contains text-labeled data for facial images. The text-labeled data includes the six emotion categories (i.e., happiness, sadness, surprise, fear, anger, and neutral) represented by the facial images and their corresponding descriptiveness. In this dataset, the descriptiveness of the emotion labels is calculated based on the percentage of each emotion category in the annotator's votes.

[0081] 2) In step S3-1-2 of Example 5, the subset is obtained by using a ten-fold cross-validation method to divide the original data set into 10 subsets, 9 of which include 4417 feature vectors and their corresponding label distributions, and the remaining subset includes 4419 feature vectors and their corresponding label distributions.

[0082] In Example 4, the method described in the present application is tested with the same testing strategy as the existing unbalanced label distribution learning methods such as the SA-BFGS method, EDL-LRL method, LDLSF method, LDL-LCLR method, Adam-LDL-SCL method, LDL-LDM method, OFR-FL method, OFR-CB method, OFR-DB method, RDA method and DILDL method. The test results are shown in Table 1.

[0083] In Example 5, the method described in the present application is tested with the same testing strategy as the existing imbalanced distribution learning methods such as the SA-BFGS method, EDLRL method, LDLSF method, LDL-LCLR method, Adam-LDL-SCL method, LDL-LDM method, OFR-FL method, OFR-CB method, OFR-DB method, RDA method and DILDL method. The test results are shown in Table 1.

[0084] Example 6:

[0085] Compared with the first embodiment, the sixth embodiment differs from the first embodiment in that:

[0086] 1) The imbalanced dataset used in Example 6 is the Natural Scene dataset, which is consistent with the Natural Scene dataset published in the paper "Label Distribution Learning." The Natural Scene dataset contains text annotations for natural scene images. The text annotations cover nine object categories (sun, cloud, sky, building, water, mountain, snow, desert, and plant) and their corresponding descriptiveness. The descriptiveness of the object categories in this dataset is calculated using nonlinear programming based on the ranking results of inconsistent labels provided by multiple annotators.

[0087] 2) In step S3-1-2 of the sixth embodiment, the subset is obtained by dividing the original data set into 10 subsets using a ten-fold cross validation method, each subset including 1800 feature vectors and their corresponding label distributions.

[0088] In Example 6, the method described in the present application is tested with the existing unbalanced label distribution learning methods such as the SA-BFGS method, EDLRL method, LDLSF method, LDL-LCLR method, Adam-LDL-SCL method, LDL-LDM method, OFR-FL method, OFR-CB method, OFR-DB method, RDA method and DILDL method using the same testing strategy, and the final error results of the test are shown in Table 1.

[0089] Table 1 Final errors of different methods on different datasets

[0090]

[0091] As can be seen from Table 1, the performance of the method described in the present invention on the above six datasets is improved. On the Movie dataset (imbalance coefficient is 11.01), the final error obtained by the method described in the present application is reduced by 7.42% compared with the DILDL method (the best imbalanced distribution learning method among the above existing imbalanced distribution learning methods); on the SCUT-FBP dataset (imbalance coefficient is 19.37), the final error obtained by the method described in the present application is reduced by 16.06% compared with the DILDL method; on the Emotion6 dataset (imbalance coefficient is 10.46), the final error obtained by the method described in the present application is reduced by 9.93% compared with the DILDL method; on the FlickrLDL dataset (imbalance coefficient is 57.12), the final error obtained by the method described in the present application is reduced by 8.24% compared with the DILDL method; on the RAF-ML dataset (imbalance coefficient is 30.33), the final error obtained by the method described in the present application is reduced by 9.47% compared with the DILDL method; on the Natural The final error obtained by the method described in this application on the Scene dataset (imbalance coefficient is 10.74) is reduced by 8.75% compared with the DILDL method.

[0092] The above-mentioned effects achieved by the method described in the present application are mainly due to the asymmetric momentum optimization mechanism introduced in the present application and the calculation of the inter-layer alignment loss of the feature encoder and the fully labeled encoder. In the above-mentioned setting, the inter-layer alignment loss of the feature encoder and the fully labeled encoder can effectively constrain the structural consistency of the encoding paths of the feature encoder and the fully labeled encoder in the potential representation space, and effectively improve the inter-layer alignment effect of the output results of each encoding layer of the feature encoder and the fully labeled encoder. The setting of the asymmetric momentum optimization mechanism enables the present application to effectively ensure that the momentum buffer variables of the dominant loss and the auxiliary loss do not interfere with each other during the update process, and control the dominance of the momentum buffer variable of the dominant loss in the gradient update by setting the dominant loss momentum coefficient to be greater than the auxiliary loss momentum coefficient. Moreover, during the back-propagation process, it can also effectively realize the smooth adjustment of the momentum buffer variables of the dominant loss and the auxiliary loss during the gradient update process, effectively suppress the gradient fluctuation of the momentum buffer variables of the dominant loss and the auxiliary loss during the gradient update process, and enhance the stability of the optimization process of the momentum buffer variables of the dominant loss and the auxiliary loss, which helps to improve the convergence and robustness of the overall training process of the imbalanced label distribution learning network, especially in the scenario of collaborative optimization of different loss terms, showing higher training stability, and obtaining an imbalanced label distribution learning network model with better parameters. This also makes it possible to use the imbalanced label distribution learning network model obtained in this application to predict a predicted label distribution that is closer to the true label distribution when predicting an imbalanced data set.

[0093] To verify the contribution of the inter-layer alignment loss between the feature encoder and the label encoder and the asymmetric momentum optimization mechanism to the method described in this application, this application conducted targeted ablation experiments based on the Movie dataset. Six evaluation metrics, including Chebyshev distance, Clark distance, Canberra measure, KL divergence, cosine coefficient, and intersection similarity, were used to evaluate the distance or similarity between the true label distribution and the predicted label distribution as indicators of the performance of the imbalanced label distribution learning network model. The test results are shown in Table 2.

[0094] Table 2 Ablation experiment test results

[0095]

[0096] In Table 2, smaller Chebyshev distance, Clark distance, Canberra measure, and KL divergence values ​​indicate better performance. Larger cosine coefficients and intersection similarities indicate better performance. In this application, KL divergence measures the difference between the predicted and true marker distributions. Smaller KL divergence values ​​indicate closer approximations between the predicted and true marker distributions.

[0097] As can be seen from Table 2, when the unbalanced label distribution learning network calculates the inter-layer alignment loss and adopts the asymmetric momentum optimization mechanism, that is, the method described in this application, the evaluation indicators such as Chebyshev distance, Clark distance, Canberra measure, KL divergence, cosine coefficient and intersection similarity all achieve significant performance improvements. For example, under the condition that the unbalanced labeled distribution learning network calculates the inter-layer alignment loss and adopts the asymmetric momentum optimization mechanism (that is, the method described in this application), the test result of the KL divergence index is 0.182, while under the condition that the unbalanced labeled distribution learning network adopts the asymmetric momentum optimization mechanism and omits the calculation of the inter-layer alignment loss, the test result of the KL divergence index is 0.187. Obviously, the KL divergence index obtained when the unbalanced labeled distribution learning network adopts the asymmetric momentum optimization mechanism and omits the calculation of the inter-layer alignment loss is increased by about 2.75% compared with the case when the unbalanced labeled distribution learning network calculates the inter-layer alignment loss and adopts the asymmetric momentum optimization mechanism; moreover, it can be seen from Table 2 that the KL divergence index obtained when the unbalanced labeled distribution learning network omits the calculation of the inter-layer alignment loss and only adopts the asymmetric momentum optimization mechanism is increased by about 2.75% compared with the method described in this application. Under the symmetric momentum optimization mechanism, the Chebyshev distance index increased by 5.56% (from 0.162 to 0.171), the Clark distance index increased by 2.32% (from 0.690 to 0.706), and the Canberra measure index increased by 0.85% (from 1.295 to 1.306); in terms of similarity index, the cosine coefficient decreased by 0.81% (from 0.864 to 0.857), and the Intersection similarity decreased by 0.40% (from 0.758 to 0.755); this shows that the predicted label distribution obtained by the method described in this application when the unbalanced label distribution learning network calculates the inter-layer alignment loss and adopts the asymmetric momentum optimization mechanism is closer to the true label distribution than the predicted label distribution obtained when the unbalanced label distribution learning network omits the calculation of the inter-layer alignment loss and only adopts the asymmetric momentum optimization mechanism.

[0098] It can also be seen from Table 2 that when the unbalanced label distribution learning network only has an encoder alignment module and removes the asymmetric momentum optimization mechanism, compared with the case where the unbalanced label distribution learning network calculates the inter-layer alignment loss and adopts the asymmetric momentum optimization mechanism in the method described in this application, the KL divergence index increases from 0.182 to 0.186, the KL divergence increases by 2.20%, the Chebyshev distance index increases by 5.56%, the Clark distance index increases by 2.32%, and the Canberra measure index increases by 0.85%; in terms of similarity index, the cosine coefficient decreases by 0.81% and the Intersection similarity decreases by 0.40%. This shows that the predicted label distribution obtained when the unbalanced label distribution learning network calculates the inter-layer alignment loss and adopts the asymmetric momentum optimization mechanism in the method described in this application is closer to the true label distribution than the predicted label distribution obtained when the unbalanced label distribution learning network omits the calculation of the inter-layer alignment loss and only adopts the asymmetric momentum optimization mechanism.

Claims

1. A method for learning unbalanced label distribution based on asymmetric momentum optimization, characterized by: The following steps are involved: S1. Construct an imbalanced label distribution learning network including a feature encoder, a full label encoder, and a decoder; S2. Calculate the total optimization loss of the imbalanced label distribution learning network; the total optimization loss includes inter-layer alignment loss, feature and label distribution alignment loss, feature and label similarity matrix alignment loss, and label distribution prediction supervision loss; S3. Train the imbalanced label distribution learning network based on the training set and the total optimization loss to obtain a network model; In step S3, a dominant momentum buffer variable and a dominant loss momentum coefficient are set for the dominant loss, and an auxiliary momentum buffer variable and an auxiliary loss momentum coefficient are set for the auxiliary loss. Then, during training, the network parameters θ in the next epoch are updated based on the dominant momentum buffer variable, dominant loss momentum coefficient, auxiliary momentum buffer variable, and auxiliary loss momentum coefficient in the current epoch. The dominant loss is the label distribution prediction supervision loss, and the auxiliary losses include inter-layer alignment loss, feature and label distribution alignment loss, and feature and label similarity matrix alignment loss. In step S3, the training set is obtained based on the original dataset, which is the Movie dataset. The Movie dataset is a dataset of user ratings of movies, and contains textually labeled data of the movies. In the Movie dataset, the distribution of rating labels for each movie is textual data, and the distribution of rating labels for each movie is obtained based on the statistical proportion of votes of all users at each rating level. S4. Obtain feature vectors and label distribution based on the unbalanced dataset to be predicted, and then input them into the network model for forward propagation once to obtain the predicted label distribution and the true label distribution; In step S4, the unbalanced dataset refers to a dataset with an uneven distribution of movie rating labels.

2. The unbalanced label distribution learning method based on asymmetric momentum optimization according to claim 1, characterized in that: In step S2, the inter-layer alignment loss refers to the inter-layer alignment loss between the feature encoder and the full-label encoder.

3. The unbalanced label distribution learning method based on asymmetric momentum optimization according to claim 2, characterized in that: In step S2, the inter-layer alignment loss is obtained as follows: Extract the distribution parameters of the i-th coding layer in the feature encoder and the i-th coding layer in the full-label encoder in the latent representation space; use the output results of each pair of corresponding coding layers in the feature encoder and the full-label encoder as the input of the KL divergence calculation to obtain the distribution alignment loss of each corresponding coding layer, and accumulate the distribution alignment loss of each layer to obtain the inter-layer alignment loss.

4. The unbalanced label distribution learning method based on asymmetric momentum optimization according to claim 1, characterized in that: Step S3 includes the following steps: inputting the feature vector in the training set into the feature encoder, and inputting the label distribution in the training set into the full label encoder, forward propagation, calculating the total optimization loss of the unbalanced label distribution learning network, and performing backpropagation under the guidance of the total optimization loss, updating the weight parameters of the unbalanced label distribution learning network, and in the process of updating the weight parameters of the unbalanced label distribution learning network, updating the network parameters θ in the next epoch according to the dominant momentum buffer variable, dominant loss momentum coefficient, auxiliary momentum buffer variable and auxiliary loss momentum coefficient in the current epoch, completing the training of one training segment after iterating 300 epochs, and obtaining an unbalanced label distribution learning network model, wherein, in the process of training the unbalanced label distribution learning network, a total of 10 training segments are trained, thereby obtaining 10 unbalanced label distribution learning network models.

5. The unbalanced label distribution learning method based on asymmetric momentum optimization according to claim 1 or 4, characterized in that: In step S3, when the next epoch is the t-th epoch, the network parameter θ in the training process of the t-th epoch is updated according to the dominant momentum buffer variable, the dominant loss momentum coefficient, the auxiliary momentum buffer variable, and the auxiliary loss momentum coefficient in the training process of the t-th epoch, specifically including the following steps: a) Update the dominant momentum buffer variable during the t-1th epoch training process based on the dominant loss momentum coefficient and the gradient of the dominant loss and the dominant momentum buffer variable during the t-1th epoch training process; b) Update the auxiliary momentum buffer variable during the t-1th epoch training process based on the auxiliary loss momentum coefficient and the gradient of the auxiliary loss and the leading momentum buffer variable during the t-1th epoch training process; c) Update the network parameters θ during the t-th epoch training process based on the network parameters θ during the t-1th epoch training process and the dominant momentum buffer variables and auxiliary momentum buffer variables during the tth epoch training process.

6. The unbalanced label distribution learning method based on asymmetric momentum optimization according to claim 5, characterized in that: In step S4, the leading loss momentum coefficient is greater than the auxiliary loss momentum coefficient.

7. The unbalanced label distribution learning method based on asymmetric momentum optimization according to claim 1, characterized in that: Step S4 includes the following steps: obtaining feature vectors and label distributions based on the imbalanced data set to be predicted, and then inputting the feature vectors and label distributions into the 10 imbalanced label distribution learning network models obtained in step S3 for forward propagation once, and outputting 10 predicted label distributions and their corresponding 10 true label distributions.

Citation Information

Patent Citations

  • Association rule determination method and device for unbalanced sample

    CN113282686A

  • Unbalance mark distribution learning method based on decoupling operation

    CN119962705A

Cited By

  • Unbalanced mark distribution learning method suitable for movie recommendation

    CN120952112A

  • Imbalanced Label Distribution Learning Method for Movie Recommendation

    CN120952112B

  • Unbalance mark distribution learning method suitable for face attraction evaluation

    CN121789016A