A feature consistency-based deep learning model rationality discrimination method
Patent Information
- Application Number
- CN202611049652.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]目前,现有技术仅通过单一归因图相似性或静态阈值方式对训练域与部署域的特征一致性进行判断,无法形成跨域归因分布的动态基准建模与分区级差异联合分析机制,导致对归因偏移的识别粒度较粗且难以区分不同类型的劣化演化模式,因此,提出一种基于特征一致性的深度学习模型合理性判别方法
[0043]本发明通过构建训练域样本归因图集合生成归因基准模式并引入部署域样本归因图进行跨域归因偏移量计算,实现训练分布与部署分布在归因空间的一致性量化评估,并基于跨域偏移量触发劣化预警比对状态,在预警状态下对部署域输入图像进行分区处理,形成目标区域过渡区域与背景区域对应的归因区域分布,并结合训练域归因基准模式进行分区偏移特征分析,同时融合历史劣化样本归因图集合提取劣化漂移模式,完成漂移类型识别并依据识别结果对归因基准模式进行反馈修正,提升了深度学习模型在跨域部署场景下的合理性识别精度与异常漂移识别能力,增强了归因一致性评估的稳定性。
Smart Images

Figure CN123016056A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, and more specifically, to a method for judging the rationality of deep learning models based on feature consistency. Background Technology
[0002] In the actual deployment and application of deep learning models, the stability of prediction behavior is usually ensured by relying on the sample distribution characteristics and model interpretation results formed during the training phase. Among them, the interpretability analysis method based on attribution graphs can reflect the model's focus area and decision basis for input features to a certain extent. The training environment and the deployment environment often have objective differences in data collection conditions, sample structure and input semantic distribution, which causes the attribution graph distribution generated by the model during the deployment phase to gradually deviate from the attribution benchmark pattern during the training phase.
[0003] The existing technology has the following shortcomings:
[0004] Currently, existing technologies only use single attribution graph similarity or static thresholds to judge the feature consistency between the training domain and the deployment domain. This fails to form a dynamic benchmark modeling and partition-level difference joint analysis mechanism for cross-domain attribution distribution, resulting in coarse-grained identification of attribution shifts and difficulty in distinguishing different types of degradation evolution patterns. Therefore, a deep learning model rationality judgment method based on feature 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 in the prior art, embodiments of the present invention provide a method for judging the rationality of deep learning models based on feature consistency. This method constructs an attribution benchmark pattern using a set of attribution graphs from the training domain samples and combines it with attribution graphs from the deployment domain samples to achieve quantitative evaluation and graded early warning of cross-domain attribution offsets. Furthermore, it introduces partitioned attribution analysis and historical degradation pattern matching to achieve drift type identification and attribution benchmark feedback 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 judging the rationality of deep learning models based on feature consistency, comprising the following steps:
[0008] Step S1: Retrieve the training domain sample attribution map set to generate the training domain attribution benchmark pattern, collect the deployment domain sample attribution map, calculate the cross-domain attribution offset by combining the training domain attribution benchmark pattern and the deployment domain sample attribution map, and determine whether to enter the degradation warning comparison state based on the cross-domain attribution offset.
[0009] Step S2: After entering the degradation warning comparison state, collect the deployment domain sample input image, perform regional division on the deployment domain sample attribution map according to the deployment domain sample input image to generate the deployment attribution region distribution, train the domain attribution benchmark mode to analyze the partition offset characteristics, and set the attribution drift level by combining the cross-domain attribution offset and partition offset characteristics.
[0010] Step S3: Read the set of historical confirmed degradation sample attribution maps, extract historical degradation drift patterns based on the set of historical confirmed degradation sample attribution maps, generate drift type identification results by combining attribution drift levels, and set deployment rationality warning instructions based on drift type identification results;
[0011] Step S4: Perform feedback correction on the training domain attribution benchmark pattern according to the deployment rationality warning instruction, and generate the corrected training domain attribution benchmark pattern.
[0012] In a preferred embodiment, in step S1, the training domain is the data acquisition environment of the sample set on which a deep learning model completes its training;
[0013] Attribution graphs are generated by interpretable computing units installed on the training server;
[0014] The values of each attribution map at the same pixel position in the training domain sample attribution map set are subjected to arithmetic mean and interval standardization to obtain the training domain attribution baseline pattern.
[0015] After deploying the trained deep learning model to the deployment domain, the same interpretability algorithm is used to generate a deployment domain sample attribution map for the samples to be evaluated in the deployment domain.
[0016] By combining the attribution benchmark model of the training domain with the attribution map of the deployment domain samples, the cross-domain attribution offset is calculated using the inverse attenuation form of the Pearson correlation coefficient.
[0017] In a preferred embodiment, in step S1, it is determined whether to enter the degradation warning comparison state based on the cross-domain attribution offset:
[0018] When the cross-domain attribution offset exceeds the preset offset trigger boundary, it is determined that the attribution of the deployment domain sample has significantly shifted relative to the training domain, and the degradation warning comparison state is entered.
[0019] When the cross-domain attribution offset does not exceed the preset offset trigger boundary, it is determined that the attribution of the deployment domain sample is still within the allowable fluctuation range of the training domain, and it does not enter the degradation warning comparison state, but directly determines that the current deployment domain sample is reasonable.
[0020] In a preferred embodiment, in step S2, after entering the degradation warning comparison state, the deployment domain sample input image is obtained by reading the deployment domain sample to be evaluated at the same resolution through the image acquisition module installed on the input interface of the deployment side inference server.
[0021] The target segmentation threshold is obtained by using the maximum inter-class variance method on the input image of the deployment domain sample. Based on the target segmentation threshold, the pixels are divided into foreground pixels and background pixels. Then, the foreground pixel contour is morphologically dilated outward according to the set transition band width to obtain three types of partition masks: target region, transition region, and background region.
[0022] The three types of partition masks are mapped onto the deployment domain sample attribution map according to their positions, so that the deployment domain sample attribution map retains the attribution values in the corresponding regions of the target region, transition region and background region respectively, thus obtaining the deployment attribution region distribution.
[0023] In a preferred embodiment, in step S2, the partition offset features are calculated by combining the training domain attribution benchmark pattern and the deployment attribution region distribution, using the inverted form of the partition Pearson correlation coefficient.
[0024] By combining cross-domain attribution shift and partition shift characteristics, the geometric mean method is used to generate an attribution drift level assessment metric.
[0025] The attribution drift rating is compared with the preset rating boundaries to set the attribution drift rating:
[0026] When the attribution drift rating is below the mild drift threshold, the attribution drift rating is set to mild.
[0027] When the attribution drift rating is between the mild drift boundary and the severe drift boundary, the attribution drift rating is set to moderate.
[0028] When the attribution drift rating is above the severe drift threshold, the attribution drift rating is set to severe.
[0029] In a preferred embodiment, in step S3, historical degradation drift patterns are extracted based on the historical attribution map set of confirmed degradation samples. The specific steps are as follows:
[0030] The attribution map set of historically confirmed deteriorated samples is divided into a background-dependent subset and a cross-domain artifact subset based on the degradation cause labels of the samples in the historically confirmed deteriorated sample attribution map set.
[0031] The background-dependent subset and the cross-domain artifact subset are processed by arithmetic mean and interval standardization according to pixel position to obtain the background-dependent degradation mode and the cross-domain artifact degradation mode. The two subset modes and the corresponding degradation cause labels are combined to form the historical degradation drift mode.
[0032] In a preferred embodiment, in step S3, the attribution drift level and historical degradation drift pattern are combined to generate a drift type identification result, and the specific process is as follows:
[0033] When the attribution drift level is mild, the drift type identification result is directly set to observable slight drift, without the need for pattern matching.
[0034] When the attribution drift level is moderate or severe, the Pearson correlation coefficient is calculated between the attribution map of the deployment domain sample and the background-dependent degradation mode and the cross-domain artifact degradation mode in the historical degradation drift mode, respectively, to obtain the similarity between the two modes.
[0035] The maximum similarity between the two patterns is compared with a preset pattern matching boundary;
[0036] When the maximum pattern similarity is higher than the pattern matching boundary, the drift type identification result is set to the known degradation type corresponding to the maximum value;
[0037] When the maximum pattern similarity is lower than the pattern matching boundary, the drift type identification result is set as an unknown novel drift.
[0038] In a preferred embodiment, in step S4, when the deployment rationality warning instruction is a regular observation instruction, the training domain attribution benchmark mode is kept unchanged, and the training domain attribution benchmark mode is directly output as the modified training domain attribution benchmark mode.
[0039] When the deployment rationality warning instruction is a known type targeted optimization instruction, the training domain attribution benchmark mode remains unchanged. At the same time, the source sample, the known degradation type, and the corresponding warning instruction of the deployment domain sample attribution graph are written into the operation log of the deployment side inference server. They do not participate in the current update of the training domain attribution benchmark mode.
[0040] In a preferred embodiment, in step S4, when the deployment rationality warning instruction is a new effective attribution pattern extension instruction, the attribution map of the current deployment domain sample is included as a new sample in the training domain sample attribution map set, and the arithmetic mean and interval standardization processing is re-executed according to the training domain attribution benchmark pattern generation method in step S1 to obtain the corrected training domain attribution benchmark pattern.
[0041] The revised training domain attribution benchmark pattern is used as the reference benchmark for the next round of deployment domain sample discrimination, replacing the training domain attribution benchmark pattern and stored in the deployment-side inference server.
[0042] The technical effects and advantages of this invention are as follows:
[0043] This invention generates an attribution benchmark pattern by constructing a set of attribution graphs for training domain samples and introduces attribution graphs for deployment domain samples to calculate cross-domain attribution offsets. This achieves a quantitative assessment of the consistency between the training distribution and the deployment distribution in the attribution space. Based on the cross-domain offset, a degradation warning comparison state is triggered. In the warning state, the input image of the deployment domain is partitioned to form the distribution of attribution regions corresponding to the transition region of the target region and the background region. The partition offset feature is analyzed in conjunction with the attribution benchmark pattern of the training domain. At the same time, the degradation drift pattern is extracted by integrating the set of attribution graphs for historical degradation samples. The drift type is identified, and the attribution benchmark pattern is corrected based on the identification results. This improves the rationality identification accuracy and abnormal drift identification capability of the deep learning model in cross-domain deployment scenarios and enhances the stability of attribution consistency assessment. Attached Figure Description
[0044] Figure 1 This is a flowchart illustrating the implementation of a deep learning model rationality judgment method based on feature consistency according to the present invention.
[0045] Figure 2 This is a schematic diagram illustrating the steps of a deep learning model rationality judgment method based on feature consistency according to the present invention. Detailed Implementation
[0046] 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.
[0047] This invention generates an attribution benchmark pattern by constructing a set of attribution graphs for training domain samples and introduces attribution graphs for deployment domain samples to calculate cross-domain attribution offsets. This achieves a quantitative assessment of the consistency between the training distribution and the deployment distribution in the attribution space. Based on the cross-domain offset, a degradation warning comparison is triggered. Under the warning state, the input image in the deployment domain is partitioned to form the distribution of attribution regions corresponding to the target region, transition region, and background region. The partition offset feature is analyzed in conjunction with the training domain attribution benchmark pattern. At the same time, the degradation drift pattern is extracted by integrating the set of historical degradation sample attribution graphs. The drift type is identified, and the attribution benchmark pattern is corrected based on the identification results. This improves the rationality recognition accuracy and abnormal drift recognition capability of the deep learning model in cross-domain deployment scenarios.
[0048] Example 1
[0049] Please see Figures 1 to 2 A method for judging the rationality of deep learning models based on feature consistency is presented, and the specific operation process is as follows:
[0050] Step S1: Retrieve the training domain sample attribution map set to generate the training domain attribution benchmark pattern, collect the deployment domain sample attribution map, calculate the cross-domain attribution offset by combining the training domain attribution benchmark pattern and the deployment domain sample attribution map, and determine whether to enter the degradation warning comparison state based on the cross-domain attribution offset.
[0051] Step S2: After entering the degradation warning comparison state, collect the deployment domain sample input image, perform regional division on the deployment domain sample attribution map according to the deployment domain sample input image to generate the deployment attribution region distribution, train the domain attribution benchmark mode to analyze the partition offset characteristics, and set the attribution drift level by combining the cross-domain attribution offset and partition offset characteristics.
[0052] Step S3: Read the set of historical confirmed degradation sample attribution maps, extract historical degradation drift patterns based on the set of historical confirmed degradation sample attribution maps, generate drift type identification results by combining attribution drift levels, and set deployment rationality warning instructions based on drift type identification results;
[0053] Step S4: Perform feedback correction on the training domain attribution benchmark pattern according to the deployment rationality warning instruction, and generate the corrected training domain attribution benchmark pattern.
[0054] The specific implementation is as follows:
[0055] In step S1, the training domain is the data acquisition environment of the sample set on which a deep learning model completes its training, and is used to provide a reference source for attribution comparison;
[0056] The deployment domain refers to the sample collection environment that a deep learning model faces when it is actually put into operation after training. It differs from the training domain in terms of the model of the collection equipment, ambient light, background noise, and other conditions.
[0057] Retrieve the training domain sample attribution map set. The training domain sample attribution map set refers to the image set composed of attribution maps generated by the interpretability algorithm through forward inference of all labeled samples in the training domain using a trained deep learning model. Each attribution map in the set corresponds one-to-one with the corresponding sample in the training domain. The value of each pixel position in the attribution map reflects the attention contribution of the model to the decision at that position.
[0058] The attribution graph is generated by an interpretable computation unit installed on the training server. The interpretable computation unit performs backpropagation of the gradient and overlay of intermediate features on each training domain sample based on the fixed weights of the deep learning model, and obtains an attribution graph with the same resolution as the sample image.
[0059] The attribution baseline pattern for the training domain is obtained by averaging and standardizing the values at the same pixel position in each attribution map set of training domain samples.
[0060] ;
[0061] ;
[0062] Where N is the total number of attribution graphs in the training domain sample attribution graph set; Let be the value of the i-th attribution map in the set at pixel position (p, q), which is dimensionless; pixel position The attribution mean of the training domain at that location; , These are the global minimum and maximum values of the mean matrix, respectively. To prevent zero constant; The value of the training domain attribution baseline pattern at pixel position (p, q).
[0063] The training domain attribution baseline pattern reflects the spatial distribution pattern of typical decision attention of the model in the training domain. The larger the value of a certain pixel position, the more likely the model is to form decision attention at that position in the training domain.
[0064] After deploying the trained deep learning model to the deployment domain, the same interpretability algorithm is used to generate an attribution map of the deployment domain samples to be evaluated.
[0065] The deployment domain sample attribution map is obtained by performing the same attribution operation as the training domain on a single deployment domain sample using the interpretable computing unit installed on the deployment-side inference server. Its pixel values are also compressed to the [0,1] interval.
[0066] By combining the attribution benchmark model of the training domain and the attribution map of the deployment domain samples, the cross-domain attribution offset is calculated using the inverted attenuation form of the Pearson correlation coefficient:
[0067] ;
[0068] ;
[0069] in, The value of the attribution map for the domain sample at pixel position (p, q); , These are the global pixel mean values of the attribution baseline pattern in the training domain and the sample attribution map in the deployment domain, respectively. The Pearson correlation coefficient between the two is given, with a value range of [-1, 1]. This is the cross-domain attribution offset, with a value range of [0,2] and is dimensionless.
[0070] The higher the spatial distribution consistency between the attribution map of the deployment domain samples and the attribution benchmark pattern of the training domain, the larger the Pearson correlation coefficient, after explicit inversion. Subsequently, the smaller the cross-domain attribution offset, the more likely the model is to continue using the same decision criteria in the deployment domain as in the training domain; conversely, the larger the cross-domain attribution offset, the more likely the model attention distribution in the deployment domain samples has shifted relative to the training domain.
[0071] Determining whether to enter the degradation warning comparison state based on cross-domain attribution offset:
[0072] When the cross-domain attribution offset exceeds the preset offset trigger boundary, it is determined that the attribution of the deployment domain sample has significantly shifted relative to the training domain, and the degradation warning comparison state is entered, triggering step S2.
[0073] When the cross-domain attribution offset does not exceed the preset offset trigger boundary, it is determined that the attribution of the deployment domain sample is still within the allowable fluctuation range of the training domain, and it does not enter the degradation warning comparison state, but directly determines that the current deployment domain sample is reasonable.
[0074] The degradation warning comparison state is the state to be refined after the attribution distribution of the deployment domain is identified as having an overall offset feature relative to the training domain benchmark. It is used to further conduct partition comparison and drift level assessment of the sample after the sample-level offset index exceeds the statistical boundary of the training domain.
[0075] The offset trigger boundary is set as follows: Before the model is deployed, the leave-one-out method is used to generate the cross-domain attribution offset distribution of samples within the training domain using the attribution graph set of attribution graphs. That is, each time, one attribution graph in the set is used as the object to be evaluated, and the remaining attribution graphs are used to reconstruct the training domain attribution baseline pattern. The offset between the object and the training domain attribution baseline pattern is calculated. The offset distribution is obtained by traversing all samples in the set. The upper quartile of the distribution is taken as the offset trigger boundary, so that normal fluctuation samples within the training domain are not falsely triggered, while real drift samples in the deployment domain can be effectively captured.
[0076] In step S2, after entering the degradation warning comparison state, the input image of the deployment domain sample is collected;
[0077] The input image of the deployment domain sample is obtained by reading the sample to be evaluated in the deployment domain at the same resolution through the image acquisition module installed on the input interface of the inference server on the deployment side. It is expressed in the form of single-channel or multi-channel pixel intensity, and the pixel intensity dimension is consistent with that of the training domain sample.
[0078] Based on the input image of the deployment domain sample, the attribution map of the deployment domain sample is divided into regions to generate the deployment attribution region distribution;
[0079] The specific process is as follows: First, the target segmentation threshold is obtained on the input image of the deployment domain sample using the maximum inter-class variance method. Based on the target segmentation threshold, the pixels are divided into foreground pixels and background pixels. Then, the foreground pixel contour is morphologically dilated outward according to the set transition band width to obtain three types of partition masks: target region, transition region, and background region. Then, the three types of partition masks are mapped onto the deployment domain sample attribution map according to their positions, so that the deployment domain sample attribution map retains the attribution values in the corresponding regions of the target region, transition region, and background region respectively, thus obtaining the deployment attribution region distribution.
[0080] The distribution of deployment attribution regions refers to the attribution space representation formed by the attribution values in each partition and the corresponding partition mask after the deployment domain sample attribution map is divided into partitions. It reflects the distribution pattern of model attention on the deployment domain samples in three semantically different spatial regions: the target ontology, the target transition zone, and the background region.
[0081] It should be noted that the purpose of dividing the target region, transition region, and background region into three categories is as follows: the target region reflects the degree of dependence of the model on the true discriminative features; the background region reflects the degree of dependence of the model on the deployment domain-specific artifacts; and the transition region reflects whether the model's attention exhibits an edge shift between the true features and the background artifacts. The three categories of regions together support the fine-grained calculation of subsequent partition shift features.
[0082] The width of the transition band for morphological dilation can be set by those skilled in the art based on the actual situation. For example, the width of the transition band can be set to 5 pixels, which will not be elaborated here.
[0083] By combining the attribution benchmark pattern of the integrated training domain with the distribution of the deployment attribution region, the partition offset feature is calculated using the inverted form of the partition Pearson correlation coefficient:
[0084] ;
[0085] in, These represent the target area, transition area, and background area, respectively. This is the set of pixels for the corresponding partition; , The attribution baseline model in the training domain and the attribution graph of the samples in the deployment domain are respectively in the partition. Local pixel mean within; This represents the partition offset feature on the corresponding partition, with a value range of [0,2] and dimensionless.
[0086] The partition offset feature is the degree of local spatial distribution offset of the deployment domain sample attribution map relative to the training domain attribution benchmark pattern in the target region, transition region, and background region. The larger the partition offset feature value in a certain partition, the more significant the shift in model attention relative to the training domain benchmark in that partition.
[0087] By combining cross-domain attribution shift and partition shift characteristics, an attribution drift level assessment metric is generated using the geometric mean method.
[0088] ;
[0089] in, This is the attribution drift rating metric, with a value range of [0,2] and is dimensionless.
[0090] The larger the cross-domain attribution shift, or the larger any of the partition shift features in the target region, transition region, or background region, the greater the attribution drift level evaluation, reflecting the deterioration of both the overall and local shifts in the attribution of the deployment domain samples relative to the training domain benchmark.
[0091] The attribution drift rating is compared with the preset rating boundaries to set the attribution drift rating:
[0092] When the attribution drift rating is below the mild drift threshold, the attribution drift rating is set to mild.
[0093] When the attribution drift rating is between the mild drift boundary and the severe drift boundary, the attribution drift rating is set to moderate.
[0094] When the attribution drift rating is above the severe drift threshold, the attribution drift rating is set to severe.
[0095] It should be noted that the slight drift boundary and the severe drift boundary can be set and adjusted according to the actual accuracy requirements, which will not be analyzed in detail here.
[0096] Through the above-mentioned deployment domain partitioning and multi-partition offset fusion process, the degree of attribution of deployment domain samples relative to the training domain benchmark in both global and partition dimensions is quantified, and the attribution drift level is passed into subsequent steps to participate in drift type identification.
[0097] In step S3, the set of historically confirmed deteriorated sample attribution maps is read. The set of historically confirmed deteriorated sample attribution maps is obtained by accessing the historical deployment record database. The database stores samples that have been manually verified and confirmed as deteriorated in multiple historical deployments and their attribution maps. Each attribution map in the set corresponds one-to-one with a confirmed deteriorated sample.
[0098] Historical degradation drift patterns are extracted from the set of historically confirmed degradation sample attribution maps. The specific steps are as follows:
[0099] Step C1: Subset partitioning; The set of historically confirmed degraded sample attribution maps is divided into background-dependent subsets and cross-domain artifact subsets according to the degradation cause labels of the samples in the set of historically confirmed degraded sample attribution maps. The background-dependent subset contains attribution maps of degraded samples caused by the model's excessive reliance on background features, and the cross-domain artifact subset contains attribution maps of degraded samples caused by the model's excessive reliance on deployment domain-specific acquisition artifacts.
[0100] Step C2: Subset pattern generation; The background-dependent subset and the cross-domain artifact subset are processed by arithmetic mean and interval standardization according to pixel position, respectively. The calculation formula refers to the generation method of the training domain attribution benchmark pattern to obtain the background-dependent degradation pattern and the cross-domain artifact degradation pattern; The two subset patterns and the corresponding degradation cause labels are combined to form the historical degradation drift pattern.
[0101] Historical degradation drift patterns are reference pattern sets formed by the typical attribution space distribution under each category of degradation causes, based on the attribution map set of historically confirmed degradation samples classified by degradation causes. They are used to identify which historically known degradation pattern or a new degradation pattern not covered in the past belongs to newly emerging deployment domain drift samples.
[0102] The drift type identification result is generated by combining the attribution drift level and the historical degradation drift pattern. The specific process is as follows:
[0103] First, when the attribution drift level is mild, the drift type identification result is directly set to observable mild drift, without the need for pattern matching;
[0104] Secondly, when the attribution drift level is moderate or severe, the Pearson correlation coefficient is calculated between the attribution map of the deployment domain sample and the background-dependent degradation mode and the cross-domain artifact degradation mode in the historical degradation drift mode, respectively, to obtain the similarity between the two modes.
[0105] The maximum value of the two pattern similarities is compared with a preset pattern matching boundary. When the maximum value of the pattern similarity is higher than the pattern matching boundary, the drift type identification result is set to the known degradation type corresponding to the maximum value. When the maximum value of the pattern similarity is lower than the pattern matching boundary, the drift type identification result is set to an unknown new type of drift.
[0106] Within the historically confirmed attribution map set of degraded samples, a leave-one-out method is used. That is, each time, one attribution map in the set is used as the object to be matched, and the remaining attribution maps are regenerated according to their respective subset patterns. The Pearson correlation coefficient between the object and the pattern of its subset is calculated. The correlation coefficient distribution within the same subset is obtained by traversing all samples in the set. The mean of this distribution is taken as the pattern matching boundary, so that typical samples of known degraded types can still be correctly classified into the corresponding subset, while new drift samples not covered in history whose similarity falls below the lower quartile are not misclassified.
[0107] Based on the drift type identification results, deployment rationality warning instructions are set as follows: When the drift type identification result is an observable slight drift, the deployment rationality warning instruction is set as a regular observation instruction; when the drift type identification result is a known degradation type, the deployment rationality warning instruction is set as a targeted optimization instruction for the corresponding type, and the optimization instruction clearly indicates the known degradation type to which the sample belongs, so that the engineering side can directly retrieve the corresponding historical improvement scheme; when the drift type identification result is an unknown new type of drift, the deployment rationality warning instruction is set as a new effective attribution mode extension instruction, requiring the attribution map of the deployment domain sample to be archived into the training domain attribution benchmark mode to participate in the next round of benchmark update.
[0108] Among them, the new effective attribution pattern extension instruction refers to the benchmark extension control instruction generated when it is determined, based on the historical degradation drift pattern matching results, that the current deployment domain sample attribution map does not correspond to an existing degradation type and its attribution response pattern meets the training domain attribution benchmark pattern extension conditions; this instruction is used to instruct the corresponding deployment domain sample attribution map to be included as an effective extension sample into the training domain sample attribution map set in order to update the training domain attribution benchmark pattern.
[0109] In step S4, feedback correction is performed on the attribution benchmark mode of the training domain according to the deployment rationality warning instruction. The specific process is as follows:
[0110] When the deployment of the rationality warning instruction is a regular observation instruction, the training domain attribution benchmark mode remains unchanged, and the training domain attribution benchmark mode is directly output as the modified training domain attribution benchmark mode.
[0111] When the deployment rationality warning instruction is a known type targeted optimization instruction, the training domain attribution benchmark mode remains unchanged. At the same time, the source samples, known degradation types, and corresponding warning instructions of the deployment domain sample attribution graph are written into the operation log of the deployment-side inference server as input materials for model iteration optimization, and do not participate in the current update of the training domain attribution benchmark mode.
[0112] When the deployment rationality warning instruction is a new effective attribution pattern extension instruction, the attribution map of the current deployment domain sample is added as a new sample to the training domain sample attribution map set. The arithmetic mean and interval standardization processing is re-executed according to the training domain attribution benchmark pattern generation method in step S1 to obtain the corrected training domain attribution benchmark pattern:
[0113] ;
[0114] ;
[0115] in, The training domain attribution mean after including new samples at pixel position (p,q); , These are the global minimum and maximum values of the new mean matrix, respectively; The value of the corrected training domain attribution baseline pattern at pixel position (p, q).
[0116] The greater the weight of the new samples, the greater the deviation of the corrected training domain attribution benchmark pattern from the training domain attribution benchmark pattern, reflecting the higher the degree to which the training domain attribution benchmark incorporates the new deployment domain attribution pattern.
[0117] The revised training domain attribution benchmark pattern is used as the reference benchmark for the next round of deployment domain sample discrimination. It replaces the training domain attribution benchmark pattern and is stored in the deployment-side inference server. This enables the discrimination method to have adaptive expansion capability when facing deployment domain attribution patterns that have not been covered in the past, and avoids a new round of discrimination failure due to the solidification of the training domain attribution benchmark during long-term deployment and operation.
[0118] Through the above feedback correction process based on the drift type identification results, the training domain attribution benchmark pattern is progressively expanded in multiple deployments and runs, providing a continuously updated discrimination reference benchmark for subsequent deployment domain samples.
[0119] 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.
[0120] 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.
[0121] 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.
[0122] 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.
[0123] 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 judging the rationality of deep learning models based on feature consistency, characterized in that: Includes the following steps: Step S1: Retrieve the training domain sample attribution map set to generate the training domain attribution benchmark pattern, collect the deployment domain sample attribution map, calculate the cross-domain attribution offset by combining the training domain attribution benchmark pattern and the deployment domain sample attribution map, and determine whether to enter the degradation warning comparison state based on the cross-domain attribution offset. Step S2: After entering the degradation warning comparison state, collect the deployment domain sample input image, perform regional division on the deployment domain sample attribution map according to the deployment domain sample input image to generate the deployment attribution region distribution, train the domain attribution benchmark mode to analyze the partition offset characteristics, and set the attribution drift level by combining the cross-domain attribution offset and partition offset characteristics. Step S3: Read the set of historical confirmed degradation sample attribution maps, extract historical degradation drift patterns based on the set of historical confirmed degradation sample attribution maps, generate drift type identification results by combining attribution drift levels, and set deployment rationality warning instructions based on drift type identification results; Step S4: Perform feedback correction on the training domain attribution benchmark pattern according to the deployment rationality warning instruction, and generate the corrected training domain attribution benchmark pattern.
2. The method for judging the rationality of a deep learning model based on feature consistency according to claim 1, characterized in that: In step S1, the training domain is the data acquisition environment of the sample set on which a deep learning model completes its training; Attribution graphs are generated by interpretable computing units installed on the training server; The values of each attribution map at the same pixel position in the training domain sample attribution map set are subjected to arithmetic mean and interval standardization to obtain the training domain attribution baseline pattern. After deploying the trained deep learning model to the deployment domain, the same interpretability algorithm is used to generate a deployment domain sample attribution map for the samples to be evaluated in the deployment domain. By combining the attribution benchmark model of the training domain with the attribution map of the deployment domain samples, the cross-domain attribution offset is calculated using the inverse attenuation form of the Pearson correlation coefficient.
3. The method for judging the rationality of a deep learning model based on feature consistency according to claim 2, characterized in that: In step S1, it is determined whether to enter the degradation warning comparison state based on the cross-domain attribution offset: When the cross-domain attribution offset exceeds the preset offset trigger boundary, it is determined that the attribution of the deployment domain sample has significantly shifted relative to the training domain, and the degradation warning comparison state is entered. When the cross-domain attribution offset does not exceed the preset offset trigger boundary, it is determined that the attribution of the deployment domain sample is still within the allowable fluctuation range of the training domain, and it does not enter the degradation warning comparison state, but directly determines that the current deployment domain sample is reasonable.
4. The method for judging the rationality of a deep learning model based on feature consistency according to claim 1, characterized in that: In step S2, after entering the degradation warning comparison state, the deployment domain sample input image is obtained by reading the deployment domain sample to be evaluated at the same resolution through the image acquisition module installed on the input interface of the deployment side inference server; The target segmentation threshold is obtained by using the maximum inter-class variance method on the input image of the deployment domain sample. Based on the target segmentation threshold, the pixels are divided into foreground pixels and background pixels. Then, the foreground pixel contour is morphologically dilated outward according to the set transition band width to obtain three types of partition masks: target region, transition region, and background region. The three types of partition masks are mapped onto the deployment domain sample attribution map according to their positions, so that the deployment domain sample attribution map retains the attribution values in the corresponding regions of the target region, transition region and background region respectively, thus obtaining the deployment attribution region distribution.
5. The method for judging the rationality of a deep learning model based on feature consistency according to claim 4, characterized in that: In step S2, the partition offset features are calculated by combining the training domain attribution benchmark pattern and the deployment attribution region distribution, using the inverted form of the partition Pearson correlation coefficient. By combining cross-domain attribution shift and partition shift characteristics, the geometric mean method is used to generate an attribution drift level assessment metric. The attribution drift rating is compared with the preset rating boundaries to set the attribution drift rating: When the attribution drift rating is below the mild drift threshold, the attribution drift rating is set to mild. When the attribution drift rating is between the mild drift boundary and the severe drift boundary, the attribution drift rating is set to moderate. When the attribution drift rating is above the severe drift threshold, the attribution drift rating is set to severe.
6. The method for judging the rationality of a deep learning model based on feature consistency according to claim 5, characterized in that: In step S3, historical degradation drift patterns are extracted based on the set of historically confirmed degradation sample attribution maps. The specific steps are as follows: The attribution map set of historically confirmed deteriorated samples is divided into a background-dependent subset and a cross-domain artifact subset based on the degradation cause labels of the samples in the historically confirmed deteriorated sample attribution map set. The background-dependent subset and the cross-domain artifact subset are processed by arithmetic mean and interval standardization according to pixel position to obtain the background-dependent degradation mode and the cross-domain artifact degradation mode. The two subset modes and the corresponding degradation cause labels are combined to form the historical degradation drift mode.
7. The method for judging the rationality of a deep learning model based on feature consistency according to claim 6, characterized in that: In step S3, the attribution drift level and historical degradation drift pattern are combined to generate the drift type identification result. The specific process is as follows: When the attribution drift level is mild, the drift type identification result is directly set to observable slight drift, without the need for pattern matching. When the attribution drift level is moderate or severe, the Pearson correlation coefficient is calculated between the attribution map of the deployment domain sample and the background-dependent degradation mode and the cross-domain artifact degradation mode in the historical degradation drift mode, respectively, to obtain the similarity between the two modes. The maximum similarity between the two patterns is compared with a preset pattern matching boundary; When the maximum pattern similarity is higher than the pattern matching boundary, the drift type identification result is set to the known degradation type corresponding to the maximum value; When the maximum pattern similarity is lower than the pattern matching boundary, the drift type identification result is set as an unknown novel drift.
8. The method for judging the rationality of a deep learning model based on feature consistency according to claim 1, characterized in that: In step S4, when the deployment rationality warning instruction is a regular observation instruction, the training domain attribution benchmark mode remains unchanged, and the training domain attribution benchmark mode is directly output as the modified training domain attribution benchmark mode. When the deployment rationality warning instruction is a known type targeted optimization instruction, the training domain attribution benchmark mode remains unchanged. At the same time, the source sample, the known degradation type, and the corresponding warning instruction of the deployment domain sample attribution graph are written into the operation log of the deployment side inference server. They do not participate in the current update of the training domain attribution benchmark mode.
9. The method for judging the rationality of a deep learning model based on feature consistency according to claim 8, characterized in that: In step S4, when the deployment rationality warning instruction is a new effective attribution mode extension instruction, the attribution map of the current deployment domain sample is added as a new sample to the training domain sample attribution map set, and the arithmetic mean and interval standardization processing is re-executed according to the training domain attribution benchmark mode generation method in step S1 to obtain the corrected training domain attribution benchmark mode. The revised training domain attribution benchmark pattern is used as the reference benchmark for the next round of deployment domain sample discrimination, replacing the training domain attribution benchmark pattern and stored in the deployment-side inference server.
