Stable and high-robustness small sample modeling method
By extracting target fields and independent variable data from the business history sample library, eliminating invalid fields, and performing stratified sampling and field resonance identification, the problems of model instability and feature selection misjudgment in small sample environments are solved, achieving a modeling effect with high robustness and interpretability.
Patent Information
- Application Number
- CN202511673381.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-03-17
AI Technical Summary
In small sample environments, existing modeling techniques suffer from model instability, misjudgment in feature selection, and non-reproducible results. In particular, in the fields of anti-fraud and rare event recognition, the imbalance in label distribution leads to serious interference with model evaluation results, and there is a lack of quantitative identification and interference correction methods for perturbation resonance phenomena.
By extracting data from the target field and independent variable set from the same business history sample library, eliminating invalid fields, performing stratified sampling to construct experimental subsets, calculating test set performance indicators, identifying pseudo-stable segments, correcting field contribution, constructing multiple feature subsets, training and evaluating performance, selecting the optimal solution, introducing a field resonance structure identification mechanism, and performing feature screening and model training.
It achieves model stability and feature selection accuracy in small sample environments, ensures consistency of the modeling process by freezing field caliber and binning rules, identifies pseudo-stable response segments, suppresses the influence of sample skewness, and improves the robustness of the model and the interpretability of the results.
Smart Images

