Semi-supervised learning undersampling method oriented to class imbalance and overlapping data classification

By using multi-layered false labeling strategy and single-class support vector machine algorithm in semi-supervised learning, combined with label propagation algorithm and minimum spanning tree strategy, false label generation and sample undersampling in class imbalance and overlapping data classification are solved problem, improving the performance of the classifier and the accuracy of data processing.

CN118568581AInactive Publication Date: 2024-08-30CIVIL AVIATION UNIV OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411047422.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-08-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively deal with the problems of class imbalance and overlapping data classification. Especially in the absence of annotation information, oversampling methods are ineffective and difficult to solve class overlap problems.

Method used

A semi-supervised learning under-sampling method for class imbalance and overlapping data is adopted, and a multi-layered pseudo-labeling strategy is combined with a single-class support vector machine and label propagation algorithm to form a dual verification mechanism to generate sample pseudo-labels and use a minimum spanning tree strategy. Perform sample overlap area detection and nearest neighbor undersampling.

Benefits of technology

It improves the accuracy and stability of pseudo-labels, provides more accurate pseudo-label annotations, is suitable for semi-supervised learning in complex fields, and expands new application directions of data processing in the case of imbalance and overlapping coupling, effectively processing classes Problems with unbalanced and overlapping couplings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568581A
    Figure CN118568581A
Patent Text Reader

Abstract

The invention relates to a semi-supervised learning under-sampling method for class imbalance and overlapping data classification. The method comprises the following steps: generating a sample pseudo label; detecting a sample overlapping region according to the generated sample pseudo label; and according to the detected sample overlapping region, carrying out nearest neighbor undersampling. According to different data categories and attribute differences, a multi-element layered pseudo tag printing strategy is introduced, and a dual verification mechanism is formed by combining a single-class support vector machine algorithm and a tag propagation algorithm, so that the accuracy of pseudo tags is improved; meanwhile, the multi-element layered framework provides more stable and accurate pseudo label labeling by fully utilizing a data distribution rule, and the framework is not only suitable for semi-supervised learning in a complex field, but also expands a new application direction of data processing of the semi-supervised learning under unbalanced and overlapping coupling conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data classification, and in particular to a semi-supervised learning undersampling method for class imbalance and overlapping data classification. Background Art

[0002] Class imbalance classification is a difficult problem. Not only do traditional classifiers tend to favor the majority class and easily make wrong predictions, but existing algorithms often have difficulty solving such problems of class overlap. Oversampling is a widely used and effective method to obtain balanced samples for imbalanced data, but existing oversampling methods often lead to more serious class overlap due to improper selection of reference samples.

[0003] Imbalance and overlap constitute a rather difficult scenario for classifiers.

[0004] Data-level and algorithm-level methods have been used to try to solve this coupling problem. The former focuses on preprocessing to balance samples and eliminate overlaps, while the latter guides the classifier to favor minority or overlapping samples. In general, the former has a wider range of applicability and solves the class imbalance problem well. However, imbalance and overlap coupling are more complex and pose great challenges to complete classification.

[0005] Oversampling is one of the pattern learning methods based on existing sample features. Especially for classification tasks, its effect is highly dependent on sufficient known information. However, in practice, only some samples are labeled, while other samples lack labeling information, which is a very tricky problem for oversampling. Obviously, the oversampling method based on supervised learning is no longer applicable.

[0006] Class imbalance and class overlap are interrelated and bring challenges to classification. Existing methods to solve this problem include data-level methods and algorithm-level methods, among which resampling is a widely used data-level method. However, existing sampling methods have difficulties in dealing with the lack of label information. Summary of the invention

[0007] The purpose of the present invention is to overcome the shortcomings of the prior art and propose a semi-supervised learning undersampling method for class imbalance and overlapping data classification, which does not require manual setting of parameters, better adapts to different data sets, provides interpretable and reproducible overlapping sample recognition results, and helps guide sampling and training classifiers.

[0008] The present invention solves the technical problem by adopting the following technical solutions:

[0009] The semi-supervised learning undersampling method for class imbalance and overlapping data classification includes the following steps:

[0010] Step 1: Based on the different data categories and attribute differences, a multi-layered anti-pseudo-labeling strategy is introduced and combined with a single-class support vector machine algorithm and a label propagation algorithm to form a double verification mechanism to generate sample pseudo-labels;

