An improved transfer learning method based on pseudo-labels

Through feature projection and center-like matching methods, accurate pseudo-labels are assigned to the target samples in the transfer learning method, and sample weighting is combined with manifold regularization, the problem of poor classification effect caused by inaccurate pseudo-labels in the prior art is solved, and higher classification accuracy is achieved.

CN115035335BActive Publication Date: 2025-04-29HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210637518.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-07
Publication Date
2025-04-29
Estimated Expiration
2042-06-07

AI Technical Summary

Technical Problem

In the sample weighting process of existing transfer learning methods, inaccurate pseudo-labeling leads to poor classification results and fails to fully utilize the correlation between the source domain and the target domain.

Method used

The source domain and target domain samples are projected into the public low-dimensional feature space through feature projection, and a more accurate pseudo-label is assigned to the target samples by using the center-like matching method, and sample weighting is performed in combination with manifold regularization.

Benefits of technology

Improve the accuracy of pseudo-labels and sample weighting accuracy, thereby improving the performance of the target classifier and reducing misclassification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115035335B_ABST
    Figure CN115035335B_ABST
Patent Text Reader

Abstract

The present invention proposes a transfer learning method based on pseudo-label improvement, which is used to solve the problem that the accuracy of the target classifier is impaired due to the inaccuracy of the target pseudo-label in transfer learning. The method of the present invention first obtains pseudo-labels by clustering the target domain samples and performing category matching (center of gravity matching) with the determined category centers of the source domain; and reduces the difference of the original samples by adding feature projection. Finally, the projected low-dimensional samples and pseudo-labels are combined to perform target weighting and learn the target classifier. Compared with the prior art, the present invention can improve the weighting effect of samples and the classification accuracy of target samples by improving the accuracy of pseudo-labels and performing feature projection processing on samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine learning, and in particular to a transfer learning method based on pseudo-label improvement. Background Art

[0002] Traditional machine learning and deep learning can process a large amount of image data generated by industries such as smart transportation and emerging media. However, in order to achieve good classification results, traditional machine learning models often rely on the source domain (training set) and the target domain (test set) having the same distribution. Therefore, it is necessary to use the rich labeled samples in the existing field to promote learning in the target field. Transfer learning domain adaptation is one of the powerful means to solve such cross-domain learning problems. Unsupervised domain adaptation mainly includes the study of feature and sample weighting. Based on the sample weighting level, the present invention improves the weighting effect of samples by improving the pseudo-labels of target samples.

[0003] The sample weighting method re-weights the source domain samples according to their importance and trains the target classifier for the unlabeled target instance: Some researchers have proposed an improved sample weighting method based on AdaBoost, which continuously improves the performance of the weak classifier through iteration, and selects source domain samples with high similarity for the target domain as sample supplements to the target domain data set to learn the classifier. The weighting method based on AdaBoost is relatively simple, easy to implement and has good theoretical support. Due to the focus on the source domain sample information, the correlation between the source domain and the target domain is not fully utilized, and the classification effect is affected. To this end, some researchers consider the correlation and difference between the source domain and the target domain, and propose a target sample weighting framework: by combining the pseudo-label predicted for the target sample and the distance from the source domain and target domain samples to the domain classifier for weighting, the probability distribution between the domains is matched. This method has high requirements on the accuracy of the pseudo-label. Since the true conditional distribution of the unlabeled target sample is unknown, it is difficult to accurately predict the pseudo-label of the target domain, which may cause large errors in the final classification results.

[0004] In order to obtain pseudo labels for target samples, a hard labeling strategy is usually used. The hard labeling strategy assigns a pseudo label to each unlabeled sample without considering the confidence level, and uses the pseudo-labeled target samples and labeled source samples to learn an improved classification model. After iteration, the accuracy of the pseudo labels is expected to be improved. Although these methods have good performance, they all classify the target samples independently. Since the structural information of the data distribution in the target domain is ignored, misclassification may occur. To this end, some researchers have proposed to calculate the category centers (class centers) of the source domain and the target domain respectively by matching between class centers, and then search for the nearest source domain class center for the target class center, and assign the label closest to the source domain class center to the target cluster.

