Imbalanced Data Classification Method Based on Cycle-Consistent Generative Adversarial Network

Synthesizing minority class samples through a loop-consistent generative adversarial network solves the problems of noise data sensitivity and insufficient feature space expansion in the existing technology, and improves the accuracy and performance of imbalanced data classification.

CN114943300BActive Publication Date: 2024-09-24XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210625335.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2024-09-24
Estimated Expiration
2042-06-02

AI Technical Summary

Technical Problem

Existing imbalanced data classification methods are highly sensitive when dealing with noisy data, and the feature space of synthetic samples is insufficiently expanded, resulting in difficulty in fitting the classifier to minority classes, low model prediction accuracy, and unstable classification boundaries.

Method used

A method based on cycle-consistent generative adversarial networks is adopted to synthesize realistic minority class samples by constructing twin data pairs and cycle-consistent generative adversarial networks, enhance the original data set, reduce noise data sensitivity and improve feature diversity.

Benefits of technology

It effectively improves the accuracy and classification performance of imbalanced data classification, reduces the impact of noise data on the model, enhances the feature diversity of minority class samples, and improves the stability of the classifier.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114943300B
    Figure CN114943300B
Patent Text Reader

Abstract

The present invention discloses an unbalanced data classification method based on a cycle-consistent generative adversarial network, which mainly solves the problems in the prior art that the classification model is sensitive to noise data, there is overlap between classes in the synthesized samples of the data layer method, and the diversity of the synthetic sample features is lacking. The implementation steps are: 1) preprocessing the original data set; 2) constructing a twin data pair set based on the preprocessed data; 3) designing a cycle-consistent generative adversarial network with two sets of discriminators and generators; 4) iteratively training the network model with data in the twin data pair set to synthesize the target minority class sample data; 5) enhancing the target minority class sample data to the original data set to obtain a balanced data set, and using the data set to train a basic classifier to complete the classification. The present invention can reduce the sensitivity of the classification model to noise data to a certain extent, effectively improve the accuracy of the classification results, improve the classification performance, and can be used for network anomaly detection.
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 processing, and further relates to imbalanced data classification, in particular to an imbalanced data classification method based on a cycle-consistent generative adversarial network, which can be used for network anomaly detection. Background Art

[0002] The problem of data imbalance is widely present in various data-driven industrial scenarios. In order to extract valuable information from large amounts of data, the most widely used data processing technology is classification. The purpose of imbalanced data classification is to improve the performance of the classifier by processing the imbalanced data. There are two main types of imbalanced data, namely intra-class imbalance and inter-class imbalance. Intra-class imbalance refers to the uneven distribution of samples of the same category in the feature space, while inter-class imbalance refers to the imbalance in the number of samples of different categories. The category with a larger number is called the majority class, and the category with a smaller number is called the minority class.

[0003] At present, the imbalanced data classification methods are mainly divided into two levels, namely the data level and the algorithm level. The data level method is implemented in the data preprocessing stage and directly processes the imbalanced data. This type of method usually undersamples the majority class to remove redundancy and oversamples the minority class samples to increase the number of samples. After that, the classifier is trained using the balanced data and the objective function is optimized to obtain the model parameters of the classifier. Different classifiers (such as deep neural networks and logistic regression) use different objective functions. The algorithm level method improves the design of the traditional classifier to reduce the bias towards the majority class samples when fitting the classification model, while strengthening its learning of the minority class sample features, thereby achieving imbalanced data classification. Classic imbalanced data classification techniques include the synthetic minority oversampling algorithm SMOTE and the adaptive boosting algorithm AdaBoost. In the imbalanced data classification process, the data set used to train the classifier is first subjected to a certain imbalance processing, and then the classification model is trained based on the balanced data set. Specifically, imbalanced data classification mainly performs the following three steps: 1) preprocessing the training data such as one-hot encoding and normalization; 2) using appropriate strategies to balance the training data with inter-class imbalance; 3) using the balanced data to iteratively train the classifier.