[0011] Step 2: Detect sample overlapping areas based on the sample pseudo labels generated in step 1;

[0012] Step 3: Perform nearest neighbor undersampling based on the sample overlap area detected in step 2.

[0013] Furthermore, the step 1 comprises the following steps:

[0014] Step 1.1, divide the sample set into internal samples and far-boundary samples by one-class support vector machine OCSVM;

[0015] Step 1.2: Use the Lagrange formula to calculate the decision function and find the decision boundaries of different categories of samples;

[0016] Step 1.3: Get the prediction result of the sample according to the decision boundary, and get some pseudo-label data sets at the same time;

[0017] Step 1.4: Based on the remaining pseudo-label data sets not obtained in step 1.3, use the label propagation algorithm to learn samples of different categories separately to obtain the remaining pseudo-label data sets;

[0018] Step 1.5: Introduce a double verification mechanism to perform intersection screening and verification on the two groups of pseudo-label samples obtained in steps 1.3 and 1.4 to determine the pseudo-label data set of the complete samples.

[0019] Moreover, the specific implementation method of the Lagrangian formula in step 1.2 for calculating the decision function is:

[0020]

[0021] in, is the solution to the dual problem, For the sample, is the offset.

[0022] Moreover, the partial pseudo-label dataset obtained in step 1.3 for:

[0023] ;

[0024] in, is the majority class sample set, including the majority class with known labels and the majority class with some pseudo labels of 0 in the unlabeled sample set , is a minority class sample set, including the minority class with known labels And the minority class with some pseudo labels of 1 in the unlabeled sample set , merge the majority class with pseudo labels of 0 and the minority class with pseudo labels of 1 in the unlabeled sample set into , is the remaining unlabeled sample set, To delete the false labeled samples.

[0025] Moreover, the specific implementation method of step 1.5 is: the two pseudo-label sample sets obtained in step 1.3 and step 1.4 are subjected to mathematical verification method, the intersection is taken, and the labels are double-verified to obtain the final determined pseudo-label sample set. :

[0026] ;

[0027] in, is the label value of the complete pseudo-label dataset, For samples in non-intersection areas, the cleaning NCL method is directly used to delete samples in this area.

[0028] Furthermore, the step 2 comprises the following steps:

[0029] Step 2.1, construct a minimum spanning tree based on the sample pseudo labels obtained in step 1;

[0030] Step 2.2: Detect sample overlapping areas using the minimum spanning tree.

[0031] Furthermore, the step 3 comprises the following steps:

[0032] Step 3.1: First, give priority to protecting minority samples within the overlapping area;

[0033] Step 3.2, calculate the distance between each sample example of the minority class sample and its nearest neighbor of the same class;

[0034] Step 3.3, calculate the distance between each sample example of the minority class sample and the corresponding nearest neighbor of different classes;

[0035] Step 3.4: If the distance calculated in step 3.2 is greater than or equal to the distance calculated in step 3.3, then delete the non-similar sample points connected in step 3.3; otherwise, keep the non-similar sample points connected in step 3.3;

[0036] Step 3.5: Traverse the remaining samples until all input samples are calculated.

[0037] The advantages and positive effects of the present invention are:

[0038] The present invention generates sample pseudo labels; detects sample overlapping areas based on the generated sample pseudo labels; and performs nearest neighbor undersampling based on the detected sample overlapping areas. The present invention introduces a multivariate hierarchical pseudo-labeling strategy based on different data categories and attribute differences, and combines a single-class support vector machine algorithm and a label propagation algorithm to form a double verification mechanism to improve the accuracy of pseudo labels; at the same time, the multivariate hierarchical framework of the present invention provides a more stable and accurate pseudo-label annotation by making full use of data distribution laws. The framework is not only suitable for semi-supervised learning in complex fields, but also expands new application directions for semi-supervised learning in data processing under imbalanced and overlapping coupling conditions. In response to the problems of class imbalance and overlapping coupling, the present invention adopts a minimum spanning tree strategy to find samples of different categories near the decision boundary, and while constructing overlapping areas, performs targeted undersampling processing on the distribution of minority class samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a general step flow chart of the present invention; Figure 2 It is a detailed operation diagram of the steps of the present invention; Figure 3 Schematic diagram of the lack of labels, class imbalance and overlapping datasets of the present invention; Figure 4 This is a schematic diagram of the majority of counterfeit labels of the present invention; Figure 5 This is a schematic diagram of the minority class counterfeiting labeling of the present invention; Figure 6 Schematic diagram of constructing the nearest neighbor minimum spanning tree of different types for the present invention; Figure 7 This is a schematic diagram of the distance between the inner and outer classes of the present invention; Figure 8 Schematic diagram of the execution process of the SSLU_LP algorithm of the present invention. DETAILED DESCRIPTION

