A method and system for adaptive optimization of scoring card temporal drift based on unbalanced samples

By constructing a time-series drift adaptive optimization method based on unbalanced samples, and adopting a hierarchical repair strategy and a cascaded master-slave model architecture, the problem of predictive performance degradation of credit scoring card models in the field of financial risk control is solved. This achieves high precision and recall while improving the model's anti-drift ability and interpretability.

CN123179362APending Publication Date: 2026-11-27CHINA ACADEMY OF INFORMATION & COMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611352821.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Credit scoring card models exhibit a significant decline in predictive performance over time in the field of financial risk control. The main reasons include the sparseness of fraud samples, which makes it difficult to simultaneously meet the requirements of precision and recall; the lack of temporal drift perception capabilities in traditional binning strategies; the simplistic drift repair methods lacking hierarchical processing logic; the lack of closed-loop verification of repair results; the absence of early warning and emergency response capabilities for main model failure; and insufficient model iteration and optimization strategies.

Method used

An adaptive optimization method for time-series drift based on unbalanced samples is adopted. Through hierarchical repair strategy, cascaded master-slave model architecture and meta-weight monitoring, a three-layer progressive drift perception index is constructed to realize hierarchical repair and cyclic verification. Combined with decision tree binning and equal-frequency binning, a high precision gate layer and a high precision fullness and omission filling layer are constructed. The meta-weight volatility of the stacked backup model is used for gray-scale switching and automatic retraining rollback.

Benefits of technology

It improved the model's prediction precision and recall, enabled early warning and differentiated repair of time series drift, ensured the long-term availability and business continuity of the model, and enhanced the scorecard's resilience and interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179362A_ABST
    Figure CN123179362A_ABST
Patent Text Reader

Abstract

The application provides a method and system for adaptive optimization of scoring card time series drift based on unbalanced samples. The method comprises: obtaining sample data containing timestamp features, performing initial binning through multiple binning strategies and screening effective features; constructing a three-layer progressive drift awareness index to jointly determine the binning drift type and degree of the features; based on the determination result, triggering a five-level differentiated repair strategy to adaptively repair and cyclically verify the binning, and solidifying the robust binning mapping and WOE coding; inputting the solidified WOE coding into a cascade main model and a stacked backup model in parallel for training and evaluation, wherein the cascade main model is composed of a decision tree binning access control layer and an equal-frequency binning repair layer; and triggering a gray scale switching and model retraining rollback mechanism based on the meta-weight fluctuation of the stacked backup model. The application improves the recall rate without significantly reducing the precision, and realizes adaptive optimization and stable operation of the scoring card model throughout its life cycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of financial risk control, and in particular relates to a method and system for adaptive optimization based on time-series drift of unbalanced sample scoring cards. Background Technology

[0002] Credit scoring models are widely used in the field of financial risk control, but their predictive performance has long suffered from significant decline over time. The main reasons include: the extreme sparseness of fraud samples makes it impossible to simultaneously meet the requirements of "precision" and "recall" with a single model; traditional binning strategies lack the ability to detect time-series drift; drift repair methods are limited and lack hierarchical processing logic; the repair results lack closed-loop verification; the main model lacks early warning and emergency response capabilities; and specific optimization strategies for model iteration over time are lacking. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention proposes a technical solution based on an adaptive optimization method for time-series drift of unbalanced sample scorecards, thereby resolving these issues.

[0004] The first aspect of this invention discloses a method for adaptive optimization based on time-series drift of unbalanced sample scorecards; the method includes: Step S100: Obtain imbalanced sample data containing timestamp features, and divide the imbalanced sample data into training set, validation set and test set in chronological order; perform initial binning of the training set using decision tree binning and equal frequency binning respectively, and filter effective features based on information value; Step S200: Construct a three-layer progressive drift perception index for the binning of the effective features. The three-layer progressive drift perception index includes: the intra-bin temporal stability coefficient at the micro level, the feature discrimination ability decay rate at the meso level, and the group stability index at the macro level. Step S300: Combine the three-layer progressive drift perception index, information value and bad sample rate in the bin for joint judgment. Trigger the corresponding hierarchical repair strategy according to the judgment result, perform adaptive repair and cyclic verification on the drift bin, and obtain the solidified final bin mapping and evidence weight WOE encoding. Step S400: Substitute the WOE encoding into the cascaded master model and the stacked backup model for training; wherein, the cascaded master model includes a high precision gate layer and a high precision omission filling layer; Step S500: Use the meta-weight volatility of the stacked backup model as a drift warning signal, and perform model grayscale switching and automatic retraining rollback according to the drift warning signal.

[0005] Furthermore, in step S200, the specific calculation process of the intra-bin temporal stability coefficient is as follows: the training set is divided into three periods of early, middle and late time according to time, the sample proportion of each bin in the three periods is calculated, and the standard deviation of the sample proportion is taken as the intra-bin temporal stability coefficient.

[0006] Furthermore, in step S300, the graded repair strategy is divided into five levels, including: Level 0 Strategy: No action is taken when the indicators of the corresponding bin do not reach the drift threshold; Level 1 Strategy: When there are slight time-series fluctuations in the corresponding bins, perform chi-square adjacent bin merging and boundary fine-tuning; Level 2 Strategy: When a timing warning occurs in the corresponding bin but no actual risk clustering occurs, perform boundary contraction and freeze WOE weights; Level 3 Strategy: When a corresponding bin experiences a substantial instability breach, a weighted secondary binning is performed; Level 4 Strategy: When the global distribution of the corresponding bins is severely offset, the corresponding feature is directly removed or external rolling retraining is triggered.

[0007] Furthermore, in step S300, in the level 2 strategy: Extract the 99th percentile of the bin corresponding to the recent sample and compare it with the upper boundary of the historical bin. Take the smaller value as the new right boundary for physical boundary compression, and inherit the WOE weight of the historical bin without recalculating.

