Credit default detection enhanced resampling method and system based on category overlapping, and application
By combining resampling methods based on sample density, distance, and overlap, minority class samples are generated, solving the problem of class overlap in credit default detection and improving the performance of the classifier and the clarity of the decision boundary.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XINJIANG CHANGJI VOCATIONAL & TECH COLLEGE
- Filing Date
- 2026-02-04
- Publication Date
- 2026-05-19
AI Technical Summary
Existing resampling methods ignore class overlap in credit default detection, resulting in insufficient representativeness of synthesized minority class samples and making it difficult to effectively address the impact of data imbalance on classification performance.
Combining sample density, distance, and sample overlap, minority class samples are generated through oversampling and undersampling methods, focusing on the synthesis of difficult samples and alleviating the class overlap problem. The density factor and distance factor are calculated using Bray-Curtis distance, and new samples are synthesized using Gaussian distribution by selecting anchor points. Random undersampling is performed on the majority class samples.
It significantly improves the classification performance of credit default detection, effectively focuses on the synthesis of difficult samples, alleviates class overlap, and enhances the clarity of the classifier's decision boundary and classification effect.
Smart Images

Figure CN122065031A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of financial data processing technology, specifically relating to an enhanced resampling method and system for credit default detection based on category overlap, and its application. Background Technology
[0002] Against the backdrop of rapid development in financial markets, credit risk has become one of the major challenges facing commercial banks, and class imbalance is a common problem in credit default detection. Class imbalance means that the number of defaulting customers is far less than the number of normal customers. In this case, classifiers often fail to accurately capture defaulting customers, and misclassification of defaulting customers can lead to serious economic losses for banks. Currently, oversampling is a common method to solve the class imbalance problem. Common oversampling methods include Synthetic Minority Oversampling (SMOTE), Adaptive Synthetic Sampling (ADASYN), and Gaussian Distribution-based Oversampling (GDO). Class overlap refers to samples of different classes having similar features or values in the attribute space, making it difficult for classifiers to accurately distinguish between these classes. Existing resampling methods are mainly designed to balance the distribution of data classes, often ignoring the class overlap phenomenon in the data. This results in insufficient representativeness of the synthesized minority class samples, making it difficult to solve the impact of data imbalance on classification performance.
[0003] Class overlap refers to the phenomenon where samples from different classes have similar features or values in the attribute space, making it difficult for the classifier to accurately distinguish between these classes. Figure 1 shows a schematic diagram of the hyperplane of an imbalanced data classifier. As can be seen from the figure, class imbalance causes the decision boundary to be biased towards minority class samples. The data in Figure 1(a) is linearly separable, and class imbalance has no significant impact on the classification result. In contrast, the data in Figure 1(b) exhibits class overlap, and the classifier misclassifies minority class samples located at the decision boundary. We refer to the minority class samples within the class overlap region as hard samples. Because existing resampling methods ignore the existence of hard samples, the synthesized new samples are difficult to effectively solve the classification problem of imbalanced data. Therefore, in solving the classification problem of imbalanced credit data with class overlap, how to capture hard samples through sampling to alleviate the class overlap phenomenon is a challenge that urgently needs to be addressed.
[0004] In view of this, the present invention proposes an enhanced resampling method and system for credit default detection based on class overlap, and an application that combines three aspects: sample density, distance, and sample overlap, to synthesize minority class samples. This not only focuses on the synthesis of difficult samples, but also alleviates the problem of class overlap. Summary of the Invention
[0005] The purpose of this invention is to provide an enhanced resampling method for credit default detection based on class overlap. This method consists of oversampling and undersampling, combining sample density, distance, and sample overlap to synthesize minority class samples. This approach focuses on generating difficult samples while mitigating class overlap. To achieve the above objective, the technical solution adopted is as follows:
[0006] An enhanced resampling method for credit default detection based on category overlap is proposed as follows: after oversampling the minority class samples, the majority class samples are undersampled to adjust the number of minority class samples and majority class samples, thereby obtaining resampled data;
[0007] The oversampling process is as follows: based on the density, distance and class overlap of minority class samples, the differences between samples are identified to obtain the weights of minority class samples; after assigning weights to the minority class samples, anchor points are selected, and new samples are synthesized based on a Gaussian distribution;
[0008] The undersampling process involves randomly undersampling the majority class samples to remove some samples.
[0009] Furthermore, the minority class samples are used to calculate the density factor and distance factor based on the Bray-Curtis distance.
[0010] Furthermore, the density factor is used... It is represented and defined as: ;in, yes The number of majority class samples in the set;
[0011] The distance factor is used It is represented and defined as: ;in, ;
[0012] The class overlap of the minority class samples is used It is represented and defined as: ;in, .
[0013] Furthermore, the process of obtaining the minority class sample weights involves obtaining information weights based on the density factor, distance factor, and class overlap. and category overlap weight After normalization, the weighting factor is obtained. Standardization processing is required;
[0014] Among them, the information weight ;
[0015] The aforementioned category overlap weight ;
[0016] The weighting factor ; These are the information weights after normalization. and category overlap weight , It is a hyperparameter for class overlap weights.
[0017] Furthermore, after determining the minority class samples as anchor points, the process of synthesizing new samples is as follows:
[0018] (1) In the vector space, randomly select The direction is used as the synthetic new sample The direction is determined by defining the endpoints of the direction vector as... , direction vector Defined as: ;
[0019] (2) Gaussian distribution The generated random number is used as The length of is given by the formula: ;
[0020] in, =0, It is the scaling factor; standard deviation yes its nearest neighbor The Euclidean distance between them is defined as follows:
[0021] ;
[0022] (3) Calculation and The ratio of their lengths is denoted as: ;in, ;
[0023] (4) Based on the above relationship, the new sample is obtained through the following formula. The position vector, given by the formula: ;
[0024] (5) Calculate the synthesized new sample using the following formula. : .
[0025] Furthermore, the number of minority class samples and majority class samples in the resampled data satisfies the following relationship:
[0026] , ;
[0027] Among them, the oversampling rate is undersampling rate Minority class samples after the oversampling process are denoted as The majority class samples after the undersampling process are denoted as .
[0028] Another objective of this invention is to provide a credit default detection enhanced resampling system based on category overlap, for implementing the aforementioned credit default detection enhanced resampling method based on category overlap.
[0029] Another objective of this invention is to provide the application of the above-mentioned enhanced resampling method and system for credit default detection based on category overlap in credit default detection.
[0030] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0031] Credit customer samples commonly suffer from class imbalance, with different customer classes forming overlapping regions in the attribute space due to feature similarity or proximity. Minority class samples (i.e., hard samples) within these regions cause classifier performance instability at the decision boundary, thus reducing classification effectiveness. Existing resampling methods typically only uniformly balance samples within each class, ignoring the impact of hard samples in overlapping regions. To address this issue, this invention comprehensively considers the effectiveness of resampling methods and the class overlap problem in the dataset, proposing for the first time a credit default detection augmented resampling method (CREDCO) based on class overlap for credit default customer mining. First, the credit default detection task from the perspective of class overlap is discussed; specifically, an oversampling method focusing on hard sample synthesis is designed. This method combines three factors: minority class sample density, distance, and class overlap, and controls the degree of attention to hard samples through the hyperparameter δ. Subsequently, it is combined with dynamically adjusted random undersampling to avoid overfitting. This invention is extensively compared with mainstream resampling methods in seven real-world scenarios, and experimental results show that CREDCO achieves state-of-the-art performance. Furthermore, CREDCO can effectively focus on hard samples based on data characteristics, fit the true data distribution, and significantly alleviate the problem of overlapping sample categories, providing a novel solution for credit default detection tasks. The contributions of this invention are summarized as follows:
[0032] 1. A resampling method, CREDCO, for processing unbalanced credit data is proposed. It explores the credit default detection task under the condition of class overlap for the first time, providing a new idea for reducing customer credit risk and has high practical application value.
[0033] 2. An oversampling method for focusing on the generation of difficult samples was designed. For the first time, sample density, distance and sample overlap were combined to synthesize minority class samples.
[0034] 3. Using five credit datasets and two datasets from other domains, extensive experiments were conducted with different resampling methods to demonstrate the effectiveness of CREDCO in various application scenarios. At the same time, CREDCO can not only focus on the synthesis of hard samples, but also alleviate the problem of class overlap. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the hyperplane for an imbalanced data classifier.
[0036] Figure 2 This is a flowchart of the framework.
[0037] Figure 3 is a schematic diagram of the calculation of minority class sample weights.
[0038] Figure 4 This is a schematic diagram of the synthesis of a new sample.
[0039] Figure 5 The distribution of the synthesized samples is shown in the box (the area inside the box represents the overlapping area of the categories); in the figure, the darkest color represents the majority class sample, the lightest color represents the minority class sample, and the rest are newly generated samples.
[0040] Figure 6 In the distribution of the synthetic samples (the boxes indicate overlapping areas of the categories), the darkest color represents the majority class samples, the lightest color represents the minority class samples, and the rest are newly generated samples.
[0041] Figure 7 The effect of δ on CREDCO performance is shown in the Rural Credit and German datasets; from left to right, the results are LR, LDA, KNN, and LightGBM.
[0042] Figure 8 The effect of δ on CREDCO performance in the Lending Club and Irish Dummy Banks datasets; from left to right, LR, LDA, KNN, and LightGBM.
[0043] Figure 9 The effect of δ on CREDCO performance in the Financial Institution dataset is shown; from left to right, the results are LR, LDA, KNN, and LightGBM.
[0044] Figure 10 For visualization of grid search, (a) rural credit, (b) Germany, (c) lending clubs, (d) Irish virtual banks, (e) financial institutions.
[0045] Figure 11The optimal index changes for different k-neighbors values in the Rural Credit, German, and Lending Club datasets; from left to right, they are LR, LDA, KNN, and LightGBM.
[0046] Figure 12 The optimal index changes for different k-neighbors values in the Irish Dummy Banks, Financial Institution, and Milk datasets are shown from left to right: LR, LDA, KNN, and LightGBM.
[0047] Figure 13 The optimal metric changes for different k-neighbors values in the Wine Quality dataset are shown; from left to right, they are LR, LDA, KNN, and LightGBM. Detailed Implementation
[0048] To further illustrate the enhanced resampling method and system for credit default detection based on category overlap, and its application, and to achieve the intended objectives of this invention, the following detailed description, in conjunction with preferred embodiments, provides a detailed explanation of the specific implementation, structure, features, and effects of the enhanced resampling method and system for credit default detection based on category overlap proposed in this invention. In the following description, different "embodiments" or "embodiments" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable manner.
[0049] The following will provide a detailed description of the enhanced resampling method and system for credit default detection based on category overlap, and its application, using specific embodiments as examples:
[0050] Relevant background:
[0051] (1) Imbalanced learning method
[0052] Currently, methods for solving the class imbalance problem are mainly divided into algorithmic methods and data-level methods. Among them, data-level methods are more favored by researchers. Oversampling and undersampling are two commonly used and effective data-level methods. Oversampling balances the data distribution by synthesizing minority class samples. SMOTE is a typical oversampling method, which synthesizes new samples by linearly connecting nearest neighbors on minority class samples. However, SMOTE does not consider the actual distribution of minority class samples and potential noise. To overcome its shortcomings, several SMOTE variants have been proposed, such as K-means SMOTE, which combines K-means clustering and SMOTE to synthesize new samples based on the clustering results, and can better take into account the distribution among minority class samples. Undersampling balances the amount of data by removing majority class samples, which can reduce redundant information in majority class samples and avoid overfitting. For example, Wilson first proposed the Edit Nearest Neighbor (ENN) method to select samples to be removed from the majority class; Koziarski proposed Radial Undersampling (RBU), which uses the concept of mutual potential to determine the undersampling order of majority class samples. In a recent study, Yan et al. proposed a Spatial Distribution-Based Undersampling (SDUS) method, which employs a supervised construction process to learn local patterns of the majority class. Specifically, it considers the neighborhood structure defined by a hypersphere around the samples and then selects a subset of majority class samples from multiple perspectives, a selection process designed to preserve the original distribution characteristics of the data. However, undersampling methods often address imbalance by removing majority class samples, which can lead to the loss of important information. Currently, oversampling methods remain the most commonly used approach for handling imbalanced data; for example, in the credit field, Marqués et al. pointed out that oversampling methods outperform any other form of imbalance learning method. Traditional oversampling methods do not consider the differences between data points and cannot fit the distribution of the true data. In recent research, factors such as distance and density have been found to have a significant impact on imbalanced data. For example, Abedin et al. proposed Weighted SMOTE (WSMOTE), which uses the Euclidean distance between each minority class sample and other minority class samples as weights to generate new samples that are denser than SMOTE. Xie et al. proposed an oversampling method based on Gaussian distribution, which considers the distributional differences between minority and majority class samples and probabilistically selects minority class samples carrying important information to synthesize new samples. Although oversampling can effectively solve the class imbalance problem, excessive oversampling may introduce redundant information, thereby increasing the risk of overfitting. Hybrid methods combine the advantages of oversampling and undersampling methods, making them more flexible in use.For example, Mirzaei et al. proposed a hybrid method called CDBH, which first uses the local density distribution information of the classes to generate new minority class samples, and then removes redundant majority class samples through undersampling.
[0053] (2) Imbalanced learning methods considering class overlap
[0054] Most resampling methods aim to balance the distribution of data classes, but for linearly separable samples, classification results are generally unaffected by class imbalance. However, class overlap regions often appear at decision boundaries, increasing the classifier's error rate and impacting the performance of resampling methods. Therefore, class overlap should be considered when addressing imbalanced data problems. Variants of SMOTE are widely used for imbalanced data learning, with adaptive synthetic sampling methods and BorderlineSMOTE focusing on synthesizing boundary samples that have a significant impact on classification, making it easier to sample minority class samples near the decision boundary. However, they often struggle to identify minority class samples at the decision boundary. Recent research has focused on designing methods that can effectively identify minority class samples to reduce the generation of minority class samples in class overlap regions. For example, Shen et al. proposed an improved SMOTE algorithm that uses Mahalanobis distance to select minority class samples for synthesis, effectively eliminating outliers and samples in overlapping regions of imbalanced credit data. Maldonado et al. proposed a feature-weighted oversampling method (FW-SMOTE) for imbalanced classification, which better defines the neighborhood of minority class samples, identifying minority class samples in overlapping regions and adequately addressing issues such as class overlap and centrality. Tao et al. proposed a novel oversampling method called SVDD-WSMOTE, which focuses on generating minority class samples at decision boundaries and in sparse regions. It reduces the impact of class overlap by assigning lower penalty constants to noisy or overlapping samples identified by the class boundaries generated by the Support Vector Data Description (SVDD) method, minimizing the influence of class overlap during sample selection. Furthermore, researchers have also used undersampling to remove data from overlapping regions to reduce their impact on classification. For example, Vuttipittayamongkol et al. proposed four neighborhood-based (NB-based) undersampling methods to address the classification problem of imbalanced and overlapping datasets by identifying and removing potential negative examples in overlapping regions. Mayabad et al. proposed two novel density-based algorithms to eliminate the influence of class overlap by removing majority class samples in dense regions and noisy samples between the two classes. However, undersampling may lead to the loss of important information. Since data in overlapping regions affects the delineation of the decision boundary, reasonably considering the synthesis of samples in this region can expand the decision boundary to a certain extent, thereby improving classification performance.
[0055] The methods described above indicate that current resampling research mainly focuses on two aspects: balancing the distribution of data categories and avoiding the generation of data in overlapping categories to minimize its impact. However, they neglect the potential value of data in overlapping categories. Furthermore, research on category overlap is almost nonexistent in credit default detection tasks. Therefore, this invention proposes a resampling method focusing on the synthesis of minority class samples in overlapping categories and explores credit default detection tasks in the presence of category overlap. This method consists of oversampling and undersampling. In the oversampling process, firstly, based on the Bray-Curtis distance, considering density and distance factors, minority class samples with differentiated representativeness in these two aspects are selected as anchor points; simultaneously, the overlap degree of samples from different categories is calculated using Euclidean distance, and anchor points are selected within the overlapping categories; then, the anchor points are probabilistically selected, and new samples are synthesized around the anchor points based on a Gaussian distribution. Further, a certain proportion of random undersampling of majority class samples is performed to remove some samples, dynamically adjusting the sample distribution to avoid overfitting. Therefore, CREDCO can both focus on generating difficult samples and alleviate the phenomenon of category overlap.
[0056] The method of the present invention considers minority class samples in overlapping category regions to fully utilize the potential value of these data; in addition, by randomly undersampling majority class samples, a dynamically adjusted resampling process is employed to better balance the data distribution.
[0057] Example 1.
[0058] Detailed operation steps:
[0059] Method A
[0060] 1. Overall Framework
[0061] The overall framework for the proposed solution to the imbalance problem considering hard samples is shown in Figure 2, and the steps are described as follows:
[0062] Step 1: Balance the dataset. Process the training set data using the CREDCO method.
[0063] Step 2: Confidence verification of the synthetic data. Statistical tests are used to demonstrate that the synthetic data is similar to the distribution of the minority class sample.
[0064] Step 3: Train the classifier. Use the processed training set data to train a commonly used classifier.
[0065] Step 4: Method Performance Analysis. CREDCO was applied to real-world credit datasets and datasets from different domains. The area under the ROC curve (AUC), geometric mean (G-mean), and recall were used as performance metrics to compare the method with SMOTE, ADASYN, Borderline SMOTE, K-means SMOTE, GDO, FW-SMOTE, and SDUS, verifying the reliability and generalization ability of the proposed method.
[0066] 2. CREDCO
[0067] (1) Oversampling process
[0068] a. Minority class sample weight calculation
[0069] This section details how to assign weights to minority class samples to focus on the relevant principles of hard sample synthesis. Assume N is a given training set, composed of... and Composition, in which It is a minority class sample set. It is the majority class sample set. Let... For minority class sample sets The K-nearest neighbor sample set, where It is the minority class sample set in the K-nearest neighbor sample set. It is the majority class sample set in the K-nearest neighbor sample set.
[0070] Differences in density and distance between samples of different classes can reflect differences in data distribution; therefore, density and distance can be used to select representative samples from the minority class. Meanwhile, since hard samples often exist at the decision boundary and are sparsely distributed, considering the synthesis of these hard samples helps to make the decision boundary clearer. Therefore, CREDCO identifies differences between samples based on three factors: density, distance, and class overlap of minority class samples. Particular attention is paid to class overlap to address the hard sample problem. Figure 3 shows a schematic diagram of the calculation of minority class sample weights, where the nearest neighbor parameter k for minority class samples is set to 5 (k=5). For each minority class sample... Its density factor is used The representation is defined as follows:
[0071] (1)
[0072] in, yes The number of majority class samples in the set express The proportion of majority class samples among the K-nearest neighbors. Its distance factor is... The representation is defined as follows:
[0073] (2)
[0074] in, , express and The Bray-Curtis distance between the samples is used to more fully account for the differences between minority class samples, where l is the feature dimension of the dataset.
[0075] The class overlap of minority class samples is used The representation is defined as follows:
[0076] (3)
[0077] in, . Representing minority class samples The reciprocal of the sum of distances to all majority class samples. According to By definition, the closer the minority class samples are to the majority class sample distribution, the higher the class overlap. (Calculations are needed.) , and Then, define information weights. and category overlap weight as follows:
[0078] (4)
[0079] (5)
[0080] in, and These are used to focus on representative minority class samples and difficult samples, respectively. Due to the different weights, normalization is performed as follows:
[0081] (6)
[0082] (7)
[0083] in, It is the number of minority class samples, and , After obtaining two sub-weights composed of three factors, the weighting factor is defined. :
[0084] (8)
[0085] in, It is a hyperparameter of class overlap weight, used to control the degree of attention given to difficult samples. See “(1) Weighting Parameters” for details. Impact on CREDCO performance.
[0086] To obtain the weighted probabilities of minority class samples, for The standardization process is as follows:
[0087] (9)
[0088] in, It is the number of minority class samples, and , It is a minority class sample The probability of being selected as an anchor point.
[0089] b Anchor point probability selection
[0090] After assigning weights to the minority class samples, anchor points are selected using the following strategy: Each time, an anchor point is selected based on its weight probability; the higher the weight, the greater the probability of it being selected. This step is repeated until a certain number of minority class samples are reached. The number of minority class samples to be synthesized (assuming an oversampling rate of 1) is:
[0091] (10)
[0092] The roulette wheel selection algorithm is used to select anchor points based on weighted probability. The single-selection probability and cumulative probability of this algorithm are shown in Table 1. In the roulette wheel selection algorithm, a random number T is generated uniformly and compared with the cumulative probability. If T satisfies the following formula, the minority class sample is selected. As an anchor point: (11)
[0093] Since the anchor points are selected probabilistically from the minority class sample set, each minority class sample can be selected more than once, and the frequency of anchor point selection is positively correlated with the weight of the minority class sample.
[0094] Table 1. Algorithm Single Choice Probability and Cumulative Probability
[0095]
[0096] c Synthesize new samples
[0097] After identifying minority class samples as anchor points, new samples are synthesized based on the surrounding Gaussian distribution, which is more consistent with the actual data distribution. First, a Gaussian distribution is defined. ,in 0, standard deviation yes its nearest neighbor The Euclidean distance between them It is the scaling factor. The definition is as follows:
[0098] (12)
[0099] As shown in Figure 4, a new sample is synthesized. ,in Anchor points of the endpoints of random direction vectors , It is a direction vector Length, Two samples determined by a Gaussian distribution The distance between them, where O is the origin of the coordinate system. and They are and The position vector. The specific steps are as follows:
[0100] (1) In the vector space, randomly select The direction is used as the synthetic new sample The direction is determined by defining the endpoints of the direction vector as... , direction vector Defined as:
[0101] (13)
[0102] (2) Gaussian distribution The generated random number is used as Length:
[0103] (14)
[0104] (3) Calculation and The ratio of their lengths is denoted as:
[0105] (15)
[0106] in,
[0107] (4) Based on the above relationship, the new sample is obtained through the following formula. Position vector:
[0108] (16)
[0109] (5) Finally, the synthesized new sample is calculated using the following formula. :
[0110] (17)
[0111] (2) Resampling process
[0112] To avoid over-generating too many minority class samples during oversampling, which would introduce redundant information and lead to overfitting, this invention adds an oversampling rate. This is used to control the number of synthesized samples during oversampling. Simultaneously, to avoid excessive differences between the minority and majority class sample numbers after oversampling, and to prevent redundant information in the majority class samples, a certain proportion of random undersampling is performed on the majority class samples after the oversampling process. This reduces the number of majority class samples and makes the data distribution more balanced. The undersampling rate is defined as... The data after CREDCO resampling is denoted as... The minority class samples after the oversampling process are denoted as The majority class samples after the undersampling process are denoted as . and These are the number of minority class samples and majority class samples in the resampled data, respectively, satisfying the following relationship:
[0113] (18)
[0114] (19)
[0115] 3. Pseudocode and Complexity Analysis
[0116] Based on Algorithm 1 in Table 2, the pseudocode for CREDCO is given, where the input data is the training set. The output is a resampled dataset. Calculate the distance between minority class samples. Need to calculate the given With training set The distance between each instance in the dataset is calculated; simultaneously, the class overlap is also calculated. Need to calculate the given The distance between each majority class sample instance. Therefore, the time complexity of the process of assigning weights to minority class samples (lines 2-8) is O(n). The complexity of generating new samples (lines 12-16) is... The time complexity of undersampling is .because and All less than Therefore, the time complexity of Algorithm 1 is O(n). .
[0117] Table 2 CREDCO's algorithm
[0118]
[0119]
[0120] Experiment B
[0121] 1. Experimental setup
[0122] (1) Dataset description
[0123] To verify the broad applicability of the proposed method, experimental data included five credit datasets and two imbalanced datasets from other domains, comprising both private and public datasets, with the private data anonymized. All these datasets exhibited class overlap, and each dataset had different numbers of classes, different feature dimensions, and different imbalance ratios (IRs), summarized in Table 3, with detailed descriptions below:
[0124] Private datasets: Rural Credit is a dataset of SME loan information from a bank in a certain province of China, all of which are financial indicators, including profitability, profit growth rate, return on net assets, and accounts receivable growth rate; Milk is a dataset of dairy product food safety testing from a certain province of China.
[0125] The publicly available datasets—Lending Club, The Irish DummyBanks, and Financial Institution—are all from Kaggle. Lending Club contains loan application information and related credit performance data from the platform; we selected loan data from 2007-2010, including borrowers' financial status (e.g., income, revolving balance), credit score, loan amount, loan purpose, and the number of late payments in the past two years. The Irish DummyBanks dataset comes from peer-to-peer lending banks in Ireland and includes borrowers' financial status (e.g., debt-to-income ratio), loan information (e.g., loan interest rate, loan amount), monthly repayments, and loan purpose. Financial Institution is a dataset created using actual data from financial institutions, including borrowers' employment status, bank deposit balances, and annual income. The datasets for Germany and Wine Quality come from UCI. Germany is a German credit dataset, including borrowers' personal information (e.g., gender, employment status), bonds, loan amount, loan purpose, and credit history. Wine Quality is a multi-class dataset; we treat the two classes with the best quality as the minority class and the rest as the majority class.
[0126] During the data statistics process, inconsistencies in data types and missing data were encountered. Therefore, data preprocessing was performed before the resampling process. The private dataset and the lending club dataset respectively had issues with missing data and inconsistent data types, while other datasets had complete features and were all numerical. Missing values in the private dataset were imputed with the mean, and the non-numerical data from the lending club dataset were one-hot encoded to obtain the experimental dataset.
[0127] Table 3 Dataset Information
[0128]
[0129] (2) Benchmark Method
[0130] To verify the effectiveness of CREDCO, it was extensively compared with seven mainstream resampling methods: SMOTE, Borderline SMOTE, ADASYN, K-means SMOTE, GDO, FW-SMOTE, and SDUS. For consistency, the k-nearest neighbor parameter for these methods was set to 5, consistent with previous recommendations. The FW-SMOTE parameter was consistent with the optimal setting in its original parameter analysis. Meanwhile, in "4. The Influence of k-nearest neighbors on CREDCO performance in parameter sensitivity analysis (3)," experiments demonstrated that changes in k-nearest neighbors had no significant impact on CREDCO performance. To verify the universality of CREDCO, four commonly used classifiers were employed: logistic regression (LR), k-nearest neighbors (KNN), linear discriminant analysis (LDA), and LightGBM. The specific parameter configurations for these classifiers are shown in Table 4.
[0131] Table 4 Classifier parameter configuration
[0132] (3) Evaluation indicators
[0133] Accuracy is a commonly used evaluation metric in classification tasks. However, due to imbalanced datasets, classifiers can achieve high accuracy even by ignoring minority class samples. To more accurately measure classification performance under imbalanced data conditions, an evaluation metric is determined by constructing a confusion matrix, as shown in Table 5. Here, TP (true positive) and FN (false negative) represent the number of correctly classified positive examples and the number of misclassified negative examples, respectively, while FP (false positive) and TN (true negative) represent the number of negative examples misclassified as positive examples and the number of correctly classified negative examples, respectively.
[0134] The AUC, G-mean score, and Recall, constructed based on the confusion matrix, are used as evaluation metrics, defined as follows:
[0135] (20)
[0136] (twenty one)
[0137] (twenty two)
[0138] Table 5 Confusion Matrix
[0139]
[0140] AUC takes into account the performance differences of classifiers across different classes and is very effective in evaluating the classifier's ability to classify different classes; while G-mean effectively balances the prediction accuracy of imbalanced classes, especially in cases of severe class imbalance, G-mean more comprehensively reflects the overall performance of the classifier; Recall measures the extent to which the method covers true positive examples and helps to evaluate the classifier's sensitivity to positive samples.
[0141] 2. Main Results
[0142] (1) Credibility verification of synthetic data
[0143] Table 6 Statistical Test Results
[0144]
[0145] Whether the distribution of the synthesized minority class samples is similar to that of the real minority class samples is crucial for subsequent experiments. Therefore, it is necessary to verify the rationality of the synthesized minority class samples before the experiment, that is, to verify whether there is a significant difference between the distribution of the synthesized samples and the anchor points. Assuming that the distributions of the synthesized samples and the anchor points are consistent, a t-test is used for verification, with the logarithm of the test data taken as the test logarithm. To avoid randomness in the test, the average of the results is taken. The specific results are shown in Table 6. The results show that the mean chi-square variance of all datasets is greater than 0.05, thus satisfying the preconditions for the t-test; simultaneously, the mean p-value is greater than 0.05, confirming the hypothesis that the distributions of the synthesized samples and the anchor points are consistent and there is no significant difference.
[0146] To clearly visualize how the method of this invention can effectively synthesize minority class samples that have a significant impact on the classifier compared to other methods, and accurately fit the distribution of the original data, a visualization analysis was performed on the artificial dataset and the synthesized samples from different sampling methods, as shown in Figure 5. This dataset contains 80 majority class samples and 20 minority class samples, with some overlap between different classes. The darkest color represents the majority class samples, the lightest color represents the minority class samples, and the rest are newly generated samples. Observing the sample distribution in the overall and overlapping areas reveals that the samples generated by SMOTE and ADASYN have similar distributions, exacerbating class overlap; the data generated by Borderline SMOTE is mostly distributed at the boundaries; the data generated by K-Means SMOTE is concentrated; none of the above methods consider the differences in data, resulting in overfitting. GDO considers the differences in data, and the generated dataset focuses on the distance from the majority class and the dense distribution of minority class samples, but the excessive amount of generated data leads to information duplication, exacerbating the class overlap problem. FW-SMOTE generates data that focuses on the center of minority class samples, resulting in some minority class samples that overlap with nearby majority class samples, thus expanding the overlap area and exacerbating the class overlap problem. SDUS is an undersampling method that removes a large number of majority class samples, potentially leading to information loss. Our method considers both data differences and class overlap, processing the majority class samples and generating appropriate amounts of data at important minority class samples and in class overlap areas, with a distribution that best matches the original data distribution.
[0147] (2) Comparison of evaluation indicator results
[0148] To verify that the CREDCO method effectively improves classifier performance by synthesizing hard samples by considering minority class density, distance, and class overlap with the majority class, this method was compared with mainstream sampling methods on four common classifiers. To avoid randomness in the results, 10-fold cross-validation was used. The AUC, G-mean, and Recall results for the seven datasets on different classifiers are shown in Tables 7(a), 7(b), 7(c), and 7(d). Origin represents the unprocessed dataset. The best results for each dataset are marked in bold, and the second-best results are marked in underline. The results are presented in the form of mean ± standard deviation.
[0149] Table 7(a) Classification results based on LR
[0150]
[0151] Table 7(b) Classification results based on LAD
[0152]
[0153] Table 7(c) Classification results based on KNN
[0154]
[0155] Table 7(d) Classification results based on GBN
[0156]
[0157] Based on a comprehensive analysis of the results, the following conclusions are drawn:
[0158] For imbalanced credit datasets, the classification results of data processed by the resampling method are better than those of unprocessed data. At the same time, the overall classification results of data processed by CREDCO are better than other methods on all datasets, indicating that the present invention is more suitable for processing imbalanced credit data. By effectively focusing on the synthesis of hard samples, it can effectively improve the performance of the classifier and has certain practical application value.
[0159] Observing the classification results of LightGBM reveals that CREDCO outperforms other oversampling methods in terms of AUC, with significant improvements in G-mean and Recall. Particularly in financial institution data, G-mean and Recall are improved by 61.8% and 180.5%, respectively. This is because LightGBM achieves accurate classification, while CREDCO, through resampling to synthesize a balanced dataset of valuable minority class samples, achieves better classification results.
[0160] Imbalance ratio significantly impacts classification results. To investigate CREDCO's performance on data with different imbalance ratios, the results of the public credit dataset were analyzed. The average performance improvement of the four classifiers on each dataset was calculated, and the following results were observed: the German credit dataset (IR=2.33) and the lending club dataset (IR=4.1) have relatively small imbalance ratios, resulting in the smallest improvements in AUC and G-mean on these two datasets; while the financial institutions dataset has the largest imbalance ratio (IR=29), exhibiting the largest improvements in both AUC and G-mean. The analysis is as follows:
[0161] ①CREDCO achieved good results on datasets with varying degrees of imbalance, demonstrating its broad adaptability to datasets with different levels of imbalance.
[0162] ② The lending club and financial institution datasets have the same data volume, but CREDCO performs better on the financial institution dataset. This is because on datasets with significant imbalance, the sample distributions differ greatly. CREDCO fully considers the distribution of minority class samples and can learn enough sample features to synthesize new samples, indicating that this method is more effective in handling severely imbalanced data.
[0163] Data size can affect the performance of the proposed method, therefore the impact of data size on CREDCO's performance was investigated. Results observed under different data sizes show that CREDCO performs well across all metrics. For smaller datasets, CREDCO shows significant improvements across all metrics; while for larger datasets, it shows significant improvements in AUC and G-mean, and although less competitive in Recall, it still shows improvement. This indicates that CREDCO is robust to changes in data size under complex scenarios.
[0164] To further verify CREDCO's strong generalization ability and robustness, CREDCO was applied to a real-world dataset of rural credit from a provincial bank in China, as well as two datasets from other domains. Observations of the classification results revealed that CREDCO outperformed all other sampling methods. In particular, significant improvements were observed in CREDCO's G-mean and Recall metrics, demonstrating that this method can improve classifier performance by synthesizing valuable samples and shows potential in synthesizing new samples.
[0165] (3) Comparison of running time
[0166] In addition to comparing the above metrics, the resampling time of CREDCO was also compared with various benchmark methods on different datasets, as shown in Table 8. The runtime of each method was recorded under an environment with an Intel i5-8265U CPU (1.60GHz), 8.0GB of memory, Microsoft Windows 10 operating system, and Python 3.7. The results show that CREDCO outperforms GDO and SDUS methods, and its efficiency on some datasets is even comparable to KMeansSMOTE. However, CREDCO lags behind efficient resampling methods such as SMOTE and its variants. This is because CREDCO uses adaptive hybrid sampling, which is less efficient than a single sequential method, especially noticeable on large-scale datasets.
[0167] Table 8. Performance Comparison
[0168]
[0169] 3. Ablation test
[0170] (1) Verify the effectiveness of CREDCO in addressing difficult samples.
[0171] To verify the importance of focusing on hard samples in handling imbalanced data and the advantages of CREDCO in addressing this challenge, a comparative experiment was designed. The comparative methods used different weighting anchors: GDO (focusing only on differences between samples), R_O (focusing only on samples in the class overlap region), and R_Uni (treating sample differences and class overlap regions as equally important). The results for AUC, G-mean, and Recall are shown in Tables 9(a), 9(b), and 9(c).
[0172] Table 9(a) Comparative experimental results of different methods on four classifiers: AUC
[0173]
[0174] Table 9(b) Comparative experimental results of different methods on four classifiers: G-means
[0175]
[0176] Table 9(c) Comparative experimental results of different methods on four classifiers: Recall
[0177]
[0178] In Table 9, CREDCO achieved the best results, demonstrating its advantage in handling minority class samples by focusing on the synthesis of difficult samples. This invention fully considers data differences and effectively focuses on data in overlapping class regions, while GDO and R_O only focus on the characteristics of data uniformity, resulting in a concentrated distribution of synthesized samples; R_Uni treats different samples and samples in overlapping class regions as equally important, leading to insufficient representativeness of the synthesized samples and exacerbating the class overlap problem.
[0179] Furthermore, the synthesized samples were visualized, intuitively presenting the CREDCO synthesized samples that simultaneously consider sample differences and focus on difficult samples. A small amount of class overlap exists in the original data distribution. As shown in Figure 6, GDO does not focus on minority class samples in the class overlap region; R_O generates samples concentrated in the class overlap region, severely exacerbating the class overlap; R_Uni does not measure the importance of information weights and class overlap weights, resulting in data that lacks representativeness and is excessively concentrated in the class overlap region. By observing the sample distribution generated by our method, we found that its distribution is most similar to the original data distribution and does not exacerbate class overlap.
[0180] (2) Verify that CREDCO does not exacerbate class overlap.
[0181] Since excessive class overlap can blur decision boundaries, it is necessary to ensure that the samples synthesized by this method have a positive impact on classification performance and do not exacerbate class overlap. Fisher discriminant analysis was performed on samples generated by GDO, R_O, R_Uni, and CREDCO. The Fisher discriminant ratio reflects the degree of overlap and is calculated for each feature as follows:
[0182] (twenty three)
[0183] in, and These represent the mean and variance of samples from different classes, respectively. A smaller Fisher discriminant ratio indicates higher overlap. Table 10 shows the number of features obtained with smaller Fisher discriminant ratios for each of the four methods. Compared to other methods, CREDCO significantly reduces class overlap in the dataset. It is worth noting that CREDCO does not perform best on all datasets, but it achieves the best results on most datasets. Considering the complexity of real-world scenarios, a more robust and generalizable method was chosen.
[0184] Table 10 Fisher's discrimination results
[0185]
[0186] 4. Parameter sensitivity analysis
[0187] (1) Weighted parameters Impact on CREDCO performance
[0188] To verify that the method of this invention can effectively focus on hard samples, the class overlap weight parameter was adjusted. Sensitivity analysis was conducted, and the impact of adding different weights on the method's performance was explored. Experiments were performed on a credit dataset, with AUC and G-mean chosen as evaluation metrics, as these two metrics are crucial for handling imbalanced data. The analysis results, as shown in Figure 7-9, are as follows:
[0189] ①As can be seen from the figure, the results of focusing on difficult samples are all better than those of not focusing on difficult samples. =0); Meanwhile, different degrees of focusing on hard samples lead to significant differences in classification performance. LR, as a simple classifier, directly reflects... The impact of changing downsampling methods was also investigated. It was found that on LR, CREDCO's performance degrades to some extent after focusing on hard samples; for example, on the Irish Virtual Bank dataset, AUC and G-mean values decrease. The value reaches an optimal level of 0.8 and then decreases. This is because the method overemphasizes hard samples, leading to a decrease in its generalization ability. Therefore, CREDCO can be improved by setting... This helps avoid introducing too many difficult samples and allows for effective focus on those samples.
[0190] ② The impact on AUC is relatively small, while the impact on G-mean is relatively large, indicating that focusing on hard samples has a significant impact on the classification performance of minority class samples.
[0191] ③ The trends of AUC and G-mean are mostly consistent, demonstrating the strong robustness and stability of the method and supporting its reliability in practical applications. However, in some cases, the trends are opposite. This is due to the trade-offs in different performance aspects of the method. For example, optimizing the overall performance may have a negative impact on minority class samples, leading to opposite trends in AUC and G-mean.
[0192] (2) The effect of sampling rate on CREDCO performance
[0193] To further explore the impact of sampling rate on method performance, a grid search was performed on oversampling rate (rate_U) and undersampling rate (rate_D) to select the optimal combination of sampling rates. Experiments were conducted on a credit dataset, with AUC and G-mean chosen as evaluation metrics. Sampling rates were set according to data characteristics: approximately 0.7 for agricultural and rural credit data, lending clubs, and the Irish virtual bank dataset; approximately 0.75 for the German dataset; and, due to the high IR of 29 for financial institution data, oversampling rates were set to 0.04-0.28, and undersampling rates to 0.7 or higher. The visualization results based on LightGBM are shown in Figure 8. The analysis of AUC and G-mean is as follows:
[0194] Regarding AUC, by observing Figures 10(a), (b), (d), and (e), it can be seen that AUC and They are positively correlated, both in Optimal performance is achieved at its maximum, while for The sensitivity is low. This demonstrates that the oversampling process plays an important role in this invention, where focusing on hard samples generates minority class samples that conform to the true data distribution, allowing the classifier to fully learn the data features and thus achieve accurate classification. As can be seen from Figure 10(c), AUC increases with... The increase first rises and then falls. The optimal value is reached at 0.65. This indicates that oversampling leads to overfitting, thus reducing the performance of the method, while appropriate undersampling can alleviate this problem to some extent.
[0195] Regarding G-mean, by observing Figures 10(a), (c), and (e), it can be seen that G-mean and They are positively correlated, both in When the maximum is reached, the same optimal value as AUC is achieved, while for The sensitivity is low. This demonstrates that the oversampling process plays an important role in improving the classification performance of minority class samples. Looking again at Figures 10(b) and 10(d), the G-mean in Figure 10(b) shows that... The increase first rises and then falls. The best performance is achieved when G-mean is 0.7; the G-mean in Figure 10(d) is affected by and The combined effects of these factors demonstrate that a single oversampling process cannot be used alone; appropriate undersampling can achieve better performance, which is consistent with the conclusions of the AUC analysis.
[0196] Based on the above results, it was found that both AUC and G-mean are affected by oversampling and undersampling processes. Specifically, the AUC and G-mean in Figures 10(a) and 10(e) show the same trend, indicating that the method of this invention can achieve the same excellent performance under different evaluation metrics. The different trends of AUC and G-mean in other figures are due to the trade-offs in performance of this method. CREDCO not only combines oversampling and undersampling processes but also dynamically selects the optimal combination of sampling rates to obtain the best performance of the method.
[0197] (3) The effect of k-nearest neighbors on CREDCO performance
[0198] To verify the rationale for setting k-nearest neighbors (kNN) to 5 in CREDCO, a sensitivity analysis was performed on the kNN parameter, where kNN ∈ [1, 10]. Experimental results are shown in Figures 11-13. By observing the trends in AUC and G-mean across four classifiers for different datasets processed by CREDCO, it was found that CREDCO exhibits stability and insensitivity to changes in the kNN parameter. Specifically, CREDCO's performance fluctuates only slightly with variations in kNN, indicating that it maintains good performance under different parameter settings. This stability is crucial for the reliability of the model in practical applications. Our results further demonstrate the rationale for setting kNN to 5; this choice not only demonstrates stability in experiments but also promises to provide consistent and reliable prediction results in practical applications.
[0199] This invention proposes CREDCO, an enhanced resampling method for credit default detection based on class overlap. It can be used to handle resampling of imbalanced credit data and explores the credit default detection task in the presence of class overlap for the first time, providing a new approach to reducing customer credit risk. CREDCO combines oversampling and undersampling methods, considering the density, distance, and class overlap of minority class samples, and can generate high-quality and representative minority class samples. Furthermore, thanks to the random undersampling strategy that dynamically adjusts the resampling process, CREDCO exhibits good generalization ability and robustness. Experimental results show that compared with suboptimal results, AUC, G-mean, and Recall are improved by 3.66%, 6.14%, and 7.75%, respectively; moreover, CREDCO performs stably. Further experiments verify that CREDCO can effectively focus on the synthesis of difficult samples while mitigating the class overlap problem.
[0200] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention shall still fall within the scope of the technical solution of the present invention.
Claims
1. An enhanced resampling method for credit default detection based on category overlap, characterized in that, The credit default detection enhanced resampling method is as follows: after oversampling the minority class samples, the majority class samples are undersampled to adjust the number of minority class samples and majority class samples and obtain resampled data. The oversampling process is as follows: based on the density, distance and class overlap of minority class samples, the differences between samples are identified to obtain the weights of minority class samples; after assigning weights to the minority class samples, anchor points are selected, and new samples are synthesized based on a Gaussian distribution; The undersampling process involves randomly undersampling the majority class samples to remove some samples.
2. The credit default detection enhanced resampling method according to claim 1, characterized in that, The minority class samples are calculated based on the Bray-Curtis distance, and the density factor and distance factor are calculated.
3. The enhanced resampling method for credit default detection according to claim 2, characterized in that, The density factor is used It is represented and defined as: in, yes The number of majority class samples in the set; The distance factor is used It is represented and defined as: ;in, ; The class overlap of the minority class samples is used It is represented and defined as: ;in, .
4. The credit default detection enhanced resampling method according to claim 3, characterized in that, The process of obtaining the minority class sample weights is as follows: information weights are obtained based on the density factor, distance factor, and class overlap. and category overlap weight After normalization, the weighting factor is obtained. And standardize the process; Among them, the information weight ; The aforementioned category overlap weight ; The weighting factor ; These are the information weights after normalization. and category overlap weight , It is a hyperparameter for class overlap weights.
5. The enhanced resampling method for credit default detection according to claim 1, characterized in that, The anchor selection process is as follows: each time, an anchor is selected based on a weighted probability; the higher the weight, the greater the probability of selection. This step is repeated until the number of minority class samples reaches a certain amount. The number of minority class samples to be synthesized is: ; The roulette wheel selection algorithm is used to select anchor points based on weighted probabilities. In the roulette wheel selection algorithm, a random number T is generated uniformly and compared with the cumulative probability. If T satisfies the following formula, then a minority class sample is selected as the anchor point: 。 6. The enhanced resampling method for credit default detection according to claim 1, characterized in that, After determining the minority class samples as anchor points, the process of synthesizing new samples is as follows: (1) In the vector space, randomly select The direction is used as the synthetic new sample The direction is determined by defining the endpoints of the direction vector as... , direction vector Defined as: ; (2) Gaussian distribution The length of the generated random number is given by the following formula: ; in, 0 , It is the scaling factor; standard deviation Is with its nearest neighbor The Euclidean distance between them is defined as follows: ; (3) Calculation and The ratio of their lengths is denoted as: ;in, ; (4) Based on the above relationship, the new sample is obtained through the following formula. The position vector, given by the formula: ; (5) Calculate the synthesized new sample using the following formula: .
7. The enhanced resampling method for credit default detection according to claim 1, characterized in that, The number of minority class samples and majority class samples in the resampled data satisfy the following relationship: ; Among them, the oversampling rate is undersampling rate The minority class samples after the oversampling process are denoted as The majority class samples after the undersampling process are denoted as .
8. An enhanced resampling system for credit default detection based on category overlap, characterized in that, This method is used to implement the credit default detection enhancement resampling method based on category overlap as described in any one of claims 1-7.
9. The application of the enhanced resampling method for credit default detection based on category overlap as described in any one of claims 1-7 in credit default detection.