[0040] The present invention is further described in detail below with reference to the accompanying drawings.

[0041] Semi-supervised learning undersampling methods for class imbalance and overlapping data classification, such as Figure 1 and Figure 2 As shown, the following steps are included: Step 1: Generate sample pseudo labels.

[0042] like Figure 3As shown in the figure, since samples in reality usually lack labels, subsequent classification tasks will be unable to process unlabeled samples, thus affecting the performance of the classifier. Therefore, it is very necessary to generate pseudo labels for samples, which also provides a basis for constructing overlapping areas. This step uses the OCSVM single-class classifier algorithm after parameter tuning to preliminarily solve the label division problem of some samples in the unlabeled sample set, and find the decision boundary between the majority class and the minority class, providing more accurate label information and decision boundary location for subsequent classification tasks.

[0043] This step includes the following sub-steps: Step 1.1: Divide the sample set into internal samples and samples far from the boundary by one-class support vector machine OCSVM: There are training samples ,That (N is the total number of samples), X is the set of training samples. yes The feature map of is the mapping to the dot product space. Represents a kernel function, among which the Gaussian kernel function is the most commonly used and flexible: ; Place the mapping in an infinite-dimensional space. and Sample to Special diagnosis mapping; As a hyperparameter of the kernel function; The OCSVM algorithm returns a function f that takes the value +1 in the region that captures the majority class sample points and takes the value -1 elsewhere. The decision boundary describes the training set to find a hyperplane. In feature space, it finds the hyperplane in such a way that the training samples in a region are separated by a hyperplane, using Partition hyperplane, where Determines the direction of the hyperplane, is the offset. For new points, the value It is determined by evaluating which side of the hyperplane the feature space falls on. In order to separate the sample set from the origin, solve the following quadratic programming: ; ; in, is the regularization coefficient. The indices i and j are considered to be in the range i...j (abbreviated as: ),in express dimensional vector, F is the original sample x after The new sample mapped out is is the sample set of the original sample set under the l-dimensional vector, non-zero slack variables To be penalized in the objective function; Regularization coefficient and the hyperparameters in the kernel function It is crucial in the formation of the hyperplane. Regularization coefficient When it is smaller, the hyperplane will place more samples on the hyperplane, thereby reducing the number of outliers, indicating that the training samples are considered to be beyond the upper limit of the decision boundary; while the hyperparameter Because it scales the distance between the two original values, for larger , the decision boundary becomes rough, prone to overfitting, and affects the locality of the decision boundary. Therefore, the range of hyperparameters can be set , then use All possible combinations are used to train OCSVM, and the optimal hyperparameter combination with the smallest classification error is selected to complete the training of OCSVM.

[0044] Step 1.2: Use the Lagrange formula to calculate the decision function and find the decision boundaries of different categories of samples.

[0045] Use Lagrange's formula to solve the decision function formula To find the decision boundaries of different categories of samples; ; in is the solution to the dual problem, For the sample, is the offset, with non-zero Sample , where the solution to the dual problem is found : ; Offset By using any The corresponding sample satisfy .

[0046] Step 1.3: Get the prediction result of the sample based on the decision boundary, and get some pseudo-label data sets at the same time.

[0047] According to the result returned by the decision function, the prediction result of sample x can be: 1) : The sample is an outlier or outlier, which also means that it is temporarily impossible to perform a pseudo-label operation on the sample; 2) : The sample has the same characteristics as the training set samples, so it belongs to the sample inside the decision boundary. The sample can be given a pseudo label that is consistent with the training set samples; After the initial division of the samples, some pseudo-label data sets can be obtained :