[0008] Furthermore, in step S300, in the level 3 strategy: The samples are weighted based on time decay weights. For time-driven bins, weighted splitting is performed directly. For concentration-driven bins, bad sample density anchors are introduced as auxiliary cut points. The cut point that maximizes the gradient of bad sample rate between adjacent sub-bins is selected as the final split boundary.

[0009] Furthermore, in step S300, the adaptive repair and cyclic verification include: After each repair, hierarchical adaptive Laplacian smoothing is performed; for sparse bins with a sample size less than a preset threshold, a first smoothing coefficient is used; for sufficient bins with a sample size greater than or equal to the preset threshold, a second smoothing coefficient is used, wherein the first smoothing coefficient is greater than the second smoothing coefficient. After smoothing, the group stability index and intra-bin temporal stability coefficient of the corresponding bins are recalculated. If the target is not met for a consecutive preset number of rounds, the corresponding feature is removed.

[0010] Furthermore, in step S400, the execution logic of the cascaded master model includes: The input sample first enters the high precision gate layer, which is composed of decision tree binning and logistic regression. If the high precision gate layer determines that the input sample is a bad sample, it is rejected directly. If the input sample is determined to be a good sample, it is sent to the high precision completeness and omissions layer, which is composed of equal frequency binning and logistic regression, for secondary determination.

[0011] Furthermore, in step S400, the stacked backup model consists of a logistic regression base model based on WOE features and an XGBoost base model based on the original features, and the optimal fusion weights for the predicted probabilities of the two base models are learned through the meta-model. The fusion weights assigned to the XGBoost base model are used as the meta-weights.

[0012] Furthermore, in step S500, the rate of change and volatility of the meta-weights are continuously monitored. When the rate of change exceeds a preset threshold and the duration reaches a preset period, a grayscale switching signal is triggered to switch the stacked backup model to an online emergency fallback model and simultaneously start the offline retraining process based on recent data.

[0013] A second aspect of this invention discloses a system based on time-series drift adaptive optimization of an unbalanced sample scorecard, the system employing the method described in the first aspect, the system comprising: The data acquisition and pre-binding module is used to acquire imbalanced sample data containing timestamp features and divide it into training set, validation set and test set. It uses decision tree binning and equal frequency binning to perform initial binning and filter effective features. The drift sensing module is used to construct a three-layer progressive drift sensing index, including the intra-box temporal stability coefficient, the feature discrimination ability decay rate, and the population stability index. The graded repair and verification module is used to combine the three-layer progressive drift perception indicators, information value and bad sample rate in the bin for joint judgment, trigger the corresponding graded repair strategy according to the judgment result, and perform cyclic verification to solidify WOE encoding. The primary and backup dual-mode construction module is used to substitute the solidified WOE code into the cascaded primary model and the stacked backup model, which include the access control layer and the leak detection layer, respectively, for parallel training. The monitoring and emergency management module is used to trigger grayscale switching based on the meta-weight volatility of the stacked backup model, and automatically perform model retraining and version rollback management.

[0014] In summary, the solution proposed in this invention can: 1. The "Graded Repair" method pioneers a "five-level treatment matrix." Unlike the existing binary approach of "either repair or discard," this invention is the first to create a graded repair matrix of 0 to 4 based on five-dimensional joint judgment. It matches differentiated repair actions to different degrees of drift, solving the technical problem of overfitting or ineffective intervention caused by "one-size-fits-all" repair.

[0015] 2. The "Boundary Contraction + WOE Freezing" introduces the concept of "Interval Reservation". Unlike the existing technology approach of repairing by recalculating WOE, this invention only compresses the physical boundary and freezes the WOE weights when the crowd has gathered but the bad guys have not appeared. This achieves preventive repair by "repairing the space but not the weights", reserving risk interception space without affecting the current model's F1 score.

[0016] 3. A three-layer progressive drift sensing mechanism is constructed using "Si + ΔIV + PSI". Unlike existing technologies that rely solely on PSI monitoring, this invention pioneers a three-layer detection chain of "microscopic (Si) → mesoscopic (ΔIV) → macroscopic (PSI)", which enables early warning of drift under non-equilibrium sample conditions and solves the industry pain point that PSI is not sensitive to sparse labels.

[0017] 4. The "Decision Tree Binning + Equal Frequency Binning" cascaded architecture decouples precision and recall. Unlike existing technologies that use a single model or parallel integration, this invention employs a cascaded pipeline of "high-precision access control → high-recall gap filling," enabling precision (≥94%) and recall (≥62%) to simultaneously meet the targets after physical decoupling.

[0018] 5. The "primary and backup mutual protection" architecture enables closed-loop management of the model lifecycle. Unlike existing technologies that only focus on the accuracy of a single modeling, this invention constructs a primary and backup mutual protection system of "cascaded primary model (daily decision-making) + stacked backup model (drift probe + emergency backup)" to achieve full lifecycle management of "monitoring and early warning → gray-scale switching → rolling retraining → version rollback".

[0019] 6. “Meta-weight β” as a drift-sensitive sensor. Unlike existing technologies that only monitor changes in data distribution, this invention uses the fusion weight β of the stacked meta-model and its temporal volatility as a data drift early warning signal, compressing the early warning response cycle from “monthly” to “daily”.

[0020] 7. "Hierarchical Adaptive Laplace Smoothing (α=1.0 / 0.5)". Unlike existing technologies that use a fixed smoothing coefficient, this invention dynamically selects the smoothing intensity based on the sample size of the bins (sparse bins α=1.0 to prevent extreme values, sufficient bins α=0.5 to maintain discrimination), solving the technical problem of scorecard precipitates caused by extreme values ​​in sparse bins' WOE.

[0021] 8. "Post-repair loop verification + out-of-limit removal" constructs a quality closed loop. Unlike the one-way repair process of existing technologies, this invention forces a jump back to the stability calculation node after repair. If the standard is not met for three consecutive rounds, it is forcibly removed and recorded in the audit log, eliminating the risk of "problematic features flowing into modeling" and meeting the traceability requirements of financial supervision.