Figure CN121682255A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning modeling technology, and more specifically, to a stable and robust small-sample modeling method. Background Technology
[0002] In real-world business modeling scenarios, especially in areas like fraud prevention and rare event identification, there are often problems such as a very small number of target labels and extreme imbalance between positive and negative samples. Building robust models in such small-sample environments is particularly difficult. Traditional modeling processes typically rely on complete labeled samples, directly building a model to evaluate field importance after training-testing. However, with imbalanced label distribution, the scarcity of target values in the test set can severely interfere with model evaluation results, thus affecting feature selection paths. Furthermore, conventional field perturbation analysis processes mostly employ scrambling and comparison strategies, failing to consider structural issues such as rhythmic resonance interference and pseudo-stable path aggregation between field response chains, leading to overestimation or misidentification of field importance. In addition, many model training processes rely on automatic parameter tuning or cross-validation strategies, which can easily lead to overfitting or unreproducible results when sample size is limited. Currently, there is also a lack of quantitative identification and interference correction methods for perturbation resonance phenomena. These problems result in a lack of stability guarantees in model training, making it difficult to isolate structural constraints and rhythmic interference in feature selection, thereby affecting modeling effectiveness and interpretability.
[0003] To address the above problems, this invention proposes a solution. Summary of the Invention
[0004] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a stable and robust small-sample modeling method to address the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: In a preferred embodiment, it includes: Data containing target fields and sets of independent variables is extracted from the same business history sample library, invalid fields are removed, and a small sample modeling path is triggered when the label distribution is unbalanced. Perform sampling to construct an experimental subset, control the label distribution of the test set through stratified sampling, train the model and calculate the performance index of the test set, and then process the boundary samples with the same score. Based on the prediction results, a field sorting path is constructed and jump positions are identified. High-frequency disturbance regions are extracted and pseudo-stable segments are identified to complete field classification and correction. Calculate the average contribution of the fields, construct multiple feature subsets, train and evaluate the performance on the full set of samples, and select the optimal solution.
[0006] In a preferred embodiment, sample data containing only the target field and the set of independent variables is extracted from the same business history sample library, and a compliance sample set is generated. The variable information value is calculated based on a fixed binning structure and target rate statistics method. Fields with information values of zero, constant columns and near constant columns are removed. When the number of samples with target=0 is significantly lower than that with target=1, the small sample modeling path is automatically triggered.
[0007] In a preferred embodiment, based on the preprocessed sample table, a fixed random number seed is called to perform bidirectional sampling of 90% of the sample rows and 90% of the field columns in 200 groups, and an experimental subset that retains the target label field generated by the historical real results is constructed. Stratified sampling ensures that the number of samples in the test set with target=0 is no less than 200. For groups that do not meet the condition, seed rollover and sampling ratio reduction are performed until the requirement is met or they are marked as unevaluable groups. For each subset of groups that meet the condition, the XGBoost model with frozen parameters is used to complete the training. The AUC value is calculated using the true target value of the test set. The index is used to process samples with tied boundary scores using argsort stable sorting and pseudo-random shuffling algorithm.
[0008] In a preferred embodiment, while keeping the model structure and trained weights unchanged, three rounds of independent shuffling perturbation operations controlled by a fixed random number seed are performed on each field in the test set. The difference in AUC before and after shuffling is calculated and the arithmetic mean is taken as the field contribution value.
[0009] In a preferred embodiment, a sorting path structure is constructed based on the predicted scores output by the current experimental group model from the test set samples, and a label sequence is generated by arranging the predicted scores from high to low. ; Count whether a label switching event occurs between any two adjacent labels and record them as a set of label transition points. In the first 20% of sample positions in the sorting path structure Internal filter transition events constitute a high-density tag transition set and with Construct a fixed-step sliding window centered on the transition point to extract the peak index of transition frequency. ; Based on the difference between the predicted scores of the test set fields before and after scrambling, a field perturbation difference vector Δ is generated. Furthermore, within the first 20% of the sorting path structure, field pairs with consistent direction and synchronized peak-valley alternation are extracted to form a set of field resonance field pairs. .
[0010] In a preferred embodiment, the field resonance field pair set is used. Each field pair in The perturbation response covariance matrix is constructed from the perturbation difference values within the index ranges of 20 samples before and after the perturbation. Principal component analysis is then performed to extract the projected standard deviation along the direction of the largest eigenvector as the field perturbation response synchronization bandwidth. ; From position index along the sort path structure Slide forward and backward to find the first segment where three consecutive label values are the same, and calculate the mean distance between the sample indices when sliding forward and backward. ; Synchronize bandwidth to field perturbation response High-density tag jump event count Distance from sample index mean Combine and calculate the tag rhythm perturbation synchronization bandwidth .
[0011] In a preferred embodiment, the sliding window length N1 is defined by the tag rhythm perturbation synchronization bandwidth, a fixed sliding window is constructed along the test set prediction score sorting path, the tag jump frequency curve and the perturbation response intensity curve are generated, and the perturbation tag coupling intensity curve is calculated by point-to-point multiplication. The local maxima in the perturbation tag coupling strength curve are identified as the response center point. A fixed sliding window of length N1 is extended, and the field perturbation prediction score sequence and target tag sequence within the fixed sliding window of length N1 are extracted. The median score, tag distribution uniformity and tag switching number are calculated to determine the pseudo-stable response aggregation segment. The statistical perturbation intensity, label jump frequency, score density and coverage length of the fields in the pseudo-steady response aggregation segment are statistically analyzed. The overall resonance interference score of the fields in the pseudo-steady response aggregation segment is calculated, and the fields are classified according to the overall resonance interference score and each type of field is corrected accordingly.
[0012] In a preferred embodiment, the perturbation contribution of each field in 200 sets of experiments and the corresponding top 10% improvement factor are used. Calculate the average contribution Construct candidate feature subsets to The system trains and evaluates the performance using the full sample set. Then, it selects the optimal solution based on the degree of deviation between the performance metrics of each candidate subset and the median of the evaluation metrics of 200 sets of experiments, and archives the feature set, performance metrics, median of metrics, field contribution, and random number seed.
[0013] The technical effects and advantages of the stable and robust small-sample modeling method of this invention are as follows: This invention effectively addresses model instability and feature selection misjudgment in small-sample environments by establishing a fully reproducible modeling mechanism. It ensures consistency between variable evaluation and experimental procedures by freezing field definitions and standardizing binning rules; and it introduces a field resonance structure recognition mechanism in perturbation contribution calculation to construct a label rhythm perturbation synchronization bandwidth. This approach accurately identifies pseudo-stable response segments, preventing fields from being misclassified as high-value fields simply because they fall into high-ranking segments. Furthermore, it categorizes fields into four classes based on their response characteristics and implements a differentiated correction strategy to rationalize the contribution of feature perturbations. In the feature selection stage, a feature contribution aggregation mechanism based on a boost factor weighting is adopted, and median deviation distance is introduced. By selecting appropriate schemes, the influence of sample skewness on the results can be effectively suppressed. This invention has advantages such as strong structural sensitivity, high process consistency, and high accuracy in feature selection, making it suitable for high-stability modeling tasks in scenarios with scarce labeled samples. Attached Figure Description
[0014] Figure 1 This is a flowchart illustrating the implementation of a stable and robust small-sample modeling method according to the present invention.
[0015] Figure 2 This is a timing diagram of a stable and robust small-sample modeling method according to the present invention. Detailed Implementation
[0016] 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.
[0017] Example This invention discloses a stable and robust small-sample modeling method, such as... Figure 1 As shown, it includes: Data containing target fields and sets of independent variables is extracted from the same business history sample library, invalid fields are removed, and a small sample modeling path is triggered when the label distribution is unbalanced. Perform sampling to construct an experimental subset, control the label distribution of the test set through stratified sampling, train the model and calculate the performance index of the test set, and then process the boundary samples with the same score. Based on the prediction results, a field sorting path is constructed and jump positions are identified. High-frequency disturbance regions are extracted and pseudo-stable segments are identified to complete field classification and correction. Calculate the average contribution of the fields, construct multiple feature subsets, train and evaluate the performance on the full set of samples, and select the optimal solution.
[0018] First, such as Figure 2 As shown, during the training sample preparation phase, the same business historical sample library is used as the only data source channel. It is clear that this modeling will not access any external data, will not use cross-business domain samples, and will not load derived fields or label inference fields. It is limited to the target label field and its corresponding independent variable set X confirmed by historical real business results under the same business line.
[0019] In practice, the data synchronization interface configured by the task scheduling platform is called to perform snapshot extraction at the task level, establish batch identifiers for extraction actions and record the current timestamp, and set a whitelist for field extraction during the extraction process, which includes only the target field and the set of independent variables X defined under the business scope, to form the original sample table.
[0020] After the original sample table is extracted, it first performs deduplication based on the unique identifier field of the sample to remove potential duplicate records. Then, it performs field integrity verification and value domain consistency verification on all fields. Sample records that fail the verification are removed, and the final list of samples that pass the verification and the field metadata records are archived.
[0021] For numerical variables, the field distribution detection function is called to generate their actual value distribution and extreme value range, and a field dictionary is constructed. For categorical variables, their legal value sets are established and stored in a list of legal value sets. All field caliber information is frozen as a version specific to this modeling process, and subsequent processes are prohibited from adding fields, modifying types, or changing meanings.
[0022] Next, in the data preprocessing stage, the first step is to perform a variable validity assessment based on the frozen field criteria. Specifically, a fixed binning method combined with target rate statistics is used to calculate the proportion of each independent variable with target=1 in each binning interval, and based on this, the information value of the variable is calculated to measure its ability to distinguish the target variable.
[0023] Specifically, the number of bins is set to K=10, and the number of samples in each bin is not less than max(30, 0.5% of the total number of samples); when a bin contains a target=1 or target=0 (0), a smoothing term ε=1e-6 is used to correct the numerator of its target rate, and the corrected bin percentage is calculated. and To avoid abnormal values of log(0); the information value (IV) of all variables is calculated using the binning boundaries determined in the frozen field dictionary to ensure consistency and reproducibility among multiple sets of experiments.
[0024] During the calculation, binning boundaries are taken from the statistical distribution in the frozen field dictionary to ensure binning consistency and reproducibility. Variables with zero information values are considered fields without target identification capabilities and are removed. Furthermore, the following two types of fields are further filtered out as they fail to provide effective information during model learning and are prone to causing model bias: One type is the abnormal constant column, which is a field whose values are completely consistent across all samples; Another type is the near-constant column, which is a field where the proportion of a single value exceeds a set threshold.
[0025] For fields with missing values, no external value imputation is performed, and the original missing state is maintained to enter the modeling process. If, after preprocessing, it is detected that the number of samples with target=0 in the full sample is less than 600 and significantly lower than target=1, then the current task is marked to enter the small sample modeling condition, triggering the small sample high robustness modeling path of this invention.
[0026] In the experimental design phase, a total of 200 experimental groups were set up to construct multiple perturbation and distribution retention experiments to improve the robustness of the overall modeling results. For each experimental group, a fixed-number random seed was used to randomly select 90% of the sample rows and 90% of the independent variable columns from the preprocessed full sample to form the sample set of the current group. The target field was completely retained in each experimental group to ensure label integrity.
[0027] Then, each sample set is stratified and sampled according to the target value, dividing it into a training set (train) and a test set (test). During the division process, a strong constraint is set: the number of samples with target=0 in the test set must be greater than or equal to 200. If the current sampling result does not meet this condition, a fixed offset is applied to the random number seed of the current group and resampling is performed until the requirement is met.
[0028] After the division is completed, record the sample ID list, the list of independent variable fields and the random number seed used in this group, and archive them as the experimental group configuration log.
[0029] When stratified sampling results in the number of samples with target=0 in the test set being less than 200, the system will reorder the random number seed for the current group and try different samples sequentially. , ...until the condition is met; if the condition is not met after 20 consecutive attempts with M=20, the row sampling ratio is reduced by 0.02 each time, down to a minimum of 0.80, and the above sequential sampling process is repeated; if the requirement of test:target=0≥200 is still not met, the current experimental group is marked as an unevaluable group, and this group does not participate in MC calculation and weighted aggregation.
[0030] During the model training and evaluation phase, the unified learner family XGBoost was called sequentially for each training set in the 200 experiments, and the frozen hyperparameter configuration file was loaded for model training. Automatic hyperparameter tuning or early stopping mechanisms were explicitly disabled to ensure consistent training behavior across experimental groups.
[0031] After the model training is complete, the model is applied to the corresponding test set `test`, and the model's AUC metric is calculated. The metrics include AUC, which is the area under the ROC curve. The indicator is the ratio of the occurrence rate of the target label in the top 10% of samples after sorting by predicted score to the overall baseline occurrence rate.
[0032] The number of samples in the top 10% is rounded down and denoted as . If there are samples with tied scores at the boundary, after adopting a stable sorting rule, the set of random number seeds is used to drive a fixed pseudo-random shuffling while preserving the order, ensuring that the selection results of the boundary samples are consistent and reproducible; all score sorting operations use the argsort stable sorting algorithm.
[0033] Since the predicted scores of the top 10% samples often have ties at the boundary, a stable ranking rule is used to avoid ranking instability caused by ties. This involves performing a fixed shuffling operation based on the random seed of the group on the sample sequences with ties, ensuring consistency and reproducibility in the selection of boundary samples. Furthermore, the model training and evaluation metrics of this group are in triplet form. , , Archive storage.
[0034] During the feature contribution calculation stage, while keeping the current model structure and trained weights unchanged, the original values of the current features on the test set are subjected to a fixed-order shuffling perturbation based on the random number seed of the current set, and the model is used to predict the score again to calculate the shuffled AUC value.
[0035] The difference between the scrambled AUC value and the original AUC value is then calculated to obtain the single-scramble importance score of the field, based on the following formula: It also assesses the independent predictive contribution of the single scrambling importance score metric field j.
[0036] To reduce the evaluation variance caused by a single shuffle, r=3 independent shuffle operations were performed on each field, and the importance score of each shuffle was calculated. The arithmetic mean of the values is used as the final field contribution value. The scrambling round number and the random number seed used are also recorded.
[0037] The field shuffling operation, while maintaining the model structure and the values of other fields and labels, only independently shuffles the values of field j in the test set. The shuffling order is controlled by a fixed random number seed, with shuffling rounds r=3, corresponding to a random number seed of [missing information]. •r, to ensure that the three rounds of scrambling are independent of each other in the same group of experiments.
[0038] It should be noted that in the field perturbation modeling stage under small sample conditions, if there is a field nesting resonance interference phenomenon in the field response chain, and the path where the perturbation assessment is located has a double overlapping structure of compressed sorting area and staggered label section, then the field label contribution will be miscalculated and a pseudo-stable response aggregation segment will be formed in the structural path.
[0039] This phenomenon occurs only when the training sample structure satisfies the following three types of coupling features simultaneously: The field set contains multiple field groups originating from the same event response chain, and their response rhythm exhibits a synchronous oscillation pattern in the sorting path; Multiple clusters of this field appear in the top 20% of the field score sorting range, and they still fall into the main sorting structure path after perturbation; The frequency of alternating switching between target=0 and target=1 in the sorting path is abnormally high, forming a label misalignment compression window.
[0040] In the original technical solution, the evaluation of field perturbation contribution adopts a strategy of comparing the fixed scrambling path with the original model, ignoring the rhythmic synchronization of structural responses between fields and the resonance coupling effect of label distribution boundaries. It assumes that all field perturbations can propagate uniformly in the full sorting path, and thus calculates the stable Sorting. However, in the pseudo-stable path aggregation segment, the rhythmic resonance characteristics of the field response and the misalignment interference formed by the interleaving of label boundaries will cause fields that originally had no independent contribution ability to be misclassified as high-perturbation fields due to frequent falling into high-lift segments, resulting in the field stability assessment deviating from the true structural effect. Therefore, in this embodiment, before the field perturbation contribution assessment process, First, a sorting path structure is constructed based on the predicted scores of the test set samples output by the current experimental group model. This structure uses the sample prediction scores as the sorting benchmark, arranging all test samples from high to low to form a sample sequence.
[0041] Subsequently, using the sample positions in this sorting path structure as indices, the permutation sequence of the original label target values of the test samples is mapped, forming a set of label sequences arranged according to the sorting path structure. And based on the label sequence The value change relationship between every two adjacent sample labels is analyzed to determine whether it constitutes a label switching event, i.e., from 0 to 1 or from 1 to 0. Then, the occurrence index of the label switching event is counted point by point according to the position index of the sorted path structure, forming a set of label jump points. .
[0042] Based on the distribution of predicted scores in the ranking path structure, the top 20% of sample positions in the ranking path structure are defined as high-lift segments, denoted as... and in the set of label transition points Screening out those that occurred All transition events within a segment are defined as the high-density tag transition set. .
[0043] exist In this process, a sliding window with a fixed step size is constructed centered on the position index of each jump point. Within each sliding window, the number of label jump events is counted, and the position index of the sorting path structure where the frequency peak of the jump event occurs is extracted. , which serves as the center point of the tag misalignment compression segment.
[0044] Secondly, after identifying potentially misaligned compressed segments, based on the set of all fields included in the field perturbation evaluation in the current experimental group model, the point-by-point difference of the predicted scores in the test set before and after scrambling is recorded for each field, forming a field perturbation difference vector: ,in, This is the predicted score sequence of the field in the test set in its original state. This is the predicted score sequence of the field after scrambling perturbation.
[0045] For each field perturbation difference vector, sort the path structure based on the predicted score. Using the sample location index as the horizontal axis and the perturbation difference as the vertical axis, a moving average function is used for local smoothing. Local fluctuation maxima are extracted within the first 20% of the sorting path structure. Field pairs with local perturbation response peaks within the first 20% of the sorting path structure are counted. Field pairs whose difference curves show consistent direction and synchronized peak-valley alternation within the first 20% of the sorting path structure are selected to form a set of field resonance pairs. .
[0046] Resonance of Fields in a Set Using the perturbation difference curves of all field pairs as input, the corresponding perturbation response sequences are extracted within a range of 20 sample indices before and after the label misalignment compression center point. A perturbation response covariance matrix is constructed, and principal component analysis is performed on this matrix to extract the projected standard deviation along the direction of the largest eigenvector. This standard deviation is defined as the field perturbation response synchronization bandwidth, used to quantify the synchronization oscillation amplitude of the field response chain in the compression path segment. .
[0047] Next, sort along the predicted score path structure. From the sort path structure position index The system slides forward and backward to find the first segment where three consecutive label values are the same (i.e., all 0s or all 1s), and records the position index from the sorted path structure. The sample index distance from the beginning of the paragraph when the position is slid forward. And the sample index distance to slide backward to the start of another paragraph. Calculate the average of the two. , which represents the length of the natural label relaxation interval of the label interleaved compression section.
[0048] The above field perturbation response synchronization bandwidth High-density tag jump event count Distance from sample index mean Combine and calculate the tag rhythm perturbation synchronization bandwidth The specific formula is as follows: ; in, The standard deviation of the maximum principal component projection derived from the covariance matrix of the field perturbation difference curve reflects the synchronous oscillation bandwidth of the field response chain in the compressed path segment; It is derived from the average distance of searching for consistent label intervals from the center point of label interleaving and compression, reflecting the natural structural length of the label aggregation segment of the sorting path; This indicates the number of transition events within the high-lift section, reflecting the intensity of label misalignment.
[0049] It should be noted that the tag rhythm perturbation synchronization bandwidth is only meaningful when all three conditions are met simultaneously: field response chain resonance interference, pseudo-stable sorting structure, and tag compression staggered window. If any one of these conditions is missing, the field perturbation response will not have synchronous oscillation, and the sorting path structure will not be able to form a pseudo-stable response aggregation segment. That is, it degenerates into a minimum value of 1-3 and is masked.
[0050] Subsequently, using the sorted sample sequence as a reference, the label rhythm perturbation synchronization bandwidth is defined as the window length N1, and a fixed sliding window of length N1 is constructed along the sorting path to gradually slide and cover all test samples along the sorting sequence.
[0051] For each sample within a fixed sliding window, the corresponding true target label sequence is extracted, maintaining the ordered arrangement of the label sequence within the fixed sliding window. Based on this ordered label sequence, the target values of adjacent samples are compared point by point, and the number of times the label changes from 0 to 1 or from 1 to 0 is counted. This number of changes is defined as the local label jump frequency value of the current fixed sliding window. For example, if the label sequence within a fixed sliding window is [1,1,0,0,1,0,1,1,0,0], and the label changes occur at positions 3, 5, 6, 7, and 9, for a total of 5 changes, then the label jump frequency value of this fixed sliding window is 5.
[0052] As the fixed sliding window slides completely across all test sample sequences along the sorting path, the local label transition frequency value corresponding to each fixed sliding window position is recorded, forming a label transition frequency curve about the sorting path position. The horizontal axis of this label transition frequency curve is the position index of the starting position of the fixed sliding window in the sorting path, and the vertical axis is the number of label changes within the corresponding fixed sliding window. This curve is used to capture the local areas with the most frequent label changes in the sorting path, i.e., the positions where label interleaving and compression of the fixed sliding window may occur.
[0053] Furthermore, based on the previously generated field perturbation difference sequence, a fixed sliding window of the same length N1 is used to perform convolutional smoothing on the predicted score sorting path. The average perturbation intensity within the center position of each fixed sliding window is calculated to obtain the perturbation response intensity curve. Each point in this perturbation response intensity curve represents the average impact intensity of the field perturbation on the model's predicted output within the current fixed sliding window.
[0054] Subsequently, the label transition frequency curve and the disturbance response intensity curve are aligned one by one along the predicted score sorting path at fixed sliding window positions, and a point-to-point multiplication operation is performed. At each fixed sliding window position, the corresponding label transition frequency value is multiplied by the disturbance response intensity value to calculate the disturbance label coupling strength value of the current fixed sliding window, which is used to measure the resonance capability of field disturbances in the local label violent fluctuation region.
[0055] As the fixed sliding window moves along the sorting path, the perturbation label coupling strength value at each fixed sliding window position is recorded, and a perturbation label coupling strength curve is plotted. Local maxima are identified on this curve and marked as response center points where field perturbation and label structure resonance may exist. Using each response center point as the center, fixed sliding windows of length N1 are extended forward and backward. The corresponding field perturbation prediction score sequence and target label sequence within each N1-length fixed sliding window are extracted and used for pseudo-stable response aggregation segment determination.
[0056] Specifically, within each fixed sliding window with an extension length of N1, the following three types of statistics are calculated: Extend the distribution density of predicted scores within a fixed sliding window of length N1, and determine whether the predicted scores are concentrated in the top 20% of the high-scoring segments of the sorting path; The uniformity of label distribution is analyzed by considering the proportion of labels with target=0 and target=1 within a fixed sliding window of length N1. The number of times the target value is switched within a fixed sliding window of length N1 is extended to determine whether there is high-frequency label interleaving within the window.
[0057] If a fixed sliding window with an extended length of N1 satisfies the following conditions: the predicted score is concentrated in the top 20% of the high-scoring segments of the sorting path, the label distribution is approximately uniform, and the label switches multiple times within the fixed sliding window with an extended length of N1, then the fixed sliding window with an extended length of N1 is determined to be a pseudo-stable response aggregation segment, and this segment is marked on the global sorting path.
[0058] Specifically, the concentration of predicted scores is determined by the median score of samples within a fixed sliding window of length N1 being greater than or equal to the 80th percentile of all test sample scores; the uniformity of label distribution is determined by a threshold of |p(target=1)−0.5|≤0.1; and multiple switching is determined by a threshold of the number of label switching occurrences within a fixed sliding window of length N1 being greater than or equal to ⌈0.3×N1⌉. When all three conditions are met simultaneously, the segment is marked as a pseudo-stable response aggregation region.
[0059] Next, within each pseudo-steady response aggregation segment, for each field within the pseudo-steady response aggregation segment, the total coverage length of all fields labeled as aggregation segments, the average disturbance intensity within the segment, the average label jump frequency, and the concentration of score distribution density are summarized. The overall resonance interference score of the field is then calculated, and the fields are divided into four categories based on this overall resonance interference score: The first type is the resonance aggregation type field, which has a wide range of aggregation segments and significant response intensity, forming a high degree of resonance in multiple interleaved label segments; The second type is the boundary squeezing field, which only forms a perturbation focus at high label switching density; The third type is the field with occasional disturbances, which forms a weak resonance only in a very few points and segments; The fourth type is the conventional response field, which has a uniform perturbation response distribution and no resonance with the tag structure.
[0060] Among them, the overall resonance interference score of the field Calculate using the following formula: =0.4 × average disturbance intensity within the segment + 0.3 × average tag jump frequency + 0.2 × high-density concentration + 0.1 × aggregated segment coverage length; After completing the field classification, the corresponding contribution adjustment strategy is executed based on the field type: For fields with resonant aggregation, all their MC calculation results are directly removed to avoid their erroneous high contribution values affecting the model feature ranking; For boundary squeezing fields, a perturbation correction factor is generated based on the overall resonance interference score of the field, and its MC value is compressed proportionally. For fields with occasional perturbations, retain the original MC value and add a flag indicating areas of concern to prompt cross-validation in subsequent model analysis. For regular response fields, the original MC result is directly retained.
[0061] Finally, the resonance evaluation data, classification results, processing actions, original prediction differences, sliding window indices, fixed sliding window positions, and identification labels of all fields are written into the field resonance perturbation identification and correction list, and archived together with the experimental group ID to which they belong, model hyperparameters, and scrambled random seeds to form a complete perturbation identification and correction record.
[0062] Furthermore, in the weighted aggregation stage, based on the model evaluation results of 200 experimental groups, the average top 10% improvement factor of all experimental groups is first calculated as a global performance reference indicator, specifically according to the formula: ; Subsequently, for each feature, the weighted average contribution is calculated based on its perturbation contribution in each experimental group and its corresponding top 10% boost factor. : ; in, The contribution of field j to the perturbation in the g-th experiment; The weighted average is used to determine the improvement factor for the top 10% in this group of experiments; the weighted average ensures that the experimental group with the higher improvement factor has a greater impact on the final contribution ranking, thereby enhancing the effectiveness of feature selection.
[0063] After obtaining all characteristics After that, only retain Features with values greater than 0 are used to remove fields that do not contribute positively to the target prediction; subsequently, by... Sort by high to low, and then select the top 50%, 60%, 70%, 80%, and 90% to form candidate feature subsets. , Simultaneously, the member list and sorting criteria of each subset are fixed and written into the archive list. If there are cases of tied feature contributions at the division boundary, a uniform random number seed is used to perform consistent shuffling on the tied fields to ensure the reproducibility of feature division.
[0064] During the full-scale reflow phase, five candidate feature subsets were targeted. On the full sample data, the learner type and hyperparameter configuration were reused exactly as in the experimental phase. The models were trained and the corresponding performance metrics were calculated, including ( Record the results; simultaneously, calculate the median of the test set metrics for the 200 experiments, and denot it as the performance statistics center. ; The distance from each candidate solution to the center was calculated by standardizing the solution using MAD (median absolute deviation) as the metric. ; in, , Used to measure the degree of deviation of candidate solutions from the overall performance center.
[0065] Then select from the candidate solutions The solution with the smallest distance is selected as the closest solution; if the distances are the same, the solution with fewer features is preferred to reduce model complexity; if the number of features is still the same, then the solution with fewer features is selected. The scheme with the largest sum is chosen to maximize the overall prediction contribution. The feature set and corresponding performance indicators of the finally determined optimal scheme are then used. ), Performance Statistics Center MAD and various The calculation process is recorded and archived synchronously.
[0066] In the quality control and caliber restriction stages, the sampling ratio, scrambling rounds, and random number seed table for the training experiment are strictly fixed to ensure the reproducibility of the entire process. Specifically, this includes: The fixed row sampling ratio is 0.9, and the column sampling ratio is 0.9. The number of random number seeding rounds is fixed at r=3, and a random number seed table is used uniformly. Strictly based on the hierarchical partitioning rules of target, ensuring that the number of samples with target=0 in the test set is ≥200; Keep the marginal distribution of the target labels unchanged; No external data source is introduced; Merging samples across batches is prohibited; all experiments must be performed independently within the same scope.
[0067] Regarding the definition of indicators, the following standards shall be adopted uniformly: AUC is defined as the area under the ROC curve; Defined as the multiple by which the occurrence rate of the target increases relative to the overall occurrence rate after taking the top 10% of the samples in descending order of the predicted scores; Field perturbation contribution (MC) is defined as the reduction in AUC caused by the absence of a field; Weighted average contribution Defined as the average contribution weighted by the top 10% increase factor.
[0068] All calculations are performed in a single batch with a unified implementation standard, and are recorded in detail in the log.
[0069] In the exception and retry strategy, a closed-loop handling mechanism is designed for potential exceptions, as follows: If a training process fails to converge, results in numerical overflow, or has missing evaluation metrics, the training will be restarted with the current group's random number seed and the reason for failure will be recorded. If the AUC calculated after scrambling a certain set of fields results in NaN or exceeds the range [0,1], then the fields are re-scrambled and an anomaly is marked in the scrambling log. If a certain group If the calculation cannot be stable due to parallel boundaries, the stable sorting and shuffling strategy is invoked to recalculate until a consistent result is obtained.
[0070] In the result output and logging process, the following content will be output uniformly: Detailed indicators for the 200 experimental groups, including: , , , }, Sampling and stratification list, scrambling operation log and random number seed table; Each feature The list consists of five candidate feature subsets, with the subsets retaining the tier boundaries and parallel broken records. Results of full-volume retraining and the basis for selecting the optimal solution.
[0071] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0072] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.
[0073] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and inventive constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0074] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0075] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0076] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A stable high-robustness small sample modeling method, characterized in that, Comprise: Extract data containing target field and independent variable set from the same business history sample library, eliminate invalid fields, and trigger small sample modeling path when label distribution is unbalanced; Perform sampling to build experimental subsets, control test set label distribution through stratified sampling, train the model and calculate test set performance indicators, then process the boundary and list the score samples; Based on the prediction results, build a field ranking path and identify the jump position, extract the high-frequency disturbance area and identify the pseudo-stable section, complete the field classification and correction; Calculate the average contribution of the field, construct a multi-grade feature subset, train and evaluate the performance on the full sample, and select the optimal solution.
2. The method of claim 1, wherein: Extract sample data containing only target fields and independent variable sets from the same business history sample library, and generate a compliance sample set; Based on the fixed binning structure and target rate statistical method, calculate the variable information value, eliminate the information value of zero, constant column and near constant column field, and automatically trigger the small sample modeling path when the number of target=0 samples is significantly lower than target=1.
3. The method of claim 1, wherein: Based on the sample table generated by preprocessing, call the fixed random seed to perform 200-group bidirectional sampling of 90% sample rows and 90% field columns, and build an experimental subset that retains the target label field generated by the historical true result; Ensure the number of test set target = 0 samples is no less than 200 by stratified sampling, perform seed order extension and sampling ratio down operation on groups that do not meet the conditions until they meet the requirements or are marked as unassessable groups; call the frozen parameter configuration XGBoost model for each subset of the groups that meet the conditions to complete training, calculate the AUC value with the true target value of the test set, and Indicators, and handle the boundary score and parallel samples with the argsort stable sorting and pseudo-random scattering algorithm.
4. The method of claim 1, wherein the method is stable and highly robust for small sample modeling. Under the premise of keeping the model structure and trained weight unchanged, perform three rounds of independent shuffling disturbance operation on each field in the test set controlled by the fixed random seed, calculate the AUC difference before and after shuffling and take the arithmetic mean as the field contribution value.
5. The method of claim 4, wherein: Constructing an ordering path structure based on the prediction scores output by the current experimental group model from the test set samples, and arranging the generated label sequences from high to low according to the prediction scores ; Counting whether a tag switching event occurs between every two adjacent tags and recording as a set of tag hopping points In the 20% sample position section before the sorting path structure The inner screening hopping event constitutes a high-density tag hopping set And The fixed step sliding window is constructed around the hopping point to extract the hopping frequency peak index ; The difference between the field perturbation difference vector Δ generated by the difference between the field prediction scores in the test set before and after the shuffle And extract the field resonance field pair set composed of the field pairs with consistent direction and alternating peak and valley synchronization in the first 20% segment of the sorting path structure .
6. The method of claim 5, wherein: Set of field resonance field pairs Each field pair in The perturbation difference values in the range of 20 sample indexes before and after each field pair are used to construct a perturbation response covariance matrix, and principal component analysis is performed to extract the projection standard deviation in the direction of the maximum characteristic vector as the field perturbation response synchronous bandwidth ; From position index along ordering path structure Forward and backward sliding find the first occurrence of 3 consecutive label value same position paragraph, calculate the forward and backward sliding sample index distance mean ; Synchronizing bandwidth with field perturbation response high density tag hop event count sample index distance mean combining, computing tag cadence perturbation synchronization bandwidth .
7. The method of claim 6, wherein: Define the sliding window length N1 with the label rhythm disturbance synchronous bandwidth, build a fixed sliding window along the test set prediction score ranking path, generate a label jump frequency curve and a disturbance response intensity curve, and perform point-to-point multiplication to calculate the disturbance label coupling intensity curve; Identify the local maximum point in the disturbance label coupling intensity curve as the response center point, expand the fixed sliding window with a length of N1, and extract the field disturbance prediction score sequence and target label sequence in the fixed sliding window with an expansion length of N1, calculate the score median, label distribution uniformity and label switching times, and determine the pseudo-stable response aggregation section; Statistical pseudo-stable response aggregation section field statistical disturbance intensity, label jump frequency, score density and coverage length, calculate the field overall resonance interference score in the pseudo-stable response aggregation section, and classify the fields according to the field overall resonance interference score and correct each type of field.
8. The method of claim 1, wherein the method is stable and highly robust for small sample modeling. Based on the disturbance contribution of each field in 200 groups of experiments and the corresponding top 10% promotion multiple Calculate the average contribution , construct a candidate feature subset to And evaluate the performance with the full sample training, then select the optimal scheme according to the deviation between the performance index of each candidate subset and the median of the 200 group experiment evaluation index, and archive the feature set, performance index, index median, field contribution and random seed.