[0005] In order to solve the problem of inaccurate pseudo-labels in sample weighting, the present invention proposes a transfer learning method for improving pseudo-labels based on target sample weighting, aiming to improve the accuracy of sample weight calculation and the performance of target classifier by obtaining more accurate pseudo-labels. Summary of the invention

[0006] The purpose of the present invention is to propose a transfer learning method based on pseudo-label improvement.

[0007] To achieve the above object, the method of the present invention mainly comprises the following steps:

[0008] Step (1): Feature Projection

[0009] Specifically: First, the source domain of the original space (in is a source domain sample, is the corresponding label) of the source domain sample X s , and the target domain (in is the target sample X t By learning a projection matrix The source domain and target domain data samples in the original space are projected into a common low-dimensional feature space. On this subspace, the dimension of the original space is reduced from m dimensions to d dimensions.

[0010] Step (2): Heart rate matching

[0011] Specifically, the initial class centroids of the source domain and the target domain are first obtained, and then pseudo labels are assigned to the target samples through the class centroid matching method, and more accurate target domain pseudo labels are obtained by improving the quality of the class centroid.

[0012] Obtaining the class center (obtaining the class center of the source domain and the target domain respectively): Since the source domain samples have labels, the class center of the source domain can be obtained by calculating the projection mean of similar samples. For the target domain, it is obtained through the K-means algorithm.

[0013]

[0014] in, is the matrix used for spatial projection, represents the cluster center of the target sample, Indicates size n s ×C is a matrix of all zeros, is the identity matrix, G t Is the label matrix representing the target sample. If the target sample X ti If the cluster label of is j, the label of the target sample is 1, otherwise it is 0.

[0015] Class center matching (assigning labels to target samples):

[0016] After obtaining the clustering prototype of the target data, the distribution difference minimization problem in domain adaptation can be restated as a class centroid matching problem. The nearest neighbor search method can be used to find the closest source class centroid for each class centroid of the target domain to solve the problem. The class centroid matching formula for the source domain and the target domain is shown in (2). The class centroid matching diagram is shown in the attached figure. Figure 2 shown.

[0017]

[0018] in, It is a constant matrix used to calculate the class center of the source domain sample after projection. If the label of the source domain sample is the jth class, the value of the constant matrix is ​​the inverse of the number of source domain categories of that class, otherwise it is 0.

[0019] This method uses the iterative update of the class center to continuously improve the quality of the class center, and finally obtains a more accurate target domain pseudo label G t And the features of the processed source domain and target domain are Z s , Z t :Z s =P T X s , Z t =P T X t The obtained pseudo labels and projected samples are used to weight the target samples.

[0020] Step (3): Sample weighting

[0021] The accuracy of the pseudo-label after centroid matching is measured by assigning weights to the target samples. The more accurate the sample, the greater the weight. The domain classifier is trained and weighted according to the directed distance from the target sample to the domain hyperplane. The weight is used to measure the probability that the target sample is correctly predicted by the pseudo-prediction. Manifold regularization is used to force the target prediction function to give similar outputs to neighboring target samples. The objective function is shown in formula (4).

[0022]

[0023] Among them, f t (Z ti ) represents the prediction of the target classifier on the target sample, G(Z ti ) represents the prediction of the target sample after class center matching, λ is the balance factor, ζ is the adjacency matrix of the target domain, and measures the similarity of the samples. represents the weight, τ is the normalization factor to ensure that the target domain distribution after weighting is still standardized, υ is the scale factor, Ω i It represents the directed distance from the target sample to the domain classification surface. The farther the distance, the smaller the weight.

[0024] The first term of formula (4) indicates that if the distance between the target sample and the source domain sample is closer, then the target domain sample is more likely to be correctly classified after class center matching, and obtain a more accurate pseudo label. If the pseudo label of the target domain sample is more accurate, we give it a greater weight. At this time, minimizing the first term of formula (4) requires the target classifier to predict the target sample. t (Z ti ) should be close to the pseudo-label prediction value G(Z) of the class center matching ti ), otherwise the prediction value of the target classifier will not be affected by the pseudo-label after class centroid matching. The second term of the formula uses the manifold regularization framework to make the final target classifier more suitable for the target domain, and transfers the target sample label with a larger weight to the target sample with a smaller weight to propagate the target sample label. By simplifying and solving formula (4), we can get the target domain classifier f t (Z), achieve prediction and classification of target domain samples.