[0022] 9. "Time-based slice decay rate assessment" quantifies anti-drift capability. Unlike existing technologies that only report the overall AUC, this invention divides the test set into long-term and short-term segments based on the median time, calculates the F1 decay rate as the basis for model selection, and empirically verifies that the cascaded integration decay rate is only 5.40%. Attached Figure Description To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0023] Figure 1 This is a flowchart of a method for adaptive optimization based on time-series drift of an unbalanced sample scorecard according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating a specific implementation of a method for adaptive optimization based on time-series drift of an unbalanced sample scorecard according to an embodiment of the present invention. Figure 3 This is a structural diagram of a system based on time-shift adaptive optimization of an unbalanced sample scorecard according to an embodiment of the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] This invention proposes an adaptive optimization method to address the decline in the predictive ability of scorecard models caused by sample drift over time. By constructing a complete closed-loop methodology path of "bundling optimization → drift detection → hierarchical repair → dual-mode primary / backup → grayscale switching → automatic rollback," early warning can be provided when drift occurs. Based on the degree of drift, multiple binning repair strategies, such as "boundary contraction," "chi-square adjacent bin merging," and "weighted secondary binning," are executed iteratively. After each repair, F1 rollback verification on a validation set ensures no performance degradation, ultimately solidifying a time-robust final binning mapping and WOE encoding. Subsequently, WOE features are incorporated into decision tree binning LR (high precision gate layer) and equal-frequency binning LR (high precision full complement layer) to form a cascaded gap-filling ensemble, outputting a scorecard rule that is optimally discriminative and highly interpretable. A WOE-LR and XGBoost stacked fusion model is introduced as a fallback defense in extreme drift scenarios after model deployment. During the evaluation phase, the test set is split according to time proximity, and the drastic fluctuations in the meta-weights of the stacked model are used as a sensitive early warning signal for data drift. A corresponding grayscale switching + [other methods] are also established. The long-term version rollback model lifecycle management mechanism effectively ensures the long-term availability of the scorecard and business continuity.

[0026] Credit scoring models are widely used in the field of financial risk control, but their predictive performance has long suffered from a significant decline over time. The main reasons include: Firstly, a core business challenge in credit scoring modeling is that the extremely sparse fraud sample rate (<0.2%) means that both precision and recall cannot be simultaneously satisfied by a single model. Prioritizing precision, the cost of falsely identifying an innocent person (FP) far outweighs the cost of omitting a guilty person (FN), especially in the loan approval process, where false positives directly impact conversion rates. Prioritizing recall, however, is also crucial; if the false negative rate is too high, bad debts will directly erode profits.

[0027] Second, traditional binning strategies lack the ability to detect temporal drift. Existing binning techniques (such as equal-frequency binning, equal-distance binning, and chi-square binning) only divide the data based on the static distribution of the training set, without considering the changing trends of feature distribution over time. When customer demographics, policy environment, or economic cycles change, the originally reasonable binning boundaries quickly become invalid, leading to a decrease in model discriminative power. Although some solutions introduce PSI (Population Stability Index) for monitoring, they only remain at the "detection → alarm" level and lack an automatic repair mechanism.

[0028] Third, the drift repair methods are simplistic and lack a hierarchical processing logic. Existing solutions adopt a uniform repair strategy for different degrees of drift—either performing global rebinding on all drift features (over-intervention, destroying the original effective distinguishing structure) or simply removing them (too crude, losing predictive ability), lacking differentiated handling mechanisms and iterative verification for mild, moderate, and severe drift.

[0029] Fourth, the repair results lack closed-loop verification. Most solutions flow directly into the downstream modeling process after binning and repair, without secondary verification of the repair effect. When an inappropriate repair strategy leads to a decline in model performance (such as overfitting to recent noise), it cannot be detected and rolled back in time, posing a risk that "repairing is worse than not repairing".

[0030] Fifth, there is a lack of early warning and emergency response capabilities for main model failure. Traditional scorecards (logistic regression + WOE) have strong interpretability but limited linear fitting ability. Once nonlinear and drastic changes occur over time, the availability of the current model will decrease. However, the stacked model based on XGBoost can provide "early warning" by calculating the temporal volatility of the fusion weights of the meta-model.

[0031] Sixth, there is a lack of specific optimization strategies for model iteration over time. Currently, the scoring card model lacks a long-term switching and rollback management mechanism for sudden changes in data distribution caused by severe data drift during the evaluation and iteration phase, which may lead to a decline in model availability over time.

[0032] To address the aforementioned issues and achieve adaptive optimization of the model as data drifts over time, this invention proposes a method based on unbalanced sample scoring cards for adaptive optimization over time. This method constructs a process of "binning selection awareness → drift awareness → hierarchical repair → dual-model fusion → grayscale switching → automatic rollback," seeking a balance between time and stability to improve predictive recall without significantly reducing precision.

[0033] The first aspect of this invention discloses a method for adaptive optimization based on time-series drift of unbalanced sample scorecards. Figure 1 This is a flowchart of a method for adaptive optimization based on time-series drift of an unbalanced sample scorecard according to an embodiment of the present invention, as shown below. Figure 1 and Figure 2 As shown, the method includes: Step S100: Obtain imbalanced sample data containing timestamp features, and divide the imbalanced sample data into training set, validation set and test set in chronological order; perform initial binning of the training set using decision tree binning and equal frequency binning respectively, and filter effective features based on information value; Specifically, the optimal initial binning strategy is selected based on data characteristics to lay a stable foundation for subsequent modeling and drift repair, as follows: Step S101: Time-series splitting. The Kaggle dataset is split into training set (60%), validation set (20%), and test set (20%) in chronological order to simulate a real-world time extrapolation scenario.

[0034] Step S102: Binning Optimization. Based on the initial multi-type binning, decision tree binning and equal-frequency binning are trained respectively to form high-purity bins that maximize the discrimination between bins and cover the full sample with an equal number of samples.