[0004] Most existing imbalanced data classification methods are based on data reuse, and do not really expand the feature space of imbalanced sample data, which makes it difficult for classifiers to fit the minority class. For imbalanced data classification, there is an urgent need for data classification technology that can not only solve conventional classification problems, but also deal with new problems brought by imbalanced data to classification tasks, such as poor model prediction accuracy, unstable classification boundaries, and lack of diversity in synthetic sample features. Summary of the invention

[0005] The purpose of the present invention is to address the deficiencies of the above-mentioned prior art and propose an unbalanced data classification method based on a cycle-consistent generative adversarial network, which is used to solve the problems in the existing unbalanced data classification technology that the classification model is sensitive to noise data, the data layer method has inter-class overlap in the synthesized samples, and the lack of diversity in the features of the synthesized samples. The method synthesizes minority class samples through a cycle-consistent generative adversarial network, and the splitting and reorganization of the minority class sample features to a certain extent reduces the possibility of overlap between the synthesized samples and the majority class samples, increases the diversity of the combined features of the minority class samples, and then enhances the synthesized samples to the original data set to achieve balanced processing of the training set, thereby improving the classification performance of the classifier for unbalanced data. The present invention can reduce the sensitivity of the classification model to noise data to a certain extent, effectively improve the accuracy of the classification results, and improve the classification performance.

[0006] The idea of ​​implementing the method of the present invention is as follows: a cycle-consistent generative adversarial network is designed, which is composed of two generative adversarial networks and has two groups of discriminators and generators. First, different minority class samples are combined into a twin data pair structure as the input data of the cycle-consistent generative adversarial network; then, the adversarial loss between the original data and the synthetic data, as well as the cycle-consistent loss between the original data and the synthesis-based restored data, is optimized to ensure the optimization of the overall cycle-consistent generative adversarial network, thereby synthesizing realistic minority class samples, so that the synthesized minority class samples have the combined characteristics of samples of different categories in the twin data pair; then the synthetic data is appended to the original data set as the training set of the classifier, and the classifier is iteratively optimized to finally achieve classification of unbalanced data.

[0007] The present invention achieves the above-mentioned purpose by the following specific steps:

[0008] (1) Preprocess the original data set to obtain the preprocessed data set:

[0009] (2) Constructing a set of twin data pairs:

[0010] (2.1) Calculate the average number of all classes in the preprocessed data set, use the decimal unit of the average number as the number unit, and determine that the class with less than this number unit is the target minority class;

[0011] (2.2) Using the quantity units obtained in step (2.1) as the target construction quantity of twin data pairs, randomly select data from the target minority class to construct twin data pairs;

[0012] (2.3) Output all twin data pairs in the form of a set;

[0013] (3) Establish a cycle-consistent generative adversarial network model:

[0014] (3.1) Construct two generators with the same structure, namely the first generator G XY and the second generator G YX , and then construct the common optimization objective of the two generators, namely the cycle-consistent loss function

[0015]

[0016] Among them, x represents a single training data, P data (x) represents the probability distribution of data in the training set, x~P data (x) indicates that the data x follows the probability distribution P data (x), Represents the distribution P data (x) calculates the function expectation for each training data x, y represents random noise data, P data (y) represents the noise data distribution, Indicates the calculation of the function expectation for each random noise data y, G XY (x) = Fake_Y represents the fake data synthesized by the generator based on data y, G YX (y) = Fake_X represents fake data synthesized by the generator based on data x;

[0017] (3.2) Construct two discriminators with the same structure, namely the first discriminator D X and the second discriminator D Y , and then construct the optimization objectives of the two discriminators, namely the first adversarial loss function and the second adversarial loss function

[0018]

[0019]

[0020] (3.3) According to the cycle consistent loss function First adversarial loss function and the second adversarial loss function Construct a global optimization objective, namely a cycle-consistent generative adversarial network model:

[0021]

[0022] Among them, λ is the control cycle consistent loss function The relative importance parameter of

[0023] (4) Synthesize target minority class sample data:

