Unbalanced fraud detection method based on WGAN-GP oversampling
By using WGAN-GP generative adversarial network and ensemble learning methods, the imbalanced data problem in fraud detection is solved, high-quality fraud samples are generated, the accuracy and robustness of detection are improved, and classification performance is optimized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANHUI NORMAL UNIV
- Filing Date
- 2026-01-07
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies suffer from data imbalance in fraud detection. Traditional oversampling methods are prone to generating redundant or noisy data, and the applicability of algorithm-level methods is limited, making it difficult to achieve optimal performance on different datasets.
We employ WGAN-GP generative adversarial network, combined with an information value weighting mechanism, to generate high-quality fraud transaction samples. We then use ensemble learning to build a strong classifier for dynamic filtering and supplementation, forming a balanced dataset.
It effectively alleviates the redundancy and noise problems of traditional oversampling methods, improves the classification performance and generalization ability of fraud detection, and demonstrates good robustness and applicability, especially in terms of G-mean and AUC.
Smart Images

Figure CN121883015A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security detection technology, and in particular to an imbalanced fraud detection method based on WGAN-GP oversampling. Background Technology
[0002] Credit card fraud has become a problem that cannot be ignored in the field of financial security, especially in today's Internet age, where fraudulent transactions are more frequent than ever before.
[0003] In the existing technology, a large number of data imbalance learning methods have been developed to solve the data imbalance problem, which can be divided into data-level methods and algorithm-level methods.
[0004] Algorithm-level methods aim to emphasize learning the minority class by changing training strategies or prediction rules. While they can reduce the impact of class imbalance on classifiers, they require modification of the loss function to achieve optimal performance for different datasets, which greatly limits their applicability.
[0005] Data-level methods aim to improve the original data distribution to alleviate class imbalance. This can be achieved by removing majority class samples (undersampling), adding minority class samples (oversampling), or a hybrid sampling method that combines both. Because of their different implementation methods, they have different application scenarios. Oversampling methods are particularly suitable for imbalanced fraud detection tasks. However, existing oversampling techniques are prone to generating redundant or noisy synthetic fraud transactions.
[0006] Therefore, an imbalanced fraud detection method based on WGAN-GP oversampling is proposed to solve the above problems. Summary of the Invention
[0007] The purpose of this invention is to provide an imbalanced fraud detection method based on WGAN-GP oversampling, which improves the classification performance of imbalanced transaction datasets in fraud detection, thereby solving the class imbalance problem and improving the accuracy of fraud detection.
[0008] To achieve the above objectives, this invention provides an imbalanced fraud detection method based on WGAN-GP oversampling, comprising the following steps: S1: Replace the weight clipping in the Wasserstein Generative Adversarial Network (WGAN) with gradient penalty to obtain WGAN-GP; S2: Analyze the imbalanced transaction dataset; if the number of fraudulent transactions... N fraud Equal to normal transaction quantity N normal If the unbalanced transaction dataset is output as a balanced transaction dataset, otherwise proceed to step S3. S3: Calculate the information value of the imbalanced transaction dataset. Information values based on imbalanced transaction datasets Train WGAN-GP to generate fraudulent transaction samples; S4: Train n base classifiers using ensemble learning, integrate the n base classifiers into a strong classifier, and calculate the judgment of the strong classifier samples. The sum of the weights of the base classifiers for fraudulent transactions C * 1( ), Judging strong classifier samples The sum of the weights of the base classifiers for normal transactions C * 2( ); S5: Based on the calculation results of the strong classifier, perform fraudulent transaction ensemble screening, dividing fraudulent transactions into qualified generated fraudulent transactions and unqualified generated fraudulent transactions. Qualified generated fraudulent transactions are added to the imbalanced transaction dataset. Steps S2-S5 are repeated until the number of fraudulent transactions reaches a certain threshold. N fraud Equal to normal transaction quantity N normal Output a balanced transaction dataset.
[0009] Preferably, step S3 specifically includes the following steps: S31: Calculate the information value of the imbalanced transaction dataset Information values of imbalanced transaction datasets Specifically set as follows: ; in, This indicates the original fraudulent transaction. This indicates the density factor carried by fraudulent transactions. This indicates the distance factor carried by fraudulent transactions; S32: Normalize the information values of the imbalanced transaction dataset. Information weights converted to an imbalanced trading dataset Information weights of imbalanced transaction datasets Specifically set as follows: ; in, n Indicates the number of samples in the imbalanced transaction dataset; S33: Weight the information of the imbalanced transaction dataset Input WGAN-GP, and then analyze the discriminant network of WGAN-GP. D and generative networks G The system is trained to generate new fraudulent transactions.
[0010] Preferably, in step S31, the density factor carried by the fraudulent transaction Specifically set as follows: ; in, T i Indicates the original fraudulent transaction of Nearest neighbor set Represents a set T i The number of normal transactions in China; Distance factor carried by fraudulent transactions Specifically set as follows: ; ; in, This represents a collection of fraudulent transactions. Indicates the original fraudulent transaction Nearest neighbor transactions, Indicates the original fraudulent transaction Transactions with nearest neighbor The Euclidean distance between them Indicates the original fraudulent transaction The serial number, This represents the number of features in an imbalanced transaction dataset. Indicates the first An original fraudulent transaction , Indicates the first An original fraudulent transaction Nearest neighbor transactions .
[0011] Preferably, step S33 specifically includes the following steps: Step 1: Generate random numbers using a roulette wheel algorithm with uniform distribution. Compare random numbers Information weight The cumulative probability is determined by the following comparison method: ; in, Information weight The probability, express Individual information weights The cumulative probability, Indicates the preceding Individual information weights The cumulative probability; Step 2: Select the original fraudulent transaction based on the comparison results. Through the original fraudulent transaction Discriminant network for WGAN-GP D and generative networks G Train and judge the network D and generative networks G objective function Specifically set as follows: ; in, This represents fraudulent transactions that conform to the original fraudulent transaction distribution. Discriminator Discrimination The probability of fraudulent transactions. Expressing expectations, This represents fraudulent transactions that follow a distribution that generates fraudulent transactions. This represents the distribution of generated fraudulent transactions. Discriminator Discrimination The probability of fraudulent transactions. This represents sampled fraudulent transactions along the straight line between the generated fraudulent transaction distribution and the original fraudulent transaction distribution. This represents the distribution along the straight line between the generated fraud transaction distribution and the original fraud transaction distribution. Discriminator Discrimination The probability of fraudulent transactions. Represents the gradient penalty coefficient. Indicates gradient penalty; Step 3: After training, the generator network of WGAN-GP is used. G Generate new fraudulent transactions to obtain fraudulent transaction samples.
[0012] Preferably, step S4 specifically includes the following steps: S41: For the original fraudulent transaction Assign equal weights According to weight A balanced trading training set is selected with proportional probability. A base classifier is trained using the balanced trading training set, and the weighted error rate of the base classifier is calculated. Weighted error rate Specifically set as follows: ; in, Represents base classifier samples The serial number, Represents base classifier samples The prediction category Represents base classifier samples The true category, The decision condition for the base classifier is that if the predicted class is different from the true class... Take 1, otherwise Set to 0; S42: Based on weighted error rate Calculate the weights of the base classifier Weights of the base classifier Specifically set as follows: ; S43: By weighted error rate Weights of base classifiers Update the original fraudulent transaction weight Updated weights Specifically set as follows: ; in, This indicates the weights before the update. This indicates an updated original fraudulent transaction. The sum of their weights; S44: Combine n base classifiers into a strong classifier, and calculate the samples that determine the strong classifier. The sum of the weights of the base classifiers for fraudulent transactions C * 1( ), Judging strong classifier samples The sum of the weights of the base classifiers for normal transactions C * 2( ).
[0013] Preferably, in step S44, the selection strategy for strong classifiers... Specifically set as follows: ; in, Indicates the weights of the strong classifier. Represents strong classifier samples The prediction category Represents strong classifier samples The true category, These are the decision conditions for a strong classifier.
[0014] Preferably, in step S5, fraudulent transactions are integrated and screened based on the calculation results of the strong classifier, specifically including the following steps: Step 1: If C * 1( (greater than)C * 2( Then the strong classifier samples To generate fraudulent transactions that are deemed legitimate; Step Two: If C * 1( Not greater than C * 2( Then the strong classifier samples To generate fraudulent transactions that are not qualified.
[0015] Therefore, the imbalance fraud detection method based on WGAN-GP oversampling described above has the following beneficial effects: (1) This scheme adopts WGAN-GP combined with information value weighting mechanism, which can generate high-quality fraud transaction samples that are close to the original distribution, effectively alleviating the problem that traditional oversampling methods are prone to generating redundant or noisy data; (2) This scheme constructs a strong classifier through ensemble learning, and dynamically filters and supplements the generated fraud samples, thereby improving the classifier's discrimination ability and generalization performance while balancing the dataset; (3) This scheme demonstrates excellent classification performance on multiple real and synthetic datasets. Its G-mean and AUC metrics are superior to those of mainstream comparison methods, showing good robustness and applicability.
[0016] The method of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0017] Figure 1 This is a flowchart of an imbalance fraud detection method based on WGAN-GP oversampling according to the present invention; Figure 2 This is a schematic diagram of the network structure of WGAN-GP of the present invention; Figure 3 The weighted error rate of this invention A diagram illustrating the impact on strong classifiers. Detailed Implementation
[0018] The method of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0019] Unless otherwise defined, the methodological or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.
[0020] The terms "comprising" or "including" as used in this invention mean that the element preceding the term encompasses the element listed after the term, and do not exclude the possibility of encompassing other elements. Terms such as "inner," "outer," "upper," and "lower" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. When the absolute position of the described object changes, the relative positional relationship may also change accordingly. In this invention, unless otherwise explicitly specified and limited, the term "attached" and similar terms should be interpreted broadly. For example, it can refer to a fixed connection, a detachable connection, or an integral part; it can refer to a direct connection or an indirect connection through an intermediate medium; it can refer to the internal communication of two elements or the interaction relationship between two elements. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0021] Example like Figures 1-3 As shown, this invention provides an imbalanced fraud detection method based on WGAN-GP oversampling, comprising the following steps: S1: Due to the overly simplistic weight pruning, the Wasserstein Generative Adversarial Network (WGAN) has many shortcomings, such as the difficulty in setting the pruning threshold and the significant waste of the neural network's fitting ability. Therefore, the weight pruning in the Wasserstein Generative Adversarial Network (WGAN) is replaced with gradient penalty, resulting in WGAN-GP. S2: Analyze the imbalanced transaction dataset; if the number of fraudulent transactions... N fraud Equal to normal transaction quantity N normal If the unbalanced transaction dataset is output as a balanced transaction dataset, otherwise proceed to step S3. S3: Calculate the information value of the imbalanced transaction dataset. Information values based on imbalanced transaction datasets Train WGAN-GP to generate fraudulent transaction samples; Step S3 specifically includes the following steps: S31: Calculate the information value of the imbalanced transaction dataset Information values of imbalanced transaction datasets Specifically set as follows: ; in, This indicates the original fraudulent transaction. This indicates the density factor carried by fraudulent transactions. This indicates the distance factor carried by fraudulent transactions; In step S31, the density factor carried by the fraudulent transaction Specifically set as follows: ; in, T i Indicates the original fraudulent transaction of Nearest neighbor set Represents a set T i The number of normal transactions in China; Distance factor carried by fraudulent transactions Specifically set as follows: ; ; in, This represents a collection of fraudulent transactions. Indicates the original fraudulent transaction Nearest neighbor transactions, Indicates the original fraudulent transaction Transactions with nearest neighbor The Euclidean distance between them Indicates the original fraudulent transaction The serial number, This represents the number of features in an imbalanced transaction dataset. Indicates the first An original fraudulent transaction , Indicates the first An original fraudulent transaction Nearest neighbor transactions .
[0022] S32: Normalize the information values of the imbalanced transaction dataset. Information weights converted to an imbalanced trading dataset Information weights of imbalanced transaction datasets Specifically set as follows: ; in, n Indicates the number of samples in the imbalanced transaction dataset; S33: Weight the information of the imbalanced transaction dataset Input WGAN-GP, and then analyze the discriminant network of WGAN-GP. D and generative networks G The system is trained to generate new fraudulent transactions.
[0023] Step S33 specifically includes the following steps: Step 1: Generate random numbers using a roulette wheel algorithm with uniform distribution. Compare random numbers Information weight The cumulative probability is determined by the following comparison method: ; in, Information weight The probability, express Individual information weights The cumulative probability, Indicates the preceding Individual information weights The cumulative probability; Using the roulette wheel algorithm, information weights The larger the original fraud transaction The higher the probability of being selected, the more WGAN-GP can focus on learning information values. Large original fraud transaction Subsequent fraudulent transactions also became more similar to the original fraudulent transactions. The distribution of .
[0024] Step 2: Select the original fraudulent transaction based on the comparison results. Through the original fraudulent transaction Discriminant network for WGAN-GP D and generative networks G Train and judge the network D and generative networks G objective function Specifically set as follows: ; in, This represents fraudulent transactions that conform to the original fraudulent transaction distribution. Discriminator Discrimination The probability of fraudulent transactions. Expressing expectations, This represents fraudulent transactions that follow a distribution that generates fraudulent transactions. This represents the distribution of generated fraudulent transactions. Discriminator Discrimination The probability of fraudulent transactions. This represents sampled fraudulent transactions along the straight line between the generated fraudulent transaction distribution and the original fraudulent transaction distribution. This represents the distribution along the straight line between the generated fraud transaction distribution and the original fraud transaction distribution. Discriminator Discrimination The probability of fraudulent transactions. Represents the gradient penalty coefficient. This represents a gradient penalty, the purpose of which is to reduce the discrimination network... D The input norm should be as close to 1 as possible; if it is not equal to 1, a penalty is imposed, and the further it is from 1, the greater the penalty. Step 3: After training, the generator network of WGAN-GP is used. G Generate new fraudulent transactions to obtain fraudulent transaction samples.
[0025] S4: Train n base classifiers using ensemble learning, integrate the n base classifiers into a strong classifier, and calculate the judgment of the strong classifier samples. The sum of the weights of the base classifiers for fraudulent transactions C * 1( ), Judging strong classifier samples The sum of the weights of the base classifiers for normal transactions C * 2( ); Step S4 specifically includes the following steps: S41: For the original fraudulent transaction Assign equal weights According to weight A balanced trading training set is selected with proportional probability. A base classifier is trained using the balanced trading training set, and the weighted error rate of the base classifier is calculated. Weighted error rate Specifically set as follows: ; in, Represents base classifier samples The serial number, Represents base classifier samples The prediction category Represents base classifier samples The true category, The decision condition for the base classifier is that if the predicted class is different from the true class... Take 1, otherwise Set to 0; Weighted error rate This represents the classification performance of the base classifier; the larger the value, the worse the classification performance of the base classifier. When the weighted error rate... When the error rate is greater than 0.5, the classification performance of the ensemble strong classifier will be worse than that of the base classifier. Therefore, during training, it is necessary to adjust the weighted error rate. Base classifiers with a value greater than 0.5 should be repeatedly trained. Before repeated training, the weights need to be adjusted. Reset.
[0026] S42: Based on weighted error rate Calculate the weights of the base classifier Weights of the base classifier Specifically set as follows: ; Weights of base classifiers This represents the importance of the base classifier in the final strong classifier; the weights... The larger the value, the greater its impact on the classification results of the final strong classifier.
[0027] S43: By weighted error rate Weights of base classifiers Update the original fraudulent transaction weight Updated weights Specifically set as follows: ; in, This indicates the weights before the update. This indicates an updated original fraudulent transaction. The sum of their weights serves a standardization purpose; S44: Combine n base classifiers into a strong classifier, and calculate the samples that determine the strong classifier. The sum of the weights of the base classifiers for fraudulent transactions C * 1( ), Judging strong classifier samples The sum of the weights of the base classifiers for normal transactions C * 2( ).
[0028] In step S44, the selection strategy for strong classifiers Specifically set as follows: ; in, Indicates the weights of the strong classifier. Represents strong classifier samples The prediction category Represents strong classifier samples The true category, These are the decision conditions for a strong classifier.
[0029] S5: Based on the calculation results of the strong classifier, perform fraudulent transaction ensemble screening, dividing fraudulent transactions into qualified generated fraudulent transactions and unqualified generated fraudulent transactions. Qualified generated fraudulent transactions are added to the imbalanced transaction dataset. Steps S2-S5 are repeated until the number of fraudulent transactions reaches a certain threshold. N fraud Equal to normal transaction quantity N normal Output a balanced transaction dataset.
[0030] In step S5, fraudulent transactions are integrated and screened based on the calculation results of the strong classifier, specifically including the following steps: Step 1: If C * 1( (greater than) C * 2( Then the strong classifier samples To generate fraudulent transactions that are deemed legitimate; Step Two: If C * 1( Not greater than C * 2( Then the strong classifier samples To generate fraudulent transactions that are not qualified.
[0031] This embodiment uses two sets of fraudulent transaction datasets, namely dataset D1 and dataset D2. Dataset D1 is selected from the CreditCard dataset on the Kaggle website. This dataset records credit card transaction records of European cardholders over two consecutive days in September 2013. Among them, there are 492 fraudulent transactions, accounting for 0.172% of the total transaction data. Each transaction data consists of 30 features (time, ...). V 1 , V 2 ... V 28 The data consists of time, amount, and category (0 represents normal transactions, 1 represents fraudulent transactions). Except for time and amount, all features have been processed by PCA to protect the privacy of cardholders. Time features were removed from the dataset before the experiment, and the remaining features were normalized.
[0032] Dataset D2 is the IEEE-CIS fraud detection dataset provided by Vesta, covering e-commerce transaction records from September to December 2017, with a total of 590,540 samples. This dataset has a significant class imbalance feature, with an imbalance score of 27.58. The original data was divided into two independent files: identity information and transaction information. The two files can be merged by transaction number, and the merged dataset contains a total of 435 original features.
[0033] To address the large number of missing values in the data, this embodiment uses mean interpolation. Subsequent preprocessing steps also include feature selection and normalization operations, ultimately resulting in an optimized dataset containing 220 features.
[0034] To objectively and fairly verify the effectiveness of the proposed method, this embodiment comprehensively selects 10 current mainstream benchmark methods as comparison models from multiple dimensions. These methods address the class imbalance problem from different perspectives and can be specifically divided into the following categories: methods based on local information (SMOTE, MDO), methods based on conditional information (CGAN, CWGAN-GP), methods based on ensemble learning (C-GAN, E-GAN, SE-GAN), methods based on region selection (OREM), and methods based on diffusion models (TabDDPM, TabDiT).
[0035] The detailed parameter settings for each method are shown in Table 1. Ten-fold cross-validation is used to ensure the reliability of the results. The classifiers selected include Gaussian Naive Bayes, Random Forest, and Decision Tree.
[0036] Table 1: Comparison Method Parameter Table
[0037] On dataset D1, the method in this embodiment outperforms other algorithms in two metrics on the Gaussian Naive Bayes classifier: its geometric mean (G-mean) is improved by 0.24% compared to the suboptimal algorithm, and its area under the ROC curve (AUC) is improved by 0.09%. Although the harmonic mean (F1-score) of this algorithm is not optimal, it is still better than the half-compare algorithm. On the random forest classifier, the G-mean and AUC of the method in this embodiment are the best among all algorithms, with the G-mean being improved by 0.75% compared to the suboptimal algorithm.
[0038] It is worth noting that although its F1-score did not rank first, it still achieved second place. Similarly, in the decision tree classifier, the G-mean and AUC of the method in this embodiment reached the optimal level, with improvements of 1.15% and 1.01% respectively. This is also the largest performance improvement achieved by the algorithm on the three classifiers.
[0039] On dataset D2, the method in this embodiment performs best on the Gaussian Naive Bayes classifier, with its G-mean and AUC improving by 1.83% and 0.67% respectively compared to the second-best results, while ranking third in F1-score. On the random forest classifier, the algorithm's G-mean is improved by 1.58% and AUC by 1.32% compared to the second-best method. On the decision tree classifier, the method in this embodiment improves G-mean and AUC by 1.22% and 1.02% respectively, and its F1-score is better than most benchmark methods.
[0040] In summary, the method in this embodiment achieves optimal G-mean and AUC on all classifiers.
[0041] Therefore, the present invention adopts the above-mentioned imbalanced fraud detection method based on WGAN-GP oversampling, which generates targeted samples by using the information values of fraudulent transactions and uses ensemble learning to screen high-quality synthetic samples, effectively alleviating the class imbalance problem and improving the accuracy and robustness of fraud detection, especially showing excellent performance in G-mean and AUC indicators.
[0042] Finally, it should be noted that the above embodiments are only used to illustrate the method of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the method of the present invention, and these modifications or equivalent substitutions should not cause the modified method to deviate from the spirit and scope of the method of the present invention.
Claims
1. An imbalanced fraud detection method based on WGAN-GP oversampling, characterized in that, Includes the following steps: S1: Replace the weight clipping in the Wasserstein Generative Adversarial Network (WGAN) with gradient penalty to obtain WGAN-GP; S2: Analyze the imbalanced transaction dataset; if the number of fraudulent transactions... N fraud Equal to normal transaction quantity N normal If the unbalanced transaction dataset is output as a balanced transaction dataset, otherwise proceed to step S3. S3: Calculate the information value of the imbalanced transaction dataset. Information values based on imbalanced transaction datasets Train WGAN-GP to generate fraudulent transaction samples; S4: Train n base classifiers using ensemble learning, integrate the n base classifiers into a strong classifier, and calculate the judgment of the strong classifier samples. The sum of the weights of the base classifiers for fraudulent transactions C * 1( ), Judging strong classifier samples The sum of the weights of the base classifiers for normal transactions C * 2( ); S5: Based on the calculation results of the strong classifier, perform fraudulent transaction ensemble screening, dividing fraudulent transactions into qualified generated fraudulent transactions and unqualified generated fraudulent transactions. Qualified generated fraudulent transactions are added to the imbalanced transaction dataset. Repeat steps S2-S5 until the number of fraudulent transactions reaches a certain threshold. N fraud Equal to normal transaction quantity N normal Output a balanced transaction dataset.
2. The imbalance fraud detection method based on WGAN-GP oversampling according to claim 1, characterized in that, Step S3 specifically includes the following steps: S31: Calculate the information value of the imbalanced transaction dataset Information values of imbalanced transaction datasets Specifically set as follows: ; in, This indicates the original fraudulent transaction. This indicates the density factor carried by fraudulent transactions. This indicates the distance factor carried by fraudulent transactions; S32: Normalize the information values of the imbalanced transaction dataset. Information weights converted to an imbalanced transaction dataset Information weights of unbalanced transaction datasets Specifically set as follows: ; in, n Indicates the number of samples in the imbalanced transaction dataset; S33: Weight the information of the imbalanced transaction dataset Input WGAN-GP, and then analyze the discriminant network of WGAN-GP. D and generative networks G The system is trained to generate new fraudulent transactions.
3. The imbalance fraud detection method based on WGAN-GP oversampling according to claim 2, characterized in that, In step S31, the density factor carried by the fraudulent transaction Specifically set as follows: ; in, T i Indicates the original fraudulent transaction of Nearest neighbor set Represents a set T i The number of normal transactions in China; Distance factor carried by fraudulent transactions Specifically set as follows: ; ; in, This represents a collection of fraudulent transactions. Indicates the original fraudulent transaction Nearest neighbor transactions, Indicates the original fraudulent transaction Transactions with nearest neighbor The Euclidean distance between them Indicates the original fraudulent transaction The serial number, This represents the number of features in an imbalanced transaction dataset. Indicates the first An original fraudulent transaction , Indicates the first An original fraudulent transaction Nearest neighbor transactions .
4. The imbalance fraud detection method based on WGAN-GP oversampling according to claim 3, characterized in that, Step S33 specifically includes the following steps: Step 1: Generate random numbers using a roulette wheel algorithm with uniform distribution. Compare random numbers Information weight The cumulative probability is determined by the following comparison method: ; in, Information weight The probability, express Individual information weights The cumulative probability, Indicates the preceding Individual information weights The cumulative probability; Step 2: Select the original fraudulent transaction based on the comparison results. Through the original fraudulent transaction Discriminant network for WGAN-GP D and generative networks G Train and judge the network D and generative networks G objective function Specifically set as follows: ; in, This represents fraudulent transactions that conform to the original fraudulent transaction distribution. Discriminator Discrimination The probability of fraudulent transactions. Expressing expectations, This represents fraudulent transactions that follow a distribution that generates fraudulent transactions. This represents the distribution of generated fraudulent transactions. Discriminator Discrimination The probability of fraudulent transactions. This represents sampled fraudulent transactions along the straight line between the generated fraudulent transaction distribution and the original fraudulent transaction distribution. This represents the distribution along the straight line between the generated fraud transaction distribution and the original fraud transaction distribution. Discriminator Discrimination The probability of fraudulent transactions. Represents the gradient penalty coefficient. Indicates gradient penalty; Step 3: After training, the generator network of WGAN-GP is used. G Generate new fraudulent transactions to obtain fraudulent transaction samples.
5. The imbalance fraud detection method based on WGAN-GP oversampling according to claim 4, characterized in that, Step S4 specifically includes the following steps: S41: For the original fraudulent transaction Assign equal weights According to the weight A balanced trading training set is selected with proportional probability. A base classifier is trained using the balanced trading training set, and the weighted error rate of the base classifier is calculated. Weighted error rate Specifically set as follows: ; in, Represents base classifier samples The serial number, Represents base classifier samples The prediction category Represents base classifier samples The true category, The decision condition for the base classifier is that if the predicted class is different from the true class... Take 1, otherwise Set to 0; S42: Based on weighted error rate Calculate the weights of the base classifier Weights of the base classifier Specifically set as follows: ; S43: By weighted error rate Weights of base classifiers Update the original fraudulent transaction weight Updated weights Specifically set as follows: ; in, This indicates the weights before the update. This indicates an updated original fraudulent transaction. The sum of their weights; S44: Combine n base classifiers into a strong classifier, and calculate the samples that determine the strong classifier. The sum of the weights of the base classifiers for fraudulent transactions C * 1( ), Judging strong classifier samples The sum of the weights of the base classifiers for normal transactions C * 2( ).
6. The imbalance fraud detection method based on WGAN-GP oversampling according to claim 5, characterized in that, In step S44, the selection strategy for strong classifiers Specifically set as follows: ; in, Indicates the weights of the strong classifier. Represents strong classifier samples The prediction category Represents strong classifier samples The true category, These are the decision conditions for a strong classifier.
7. The imbalance fraud detection method based on WGAN-GP oversampling according to claim 6, characterized in that, In step S5, fraudulent transactions are integrated and screened based on the calculation results of the strong classifier, specifically including the following steps: Step 1: If C * 1( (greater than) C * 2( Then the strong classifier samples To generate fraudulent transactions that are deemed legitimate; Step Two: If C * 1( Not greater than C * 2( Then the strong classifier samples To generate fraudulent transactions that are not qualified.