[0035] Step S103: Calculate WOE (Weight of Evidence) and IV (Value of Information). Based on the WOE and IV of each feature bin, select effective features with IV ≥ 0.02. Based on the IV value, classify the features into strong predictive power (≥ 0.3), medium predictive power (0.1~0.3), and weak predictive power (< 0.1).

[0036] Step S200: Construct a three-layer progressive drift perception index for the bins of the effective features. The three-layer progressive drift perception index includes: the intra-bin temporal stability coefficient at the micro level, the feature discrimination ability decay rate at the meso level, and the population stability index at the macro level. Divide the bins into early, middle and late periods, calculate the sample proportion of each bin in the three periods, and take the standard deviation of the sample proportion as the intra-bin temporal stability coefficient.

[0037] Specifically, a three-tiered progressive drift perception system is constructed, consisting of "in-box → feature → global" layers, to achieve early warning of drift.

[0038] Step S201: Calculate the intra-bin temporal stability coefficient (Si). Divide the training set into three equal phases (early, middle, and late) according to time sequence. For each feature, calculate the proportion of samples (number of people entering the bin) in each of the three phases for each bin, and take the standard deviation as Si.

[0039]

[0040] Let be the timing stability coefficient of the i-th bin; Let be the percentage of samples from the i-th bin during the t-th time period in the morning / noon / evening. This represents the number of samples within each bin during the morning / noon / evening time period. Sample data for this period; This is the average percentage of the three periods. If the standard deviation of the percentages across the three periods is too large ( > , μS For all the boxes The mean, σS Standard deviation Total number of boxes.

[0041] Step S202: Calculate the feature discrimination attenuation rate (ΔIV). Recalculate each feature on the validation set. , and training set Compare.

[0042]

[0043] Step S203: Global PSI Calculation. Calculate the population stability index based on the difference in the proportion of samples in each bin between the validation set and the training set.

[0044]

[0045] Where: K is the total number of feature bins. This represents the percentage of samples in the i-th bin of the training set (during the photo-taking period). It is the number of samples in the corresponding bin of the training set. ) represents the number of samples corresponding to this feature in the training set; The percentage of samples in the i-th bin of the validation set (observation period). It is the number of samples in the corresponding bin of the validation set. The number of samples corresponding to this feature in the validation set.