[0048] in, is the majority class sample set, such as Figure 4 As shown, including the majority class with known labels and the majority class with some pseudo labels of 0 in the unlabeled sample set , is a minority class sample set, such as Figure 5 As shown, including the minority class with known labels And the minority class with some pseudo labels of 1 in the unlabeled sample set , merge the majority class with pseudo labels of 0 and the minority class with pseudo labels of 1 in the unlabeled sample set into , is the remaining unlabeled sample set, To delete the false labeled samples; Based on the existing division, the present invention constructs a semi-supervised model algorithm that uses a double verification mechanism to fake labels to further determine the labels of the complete sample set; Assume that the closer the distance in the sample space is, the more likely it is to have the same sample label. So assume that the remaining unlabeled sample set just obtained is And delete the false labeled samples , the positional relationship between sample points is a directed complete graph. The closer the distance between samples, the more similar the features between sample points are, and the greater the corresponding weight is.

[0049] Step 1.4: Based on the remaining pseudo-label data set not obtained in step 1.3, use the label propagation algorithm to learn samples of different categories separately to obtain the remaining pseudo-label data set.

[0050] Through the known label samples obtained above ,in is the label corresponding to the sample set, and the majority class samples and minority class samples are distributed in two known label sample sets respectively. is a sample point without a label, where The specific value of is unknown; Calculate the weights between samples : ; is the hyperparameter controlling the weight, Representation sample and The weighted distance between ij is the data dimension, is the total data dimension, For sample Sample values ​​in dimension d, For sample Sample values ​​in d dimension; After calculating the weighted distance, we get the weight matrix W between the sample and the edge, which is a symmetric matrix. Then we calculate the transition probability between two samples and define the shape The probability transfer matrix T is: ; in represents the probability of sample j transferring to sample i. At this time, T is not a symmetric matrix, and P is the calculated probability The probability calculation value of is represented by j, where j is sample x at position j and i is sample x at position i. Then define a shape of The label matrix Y, each row of which is used to represent the probability distribution of each sample belonging to each category; Finally, you only need to iterate the following steps to get the prediction result of the unknown label sample; Step 1: Calculate the updated Y: ; Step 2: Standardize Y: ; Step 3: Replace the results at the known label positions in with the original correct samples, and then repeat the previous two steps until Y converges.

[0051] Step 1.5: Introduce a double verification mechanism to perform intersection screening and verification on the two groups of pseudo-label samples obtained in steps 1.3 and 1.4 to determine the pseudo-label data set of the complete samples.

[0052] The present invention adopts a mathematical verification method to obtain the intersection of the two pseudo-label sample sets, performs double verification on the labels, and obtains the final confirmed pseudo-label sample set. ; ; For samples in non-intersection areas, the NCL method is directly used to delete samples in this area. After using heterogeneous ensemble learning and double verification mechanisms to pseudo-label samples, it is necessary to continue to solve the problems of sample imbalance and class overlap. Therefore, it is necessary to continue to perform overlapping area detection and sampling techniques on samples to balance the sample set.

[0053] Step 2: Detect sample overlapping areas based on the sample pseudo labels generated in step 1.

[0054] For the characteristics of OCSVM region boundaries, such as Figure 6 As shown, according to the strategy of constructing a minimum spanning tree (MST), when there may be multiple connected edges in a graph and each edge in the graph has a weight, some edges are selected to generate a tree with n-1 edges, and the total cost of generating this tree is a tree with the smallest sum of the weights of each edge. That is, by scanning all points inside the decision boundary area, and calculating the distances between different points respectively, setting them as weight values, and then selecting the connection points with the smallest weight sum in different areas; First, input the sample set with pseudo labels near the decision boundary ;for Each sample in , calculate the distance matrix between the points in the new sample set : ; Receive the distance matrix between samples And the classification label of the sample Parameters, (if no parameters are passed, the default values ​​calculated in the function are used and .)according to Calculate the minimum spanning tree (MST). Traverse the MST and find the closest sample of the same type. Or different types of samples .Pick and Index of the sample .according to Extract points to form a new sample set and class labels . Count which samples are connected by edges but have different categories, that is ; Return specific It represents the sample value of the overlapping area.

[0055] Step 3: Perform nearest neighbor undersampling based on the sample overlap area detected in step 2.