[0025] Compared with the existing sample weighted transfer learning algorithm, the present invention has the following characteristics:

[0026] The present invention uses the method of class centroid matching to assign pseudo labels to target samples, marks the target samples as a whole, reduces the probability of samples being misclassified due to the identification of a single sample, and more accurate target pseudo labels can help improve the accuracy of the target classifier. Secondly, the present invention projects the original high-dimensional samples into a low-dimensional common subspace by learning the feature projection matrix. Compared with traditional dimensionality reduction methods such as principal component analysis, it can not only achieve the purpose of dimensionality reduction, but also help reduce the distribution differences of samples and improve the accuracy of target sample weighting. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 Flowchart of the present invention

[0028] Figure 2 Schematic diagram of class center matching DETAILED DESCRIPTION

[0029] The following is a detailed description of the embodiment of the present invention in conjunction with the accompanying drawings: This embodiment is implemented on the premise of the technical solution of the present invention. A detailed implementation plan and specific operation process are given.

[0030] As attached Figure 1As shown, the implementation of the present invention can be divided into the following three steps: (1) First, the source domain and target domain samples in the original space are projected into the common feature space using projection transformation. (2) The centroid matching method is used to assign more accurate pseudo labels to the target samples, and the centroid quality is improved through iterative learning. (3) Finally, the projected "new samples" and the pseudo labels after centroid matching are combined with the target domain samples for weighted training of the final target classifier.

[0031] Step (1): Feature Projection

[0032] Learn a projection matrix P to project the source and target domain data samples in the original space into a common low-dimensional feature space. On this subspace, the dimension of the original space is reduced from m dimensions to d dimensions.

[0033] Step (2): Heart rate matching

[0034] First, the class centroids of the source domain and the target domain need to be obtained: the source domain is obtained by calculating the mean of similar samples, and the target domain is obtained by K-means clustering. After the class centroid is obtained, the class centroid of the target domain is matched with the closest source domain class centroid as the label of the target class. And by improving the quality of the class centroid, a more accurate target domain pseudo label is obtained. The class centroid matching diagram is shown in the attached figure. Figure 2 shown.

[0035] Step (3): Sample weighting

[0036] Specifically, the pseudo-label prediction of the target sample is first performed using the centroid matching method. Secondly, the source domain and the target domain are divided as much as possible by training a domain classifier that can distinguish between source domain and target domain samples, and then weighted according to the directed distance from the target sample to the binary domain hyperplane. Finally, manifold regularization is used to force the target prediction function to give similar outputs to neighboring target samples, and the target sample labels with larger weights are gradually transferred to target samples with smaller weights.

[0037] In order to verify the performance of the method of the present invention, experiments were conducted on the public dataset Office-31 for transfer learning, and the feasibility of the present invention was measured by classified performance indicators. This dataset contains 31 categories of target recognition in 3 fields. The 3 fields are Amazon, Webcam, and Dslr, with 2817, 498, and 795 pictures respectively. This embodiment uses the AlexNet-FC7 (4096-dimensional) features of the sample. According to the combination of source domain and target domain, it can be divided into 6 groups of tasks: "AD", "AW", "DA", "DW", "WA", and "WD". The results of the embodiment are shown in Table 1.