[0046] Step S204: Five-dimensional joint judgment. Comprehensive Si over-limit multiple (Si / The drift characteristics and the box are marked by five dimensions: ΔIV attenuation degree, PSI value, IV level, BadRate, etc., as shown in Table 1.

[0047] Table 1 Decision Matrix and Response Path

[0048] Step S300: Combine the three-layer progressive drift perception index, information value and bad sample rate in the bin for joint judgment. Trigger the corresponding hierarchical repair strategy according to the judgment result, perform adaptive repair and cyclic verification on the drift bin, and obtain the solidified final bin mapping and evidence weight WOE encoding. The graded repair strategy is divided into five levels, including: Level 0 Strategy: No action is taken when the indicators of the corresponding bin do not reach the drift threshold; Level 1 Strategy: When there are slight time-series fluctuations in the corresponding bins, perform chi-square adjacent bin merging and boundary fine-tuning; Level 2 Strategy: When a timing warning occurs in the corresponding bin but no actual risk clustering occurs, perform boundary contraction and freeze WOE weights; In the Level 2 strategy: Extract the 99th percentile of the bin corresponding to the recent sample and compare it with the upper boundary of the historical bin. Take the smaller value as the new right boundary for physical boundary compression, and inherit the WOE weight of the historical bin without recalculating.

[0049] Level 3 Strategy: When a corresponding bin experiences a substantial instability breach, a weighted secondary binning is performed; In the level 3 strategy: Samples are weighted based on time-decay weights, and weighted splitting is directly performed for time-driven bins; for concentration-driven bins, a bad user density anchor is introduced as an auxiliary cut-off point, and the cut-off point that maximizes the gradient of the bad sample rate between adjacent sub-bins is selected as the final splitting boundary.

[0050] Level 4 strategy: When the global distribution of the corresponding bin is severely shifted, the corresponding feature is directly removed or external rolling retraining is triggered. In addition, the adaptive repair and cyclic verification include: Hierarchical adaptive Laplacian smoothing is performed after each repair; for sparse bins with a sample size less than the preset threshold, a first smoothing coefficient is used; for sufficient bins with a sample size greater than or equal to the preset threshold, a second smoothing coefficient is used, and the first smoothing coefficient is greater than the second smoothing coefficient; After smoothing, the population stability index and intra-bin time-series stability coefficient of the corresponding bin are recalculated, and if the standards are not met for consecutive preset rounds, the corresponding feature is removed.

[0051] In some specific embodiments, level 0 to level 4 repair strategies are differentially executed according to the five-dimensional joint judgment results, supplemented by smoothing and cyclic verification to ensure repair quality, details are as follows: Step S301: Level 0 strategy. When Si < 1.0 times the benchmark, or ΔIV ≥ -20% and PSI < 0.1, it passes silently and directly performs WOE encoding.

[0052] Step S302: Level 1 strategy. When ΔIV ≥ -20%, 1.0 ≤ Si < 1.5 times, 0.1 < IV < 0.3, PSI < 0.1, the over-standard bin and its adjacent bins are detected. If P ≤ 0.05, it is retained and passed; if the chi-square test P > 0.05, merging is completed. After the chi-square merging is fine-tuned, Laplacian smoothing is performed to pass.

[0053] Step S303: Level 2 strategy. When ΔIV ≥ -20%, 1.0 ≤ Si < 1.5 times, IV ≥ 0.3, BadRate ≤ 15%, PSI < 0.1, its significance lies in dynamically adjusting the upper limit (or high-side boundary) of the historical division interval according to the distribution of the latest samples, to prevent "inflation" in the high segment caused by the passage of time, that is, the 99th percentile of recent samples is extracted as the new right boundary using the outdated standard, and the WOE inherits the parent bin (historical bin) without recalculation.

[0054]

[0055] Wherein, , means only take the current (the feature value of the j-th sample) the j-th Binned samples that satisfy the condition that Recent is defined as a sample set whose timestamp is at the 20th percentile, meaning we only focus on the distribution of the most recent data. The highest level can be reached by calculating the 99th percentile of the most recent bin. The new boundary is the smaller of the historical boundary and the recent 99th percentile. < Recently, the overall sample score has decreased, and the boundary will be narrowed (lowered). This means that the high-score criteria for this bin have become stricter; scores that previously qualified for this bin may now be excluded due to the overall shift in the customer base towards a lower score range. >= The sample scores have not decreased significantly recently, the new boundary remains unchanged, and the old historical boundary is still used.

[0056] It should be further noted that in imbalanced sample scenarios, if boundary contraction is triggered solely by a time-series warning, but bad samples have not yet formed an effective cluster within that contraction region, recalculating the WOE essentially relies on random noise from a very small number of bad samples to update the feature weights of the entire bin. This approach can easily lead to a significant drop in model accuracy. Therefore, this invention chooses to freeze the WOE weights in Level 2 repair, performing only physical space compression, and updating the WOE weights only after the bad samples in that region have accumulated to a statistically reliable threshold.

[0057]

[0058] Step S304: Level 3 Strategy. When time-driven (ΔIV < -20% or PSI ≥ 0.15, Si > 1.5x, IV ≥ 0.3), the bad rate is ignored, and weighted binning is enforced. When concentration-driven (ΔIV ≥ -20%, PSI < 0.1, Si > 1.5x, IV ≥ 0.3, BadRate > 15%), the bad guy density anchor point assists in selecting the cut-off point. The overall path is repaired around the following sequence: time decay weight allocation → weighted quantile cut-off point → gradient ≥ 1.2 verification → cut-off point validity verification (≥ 30 samples) → stratified smoothing → iterative verification.

[0059] In the time decay weight allocation, It is the time decay weight of the j-th sample, which approaches 1 in the near term and approaches 0 in the long term. This is the decay rate control parameter, ranging from 0.1 to 0.3. It is the 80th percentile of the time quantile. The timestamp represents the j-th sample.

[0060]

[0061] It is the time decay weight of the j-th sample. The binning cut point is calculated based on the weighted samples, so that the cut point is shifted towards the dense area of ​​recent samples. =1 / M,2 / M,…,(M 1) / M, where M is the preset number of sub-boxes. It assigns a value to a clearly defined interval boundary, ensuring that each sample is placed into only one unique bin. It is the feature value of the j-th sample.

[0062]

[0063] Calculate the bad sample rate gradient of adjacent sub-boxes This represents the risk ratio between two adjacent sub-boxes. If the gradient is insufficient, merging and backtracking are performed to prevent overfitting. This represents the k-th sub-box after sorting by eigenvalues ​​from smallest to largest. This is the bad sample rate of the next sub-bin, which is the bad sample rate of the adjacent sub-bin with the higher score. This is the bad sample rate of the k-th sub-box, calculated by dividing the number of bad samples in that sub-box by the total number of samples in that sub-box. It is the gradient threshold, and setting it to 1.2 in the algorithm is based on the financial risk control industry standard.

[0064]

[0065] However, when the concentration of bad actors is greater than 15%, a bad actor density anchor point is used to assist in the cutoff point. Calculate the mean characteristics of bad actors within the box. B is the sum of the feature values ​​of the j-th bad guy sample, and B is the total number of bad guy samples. The auxiliary candidate tangent point δ is an adjustment coefficient. It is the feature value of the j-th bad guy sample; These are candidate split points (bad guy anchor points); This involves assigning a clearly defined boundary value to an interval; the effectiveness of the cut point is generally assumed by assuming each bin contains more than 30 bad samples. Subsequently, the weighted quantiles and bad sample anchors are combined, and the cut point that maximizes the gradient after segmentation is selected. , The candidate sets are derived from the original binning cutoff point and the risk inflection point (bad sample rate inflection point). and The set represents the bad debt rate on the left and right sides with q as the cut-off point. From the candidate cut-off point set, the point that maximizes the ratio of the "right-side bad debt rate" to the "left-side bad debt rate" (the critical point with the largest risk difference between the left and right sides) is selected as the final binning boundary. Then, Laplace smoothing is performed, and the loop is entered. After passing the test, the WEO transformation is performed.

[0066] Step S305: Level 4 strategy. When PSI ≥ 0.25 and IV < 0.1, directly remove the feature and do not include it in WOE encoding; when PSI ≥ 0.25, IV ≥ 0.3 and ΔIV < -20%, retraining is required, i.e., extract the 30-day window, re-bind and model the entire feature, referring to the model retraining steps.

[0067] Where P≤0.05 is based on the generally accepted significance level in the field of statistics; PSI classification threshold, BadRate>15% risk concentration threshold, IV screening threshold, and gradient threshold γ≥1.2 are based on common practice standards in the financial risk control industry; α=1.0 / 0.5, ΔIV< The optimal value is determined by performing grid search and sensitivity analysis on the validation set at 20% and a maximum number of iterations of 3. After traversing the candidate threshold combinations, the value that makes the validation set F1 and PSI optimal is selected.

[0068] Step S400: Substitute the WOE encoding into the cascaded master model and the stacked backup model for training; wherein, the cascaded master model includes a high precision gate layer and a high precision omission filling layer; The execution logic of the cascaded main model includes: The input sample first enters the high precision gate layer, which is composed of decision tree binning and logistic regression. If the high precision gate layer determines that the input sample is a bad sample, it is rejected directly. If the input sample is determined to be a good sample, it is sent to the high precision completeness and omissions layer, which is composed of equal frequency binning and logistic regression, for secondary determination.

[0069] The stacked backup model consists of a logistic regression base model based on WOE features and an XGBoost base model based on the original features. The optimal fusion weights for the predicted probabilities of the two base models are learned through the meta-model. The fusion weights assigned to the XGBoost base model are used as the meta-weights.

[0070] Specifically, a dual-model architecture is constructed, consisting of "cascaded primary and stacked backup". The primary model is responsible for daily high-precision decision-making, while the backup model runs in the bypass mode and detects drift.

[0071] Step S401: WOE encoding conversion. Apply the corrected bin boundaries to the training / validation / test sets to map the original feature values ​​to WOE values.

[0072] Step S402: Constructing the Cascaded Main Model. This model employs a "funnel-shaped binary classification with hard labels" decision logic, meaning that if any layer classifies a sample as bad, the entire sample is rejected; only if both layers classify a sample as good can it pass through, ultimately outputting a 0 / 1 label for subsequent calculations of precision, accuracy, F1 score, and other metrics. Specifically, the access control layer (decision tree binning + LR) trains an LR model based on the decision tree binning boundaries, outputting probability P1; the filler layer (equal-frequency binning + LR) trains an LR model based on the equal-frequency binning boundaries, outputting probability P2. The overall cascaded process is as follows: if P1 classifies a sample as bad, the sample is directly rejected and does not enter the filler layer; if P1 classifies a sample as good, it is sent to P2 for a second judgment, with P2 making the final decision.

[0073] Step S403: Stacked backup model construction. Base model 1, an LR model (copy of the master model) based on WOE features; Base model 2, an XGBoost model based on the original standardized features, wherein the meta-model is trained by using the predicted probabilities of the two base models as input to learn the fusion weights through logistic regression.

[0074]

[0075] in The probability of a bad sample or a fraudulent sample. (The fusion weights of the LR probabilities) and (XGBoost probability fusion weights). and The input features are constructed by concatenating the two predicted probabilities trained on the validation set using a Logit transformation, and then feeding them into the logistic regression model for training. This process automatically learns the optimal features. and .

[0076] Step S404: Parallel Evaluation of Two Models. Precision, recall, F1 score, and robustness against drift are simultaneously calculated on the validation set for both the cascaded and stacked models. Drift robustness is determined by extracting the timestamp column from the original test data, sorting the data by time to confirm the data order, and then cutting it according to the 50th quantile. The F1 scores of both the cascaded and stacked models are calculated separately for robustness over short-term and long-term time periods. If the decay of the stacked model is greater than that of the cascaded model, the main model is ready for deployment; otherwise, it reverts to the binning stage for retraining.

[0077] Step S405: Threshold Optimization. Perform a PR curve threshold search on the stacked models to force alignment with the main model's precision target (≥94%). The cascaded main models achieve a balance between precision (94%) and recall (62.67%) at the business level through a physical decoupling of "gatekeeping first, then filling gaps," while retaining complete and interpretable scorecard binning details. The stacked backup models run in bypass mode throughout the process and do not participate in daily business decisions; their core value lies in meta-weights. The perception of fluctuations, that is, when A surge in this level indicates the emergence of new nonlinear patterns that LR cannot capture.

[0078] Step S500: Use the volatility of the meta-weights of the stacked backup model as a drift warning signal, and perform model gray-scale switching and automatic retraining rollback according to the drift warning signal; continuously monitor the change rate and volatility of the meta-weights, and when the change rate exceeds a preset threshold and the duration reaches a preset period, trigger the gray-scale switching signal, switch the stacked backup model to the online emergency backup model, and simultaneously start the offline retraining process based on recent data.

[0079] Specifically, based on the abnormal fluctuations in the meta-weights β of the stacked model, an early warning is triggered and grayscale switching is executed to achieve emergency backup for the model, as follows: Step S501: Real-time monitoring of β weights. Calculate the fusion weight β corresponding to XGBoost in the stacked meta-model daily. Calculate the short-term rate of change and volatility of β.

[0080]

[0081] Here, β is the XGBoost fusion weight, a coefficient assigned to the XGBoost probability in the stacked-element model (logistic regression). It is a quantitative indicator that measures the importance of the nonlinear pattern. The larger β is, the more the current data relies on the complex tree model, and the explanatory power of the linear scorecard (LR) is decreasing. This is the core early warning indicator. It represents the rate of change of β daily (or weekly). If this value remains positive and exceeds a threshold (e.g., 30%), it indicates that the non-linear pattern is rapidly intensifying and a sudden change has occurred in the data. This is the current evaluation period. In the previous evaluation cycle, The absolute change in weight measures how much β has increased or decreased during the interval. The time span between two monitoring nodes.

[0082]

[0083] Where N is the size of the observation window and the number of historical data points used for calculation, and t represents the t historical time periods experienced by the window. It is the weight of day t in history. The historical weighted mean represents the normal baseline level of β within that time period. It is the standard deviation of the weights, which measures the absolute dispersion of β relative to its mean. Volatility The influence of the absolute value of β is eliminated because β varies greatly across different datasets, providing a standardized stability score.

[0084] Step S502: Grayscale flow cut-off trigger. After the model goes live, run the stacked model daily using the scoring samples of the day in bypass mode, and record the recent rate of change in the metamodel fusion weight calculation. With volatility When its rate of change continuously exceeds a threshold, it enters the grayscale switching process, that is, when An orange alert is triggered if the percentage is >30% and the duration is >= 2 assessment periods (days / weeks); when An orange alert is triggered if the rate is >50% and the duration is >= 3 evaluation periods (days / weeks), and gray-scale traffic switching begins. At the same time, the precision and recall of the stacked model on recent validation data are calculated and compared with the cascaded main model. If the conditions of "stacked precision > cascaded precision - 5% and stacked recall > cascaded recall + 3%" are met, the switching value is confirmed.

[0085] Furthermore, in some specific embodiments, model retraining involves extracting recent time window data and re-executing the binning → repair → modeling → verification → deployment process when a stacked alert is triggered or periodic maintenance is performed, as follows: Step S511: Data window extraction. Call the scrolling window splitting function to extract the data from the most recent 30 days of training, 7 days of validation, and 1 day of simulation testing.

[0086] Step S512: Full Remodeling Pipeline. Re-execute all processes from Phase 1 to Phase 4 (binning → drift detection → hierarchical repair → primary / backup modeling) on ​​the new training set.

[0087] Step S513: Comparison and evaluation of the new and old models. Calculate the F1 score, precision, and recall of the new model on recent data. If the new cascaded master model's F1 score and precision are both better than the old version, proceed with deployment.

[0088] Step S514: Gray-scale Validation and Deployment. The new model will initially undergo gray-scale validation with 5% of the traffic. After successful validation, it will be gradually scaled up.

[0089] Step S515: Version Archiving and Rollback. Old model binning configurations, WOE mappings, and PSI monitoring logs are archived together. If issues arise with the new version, a one-click rollback to the previous stable version is possible.

[0090] Comparative example: The experiment uses the Kaggle publicly available credit card fraud time-series dataset for comparative verification. The dataset contains 284,807 samples, with a bad sample rate of 0.172%, representing a highly imbalanced time-series business scenario. The dataset is divided into a training set, a pre-drift test set, and a post-drift test set according to transaction time. The post-drift test set simulates the shift in feature distribution over time in real-world business scenarios.

[0091] As shown in Table 2, the control group used the industry-standard traditional WOE-LR model, XGBoost model, stacked model, and the adaptive cascaded master-slave model proposed in this invention, which includes a five-level disposal matrix, boundary shrinkage + WOE freezing, and cascaded architecture. Evaluation metrics included precision, recall, F1 score, and population stability index PSI. A PSI < 0.1 indicates that the overall model score is stable.

[0092] Table 2 Analysis of the decay of model metrics with time-series drift of the test set

[0093] While the traditional WOE-LR model exhibits a low PSI increment, its F1 score drops drastically, demonstrating a complete failure in predictive ability. XGBoost also shows a significant drop in F1. The cascaded ensemble model designed in this invention maintains the highest F1 score (75.68%) and the smallest performance degradation (5.4%) after time drift, showcasing good predictive stability and robustness to time drift. Although its PSI increment (0.0342) is slightly higher than the stacked model, this is mainly due to the hard-voting ensemble and refined binning making the score distribution more sensitive to feature drift, correctly classifying more risk samples into extremely low segments. Compared to the stacked model, this model has advantages in both precision (93.33%) and recall (63.64%). This distribution change is a benign shift (PSI < 0.1) and does not affect the effectiveness of actual risk control decisions.

[0094] Therefore, it can be seen that the method of the present invention differs from the prior art as follows: 1) Different dimensions of drift perception. Existing technologies mainly rely on a single PSI indicator for drift monitoring. This invention constructs a three-layer progressive detection link: "microscopic Si → mesoscopic ΔIV → macroscopic PSI". Si captures sudden changes in the temporal proportion of a single bin, ΔIV captures the decay of feature discrimination ability, and PSI captures global distribution shift. The three are jointly judged to achieve early warning of drift under unbalanced samples, solving the industry pain point of PSI's insensitivity to sparse labels.