[0024] Set the maximum number of iterations to E and the stopping iteration threshold to ε, and use the data in the twin data set to iteratively train the network model constructed in step (3) until the function value of the current iteration is less than the threshold ε or reaches the maximum number of iterations E, and then output the synthetic fake data G XY (x) = Fake_Y, i.e., the synthesized target minority class sample data;

[0025] (5) The synthesized target minority class sample data is added to the preprocessed data set to obtain a balanced training data set, and the balanced data set is used to train the basic classifier to complete the classification of the imbalanced data.

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

[0027] First, since the method of the present invention takes into account the impact of noise data on classification performance and prediction accuracy, the minority class samples and noise data are synthesized together to solve the problem that the algorithm-level classification model is sensitive to noise data, thereby effectively improving the accuracy of imbalanced data classification.

[0028] Second, compared with the existing method of synthesizing minority class samples based on the interpolation operation of the original data, the present invention uses a cycle-consistent generative adversarial network to synthesize minority class samples. The generated samples are based on the splitting and reorganization of the original minority class sample features, which can avoid the overlap of the synthesized minority class samples and the majority class samples in the feature space to a certain extent, and solve the problem that the samples synthesized by the existing data layer classification method have overlaps between data classes in the feature space, resulting in unstable classification boundaries, thereby improving the classification performance of unbalanced data.

[0029] Third, the present invention utilizes the combined design of twin data pairs and cycle-consistent generative adversarial networks to solve the problem of insufficient diversity of data features synthesized by existing data layer classification methods, thereby improving the classification performance of unbalanced data. Existing data layer technologies synthesize data by interpolation. The location of the synthesized data in the feature space is usually densely distributed near the original minority class samples. The feature diversity of the synthesized samples is scarce, which is not conducive to the fitting of the classification model to the features of the minority class samples. The present invention constructs twin data pairs for minority class samples to ensure that the combined features that can be learned by the cycle-consistent generative adversarial network are highly cross-linked. The splitting and reorganization of the original sample features ensures the single feature distribution of the synthesized samples, while increasing the diversity of the combined features, which is conducive to the classification model learning the mapping relationship between features and category labels, thereby improving the classification performance of unbalanced data. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 Flow chart for realizing the method of the present invention;

[0031] Figure 2It is a schematic diagram of the overall structure of the network in the method of the present invention;

[0032] Figure 3 A generator structure diagram of a cycle-consistent generative adversarial network in the method of the present invention;

[0033] Figure 4 A discriminator structure diagram of a cycle-consistent generative adversarial network in the method of the present invention;

[0034] Figure 5 Schematic diagram of the adversarial structure of the generator and discriminator of the cycle-consistent generative adversarial network in the method of the present invention. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with specific examples and drawings.

[0036] See attached Figure 1 The algorithm structure of the imbalanced data classification method based on the cycle-consistent generative adversarial network proposed in the present invention mainly includes three parts: twin data pairs, cycle-consistent generative adversarial networks and basic classifiers, which are as follows:

[0037] Twin data pairs: Twin data pairs are formed based on the pairing of minority class samples. Depending on whether the categories of the paired samples are the same, they are divided into positive sample pairs with the same category and negative sample pairs with different categories. For example, for minority classes X and Y, the corresponding positive sample pairs are (X, X) and (Y, Y), and the negative sample pairs are (X, Y) and (Y, X).

[0038] Cycle-consistent GAN: Cycle-consistent GAN consists of four sub-entities, namely two generators G XY , G YX and two discriminators D X , D Y The cycle-consistent generative adversarial network synthesizes target minority samples based on twin data. The network structure optimizes the generator G through multiple iterations. XY , G YX and the discriminator D X , D Y , and finally output the same distribution of Fake_X or Fake_Y as the synthetic target minority class sample. XY and G YX are two generators with the same structure but different functions, G XY Based on X domain data, Y domain data is synthesized, G YX Synthesize X domain data based on Y domain data. X and D Y These are two discriminators with the same structure but different functions; D X The discriminant is data X and Fake_X, DY The discriminator D is used to distinguish data Y and Fake_Y. X The role of is to calculate the adversarial loss based on data X and fake data Fake_X to optimize itself and YX Optimize feedback; Discriminator D Y The role of is to calculate the adversarial loss based on data Y and fake data Fake_Y to optimize itself and XY Provide optimization feedback.