[0056] Step 3.1: When undersampling, first give priority to protecting minority samples within the overlapping area; Step 3.2: Calculate the distance between each sample of the minority class (label=1) and its nearest neighbor of the same class ; Step 3.3: Calculate the distance between each sample of the minority class (label=1) and the nearest neighbor of the corresponding class. ; Step 3.4: Figure 7 As shown, judge , if greater than or equal to, delete The connected non-similar sample points, otherwise the non-similar sample points connected in step 3.3 are left; Step 3.5: Traverse the remaining samples until all input samples are calculated. If the algorithm reaches a safe point during calculation, no calculation will be performed in the next iteration until all input samples are calculated. Figure 8 shown.

[0057] It should be emphasized that the embodiments described in the present invention are illustrative rather than restrictive. Therefore, the present invention includes but is not limited to the embodiments described in the specific implementation manner. Any other implementation manners derived by those skilled in the art based on the technical solution of the present invention also fall within the scope of protection of the present invention.

Claims

1. Semi-supervised learning undersampling method for class imbalance and overlapping data classification, Features: The following steps are involved: Step 1: Based on the different data categories and attribute differences, a multi-layered anti-pseudo-labeling strategy is introduced and combined with a single-class support vector machine algorithm and a label propagation algorithm to form a double verification mechanism to generate sample pseudo-labels; Step 2: Detect sample overlapping areas based on the sample pseudo labels generated in step 1; Step 3: Perform nearest neighbor undersampling based on the sample overlap area detected in step 2.

2. The semi-supervised learning undersampling method for class imbalance and overlapping data classification according to claim 1, Features: The step 1 comprises the following steps: Step 1.1, divide the sample set into internal samples and far-boundary samples by one-class support vector machine OCSVM; Step 1.2: Use the Lagrange formula to calculate the decision function and find the decision boundaries of different categories of samples; Step 1.3: Get the prediction result of the sample according to the decision boundary, and get some pseudo-label data sets at the same time; Step 1.4: Based on the remaining pseudo-label data sets not obtained in step 1.3, use the label propagation algorithm to learn samples of different categories separately to obtain the remaining pseudo-label data sets; Step 1.5: Introduce a double verification mechanism to perform intersection screening and verification on the two groups of pseudo-label samples obtained in steps 1.3 and 1.4 to determine the pseudo-label data set of the complete samples.

3. The semi-supervised learning undersampling method for class imbalance and overlapping data classification according to claim 2, Features: The specific implementation method of the Lagrangian formula in step 1.2 for calculating the decision function is: ; in, is the solution to the dual problem, x is a sample, is the offset.

4. The semi-supervised learning undersampling method for class imbalance and overlapping data classification according to claim 3, Features: Part of the pseudo-label dataset obtained in step 1.3 for: ; in, is the majority class sample set, including the majority class with known labels and the majority class with some pseudo labels of 0 in the unlabeled sample set , is a minority class sample set, including the minority class with known labels And the minority class with some pseudo labels of 1 in the unlabeled sample set , merge the majority class with pseudo labels of 0 and the minority class with pseudo labels of 1 in the unlabeled sample set into , is the remaining unlabeled sample set, To delete the false labeled samples.

5. The semi-supervised learning undersampling method for class imbalance and overlapping data classification according to claim 4, Features: The specific implementation method of step 1.5 is: the two pseudo-label sample sets obtained in step 1.3 and step 1.4 are subjected to mathematical verification method, the intersection is taken, and the labels are double-verified to obtain the final determined pseudo-label sample set. : ; in, is the label value of the complete pseudo-label dataset, For samples in non-intersection areas, the cleaning NCL method is directly used to delete samples in this area.

6. The semi-supervised learning undersampling method for class imbalance and overlapping data classification according to claim 1, Features: The step 2 comprises the following steps: Step 2.1, construct a minimum spanning tree based on the sample pseudo labels obtained in step 1; Step 2.2: Detect sample overlapping areas using the minimum spanning tree.

7. The semi-supervised learning undersampling method for class imbalance and overlapping data classification according to claim 1, Features: The step 3 comprises the following steps: Step 3.1: First, give priority to protecting minority samples within the overlapping area; Step 3.2, calculate the distance between each sample example of the minority class sample and its nearest neighbor of the same class; Step 3.3, calculate the distance between each sample example of the minority class sample and the corresponding nearest neighbor of different classes; Step 3.4: If the distance calculated in step 3.2 is greater than or equal to the distance calculated in step 3.3, then delete the non-similar sample points connected in step 3.3; otherwise, keep the non-similar sample points connected in step 3.3; Step 3.5: Traverse the remaining samples until all input samples are calculated.