[0095] 2) Different granularity of repair strategies. Existing technologies treat drift features uniformly, either by global rebinding or simple removal. This invention pioneers a five-level repair hierarchy matrix (levels 0-4). Level 1 performs chi-square merging and fine-tuning; Level 2 performs boundary shrinkage + WOE freezing (WOE inherits from the parent bin and is not recalculated); Level 3 distinguishes between "time-driven" and "concentration-driven" weighted secondary binning modes; and Level 4 performs triage and removal or rolling retraining based on IV thresholds. This achieves differentiated repair based on "level-specific strategies".

[0096] 3) Different cascaded architectures. Existing scorecards mostly use a single logistic regression model or parallel ensemble. This invention adopts a cascaded pipeline of "decision tree binning LR (access control) + equal-frequency binning LR (leakage compensation)". The access control layer finds the optimal cut point by maximizing the Gini coefficient, with a measured precision of 97.30%; the leak compensation layer ensures statistical power by balancing sample sizes. The two are combined in a serial logic of "access control directly intercepts bad cases and leak compensation handles good cases", achieving physical decoupling between precision and recall.

[0097] In summary, this invention represents a paradigm shift in methodology. Addressing the issue that existing technologies only solve single-stage problems (PSI monitoring only alarms, and card-based binning only statically merges), this invention, for the first time, connects "perception → graded repair → dual-mode mutual protection → gray-scale switching → rolling retraining" into a complete closed loop. This reduces the drift detection response cycle from the traditional "monthly level (relying on PSI accumulation)" to "daily level (relying on real-time fluctuations of β weight)," thus comprehensively optimizing the passive response mode of scorecards to time-series drift.