[0039] Basic classifier: The basic classifier can be freely selected according to needs, such as logistic regression (LR), K-nearest neighbor algorithm (KNN), decision tree (DT), support vector machine (SVM), random forest (RF), Gaussian naive Bayes (GaussianNB), deep neural network (DNN), etc. The minority class samples synthesized by the cycle-consistent generative adversarial network will be enhanced to the original data set to achieve balanced data processing. The balanced data is used as the training set of the basic classifier. After iterative optimization, the classification of unbalanced data is finally achieved.

[0040] Reference Figure 1-5 The imbalanced data classification method based on cycle-consistent generative adversarial network proposed in the present invention comprises the following steps:

[0041] Step 1: Preprocess the original data set:

[0042] (1.1) Process missing values, null values ​​and redundancy in the data set;

[0043] (1.2) performing one-hot encoding on the state information items in the data set obtained after processing in step (1.1);

[0044] (1.3) normalizing the numerical items in the data set obtained in step (1.2);

[0045] (1.4) According to the category labels, the data set obtained after normalization is split into multiple subsets to complete the preprocessing of the original data set and obtain the preprocessed data set.

[0046] Step 2: Build twin data pairs:

[0047] (2.1) Calculate the average number of all classes in the preprocessed data set, and use the decimal unit of the average number as the number unit for determining the minority class. Classes with less than this number unit will be determined as the target minority class;

[0048] (2.2) Using the quantity unit obtained in step (2.1) as the target number of twin data pairs, randomly select data from the target minority class to construct positive sample pairs and negative sample pairs, namely, twin data pairs (X,X), (Y,Y), (X,Y) and (Y,X);

[0049] (2.3) Output all the twin data pairs constructed in step (2.2) in the form of a set.

[0050] Step 3: Construct a cycle-consistent generative adversarial network and use twin data pairs to train the network to synthesize target minority class sample data.

[0051] (3.1)Reference Figure 3 , construct two generators with the same structure, namely the first generator G XY and the second generator G YX , and then construct the common optimization objective of the two generators, namely the cycle-consistent loss function The activation function used in the two-dimensional convolutional layer of the two generators is the leaky rectified linear unit LeakyReLU, and the gradient optimization method is adaptive gradient descent Adam; the cycle-consistent loss function The expression is as follows:

[0052]

[0053] Among them, x represents a single training data, P data (x) represents the probability distribution of data in the training set, x~P data (x) indicates that the data x follows the probability distribution P data (x), Represents the distribution P data (x) calculates the function expectation of all training data x, y represents random noise data, P data (y) represents the noise data distribution, Indicates the calculation of the function expectation for all random noise data y, G XY (x) = Fake_Y represents the fake data synthesized by the generator based on data y, G YX (y) = Fake_X represents fake data synthesized by the generator based on data x;

[0054] (3.2)Reference Figure 4 , construct two discriminators with the same structure, namely the first discriminator D X and the second discriminator D Y , and then construct the optimization objectives of the two discriminators, which are two combined optimization objectives, as follows:

[0055] The first generator G XY and the second discriminator DY Combine and construct the first combined optimization objective, that is, the first adversarial loss function The second generator G YX and the first discriminator D X Combine and construct the second combined optimization objective, that is, the second adversarial loss function The activation function of the two-dimensional convolutional layer of the two discriminators is the leaky rectified linear unit LeakyReLU, and the gradient optimization method is adaptive gradient descent Adam; the adversarial loss function and The specific expression is as follows:

[0056]

[0057]

[0058] (3.3)Reference Figure 2 and Figure 5 , according to the cycle-consistent loss function First adversarial loss function and the second adversarial loss function Construct a global optimization objective, namely a cycle-consistent generative adversarial network model:

[0059]

