A model training data bias detection method based on attribution consistency
Patent Information
- Application Number
- CN202611124203.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]目前,在复杂电磁数据场景下,无法准确判断同类别样本归因特征的聚合一致程度以及类别中心特征的代表性偏移情况,导致训练数据中的伪相关偏差和低质量样本难以被有效识别,进而降低训练数据偏差检测结果的可靠性,因此,提出一种基于归因一致性的模型训练数据偏差检测方法
[0042]本发明通过对候选样本执行积分梯度归因生成样本归因向量,并构建类别归因中心向量,结合样本归因偏离度与预测置信度形成样本可信度评估量,筛选有效归因样本集合,基于有效归因样本集合计算类内归因一致性得分和代表性偏差量,对类别归因中心向量进行迭代修正,并利用修正后类内归因一致性得分完成类别偏差判定,实现训练数据偏差的精准识别与伪相关特征的有效发现,提高模型训练数据质量评估的准确性和可靠性,实现模型决策依据的可解释分析与偏差溯源能力增强,降低因数据偏差导致的模型误判风险。
Smart Images

Figure CN123012490A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data detection technology, and more specifically, to a method for detecting bias in model training data based on attribution consistency. Background Technology
[0002] With the widespread application of deep learning models in electromagnetic data processing scenarios such as synthetic aperture radar image recognition, communication signal analysis, and signal time-frequency feature learning, the impact of training data quality on model performance is becoming increasingly prominent. Existing training data quality assessment methods typically focus on statistical indicators such as sample label correctness, class distribution balance, or overall model recognition accuracy, judging whether there are abnormal samples or class bias in the training data by analyzing the model output results.
[0003] The existing technology has the following shortcomings:
[0004] Currently, in complex electromagnetic data scenarios, it is impossible to accurately determine the degree of convergence consistency of attribution features of samples of the same category and the representativeness shift of category center features. This makes it difficult to effectively identify spurious correlation bias and low-quality samples in the training data, thereby reducing the reliability of training data bias detection results. Therefore, a model training data bias detection method based on attribution consistency is proposed.
[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a model training data bias detection method based on attribution consistency. This method utilizes a sample feature mapping and class attribution center construction mechanism based on integral gradient attribution, and integrates sample attribution deviation analysis and prediction confidence assessment to achieve sample credibility grading and screening and intra-class attribution consistency iterative correction, thereby solving the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting bias in model training data based on attribution consistency, comprising the following steps:
[0008] Step S1: Perform integral gradient attribution on candidate samples to generate sample attribution vectors, and aggregate the sample attribution vectors of similar candidate samples to generate class attribution center vectors.
[0009] Step S2: Calculate the sample attribution deviation by combining the sample attribution vector and the category attribution center vector, collect the sample prediction confidence distribution, generate the sample confidence assessment quantity by combining the sample attribution deviation, perform hierarchical labeling on the candidate samples according to the sample confidence assessment quantity, and set the effective attribution sample set.
[0010] Step S3: Calculate the intra-class attribution consistency score based on the sample attribution vectors in the effective attribution sample set, and combine the intra-class attribution consistency score to evaluate the representativeness deviation of the current category attribution center vector and determine whether to trigger the deviation correction mechanism.
[0011] Step S4: In the deviation correction mechanism, the category attribution center vector is updated according to the set of valid attribution samples, and the corrected intra-class attribution consistency score is regenerated. The corrected intra-class attribution consistency score is used as the basis for class deviation judgment.
[0012] In a preferred embodiment, in step S1, the candidate samples are electromagnetic data samples initially selected from the test set by category and to be included in the attribution consistency calculation. The sample types include one of three electromagnetic data modes: synthetic aperture radar image, communication I / Q time-series signal, and signal time-frequency diagram.
[0013] Candidate samples are first acquired using an electromagnetic data acquisition device consisting of a synthetic aperture radar system, a communication signal acquisition card, or a signal time-frequency analyzer. The candidate samples are then input into the training dataset to be detected to complete the training of the target deep learning model and solidify the weights. The model is then called to output the predicted optimal category for each candidate sample.
[0014] In a preferred embodiment, in step S1, the integral gradient attribution method is used to calculate the attribution map of each candidate sample to the predicted optimal category.
[0015] Flatten the two-dimensional attribution heatmap or one-dimensional attribution sequence into a one-dimensional vector, and perform L2 normalization on the flattened vector to obtain the sample attribution vector.
[0016] The class attribution center vector is obtained by performing mean aggregation on the attribution vectors of candidate samples of the same class.
[0017] In a preferred embodiment, in step S2, for each candidate sample, the sample attribution deviation is calculated by combining the sample attribution vector and the category attribution center vector.
[0018] The sample prediction confidence distribution of each candidate sample is obtained in real time by using the Softmax output function of the target deep learning model, and the confidence concentration is calculated.
[0019] Next, Max-Min interval standardization was performed on the sample attribution deviation to obtain the standardized result of the sample attribution deviation;
[0020] The sample confidence assessment metric is obtained by fusing the standardized results of sample attribution deviation and confidence concentration using the geometric mean method.
[0021] In a preferred embodiment, in step S2, the sample confidence assessment value is compared with two critical values: the lower bound of a reliable sample and the lower bound of a suspicious sample.
[0022] When the sample confidence assessment value is greater than or equal to the lower bound of the confidence sample, the candidate sample is marked as a confidence sample and included in the effective attribution sample set;
[0023] When the sample confidence assessment value is between the lower bound of suspicious samples and the lower bound of reliable samples, the candidate sample is marked as a suspicious sample, and its sample attribution vector is retained for subsequent source tracing but not included in the set of valid attribution samples.
[0024] When the sample confidence assessment value is less than the lower bound of the suspicious sample, the candidate sample is marked as a rejected sample and removed from the valid attribution sample set. The attribution vector is retained for subsequent bias cause analysis.
[0025] In a preferred embodiment, in step S3, the sample attribution vectors corresponding to each sample in the valid attribution sample set are retrieved to calculate the intra-class attribution consistency score.
[0026] The sample attribution vectors in the effective attribution sample set are re-aggregated by mean to obtain the re-aggregated center vector, and the representativeness bias is calculated.
[0027] ;
[0028] in, For category The representative deviation, The re-aggregated center vector is obtained by re-mean aggregation of the sample attribution vectors in the effective attribution sample set. For category The category attribution center vector.
[0029] In a preferred embodiment, in step S3, the representative deviation is compared with a preset offset tolerance threshold:
[0030] When the representativeness deviation is greater than or equal to the preset offset tolerance threshold, it is determined that the category attribution center vector has deviated from the true direction of the effective sample, the correction mechanism is set to true, and the intra-class attribution consistency score is awaited for correction.
[0031] When the representativeness deviation is less than the preset offset tolerance threshold, the category attribution center vector is deemed sufficiently representative. The correction mechanism is then marked as false, and the intra-class attribution consistency score is directly output as the basis for category deviation determination.
[0032] In a preferred embodiment, in step S4, when the correction mechanism trigger flag is greater than zero (true), the deviation correction mechanism is activated; when the trigger flag is not greater than zero (false), the intra-class attribution consistency score is directly used as the corrected intra-class attribution consistency score, and then proceeds to the subsequent spurious correlation bias determination.
[0033] The deviation correction mechanism generates a re-aggregation center vector by calculating the mean of the sample attribution vectors in the effective attribution sample set. The re-aggregation center vector and the category attribution center vector are then recalculated using the representativeness deviation formula to obtain a new representativeness deviation. Finally, the category attribution center vector is updated to the re-aggregation center vector.
[0034] Based on the category attribution center vector, the sample attribution deviation of each candidate sample is recalculated according to the deviation formula. The sample credibility assessment is regenerated according to the geometric mean fusion method. The grading labeling is re-executed according to the grading threshold, and the effective attribution sample set is updated.
[0035] The iteration terminates when the new representative deviation is less than the preset offset tolerance threshold; otherwise, it returns to the deviation correction mechanism to continue iteration.
[0036] After the iteration converges, the intra-class attribution consistency score is recalculated based on the sample attribution vectors in the final valid attribution sample set, resulting in the corrected intra-class attribution consistency score.
[0037] In a preferred embodiment, in step S4, after obtaining the corrected intra-class attribution consistency score, the corrected intra-class attribution consistency score is compared with the consistency threshold. At the same time, the ratio of the number of correctly predicted samples of the current category in the test set to the total number of samples is calculated as the category recognition accuracy, and the category recognition accuracy is compared with the accuracy threshold.
[0038] When the corrected intra-class attribution consistency score is less than the consistency threshold and the class recognition accuracy is not less than the accuracy threshold, it is determined that the current class has a pseudo-correlation bias with high accuracy and low consistency, and the class bias judgment conclusion is output.
[0039] When the corrected intra-class attribution consistency score is not less than the consistency threshold, the current category attribution pattern is determined to be unified. Based on the comparison between the category recognition accuracy and the accuracy threshold, it is further subdivided into high-quality categories or model learning bias categories.
[0040] When the corrected intra-class attribution consistency score is less than the consistency threshold and the category identification accuracy is less than the accuracy threshold, the current category is determined to be a data quality defect category, indicating a chaotic attribution pattern and insufficient decision-making ability.
[0041] The technical effects and advantages of this invention are as follows:
[0042] This invention generates sample attribution vectors by performing integral gradient attribution on candidate samples and constructs a class attribution center vector. It combines sample attribution deviation and prediction confidence to form a sample credibility assessment metric, filters a set of valid attribution samples, calculates intra-class attribution consistency score and representativeness bias based on the valid attribution sample set, iteratively corrects the class attribution center vector, and uses the corrected intra-class attribution consistency score to determine class bias. This achieves accurate identification of training data bias and effective discovery of spurious correlation features, improves the accuracy and reliability of model training data quality assessment, enhances the interpretability and bias tracing capabilities of model decision-making, and reduces the risk of model misjudgment due to data bias. Attached Figure Description
[0043] Figure 1 This is a flowchart illustrating the implementation of a model training data bias detection method based on attribution consistency according to the present invention.
[0044] Figure 2 This is a schematic diagram illustrating the steps of a model training data bias detection method based on attribution consistency according to the present invention. Detailed Implementation
[0045] 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.
[0046] This invention generates sample attribution vectors by performing integral gradient attribution on candidate samples and constructs a class attribution center vector. It combines the sample attribution deviation and prediction confidence to form a sample credibility assessment metric, filters the effective attribution sample set, calculates the intra-class attribution consistency score and representativeness bias based on the effective attribution sample set, iteratively corrects the class attribution center vector, and uses the corrected intra-class attribution consistency score to complete the class bias determination. This achieves accurate identification of training data bias and effective discovery of spurious correlation features, improving the accuracy and reliability of model training data quality assessment.
[0047] Example 1
[0048] Please see Figures 1 to 2 A method for detecting bias in model training data based on attribution consistency is described below.
[0049] Step S1: Perform integral gradient attribution on candidate samples to generate sample attribution vectors, and aggregate the sample attribution vectors of similar candidate samples to generate class attribution center vectors.
[0050] Step S2: Calculate the sample attribution deviation by combining the sample attribution vector and the category attribution center vector, collect the sample prediction confidence distribution, generate the sample confidence assessment quantity by combining the sample attribution deviation, perform hierarchical labeling on the candidate samples according to the sample confidence assessment quantity, and set the effective attribution sample set.
[0051] Step S3: Calculate the intra-class attribution consistency score based on the sample attribution vectors in the effective attribution sample set, and combine the intra-class attribution consistency score to evaluate the representativeness deviation of the current category attribution center vector and determine whether to trigger the deviation correction mechanism.
[0052] Step S4: In the deviation correction mechanism, the category attribution center vector is updated according to the set of valid attribution samples, and the corrected intra-class attribution consistency score is regenerated. The corrected intra-class attribution consistency score is used as the basis for class deviation judgment.
[0053] The specific implementation is as follows:
[0054] In step S1, the candidate samples are electromagnetic data samples initially selected from the test set by category and to be included in the attribution consistency calculation. The sample types include one of the three electromagnetic data modes: synthetic aperture radar image, communication I / Q time series signal, and signal time-frequency diagram.
[0055] The category attribution center vector is the aggregation result of all candidate sample attribution vectors for the current category, and is used to characterize the overall decision direction of the category in the attribution space;
[0056] The deviation correction mechanism is a closed-loop correction process that re-aggregates and updates the category attribution center vector after the initial consistency score is calculated.
[0057] Candidate samples are first acquired using an electromagnetic data acquisition device consisting of a synthetic aperture radar system, a communication signal acquisition card, or a signal time-frequency analyzer. The target deep learning model is then trained based on the training dataset to be detected. After the model parameters are solidified, the candidate samples are input into the target deep learning model, and the model is called to output the predicted optimal category for each candidate sample.
[0058] The target deep learning model is a convolutional neural network model with fixed weights trained on the training dataset to be detected using the standard cross-entropy loss function. In this example, it is used to drive subsequent attribution calculations and consistency assessments.
[0059] For each candidate sample, the integral gradient attribution method is used to calculate its attribution map for the predicted optimal class. The formula for calculating the single-dimensional attribution value is as follows:
[0060] ;
[0061] in, For candidate samples Attribution value, Input tensor for candidate samples Dimensional value, The zero-valued baseline tensor of the first Dimensional values (image samples use all-zero images, and time-series signals use all-zero sequences). These are the integral interpolation coefficients. Let be the output probability of the deep learning model for predicting the optimal class. (Candidate sample number 1) The greater the deviation of a dimension's value from the baseline, and the higher the model's prediction probability is sensitive to that dimension, the larger the attribution value of that dimension, reflecting the more significant the contribution of that dimension's feature to the model's decision.
[0062] Flatten the two-dimensional attribution heatmap or one-dimensional attribution sequence into a one-dimensional vector, and perform L2 normalization on the flattened vector to obtain the sample attribution vector:
[0063] ;
[0064] in, To flatten the attribution vector, For vector L2 norm, It is a very small positive number, used to avoid calculation errors caused by a denominator of zero. This refers to the attribution vector of the sample. L2 normalization maps all attribution vectors onto a unit sphere, eliminating differences in magnitude and ensuring that the angles between subsequent vectors directly reflect the similarity of the attribution directions.
[0065] Perform mean aggregation on the attribution vectors of similar candidate samples to obtain the category attribution center vector:
[0066] ;
[0067] in, For category The category attribution center vector, For category The Middle The sample attribution vector corresponding to each candidate sample. For category The number of candidate samples. The more similar the attribution directions of candidate samples of the same type, the larger the magnitude and the more definite the direction of the category attribution center vector, and the more representative it is of the overall decision direction of that category in the attribution space.
[0068] In step S2, for each candidate sample, the sample attribution deviation is calculated by combining the sample attribution vector and the category attribution center vector:
[0069] ;
[0070] in, For category The Middle Sample attribution deviation of candidate samples, sign This is a vector dot product operation. The more consistent the direction of the sample attribution vector with that of the category attribution center vector, the smaller the sample attribution deviation, reflecting that the model decision basis of the candidate sample is more consistent with the overall decision direction of the category; the greater the directional deviation, the greater the sample attribution deviation, reflecting that the feature region on which the candidate sample depends deviates from the core decision region of the category.
[0071] The sample prediction confidence distribution of each candidate sample is obtained in real time through the softmax output function of the target deep learning model, and the confidence concentration is calculated according to the following formula:
[0072] ;
[0073] in, For the sample prediction confidence distribution, the th The predicted probabilities of each category, The total number of categories in the dataset. For category The Middle The confidence concentration of the candidate samples, with values falling into Interval. The more focused the sample prediction confidence distribution is on a single class, the greater the confidence concentration and the closer it is to a certain range. The more dispersed the distribution, the smaller the confidence concentration and the closer it is to a certain level. .
[0074] Next, Max-Min interval standardization was performed on the sample attribution deviation:
[0075] ;
[0076] in, , This represents the extreme value of the attribution deviation for all candidate samples in the current category. This is the standardized result of the sample attribution deviation.
[0077] The sample reliability assessment metric is obtained by combining the two factors mentioned above using the geometric mean method.
[0078] ;
[0079] in, This is the inverse value of the standardized result of the sample attribution deviation, used to explicitly convert "low deviation" into a co-contribution of "high confidence". This is a measure of sample credibility. The smaller the attribution deviation and the greater the confidence concentration, the greater the sample credibility measure, reflecting that the candidate sample is closer to a high-quality learning sample that "the attribution direction fits the category center and the model makes decisive decisions".
[0080] The sample confidence assessment metric is compared with two critical values: the lower bound of the reliable sample and the lower bound of the suspicious sample.
[0081] When the sample confidence assessment value is greater than or equal to the lower bound of the confidence sample, the candidate sample is marked as a confidence sample and included in the effective attribution sample set;
[0082] When the sample confidence assessment value is between the lower bound of suspicious samples and the lower bound of reliable samples, the candidate sample is marked as a suspicious sample, and its sample attribution vector is retained for subsequent source tracing but not included in the set of valid attribution samples.
[0083] When the sample confidence assessment value is less than the lower bound of the suspicious sample, the candidate sample is marked as a rejected sample and removed from the valid attribution sample set. The attribution vector is retained for subsequent bias cause analysis.
[0084] The lower bounds for reliable and suspicious samples are set as follows: Before dataset bias detection is initiated, the sample reliability assessment value is calculated for all candidate samples of the current category, forming an assessment value distribution. The upper quartile of this distribution is taken as the lower bound for reliable samples, and the lower quartile is taken as the lower bound for suspicious samples. This method ensures that both threshold values are objectively given by the actual data distribution, avoiding subjective setting.
[0085] The effective attribution sample set refers to a subset of candidate samples that are labeled as credible samples. Each element in the set carries a reference to both the corresponding sample attribution vector and the category attribution center vector, which is used to support the calculation of intra-class attribution consistency scores and the updating of category attribution center vectors in subsequent steps.
[0086] In step S3, the sample attribution vectors corresponding to each sample in the valid attribution sample set are retrieved, and the intra-class attribution consistency score is calculated based on the following formula:
[0087] ;
[0088] in, For category The intra-class attribution consistency score, with a value range of ; For the categories in the effective attribution sample set The number of samples; , For the sample index in the valid attribution sample set, For the first Each belongs to category The sample attribution results For the first Each belongs to category The sample attribution results For category indexing, since the sample attribution vectors have undergone L2 normalization, the vector dot product is equivalent to cosine similarity. The more consistent the pairwise directions of the sample attribution vectors in the effective attribution sample set, the higher the intra-class attribution consistency score and the closer it is to the class similarity score. This reflects that the more unified and stable the decision rules of this type of model are.
[0089] To evaluate whether the category attribution center vector output by S1 can still represent the true direction after removing suspicious and unreliable samples, the sample attribution vectors in the valid attribution sample set are re-aggregated by mean to obtain a re-aggregated center vector, and the representativeness bias is calculated according to the following formula:
[0090] ;
[0091] in, For category The representative deviation, For the re-aggregation center vector, For category The category attribution center vector is obtained by re-averaging the sample attribution vectors from the valid attribution sample set. The greater the directional deviation between the S1 category attribution center vector and the re-aggregated center vector, the greater the representativeness deviation, reflecting the more severe the contamination of the category attribution center vector by suspicious and removed samples. Both center vectors are dimensionless vectors, and their ratio is dimensionless, so standardization is not required.
[0092] Compare the representative deviation with the preset offset tolerance threshold:
[0093] When the representativeness deviation is greater than or equal to the preset offset tolerance threshold, it is determined that the category attribution center vector has deviated from the true direction of the effective sample, the correction mechanism trigger is set to true, and the intra-class attribution consistency score is passed to step S4 for correction.
[0094] When the representativeness deviation is less than the preset offset tolerance threshold, the category attribution center vector is deemed sufficiently representative, the correction mechanism trigger flag is set to false, and the intra-class attribution consistency score is used as the basis for category deviation determination and directly output to step S4.
[0095] Before deploying the method, select a calibration dataset with known unlabeled noise and execute the entire process of steps S1 and S2. Statistically analyze the distribution of representative deviations in the uncontaminated scenario and take the upper quartile of the distribution as the preset offset tolerance threshold. This ensures that the correction mechanism is not triggered for most categories in the uncontaminated scenario and is only activated when the category attribution center vector is significantly contaminated.
[0096] In step S4, when the correction mechanism trigger flag is greater than zero (true), the deviation correction mechanism is activated; when the trigger flag is not greater than zero (false), the intra-class attribution consistency score is directly used as the corrected intra-class attribution consistency score, and the subsequent pseudo-correlation bias judgment is entered.
[0097] When the deviation correction mechanism is activated, the set of valid attribution samples and the corresponding sample attribution vectors are retrieved through the associated reference of the valid attribution sample set, and the following closed-loop operation is performed:
[0098] Calculate the mean of the sample attribution vectors within the effective attribution sample set to generate a re-aggregation center vector. Recalculate the new representative deviation between the re-aggregation center vector and the category attribution center vector according to the representative deviation formula in step S3. Then update the category attribution center vector to the re-aggregation center vector.
[0099] Based on the category attribution center vector, the sample attribution deviation of each candidate sample is recalculated according to the deviation formula in step S2. The sample credibility assessment is regenerated according to the geometric mean fusion method in step S2. The grading labeling is re-executed according to the grading threshold in step S2, and the effective attribution sample set is updated.
[0100] The iteration terminates when the new representative deviation is less than the preset offset tolerance threshold; otherwise, it returns to the deviation correction mechanism to continue iteration.
[0101] After iterative convergence, the intra-class attribution consistency score is recalculated based on the sample attribution vectors in the final valid attribution sample set, resulting in the corrected intra-class attribution consistency score. .
[0102] After obtaining the corrected intra-class attribution consistency score, a spurious correlation bias determination is performed on the current class: the corrected intra-class attribution consistency score is compared with the consistency threshold. The comparison is performed, and the ratio of the number of correctly predicted samples for the current category on the test set to the total number of samples is calculated as the category recognition accuracy. And compare the category recognition accuracy with the accuracy threshold. Comparison:
[0103] When the corrected intra-class attribution consistency score is less than the consistency threshold and the class recognition accuracy is not less than the accuracy threshold, it is determined that the current class has a pseudo-correlation bias with high accuracy and low consistency, and the class bias judgment conclusion is output.
[0104] When the corrected intra-class attribution consistency score is not less than the consistency threshold, the current category attribution pattern is determined to be unified. Based on the comparison between the category recognition accuracy and the accuracy threshold, it is further subdivided into high-quality categories or model learning bias categories.
[0105] When the corrected intra-class attribution consistency score is less than the consistency threshold and the category identification accuracy is less than the accuracy threshold, the current category is determined to be a data quality defect category, indicating a chaotic attribution pattern and insufficient decision-making ability.
[0106] It should be noted that the consistency threshold and accuracy threshold mentioned above are set by professionals in the field based on accuracy requirements, and will not be elaborated here.
[0107] Finally, the corrected intra-class attribution consistency score and class bias determination conclusion for the current category are output as the basis for quantitative diagnosis of training data bias for this category. Based on the specific bias type indicated by the class bias determination conclusion, subsequent targeted data cleaning, supplementation of collection scenarios, label verification and other optimization operations are supported.
[0108] Finally, it should be noted that in this paper, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0109] Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0110] In this document, the singular forms “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that terms such as “comprising / including” or “having” specify the presence of the stated features, integrals, steps, operations, components, parts, or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, integrals, steps, operations, components, parts, or combinations thereof. Meanwhile, the term “and / or” as used in this specification includes any and all combinations of the associated listed items.
[0111] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0112] The above description of the disclosed embodiments will enable those skilled in the art to make or use various modifications to these embodiments. It will be readily apparent to those skilled in the art that the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting bias in model training data based on attribution consistency, characterized in that: Includes the following steps: Step S1: Perform integral gradient attribution on the candidate samples to generate sample attribution vectors, and aggregate the sample attribution vectors of the same type of candidate samples to generate a category attribution center vector. Step S2: Calculate the sample attribution deviation by combining the sample attribution vector and the category attribution center vector, collect the sample prediction confidence distribution, generate the sample confidence assessment quantity by combining the sample attribution deviation, perform hierarchical labeling on the candidate samples according to the sample confidence assessment quantity, and set the effective attribution sample set. Step S3: Calculate the intra-class attribution consistency score based on the sample attribution vectors in the effective attribution sample set, and combine the intra-class attribution consistency score to evaluate the representativeness deviation of the current category attribution center vector and determine whether to trigger the deviation correction mechanism. Step S4: In the deviation correction mechanism, the category attribution center vector is updated according to the set of valid attribution samples, and the corrected intra-class attribution consistency score is regenerated. The corrected intra-class attribution consistency score is used as the basis for class deviation judgment.
2. The method for detecting bias in model training data based on attribution consistency according to claim 1, characterized in that: In step S1, the candidate samples are electromagnetic data samples initially selected from the test set by category and to be included in the attribution consistency calculation. The sample types include one of the three electromagnetic data modes: synthetic aperture radar image, communication I / Q time series signal, and signal time-frequency diagram. Candidate samples are first acquired using an electromagnetic data acquisition device consisting of a synthetic aperture radar system, a communication signal acquisition card, or a signal time-frequency analyzer. The candidate samples are then input into the training dataset to be detected to complete the training of the target deep learning model and solidify the weights. The model is then called to output the predicted optimal category for each candidate sample.
3. The method for detecting bias in model training data based on attribution consistency according to claim 2, characterized in that: In step S1, the integral gradient attribution method is used to calculate the attribution map of each candidate sample to the predicted optimal category. Flatten the two-dimensional attribution heatmap or one-dimensional attribution sequence into a one-dimensional vector, and perform L2 normalization on the flattened vector to obtain the sample attribution vector. The class attribution center vector is obtained by performing mean aggregation on the attribution vectors of candidate samples of the same class.
4. The method for detecting bias in model training data based on attribution consistency according to claim 1, characterized in that: In step S2, for each candidate sample, the sample attribution deviation is calculated by combining the sample attribution vector and the category attribution center vector; The sample prediction confidence distribution of each candidate sample is obtained in real time by using the Softmax output function of the target deep learning model, and the confidence concentration is calculated. Next, Max-Min interval standardization was performed on the sample attribution deviation to obtain the standardized result of the sample attribution deviation; The sample confidence assessment metric is obtained by fusing the standardized results of sample attribution deviation and confidence concentration using the geometric mean method.
5. The method for detecting bias in model training data based on attribution consistency according to claim 4, characterized in that: In step S2, the sample confidence assessment value is compared with two critical values: the lower bound of the confident sample and the lower bound of the suspicious sample. When the sample confidence assessment value is greater than or equal to the lower bound of the confidence sample, the candidate sample is marked as a confidence sample and included in the effective attribution sample set; When the sample confidence assessment value is between the lower bound of suspicious samples and the lower bound of reliable samples, the candidate sample is marked as a suspicious sample, and its sample attribution vector is retained for subsequent source tracing but not included in the set of valid attribution samples. When the sample confidence assessment value is less than the lower bound of the suspicious sample, the candidate sample is marked as a rejected sample and removed from the valid attribution sample set. The attribution vector is retained for subsequent bias cause analysis.
6. The method for detecting bias in model training data based on attribution consistency according to claim 1, characterized in that: In step S3, the sample attribution vectors corresponding to each sample in the valid attribution sample set are retrieved to calculate the intra-class attribution consistency score; The sample attribution vectors in the effective attribution sample set are re-aggregated by mean to obtain the re-aggregated center vector, and the representativeness bias is calculated. ; in, For category The representative deviation, The re-aggregated center vector is obtained by re-mean aggregation of the sample attribution vectors in the effective attribution sample set. For category The category attribution center vector.
7. The method for detecting bias in model training data based on attribution consistency according to claim 6, characterized in that: In step S3, the representative deviation is compared with a preset offset tolerance threshold: When the representativeness deviation is greater than or equal to the preset offset tolerance threshold, it is determined that the category attribution center vector has deviated from the true direction of the effective sample, the correction mechanism trigger is set to true, and the intra-class attribution consistency score is corrected. When the representativeness deviation is less than the preset offset tolerance threshold, the category attribution center vector is deemed sufficiently representative. The correction mechanism is then marked as false, and the intra-class attribution consistency score is directly output as the basis for category deviation determination.
8. The method for detecting bias in model training data based on attribution consistency according to claim 7, characterized in that: In step S4, when the correction mechanism trigger flag is greater than zero (true), the deviation correction mechanism is activated; when the trigger flag is not greater than zero (false), the intra-class attribution consistency score is directly used as the corrected intra-class attribution consistency score, and the subsequent pseudo-correlation bias judgment is entered. The deviation correction mechanism generates a re-aggregation center vector by calculating the mean of the sample attribution vectors in the effective attribution sample set. The re-aggregation center vector and the category attribution center vector are then recalculated using the representativeness deviation formula to obtain a new representativeness deviation. Finally, the category attribution center vector is updated to the re-aggregation center vector. Based on the category attribution center vector, the sample attribution deviation of each candidate sample is recalculated according to the deviation formula. The sample credibility assessment is regenerated according to the geometric mean fusion method. The grading labeling is re-executed according to the grading threshold, and the effective attribution sample set is updated. The iteration terminates when the new representative deviation is less than the preset offset tolerance threshold; otherwise, it returns to the deviation correction mechanism to continue iteration. After the iteration converges, the intra-class attribution consistency score is recalculated based on the sample attribution vectors in the final valid attribution sample set, resulting in the corrected intra-class attribution consistency score.
9. A method for detecting bias in model training data based on attribution consistency according to claim 8, characterized in that: In step S4, after obtaining the corrected intra-class attribution consistency score, the corrected intra-class attribution consistency score is compared with the consistency threshold. At the same time, the ratio of the number of correctly predicted samples of the current category in the test set to the total number of samples is calculated as the category recognition accuracy, and the category recognition accuracy is compared with the accuracy threshold. When the corrected intra-class attribution consistency score is less than the consistency threshold and the class recognition accuracy is not less than the accuracy threshold, it is determined that the current class has a pseudo-correlation bias with high accuracy and low consistency, and the class bias judgment conclusion is output. When the corrected intra-class attribution consistency score is not less than the consistency threshold, the current category attribution pattern is determined to be unified. Based on the comparison between the category recognition accuracy and the accuracy threshold, it is further subdivided into high-quality categories or model learning bias categories. When the corrected intra-class attribution consistency score is less than the consistency threshold and the category identification accuracy is less than the accuracy threshold, the current category is determined to be a data quality defect category, indicating a chaotic attribution pattern and insufficient decision-making ability.