[0098] The second aspect of this invention discloses a system based on time-series drift adaptive optimization of unbalanced sample scorecards. Figure 3 This is a structural diagram of a system based on time-series drift adaptive optimization of an unbalanced sample scorecard according to an embodiment of the present invention; as shown below. Figure 3 As shown, the system 100 includes: The data acquisition and pre-binding module is used to acquire imbalanced sample data containing timestamp features and divide it into training set, validation set and test set. It uses decision tree binning and equal frequency binning to perform initial binning and filter effective features. The drift sensing module is used to construct a three-layer progressive drift sensing index, including the intra-box temporal stability coefficient, the feature discrimination ability decay rate, and the population stability index. The graded repair and verification module is used to combine the three-layer progressive drift perception indicators, information value and bad sample rate in the bin for joint judgment, trigger the corresponding graded repair strategy according to the judgment result, and perform cyclic verification to solidify WOE encoding. The primary and backup dual-mode construction module is used to substitute the solidified WOE code into the cascaded primary model and the stacked backup model, which include the access control layer and the leak detection layer, respectively, for parallel training. The monitoring and emergency management module is used to trigger grayscale switching based on the meta-weight volatility of the stacked backup model, and automatically perform model retraining and version rollback management.

[0099] Please note that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for adaptive optimization based on time-series drift of unbalanced sample scorecards, characterized in that, The method includes: Step S100: Obtain imbalanced sample data containing timestamp features, and divide the imbalanced sample data into training set, validation set and test set in chronological order; perform initial binning of the training set using decision tree binning and equal frequency binning respectively, and filter effective features based on information value; Step S200: Construct a three-layer progressive drift perception index for the binning of the effective features. The three-layer progressive drift perception index includes: the intra-bin temporal stability coefficient at the micro level, the feature discrimination ability decay rate at the meso level, and the group stability index at the macro level. Step S300: Combine the three-layer progressive drift perception index, information value and bad sample rate in the bin for joint judgment. Trigger the corresponding hierarchical repair strategy according to the judgment result, perform adaptive repair and cyclic verification on the drift bin, and obtain the solidified final bin mapping and evidence weight WOE encoding. Step S400: Substitute the WOE encoding into the cascaded master model and the stacked backup model respectively for training; wherein, the cascaded master model includes a high precision gate layer and a high precision omission filling layer; Step S500: Use the meta-weight volatility of the stacked backup model as a drift warning signal, and perform model grayscale switching and automatic retraining rollback according to the drift warning signal.