[0060] Among them, λ is the control cycle consistent loss function The relative importance parameter of , the global optimization method is stochastic gradient descent SGD;

[0061] In the cycle-consistent generative adversarial network, the generator G XY The function of G is to generate fake data Fake_Y based on data X, and to generate the restored data Y' of data Y based on fake data Fake_X; conversely, G YX The function is to generate fake data Fake_X based on data Y, and to generate restored data X' of data X based on fake data Fake_Y; and to simultaneously perform G by calculating the cycle consistency loss of data X and restored data X' respectively. XY and G YX Perform constrained optimization. Discriminator D X The role of is to calculate the adversarial loss based on data X and fake data Fake_X to optimize itself, D Y Similarly, the global optimization loss function is finally calculated based on the cycle consistency loss and adversarial loss.

[0062] (3.4) The network model constructed in step (3.4) is trained with the twin data set. The process is as follows: set the maximum number of iterations to E, the stopping iteration threshold to ε, and start iterative training until the function value of the current iteration is less than the threshold ε or the maximum number of iterations E is reached. Output the fake data G synthesized by the generator based on the data y in the current iteration XY (x) = Fake_Y, i.e., the synthesized target minority class sample data;

[0063] Step 4: Enhance the synthesized target minority class sample data to the original data set to achieve data balancing, and train the basic classifier based on the balanced data set after balancing, as follows:

[0064] (4.1) Add the data synthesized in step (3.4) to the preprocessed data set to obtain a balanced training data set;

[0065] (4.2) Use the balanced data set to train the basic classifier to complete the classification of imbalanced data.

[0066] The effects of the present invention are further described below in conjunction with experimental examples.

[0067] The imbalanced data comes from two datasets commonly used in anomaly detection, NSL-KDD and UNSW-NB15. The data distribution of the NSL-KDD dataset is shown in Table 1. There is one normal data (Normal) and four abnormal data types, namely, denial of service attack (DoS), probe attack (Probe), remote to local attack (R2L) and local privilege escalation attack (U2R). The data distribution of the UNSW-NB15 dataset is shown in Table 2. There is one normal data (Normal) and nine abnormal data types, namely, fuzzers, analysis (port scan), backdoors (backdoor attack), DoS (denial of service attack), exploits (vulnerability exploit), generic (generic attack), reconaissance (reconnaissance attack), shell attack (Shellcode) and worm attack (Worms).

[0068] Table 1 Data distribution of NSL-KDD dataset

[0069] category Normal DoS Probe R2L U2R Sample size 67343 11656 45927 995 52

[0070] Table 2 Data distribution of UNSW-NB15 dataset

[0071] category Sample size Normal 2218761 Fuzzers 24246 Analysis 2677 Backdoors 2329 DoS 16353 Exploits 44525 Generic 215481 Reconnaissance 13987 Shellcode 1511 Worms 174

[0072] This experiment uses the TensorFlow framework and conducts programming experiments based on the Python language. The detailed process is as follows:

[0073] 1) Preprocessing the original data set: There are some missing values, null values ​​and redundant items in the original NSL-KDD and UNSW-NB data sets. In order to ensure the universality of different data sets, the state information items are encoded and the numerical items are normalized; in order to screen the minority classes that need data synthesis, the subsets are split according to the category labels;

[0074] 2) Select appropriate minority class samples to construct twin data pairs: According to the average data of samples of different categories in Table 1 and Table 2, it is determined that the balanced data units of the NSL-KDD and UNSW-NB15 datasets are both 10,000, and the categories with less than 10,000 are selected to construct minority class samples; the minority classes selected in NSL-KDD are U2R and R2L, and the minority classes selected in UNSW-NB15 are Analysis, Backdoors, Shellcode, and Worms; Randomly select data from these minority classes to construct positive and negative sample pairs, and output them in the form of sets;

[0075] 3) Training the cyclically consistent generative adversarial network to synthesize target minority class sample data: First, the generator and discriminator networks are constructed according to the feature dimensions of the data, and then parameter training is performed based on the initialization parameters. The training cyclically consistent generative adversarial network is used to synthesize target minority class sample data. The steps are as follows:

[0076] (3.a) According to the attached Figure 2 The generator structure shown in the figure and the generator parameters shown in Table 3 are used to construct a generator G with the same structure. XY and G YX , and then according to the attached Figure 1 Build generator G XY and G YX The common optimization goal of Among them, the activation function (activation) used by the two-dimensional convolution layer (Convolution2D) is the leaky rectified linear unit (LeakyReLU), the batch normalization layer (BatchNormalization) uses the default parameters, the size (size) of the two-dimensional upsampling layer (UpSampling2D) is 1, and the optimizer is adaptive gradient descent (Adam);

[0077] Table 3 Cycle-consistent generative adversarial network parameter settings

[0078]

[0079]

[0080] (3.b) According to the attached Figure 3 The discriminator structure shown in the figure and the discriminator parameters shown in Table 3 are used to construct a discriminator D with the same structure. X and D Y , the discriminator uses the adversarial loss function Optimize, this function calculates the mean square error (mse) of the target variable Fake_Y and Y. Similarly, the generator G YX and the discriminator D X Combine them separately to construct the combined optimization objective, that is, the adversarial loss function This function calculates the mean square error of the target variables Fake_X and X. The activation function of the two-dimensional convolutional layer of the two discriminators is the leaky rectified linear unit (LeakyReLU), the momentum of the two-dimensional upsampling layer is 0.8, and the gradient optimization method is adaptive gradient descent (Adam);

[0081] (3.c) According to the attached Figure 1 and attached Figure 4 The structure shown combines the adversarial structures of the generator and the discriminator, and combines the adversarial network structure parameters of the generator and the discriminator shown in Table 3 to construct the global optimization objectives of the discriminator and the generator. This function calculates the mean square error (mse) and mean absolute error (mae) of the target variable, and the global optimization method is stochastic gradient descent (SGD);

[0082] (3.d) batch-process the twin data pairs (X,X), (Y,Y), (X,Y), and (Y,X) for training the cycle-consistent generative adversarial network constructed in steps (3.a) to (3.c), i.e., for the global loss function Perform E iterations until its value is less than the threshold ε, and output the synthetic data G of this iteration stage XY (x) = Fake_Y, which is the target minority class sample to be synthesized;

[0083] 4) Enhance the synthesized target minority class sample data to the original data set to achieve data balance processing. The steps are as follows:

[0084] (4.1) The data synthesized in step (3.d) is augmented into the original datasets NSL-KDD and UNSW-NB15 preprocessed in step (1) to obtain a relatively balanced training dataset;

[0085] (4.2) Use the balanced dataset to train the basic classifier and finally complete the classification of the unbalanced datasets NSL-KDD and UNSW-NB15.

[0086] This experiment uses accuracy, precision, detection rate, false alarm rate, F1 score, G-mean value and AUC value as quantitative evaluation criteria.

[0087] The classic synthetic minority oversampling method (SMOTE) is used as a control benchmark, and eight commonly used basic classifiers are combined for effect comparison. The selected basic classifiers are logistic regression (LR), support vector machine (SVM), deep neural network (DNN), decision tree (DT), K nearest neighbor (KNN), random forest (RF), Gaussian naive Bayes (GaussianNB) and adaptive boosting algorithm (AdaBoost). The experimental results are shown in Tables 4 and 5, and the methods proposed in the tables are the methods used in the present invention.

[0088] Table 4 Classification performance of different methods on the NSL-KDD dataset.

[0089]

[0090]

[0091] Table 5 Classification performance of different methods on the UNSW-NB15 dataset.

[0092]

[0093]

[0094] The above experimental data analysis proves the correctness and effectiveness of the method proposed in the present invention.

[0095] Parts of the present invention that are not described in detail belong to common knowledge among those skilled in the art.

[0096] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Obviously, for professionals in this field, after understanding the content and principles of the present invention, they may make various modifications and changes in form and details without departing from the principles and structures of the present invention. However, these modifications and changes based on the ideas of the present invention are still within the scope of protection of the claims of the present invention.