[0038] Table 1 Accuracy comparison on Office-31 dataset

[0039]

[0040] As can be seen from Table 1, the method achieves the highest classification accuracy in 5 of the 6 groups of tasks, which shows that the present invention can improve the classification accuracy of target samples by improving the accuracy of pseudo labels.

[0041] The embodiments described above are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the scope of protection determined by the claims of the present invention.

Claims

1. A transfer learning method based on pseudo-label improvement, characterized in that: The main steps include: Step (1), feature projection; Specifically, by learning a projection matrix The source domain of the original high-dimensional space The source domain sample X in s , and the target domain The target sample X in t , projected into a common low-dimensional feature space. In this subspace, not only the dimension of the original space is reduced from m to d, but also the distribution difference of samples can be reduced; in the source domain middle, is a source domain sample, is the corresponding label; in the target domain middle, is the target sample; Step (2), class center matching; Specifically, first obtain the class center, and obtain the class center of the source domain and the target domain respectively: since the source domain samples have labels, the class center of the source domain can be obtained by calculating the projection mean of similar samples, and for the target domain, it is obtained by the K-means algorithm; Next, perform class center matching: Use the nearest neighbor search method to find the closest source class center for each target domain class center, and achieve collective labeling of target samples of this class; in, represents the cluster center matrix of the target sample, It is a constant matrix used to calculate the class center of the source domain sample after projection. If the label of the source domain sample is the jth class, the value of the constant matrix is ​​the inverse of the number of source domain categories, otherwise it is 0; Through class center matching, we get the target domain pseudo label matrix and the processed source domain and target domain features Z s , Z t :Z s =P T X s , Z t =P T X t , the obtained pseudo labels and projected source domain and target domain samples are used for sample weighting; Step (3), sample weighting; Specifically, the pseudo-label prediction of the target sample is first performed using the centroid matching method; secondly, the source domain and the target domain are separated as much as possible by training a domain classifier that can distinguish between source domain and target domain samples, and then weighted according to the directed distance from the target sample to the binary domain hyperplane; finally, manifold regularization is used to force the target prediction function to give similar outputs to neighboring target samples. The sample weighting formula is shown in (3) Among them, f t (Z ti ) represents the prediction of the target classifier on the target sample, G(Z ti ) represents the prediction of the target sample after class center matching, λ is the balance factor, ζ is the adjacency matrix of the target domain, which measures the similarity of the samples, τ is the normalization factor, which ensures that the distribution of the target domain after weighting is still standardized, υ is the scale factor, and Ω i Represents the directed distance from the target sample to the domain classification surface. The farther the distance, the smaller the weight. The first term of formula (3) indicates that if the distance between the target sample and the source domain sample is closer, then the target domain sample is more likely to be correctly classified after class center matching, and obtain a more accurate pseudo label; if the pseudo label of the target domain sample is more accurate, we give it a greater weight; at this time, minimizing the first term of formula (3) requires the target classifier to predict the target sample. t (Z ti ) should be close to the pseudo-label prediction value G(Z) of the class center matching ti ), otherwise the predicted value of the target classifier will not be affected by the pseudo-label after class centroid matching; the second term of the formula uses the manifold regularization framework to make the final target classifier more adaptable to the target domain, and transfers the target sample label with a larger weight to the target sample with a smaller weight to perform label propagation of the target sample; By simplifying and solving formula (3), we can get the target domain classifier f t (Z), achieve prediction and classification of target domain samples.

2. The transfer learning method based on pseudo-label improvement according to claim 1, characterized in that: In step (3), the projected source domain, target domain samples and target sample pseudo labels obtained in steps (1) and (2) are used for sample weighting and improving the accuracy of the target classifier.

Citation Information

Patent Citations

  • Domain adaptive migration feature method and system

    CN110348579A

  • Cross-domain image classification method based on class consistency structured learning and related device

    CN113920382A