2. The method for adaptive optimization based on time-series drift of unbalanced sample scorecards according to claim 1, characterized in that, In step S200, the specific calculation process for the in-box timing stability coefficient is as follows: The training set is divided into three periods: early, middle, and late. The sample proportion of each bin within the three periods is calculated, and the standard deviation of the sample proportion is taken as the temporal stability coefficient within the bin.

3. The method for adaptive optimization based on time-series drift of an unbalanced sample scorecard according to claim 1, characterized in that, In step S300, the graded repair strategy is divided into five levels, including: Level 0 Strategy: No action is taken when the indicators of the corresponding bin do not reach the drift threshold; Level 1 Strategy: When there are slight time-series fluctuations in the corresponding bins, perform chi-square adjacent bin merging and boundary fine-tuning; Level 2 Strategy: When a timing warning occurs in the corresponding bin but no actual risk clustering occurs, perform boundary contraction and freeze WOE weights; Level 3 Strategy: When a corresponding bin experiences substantial instability, weighted secondary binning is performed; Level 4 Strategy: When the global distribution of the corresponding bins is severely offset, the corresponding feature is directly removed or external rolling retraining is triggered.

4. The method for adaptive optimization based on time-series drift of an unbalanced sample scorecard according to claim 3, characterized in that, In step S300, in the level 2 strategy: Extract the 99th percentile of the bin corresponding to the recent sample and compare it with the upper boundary of the historical bin. Take the smaller value as the new right boundary for physical boundary compression, and inherit the WOE weight of the historical bin without recalculating.

5. The method for adaptive optimization based on time-series drift of an unbalanced sample scorecard according to claim 3, characterized in that, In step S300, in the level 3 strategy: The samples are weighted based on time decay weights. For time-driven bins, weighted splitting is performed directly. For concentration-driven bins, bad sample density anchors are introduced as auxiliary cut points. The cut point that maximizes the gradient of bad sample rate between adjacent sub-bins is selected as the final split boundary.

6. The method for adaptive optimization based on time-series drift of an unbalanced sample scorecard according to claim 1, characterized in that, In step S300, the adaptive repair and cyclic verification include: After each repair, hierarchical adaptive Laplacian smoothing is performed; for sparse bins with a sample size less than a preset threshold, a first smoothing coefficient is used; for sufficient bins with a sample size greater than or equal to the preset threshold, a second smoothing coefficient is used, wherein the first smoothing coefficient is greater than the second smoothing coefficient. After smoothing, the group stability index and intra-bin temporal stability coefficient of the corresponding bins are recalculated. If the target is not met for a consecutive preset number of rounds, the corresponding feature is removed.

7. The method for adaptive optimization based on time-series drift of unbalanced sample scorecards according to claim 1, characterized in that, In step S400, the execution logic of the cascaded master model includes: The input sample first enters the high precision gate layer, which is composed of decision tree binning and logistic regression. If the high precision gate layer determines that the input sample is a bad sample, it is rejected directly. If the input sample is determined to be a good sample, it is sent to the high precision completeness and omissions layer, which is composed of equal frequency binning and logistic regression, for secondary determination.

8. The method for adaptive optimization based on time-series drift of unbalanced sample scorecards according to claim 1, characterized in that, In step S400, the stacked backup model consists of a logistic regression base model based on WOE features and an XGBoost base model based on the original features. The optimal fusion weights for the predicted probabilities of the two base models are learned through the meta-model. The fusion weights assigned to the XGBoost base model are used as the meta-weights.

9. The method for adaptive optimization based on time-series drift of an unbalanced sample scorecard according to claim 8, characterized in that, In step S500, the rate of change and volatility of the meta weights are continuously monitored. When the rate of change exceeds a preset threshold and the duration reaches a preset period, a grayscale switching signal is triggered to switch the stacked backup model to an online emergency fallback model and simultaneously start the offline retraining process based on recent data.

10. A system based on time-series drift adaptive optimization of unbalanced sample scorecards, characterized in that, The system includes: The data acquisition and pre-binding module is used to acquire imbalanced sample data containing timestamp features and divide it into training set, validation set and test set. It uses decision tree binning and equal frequency binning to perform initial binning and filter effective features. The drift sensing module is used to construct a three-layer progressive drift sensing index, including the intra-box temporal stability coefficient, the feature discrimination ability decay rate, and the population stability index. The graded repair and verification module is used to combine the three-layer progressive drift perception indicators, information value and bad sample rate in the bin for joint judgment, trigger the corresponding graded repair strategy according to the judgment result, and perform cyclic verification to solidify WOE encoding. The primary and backup dual-mode construction module is used to substitute the solidified WOE code into the cascaded primary model and the stacked backup model, which include the access control layer and the leak detection layer, respectively, for parallel training. The monitoring and emergency management module is used to trigger grayscale switching based on the meta-weight volatility of the stacked backup model, and automatically perform model retraining and version rollback management.