Claims

1. A method for imbalanced data classification based on a cycle-consistent generative adversarial network, comprising the following steps: (1) Preprocess the original data set to obtain the preprocessed data set: (2) Constructing a twin data pair set: (2.1) Calculate the average number of all classes in the preprocessed data set, use the decimal unit of the average number as the number unit, and determine that the class with less than this number unit is the target minority class; (2.2) Using the quantity units obtained in step (2.1) as the target construction quantity of twin data pairs, randomly select data from the target minority class to construct twin data pairs; (2.3) Output all twin data pairs in the form of a set; (3) Establish a cycle-consistent generative adversarial network model: (3.1) Construct two generators with the same structure, namely the first generator G XY and the second generator G YX , and then construct the common optimization objective of the two generators, namely the cycle-consistent loss function in, x represents a single training data, P data (x) represents the probability distribution of data in the training set, x~P data (x) indicates that the data x follows the probability distribution P data (x), Represents the distribution P data (x) calculates the function expectation for each training data x, y represents random noise data, P data (y) represents the noise data distribution, Indicates the calculation of the function expectation for each random noise data y, G XY (x) = Fake_Y represents the fake data synthesized by the generator based on data y, G YX (y) = Fake_X represents fake data synthesized by the generator based on data x; (3.2) Construct two discriminators with the same structure, namely the first discriminator D X and the second discriminator D Y , and then construct the optimization objectives of the two discriminators, namely the first adversarial loss function and the second adversarial loss function (3.3) According to the cycle consistent loss function First adversarial loss function and the second adversarial loss function Construct a global optimization objective, namely a cycle-consistent generative adversarial network model: Among them, λ is the control cycle consistent loss function The relative importance parameter of (4) Synthesize target minority sample data: Set the maximum number of iterations to E and the stopping iteration threshold to ε, and use the data in the twin data set to iteratively train the network model constructed in step (3) until the function value of the current iteration is less than the threshold ε or reaches the maximum number of iterations E, and then output the synthetic fake data G XY (x) = Fake_Y, i.e., the synthesized target minority class sample data; (5) The synthesized target minority class sample data is added to the preprocessed data set to obtain a balanced training data set, and the balanced data set is used to train the basic classifier to complete the classification of the imbalanced data.

2. The method according to claim 1, characterized in that: In step (1), the original data set is preprocessed, including the following steps: (1.1) Process missing values, null values ​​and redundancy in the data set; (1.2) performing one-hot encoding on the state information items in the data set obtained after processing in step (1.1); (1.3) normalizing the numerical items in the data set obtained in step (1.2); (1.4) According to the category labels, the normalized data set is split into multiple subsets to obtain the preprocessed data set.

3. The method according to claim 1, characterized in that: The twin data pairs constructed in step (2.2) are based on the pairing of minority class samples. Depending on whether the categories of the paired samples are the same, they are divided into positive sample pairs with the same category and negative sample pairs with different categories.

4. The method according to claim 1, characterized in that: The optimization objectives of the two discriminators in step (3.2) are two combined optimization objectives, as follows: The first generator G XY and the second discriminator D Y Combine and construct the first combined optimization objective, that is, the first adversarial loss function The second generator G YX and the first discriminator D X Combine and construct the second combined optimization objective, that is, the second adversarial loss function 5. The method according to claim 1, characterized in that: The activation function used in the two generators in step (3.1) and the two discriminators in step (3.2) for their two-dimensional convolutional layers is the leaky rectified linear unit LeakyReLU, and the gradient optimization method is the adaptive gradient descent Adam.

6. The method according to claim 1, characterized in that: In step (3.3), global optimization is performed using stochastic gradient descent (SGD).

7. The method according to claim 1, characterized in that: The basic classifier in step (5) is selected as needed, and the optional classifiers include at least logistic regression, K nearest neighbor algorithm, decision tree, support vector machine, random forest, Gaussian naive Bayes and deep neural network.