Medical image segmentation explainability evaluation method and system based on dual-view analysis
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LANZHOU UNIV
- Filing Date
- 2026-05-20
- Publication Date
- 2026-08-07
AI Technical Summary
这些方法应用于像素级分割任务时,存在明显的适配性不足问题,具体而言,一方面,现有方法仅能生成粗粒度的热力图,刻画模型“看到了哪里”,却无法量化该关注区域与真实解剖结构的精确一致性,即缺乏对决策合理性的定量评估;另一方面,这些方法忽略了对模型决策依据是否充分的验证,即仅靠被关注区域,是否足以支撑起正确的分割预测,缺乏对决策充分性的分析
第一、本发明通过第一视角分析模块即基于原型学习的特征判别能力分析分支,利用前景原型与背景原型的构建及像素级相似度计算,能够在无需修改模型参数或额外训练的前提下,定量输出每一目标网络层的特征分割能力指标(Diceproto),该指标直接反映中间层特征是否已具备独立区分前景与背景的能力,解决了现有技术无法对模型内部特征表示质量进行分层量化的问题,为网络深度设计和卷积算子选择提供了可比较的数值依据。
Smart Images

Figure CN122530735A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and medical image processing technology. More specifically, this invention relates to a method and system for evaluating the interpretability of medical image segmentation based on dual-view analysis. Background Technology
[0002] With the development of artificial intelligence technology, deep learning-based medical image segmentation models have shown great potential in assisted diagnosis, enabling pixel-level accurate prediction of lesion regions. Existing mainstream methods, such as the U-Net series and its improved networks, can extract multi-scale features, but their internal decision-making processes often lack interpretability, making them essentially "black box" models. In medical applications, relying solely on macroscopic evaluation metrics such as the Dice coefficient and IoU is insufficient to fully reflect the actual working mechanism and clinical reliability of the model.
[0003] However, most current interpretability analysis methods for such models are directly transferred from the image classification field, such as gradient-based class activation mapping methods (e.g., Grad-CAM) or perturbation-based methods like LIME and SHAP. These methods exhibit significant limitations in adaptability when applied to pixel-level segmentation tasks. Specifically, on the one hand, existing methods can only generate coarse-grained heatmaps, depicting "where the model sees," but cannot quantify the precise consistency between the region of interest and the actual anatomical structure, lacking a quantitative assessment of the rationality of the decision. On the other hand, these methods neglect to verify the sufficiency of the model's decision-making basis; that is, whether the region of interest alone is sufficient to support correct segmentation prediction, lacking analysis of the sufficiency of the decision. More critically, existing methods fail to answer the core question: "Do the features of the intermediate layers of the network already possess the ability to distinguish between lesions and normal tissue?"
[0004] Therefore, there is an urgent need for an interpretability evaluation method that can systematically and multidimensionally quantify medical image segmentation models from two dimensions: feature representation layer and model decision layer. This method would reveal the representational ability of the model's internal features and the logical basis of the final decision, thereby providing reliable technical support for model design optimization and clinical application. Summary of the Invention
[0005] One object of the present invention is to provide a method for evaluating the interpretability of medical image segmentation based on dual-view analysis, comprising: Extract feature maps of at least one target network layer from a pre-trained medical image segmentation model; Based on the feature map, a first evaluation index is calculated and output to quantify the feature discrimination capability of the target network layer. The first evaluation index reflects the ability of the feature map of this layer to distinguish between foreground and background without relying on subsequent network layers. The calculation steps of the first evaluation index include: Based on the predicted mask output by the medical image segmentation model, the foreground pixel set and background pixel set in the feature map are determined, and the foreground prototype and background prototype are calculated respectively. Calculate the similarity between each spatial location in the feature map and the foreground prototype and the background prototype, and generate an independent prediction mask for the target network layer based on the similarity. Calculate the spatial overlap metric between the independent predicted mask and the true annotation, and use the metric value as the first evaluation index; Based on the feature map, a second evaluation index and a third evaluation index are calculated and output to quantify the basis of model decision-making. The second evaluation index reflects the spatial alignment between the model’s region of interest and the real labeled region. The third evaluation index reflects whether the model can make a correct segmentation prediction based solely on the region of interest. Based on the first evaluation index, the second evaluation index, and the third evaluation index, an interpretability evaluation result for the medical image segmentation model is generated.
[0006] Preferably, the calculation steps for the second and third evaluation indicators include: Based on the feature map, a saliency heatmap reflecting the model's attention to each spatial location is generated using the gradient-weighted class activation mapping method. The significant thermal properties are analyzed using the Otsu algorithm. Figure 2 Value-enhanced, resulting in a binary attention mask, which serves as the region of interest for the model; Calculate the Dice coefficient between the binary attention mask and the true annotation, and use the Dice coefficient as the second evaluation index; The original input image is masked using the binary attention mask, and the masked image is re-input into the medical image segmentation model to obtain a new prediction result. The Dice coefficient between the new prediction result and the ground truth label is calculated, and the Dice coefficient is used as the third evaluation index.
[0007] Preferably, the feature extraction step includes: Register a forward hook function for the target network layer; When the medical image segmentation model performs forward propagation on the input image, the output feature map of the target network layer is automatically intercepted and copied through the forward hook function; The registration and invocation of the forward hook function do not require modification of the network structure or parameters of the medical image segmentation model.
[0008] Preferably, the comprehensive evaluation step includes: For each layer in the target network layer set, obtain the corresponding first evaluation index, second evaluation index and third evaluation index respectively; The average values of the first evaluation metric, the second evaluation metric, and the third evaluation metric for all target network layers are calculated respectively, and used as the overall interpretability score of the medical image segmentation model.
[0009] Preferably, the calculation steps for the foreground prototype and the background prototype include: Using the prediction mask, all spatial locations in the feature map are divided into a foreground pixel set and a background pixel set; Calculate the mean vectors of the foreground pixel set and the background pixel set in the channel dimension, respectively, and use the mean vector of the foreground pixel set as the foreground prototype and the mean vector of the background pixel set as the background prototype. The similarity calculation steps include: Calculate the first negative square Euclidean distance between the feature vector at each spatial location in the feature map and the foreground prototype, and the second negative square Euclidean distance between the feature vector at each spatial location and the background prototype, and use the first negative square Euclidean distance and the second negative square Euclidean distance as the similarity.
[0010] Preferably, the heatmap generation sub-step includes: For the feature map of the target network layer, calculate the gradient of the foreground category prediction score of the medical image segmentation model relative to each channel of the feature map; Global average pooling is performed on the gradient to obtain the importance weights of each channel; The feature map is linearly weighted and summed according to its corresponding importance weight, and then processed by the ReLU activation function to obtain the saliency heatmap.
[0011] Preferably, the core region extraction sub-step includes: Perform grayscale histogram statistics on the saliency heatmap, traverse all possible grayscale thresholds, calculate the inter-class variance between foreground and background at each threshold, and take the threshold that maximizes the inter-class variance as the optimal threshold. The saliency heatmap is binarized using the optimal threshold, with pixels greater than the optimal threshold set to 1 and pixels less than or equal to the optimal threshold set to 0, to obtain the binary attention mask.
[0012] Preferably, it also includes: When the second evaluation index is lower than the first preset threshold, and the segmentation accuracy of the medical image segmentation model on the original complete image is higher than the second preset threshold, it is determined that the medical image segmentation model has a correct error reasoning behavior.
[0013] A medical image segmentation interpretability assessment system based on dual-view analysis is provided to implement the aforementioned medical image segmentation interpretability assessment method based on dual-view analysis. The system includes: The feature extraction module is used to extract feature maps of at least one target network layer from a pre-trained medical image segmentation model. A first-view analysis module is used to calculate and output a first evaluation index based on the feature map to quantify the feature discrimination capability of the target network layer. The first evaluation index reflects the ability of the feature map of that layer to distinguish between foreground and background without relying on subsequent network layers. The first-view analysis module includes: The prototype construction unit is used to determine the foreground pixel set and background pixel set in the feature map based on the prediction mask output by the medical image segmentation model, and to calculate the foreground prototype and background prototype respectively. A mask generation unit is used to calculate the similarity between each spatial location in the feature map and the foreground prototype and the background prototype, and generate an independent prediction mask for the target network layer based on the similarity. The index calculation unit is used to calculate the spatial overlap metric between the independent prediction mask and the real label, and use the metric value as the first evaluation index. The second perspective analysis module is used to calculate and output a second evaluation index and a third evaluation index based on the feature map to quantify the basis of model decision-making. The second evaluation index reflects the spatial alignment between the model's region of interest and the real labeled region, and the third evaluation index reflects whether the model can make a correct segmentation prediction based solely on the region of interest. The comprehensive evaluation module is used to generate interpretability evaluation results for the medical image segmentation model based on the first evaluation index, the second evaluation index, and the third evaluation index.
[0014] Preferably, the second perspective analysis module includes: The heatmap generation unit is used to generate a saliency heatmap reflecting the model's attention to each spatial location based on the feature map using a gradient-weighted class activation mapping method. The core region extraction unit is used to extract the salient thermal properties using the Otsu algorithm. Figure 2 Value-enhanced, resulting in a binary attention mask; A rationality index calculation unit is used to calculate the Dice coefficient between the binary attention mask and the real annotation, and to use the Dice coefficient as the second evaluation index. The sufficiency index calculation unit is used to perform masking processing on the original input image using the binary attention mask, re-input the masked image into the medical image segmentation model to obtain a new prediction result, calculate the Dice coefficient between the new prediction result and the ground truth label, and use the Dice coefficient as the third evaluation index.
[0015] The present invention has at least the following beneficial effects: First, this invention, through a first-view analysis module, namely the feature discrimination capability analysis branch based on prototype learning, utilizes the construction of foreground and background prototypes and pixel-level similarity calculation to quantitatively output the feature segmentation capability index of each target network layer without modifying model parameters or additional training. Dice proto This indicator directly reflects whether the intermediate layer features have the ability to independently distinguish between the foreground and the background. It solves the problem that existing technologies cannot perform hierarchical quantification of the quality of feature representations within the model, and provides a comparable numerical basis for network depth design and convolution operator selection.
[0016] Secondly, this invention generates a saliency heatmap based on the gradient-weighted class activation mapping method through a second-perspective analysis module, and combines it with the Otsu algorithm to adaptively extract the core interest region of the model, simultaneously outputting a decision rationality index. Dice pla ) and decision adequacy indicators ( Dice suf This mechanism not only quantifies the spatial alignment between the model's focus area and the real anatomical structure, but also verifies for the first time whether the region alone is sufficient to support correct segmentation prediction. It solves the problem that existing technologies lack a systematic double verification of decision-making criteria and provides a clear evaluation standard for identifying "correctly wrong reasons" (Clever Hans) behavior.
[0017] Third, the three core quantitative indicators proposed in this invention ( Dice proto , Dice pla , Dice suf The KAN convolution and its aggregation method constitute a model-independent evaluation system. Experiments show that, under the same network architecture, the introduction of KAN convolution results in quantifiable improvements over the baseline model in feature segmentation ability, decision rationality, and sufficiency metrics (e.g., ...). Dice protoWith an average improvement of 0.15%, this allows for a direct comparison of the performance differences of different network structures and convolution operators in terms of "how to learn," providing an objective technical evaluation tool for new operators and network optimization.
[0018] Fourth, the method proposed in this invention requires only one forward propagation and one backward propagation, without relying on the multiple sampling or repeated inference required by methods such as LIME and SHAP. Under typical configuration, a complete analysis of a single sample takes only 0.3 to 0.5 seconds. Its lightweight and plug-and-play characteristics make it easy to integrate into existing model development processes. The multiple quantitative indicators output effectively bridge the trust gap between artificial intelligence models and clinical decision-making, improving the reliability and transparency of the model in clinical practice.
[0019] Other advantages, objectives and features of the present invention will become apparent in part from the following description, and in part from those skilled in the art through study and practice of the invention. Attached Figure Description
[0020] Figure 1 This is an overview of the overall framework of the medical image segmentation interpretability assessment method based on dual-view analysis of the present invention. It shows the overall process of the dual-view interpretable segmentation framework, which begins with "data preprocessing and input", including three steps: "raw input", "segmentation model" and "feature extraction", and then constructs two parallel analysis branches. Figure 2 The flowchart of the feature representation layer interpretability analysis of the present invention illustrates the prototype-based feature characterization analysis process. Figure 3 The flowchart of the predictive decision layer interpretability analysis of the present invention illustrates the model decision interpretation process based on saliency mapping; Figure 4 This is a comparison chart of the feature map segmentation capabilities of the KAN enhanced model and the baseline model in the eight bottleneck layers in this embodiment of the invention; Figure 5 The feature segmentation ability scores of the KAN enhanced model and the baseline model in the 12 convolutional layers in this embodiment of the invention are ( Dice proto Line chart comparison; Figure 6 This is a comparison of Grad-CAM heatmaps of the KAN enhanced model and the baseline model at eight bottleneck layers in an embodiment of the present invention. Figure 7 The decision rationality scores of the KAN-enhanced model and the baseline model at the eight bottleneck layers in this embodiment of the invention are ( Dice pla Line chart comparison; Figure 8The decision sufficiency scores of the KAN-enhanced model and the baseline model in the eight bottleneck layers in this embodiment of the invention are ( Dice suf Line graph comparison. Detailed Implementation
[0021] The present invention will now be described in further detail with reference to the accompanying drawings, so that those skilled in the art can implement it based on the description.
[0022] It should be noted that, unless otherwise specified, the experimental methods described in the following embodiments are all conventional methods, and the reagents and materials described are all commercially available unless otherwise specified. In the description of this invention, the orientation or positional relationship indicated by the terms is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing this invention and simplifying the description. It does not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.
[0023] like Figures 1-3 As shown, this invention provides a method for evaluating the interpretability of medical image segmentation based on dual-view analysis, comprising: Extract feature maps of at least one target network layer from a pre-trained medical image segmentation model; Based on the feature map, a first evaluation index is calculated and output to quantify the feature discrimination capability of the target network layer. The first evaluation index reflects the ability of the feature map of this layer to distinguish between foreground and background without relying on subsequent network layers. The calculation steps of the first evaluation index include: Based on the predicted mask output by the medical image segmentation model, the foreground pixel set and background pixel set in the feature map are determined, and the foreground prototype and background prototype are calculated respectively. Calculate the similarity between each spatial location in the feature map and the foreground and background prototypes, and generate an independent prediction mask for the target network layer based on the similarity. Calculate the spatial overlap metric between the independently predicted mask and the ground truth label, and use this metric as the first evaluation indicator; Based on the feature map, the second and third evaluation metrics are calculated and output to quantify the basis of model decision-making. The second evaluation metric reflects the spatial alignment between the model’s region of interest and the real labeled region, while the third evaluation metric reflects whether the model’s region of interest alone can support it to make correct segmentation predictions. Based on the first evaluation index, the second evaluation index, and the third evaluation index, the interpretability evaluation results of the medical image segmentation model are generated. Specifically, a pre-trained medical image segmentation model is prepared. This model can employ a U-Net, U-Net++, or Transformer-UNet encoder-decoder architecture. The input image can be medical images such as ultrasound, CT, and MRI pathological sections, with image resolutions set to 256×256, 512×512, or 1024×1024. At least one network layer from the encoder, bottleneck, or decoder stages is selected as the target network layer. During the forward propagation of the model, the output of the target network layer is intercepted using a forward hook function, resulting in a segment with dimensions of [missing information]. C×H′×W′ Feature map, C For the number of channels, H′ , W′ Given the feature map spatial dimensions, bilinear interpolation is used to upsample the feature map to the same size as the input image. H × W Resolution, resulting in aligned feature maps; Feature discrimination capability is evaluated by generating a prediction mask based on the probability map output by the medical image segmentation model, using a threshold of 0.5 for binarization. The mask value is either 0 or 1, representing the background and foreground regions, respectively. The prediction mask is used to divide the aligned feature map pixels into foreground and background pixel sets. The mean vectors of the two types of pixels in the channel dimension are calculated as foreground and background prototypes. The negative squared Euclidean distance between the feature vector at each spatial location and the two prototypes is calculated as the similarity. This similarity is then converted into a probability distribution using the Softmax function, and an independent prediction mask for this layer is generated using a threshold of 0.5. The Dice coefficient between the independent mask and the ground truth annotation is calculated as the first evaluation metric. Dice proto (Feature segmentation capability index), followed by decision evaluation. Based on the same feature map, Grad-CAM is used to generate a saliency heatmap. The heatmap is then binarized using Otsu's method to obtain a binary attention mask by taking the optimal threshold. The Dice coefficient between the attention mask and the ground truth annotation is calculated as the second evaluation index. Dice pla (Decision rationality index) After masking the original image with an attention mask, the inference model is recalculated, and the Dice coefficient between the new prediction result and the true annotation is calculated as the third evaluation index. Dice suf (Decision adequacy indicators); During the comprehensive evaluation, the first evaluation index, the second evaluation index, and the third evaluation index corresponding to a single or multiple target network layers are summarized, and the arithmetic mean of the results of each layer is calculated to obtain the overall feature segmentation ability, decision rationality, and decision sufficiency scores of the model. The output evaluation results include the indicators of each layer and the overall aggregated index, which are used to quantitatively reflect the quality of the model's feature representation and the reliability of the decision basis. This method can quantitatively evaluate the interpretability of medical image segmentation models from both the feature representation layer and the decision layer. It can independently assess the feature discrimination ability of the intermediate layer, and at the same time quantify the rationality and sufficiency of the decision basis, providing quantifiable analytical basis for model structure optimization and clinical application.
[0024] In another technical solution, the calculation steps for the second and third evaluation indicators include: Based on the feature map, a saliency heatmap reflecting the model's attention to each spatial location is generated using the gradient-weighted class activation mapping method. The saliency heatmap is obtained using the Otsu algorithm. Figure 2 Value-enhanced, resulting in a binary attention mask, which serves as the model's attention region; Calculate the Dice coefficient between the binary attention mask and the ground truth annotation, and use the Dice coefficient as the second evaluation metric. The original input image is masked using a binary attention mask. The masked image is then re-input into the medical image segmentation model to obtain a new prediction result. The Dice coefficient between the new prediction result and the ground truth label is calculated and used as the third evaluation index. Specifically, after extracting and aligning the feature maps of the target network layer, the log-odds map (logits map) or probability map of the foreground class output by the model is obtained. The probability map can be converted to a logits map using logarithmic transformation. The foreground class scalar score is obtained by summing the logits map in the spatial dimension. The gradient of this scalar score relative to each channel of the feature map is calculated. Global average pooling is performed on the gradient in the spatial dimension to obtain the importance weight of each channel. The weight values are in the real number domain and can be positive or negative. The feature map channels are linearly weighted and summed according to the weights, and then processed by the Rectified Linear Unit (ReLU) activation function to suppress negative contribution regions, resulting in a size of [missing information]. H × W The saliency heatmap has non-negative pixel values, reflecting the degree of contribution of each spatial location to the prediction results. A gray-level histogram was used to statistically analyze the saliency heatmap, with gray levels ranging from 0 to 255. All candidate thresholds from 0 to 255 were iterated, and the inter-class variance between foreground and background was calculated for each threshold. The threshold maximizing the inter-class variance was selected as the optimal threshold, which falls between 0 and 255. The optimal threshold was then used to analyze the heatmap. Figure 2 Values are devalued: pixel values greater than the optimal threshold are set to 1, and those less than or equal to the optimal threshold are set to 0, resulting in a binary attention mask. Regions with values of 1 in the mask are the core attention regions of the model. The Dice coefficient between the binary attention mask and the ground truth annotation is calculated as a second evaluation metric. Dice pla The value ranges from 0 to 1; A binary attention mask is used to perform element-wise multiplication masking on the original input image. The mask is broadcast to all channels in the multi-channel image, and the pixel values of non-interested regions are set to 0, resulting in the masked image. This masked image is then input into the original medical image segmentation model to complete one forward inference to obtain a new predicted probability map. This map is then binarized with a threshold of 0.5 to obtain a new predicted mask. The Dice coefficient between the new predicted mask and the ground truth annotation is calculated as the third evaluation metric. Dice suf The value ranges from 0 to 1 and is used to characterize whether the model's focus region alone can support correct segmentation prediction; This method can stably generate the region of interest for model decision-making and quantify its rationality and sufficiency, achieving dual verification of the decision-making basis and providing quantitative evidence for judging whether the model decision depends on the effective anatomical region.
[0025] In another technical solution, the feature extraction steps include: Register forward hook functions for the target network layer; When the medical image segmentation model performs forward propagation on the input image, the output feature map of the target network layer is automatically intercepted and copied through the forward hook function; Among them, the registration and calling of the forward hook function does not require modification of the network structure or parameters of the medical image segmentation model; Specifically, PyTorch or TensorFlow deep learning frameworks are selected, and stable release versions of the frameworks can be used. The medical image segmentation model to be evaluated is loaded into the framework, and the model parameters are kept in a fixed state after training without fine-tuning or modification. The target network layers in the encoder stage, bottleneck layer, and decoder stage of the model are selected. The target network layers can be the output layers of convolutional layers, pooling layers, or transposed convolutional layers. All selected target network layers are traversed, and forward hook functions are registered for each layer one by one. The forward hook function is implemented using the framework's built-in interface. The input parameters of the hook function include network layer modules, input tensors, and output tensors. Inside the function, the output tensor is detached from the computation graph and copied to a preset dictionary structure cache. The dictionary key is the network layer module identifier, and the value is the corresponding feature map tensor. The hook function registration process is only executed once after the model is initialized. It does not require modification of the model's network layer connection relationships, convolution kernel size, number of channels, or other structural parameters, nor does it require modification of the model's already trained weight parameters. A single or batch of medical images are input into the model for forward propagation. The model completes feature extraction and prediction output according to the original inference process. After the forward computation of each target network layer is completed, the corresponding forward hook function is automatically triggered to intercept and cache the output feature map of that layer in real time. After the forward propagation is completed, the feature maps corresponding to each target network layer are read from the cache dictionary. The feature map size is [missing information]. C ×H′ × W′ It can be directly used for subsequent alignment and interpretability analysis, and the whole process does not affect the original inference speed and output results of the model; This feature extraction method does not require modification of the model structure and parameters, achieves model-independent feature acquisition, is compatible with various mainstream medical image segmentation models, is easy to operate and has low computational overhead, and is easy to integrate into the model evaluation process.
[0026] In another technical solution, the comprehensive evaluation steps include: For each layer in the target network layer set, obtain the corresponding first evaluation index, second evaluation index, and third evaluation index respectively; The average values of the first evaluation metric, the average value of the second evaluation metric, and the average value of the third evaluation metric for all target network layers are calculated separately and used as the overall interpretability score of the medical image segmentation model. Specifically, a target network layer set is pre-determined, containing output layers from different stages of the encoder, bottleneck layers, and decoder. The number of layers can be set to 3, 5, or 8, covering shallow, mid, and deep features of the model. For each layer in the set, feature extraction, feature alignment, first-view analysis, and second-view analysis are performed sequentially to obtain the corresponding first evaluation metric for each layer. Dice proto Second evaluation indicator Dice pla Third evaluation indicator Dice suf Each indicator takes a real number between 0 and 1, and is stored as an indicator array in hierarchical order; Extract the first evaluation metric array for all target network layers, calculate the arithmetic mean of all values in the array, and calculate the mean by summing the values and then dividing by the number of layers to obtain the overall feature segmentation capability score of the model. Similarly, the second evaluation index array of all target network layers is extracted, and the arithmetic mean is calculated to obtain the comprehensive score of decision rationality. Extract the third evaluation index array of all target network layers and calculate the arithmetic mean to obtain the comprehensive score for decision adequacy. The three comprehensive scores are all between 0 and 1; The individual indicators at each level and the overall three-item comprehensive score of the model are compiled and output. The output format can be a numerical table, line graph, or visualization report. The line graph can show the changing trend of indicators at each level, and the visualization report can overlay feature maps, heat maps, and mask results. The comprehensive score is used to compare the interpretability level of different medical image segmentation models horizontally, and can also be used for vertical comparison of different training stages or different structural variants of the same model, providing a unified quantitative benchmark for model selection and optimization. This aggregation method can integrate multi-level analysis results, output an overall interpretability score for the model, achieve standardized comparisons between different models, and facilitate intuitive evaluation of the overall quality of model feature representation and decision basis.
[0027] In another technical solution, the calculation steps for the foreground prototype and the background prototype include: Using a prediction mask, all spatial locations in the feature map are divided into a set of foreground pixels and a set of background pixels; Calculate the mean vectors of the foreground pixel set and the background pixel set in the channel dimension, respectively. Use the mean vector of the foreground pixel set as the foreground prototype and the mean vector of the background pixel set as the background prototype. The steps for calculating similarity include: Calculate the first negative square Euclidean distance between the feature vector at each spatial location in the feature map and the foreground prototype, and the second negative square Euclidean distance between the feature vector at each spatial location and the background prototype. Use the first negative square Euclidean distance and the second negative square Euclidean distance as the similarity. Specifically, after the model outputs the predicted probability map, it is binarized with a threshold of 0.5 to generate a prediction mask. M pred The mask size is the same as the input image, and its value is either 0 or 1. The size after alignment is... C × H × W Feature map F l Corresponding pixel-by-pixel to the predicted mask, traversing all spatial locations of the image ( i , j ),according to M pred ( i , j ) Values are used to classify pixel affiliation. M pred ( i , j When )=1, it is assigned to the foreground pixel set. M pred ( i , j When )=0, it is assigned to the background pixel set, and the total number of pixels in the two sets is counted respectively; During prototype computation, feature vectors corresponding to all pixel positions are extracted from the foreground pixel set. F l (:, i , j The mean value is calculated along the channel dimension to obtain the C-dimensional foreground prototype vector. μ fg The calculation formula is: Where I(・) is an indicator function, taking the value 1 if the condition is true and 0 otherwise. Similarly, the mean value of the channel dimensions of the background pixel set is calculated to obtain the background prototype vector. μ bg The calculation formula is: Both types of prototype vectors have dimensions consistent with the number of channels in the feature map; When calculating similarity, for each spatial location ( i , j ) eigenvectors F l (:, i , j ), calculate its relationship with the foreground prototype μ fg The negative squared Euclidean distance is used as a foreground similarity. Calculate the negative squared Euclidean distance between it and the background prototype μbg, and use it as the background similarity. The similarity value is a real number. The larger the value, the closer the feature vector is to the corresponding prototype. The two similarity values are combined into a two-dimensional vector for subsequent probability transformation. This prototype and similarity calculation method can accurately characterize the typical distribution of foreground and background in the feature space, effectively quantify the matching degree between pixel features and category prototypes, and provide a reliable basis for the independent prediction of masks in the generation layer.
[0028] In another technical solution, the heatmap generation sub-step includes: For the feature map of the target network layer, calculate the gradient of the foreground category prediction score of the medical image segmentation model relative to each channel of the feature map; Global average pooling is performed on the gradient to obtain the importance weights of each channel; The feature map is linearly weighted and summed according to its corresponding importance weight, and then processed by the ReLU activation function to obtain a saliency heatmap; Specifically, the feature map Fl output by the target network layer is determined, with a size of... C × H × W Obtain the foreground category logits plot output by the model after passing through this layer. A l The size is H × W If the model directly outputs a probability plot, it can be converted into a logits plot using logarithms. (Regarding the logits plot...) A l Summing along the spatial dimension yields the foreground category scalar score. The scalar score reflects the model's overall confidence in the foreground category and serves as a baseline for subsequent gradient calculations.
[0029] The scalar score is calculated using the backpropagation algorithm.y c Relative to feature map F l Gradient of each channel k Gradient size and features Figure 1 To, including C The gradient information of each channel, the gradient of each channel in the spatial dimension ( H , W Perform global average pooling to obtain the importance weights of each channel. The weights are real numbers; a positive weight indicates that the channel makes a positive contribution to the forecast, while a negative weight indicates a negative contribution. The feature map is obtained by linearly summing the channels according to their corresponding weights. The size is H × W Applying the ReLU activation function to the weighted feature map sets pixel values less than 0 to 0, while leaving pixel values greater than or equal to 0 unchanged, thus obtaining a saliency heatmap. The pixel values of the heatmap are non-negative, which intuitively reflects the contribution intensity of each spatial location to the model's foreground prediction. This heatmap generation method can accurately locate the key contribution areas predicted by the model, filter out invalid negative contribution information, and the output heatmap is highly correlated with the model's decision logic, providing a reliable foundation for subsequent attention region extraction.
[0030] In another technical solution, the core region extraction sub-step includes: Perform grayscale histogram statistics on the saliency heatmap, traverse all possible grayscale thresholds, calculate the inter-class variance between foreground and background at each threshold, and take the threshold that maximizes the inter-class variance as the optimal threshold. The saliency heatmap is binarized using the optimal threshold. Pixels greater than the optimal threshold are set to 1, and pixels less than or equal to the optimal threshold are set to 0, thus obtaining a binary attention mask. Specifically, obtain a significance heatmap with dimensions H×W. S l The pixel values of the heatmap are normalized to a grayscale range of 0-255. Normalization uses a linear mapping method, mapping the minimum pixel value to 0 and the maximum pixel value to 255. A grayscale histogram of the normalized heatmap is then calculated, containing 256 grayscale levels. The histogram for each grayscale level is then analyzed. i (0≤) i The number of pixels corresponding to ≤255) n i Calculate the probability of each gray level. p i = n i / N, where N is the total number of pixels in the heatmap, to complete the grayscale distribution quantization statistics; Traverse all candidate thresholds from 0 to 255 t For each threshold t Divide the heatmap pixels into foreground C 1 (Grayscale value ≤) t ) and background C 2 (Grayscale value>) t ), calculate the foreground probability Background probability Calculate the average gray level of the foreground Average grayscale of the background Further calculate the inter-class variance After the traversal is complete, select the one that makes The largest threshold is used as the optimal threshold. τ l The optimal threshold is uniquely determined; The third segment uses the optimal threshold. τ l Binarize the saliency heatmap, and iterate through each pixel position of the heatmap. i , j ),like S l ( i , j )> τ l Then the binary attention mask A l ( i , j If )=1; S l ( i , j )≤ τ l ,but A l ( i , j )=0, resulting in a final size of H × W The binary attention mask has regions with a value of 1 representing the core attention region of the model and regions with a value of 0 representing non-attention regions. The mask boundary is consistent with the boundary of the high contribution region of the heatmap and can be directly used to evaluate the rationality and sufficiency of decision-making. The threshold selection and binarization method can adaptively separate the core attention region of the model from the background region, avoiding the subjectivity of manual threshold setting, and the generated attention mask accurately reflects the core decision-making region of the model.
[0031] Another technical solution also includes: When the second evaluation index is lower than the first preset threshold, and the segmentation accuracy of the medical image segmentation model on the original complete image is higher than the second preset threshold, it is determined that the medical image segmentation model has a correct error reasoning behavior. Specifically, a first preset threshold of 0.5 is set to measure the critical level of decision rationality, and a second preset threshold of 0.7 is set to measure the critical level of the model's original segmentation accuracy. Both thresholds are fixed values, adaptable to most medical image segmentation scenarios. After model evaluation, a second evaluation metric for the overall model is extracted. Dice pla This is a comprehensive score for the rationality of the decision, and at the same time, the Dice coefficient of the model on the original complete input image is calculated as the original segmentation accuracy. Perform conditional judgment, compare the comprehensive score of decision rationality with the first preset threshold, if Dice pla <0.5 indicates that the overall alignment between the model's focus area and the actual anatomical structure is low, and the decision criteria deviate from the effective area. At the same time, comparing the original segmentation accuracy with the second preset threshold, if the original segmentation Dice coefficient >0.7, it indicates that the final segmentation result output by the model has high accuracy and can accurately delineate the lesion or anatomical structure outline, meeting the requirements of conventional segmentation tasks. When both of the above conditions are met, the medical image segmentation model is judged to have correct error reasoning behavior, that is, the model outputs the correct segmentation result, but the region of interest on which the decision depends is not the real effective anatomical region, but rather learns the false association features in the data. This judgment result can serve as a model risk warning signal, indicating that the model has potential generalization defects and needs to further optimize the network structure or training strategy to avoid prediction bias caused by false associations in clinical applications. This judgment method can accurately identify the correct reasoning behavior of the model, make up for the shortcomings of the traditional assessment that only looks at the segmentation accuracy, provide timely warning of potential decision-making logic defects of the model, and improve the safety and reliability of the model in clinical applications.
[0032] To further verify the technical effectiveness of the dual-view interpretability analysis framework (DPX-Seg) proposed in this invention, and to intuitively demonstrate its performance advantages in evaluating different network architectures (such as the introduction of Kolmogorov-Arnold Network convolutions (KAN convolutions), this embodiment combines the appendix... Figures 4 to 8 To provide a detailed explanation, these figures illustrate the specific experimental results of layer-by-layer analysis of the classic U-Net model and its KAN convolutional enhancement version on publicly available medical image segmentation datasets, such as the BUSI breast cancer ultrasound segmentation dataset.
[0033] <Experimental Verification and Visual Analysis> This embodiment verifies the effectiveness of the method of the present invention in terms of quantitatively evaluating the internal feature representation ability, decision rationality and sufficiency of the evaluation model through comparative experiments.
[0034] The experimental subjects included: Baseline model (Ours w / o KAN / Wo-KC-Unet): U-Net model using standard 3×3 convolution.
[0035] Enhanced Model (Ours w / KAN / KC-Unet): A model that replaces some standard convolutions in U-Net with KAN convolutions, while keeping the number of parameters and computational cost basically the same.
[0036] <Visual Analysis of Feature Representation Layer Segmentation Capability> like Figure 4 As shown in the figure, this figure compares the segmentation capabilities of the two models in the feature maps of the feature maps of eight different bottleneck layers (Conv1' to Conv8'). In the figure, the blue area represents the foreground (lesion) area identified by the model in the feature map of this layer, the bright green outline represents the boundary of the ground truth, and the reddish-brown background represents the background area.
[0037] By comparison, we can observe that: In the shallow layers (Conv1' to Conv3'), the feature maps of both models are relatively blurry, and the blue foreground region has low overlap with the green ground truth contour, indicating that the shallow features do not yet have independent segmentation capabilities. However, the blue region of the KAN-enhanced model (Ours w / KAN) has relatively clearer boundaries and better background suppression.
[0038] In the deeper layers (Conv4' to Conv8'), the blue foreground region of the KAN-enhanced model (Ours w / KAN) closely matches the green true outline, and the boundary is clear and stable, showing a stronger feature discrimination ability. In contrast, the blue region of the baseline model (Oursw / o KAN) shows obvious blurring and diffusion in the deeper layers, indicating that its deep features have a weaker ability to suppress background noise and a decrease in feature separability.
[0039] The visualization results are consistent with Figure 5 The layer-by-layer feature segmentation ability score shown ( Dice proto The line graphs corroborate each other. Figure 5 In the diagram, the horizontal axis represents the 12 convolutional layers (Conv1 to Conv12), and the vertical axis represents... Dice proto Score, KAN augmentation model (KC-Unet, orange line) Dice protoThe score steadily increased from shallow to deep layers, eventually reaching approximately 0.78, while the baseline model (Wo-KC-Unet, blue line) showed a similar score. Dice proto The score increases slowly, peaking at about 0.64 in the middle layer (Conv8) and then dropping back until it suddenly increases to about 0.76 in the last layer. This quantitative data clearly shows that KAN convolution enables the model to generate structured and more separable feature representations earlier and maintains more stable feature discrimination ability throughout the network depth.
[0040] <Visual Analysis of the Rationality and Sufficiency of Predictive Decision-Making> like Figure 6 As shown, this figure compares the Grad-CAM heatmaps of the two models across eight bottleneck layers (Conv1' to Conv8'). In the heatmap, red / yellow areas represent regions of high interest during model decision-making, and green outlines represent the boundaries of actual lesions.
[0041] By comparison, we can observe that: The heatmap of the KAN-enhanced model (Ours w / KAN) shows a highly concentrated red highlight area in the middle layer (Conv3' to Conv5'), which highly overlaps with the outline of the green real lesion, indicating that the attention area on which the model makes decisions has excellent spatial alignment with the real anatomical structure.
[0042] The heatmap activation regions of the baseline model (Ours w / o KAN) are more dispersed and weaker, and there is obvious spatial drift or spurious response in some layers, indicating that its decision-making basis is not focused enough and may be at risk of relying on features of non-target regions.
[0043] The above qualitative observations were conducted through Figure 7 and Figure 8 The quantitative indicators were accurately verified.
[0044] Figure 7 The decision rationality scores of the two models at eight bottleneck levels are shown. Dice pla In comparison, this metric measures the spatial alignment between the gradient-weighted class activation mapping (Grad-CAM) attention map and the actual lesion region. In the Conv1' to Conv5' stages, the KAN-enhanced model (Ours w / KAN, orange line) shows... Dice plaThe score was significantly higher than the baseline model (Ours w / o KAN, blue line), indicating that its attention distribution matched the real lesion area more closely. Although the baseline model surpassed it in the last layer (Conv8'), overall, the KAN convolution significantly improved the rationality of the model's decisions in the middle layers.
[0045] Figure 8 The decision sufficiency scores of the two models at eight bottleneck levels are shown. Dice suf In comparison, this indicator quantifies whether relying solely on the regions emphasized by Grad-CAM is sufficient to support accurate predictions. In the Conv1' to Conv5' stages, the KAN-enhanced model (Ours w / KAN, orange line) shows... Dice suf The scores were also significantly higher than the baseline model (Ours w / o KAN, blue line), indicating that its predictions relied more on semantically relevant core regions rather than background or noise features. This quantitative result proves that KAN convolution not only improves segmentation accuracy, but more importantly, it significantly enhances the sufficiency of decision-making basis, that is, the model "learns more reasonably" rather than just "learns more accurately".
[0046] comprehensive Figures 4 to 8 The comparison between visual analysis and quantitative indicators leads to the following conclusions: The dual-view interpretability analysis framework (DPX-Seg) proposed in this invention can effectively quantify and visualize the differences in feature representation capabilities and decision logic between different network architectures (such as standard convolutional neural networks (CNN) and KAN-ConvNet).
[0047] The introduction of KAN convolution not only improves the final segmentation accuracy of the model (Dice coefficient), but more importantly, it significantly enhances the discriminative ability of intermediate layer features. Dice proto This makes the model's decision-making basis (attention area) more reasonable and sufficient in relation to the actual anatomical structure. Dice pla , Dice suf ).
[0048] The three quantitative indicators provided by this invention ( Dice proto , Dice pla , Dice sufThis constitutes a unified, quantifiable cross-architecture benchmark, providing direct evidence for the interpretability advantages of novel convolution operators. A dual-view analysis-based medical image segmentation interpretability evaluation system is provided, which implements a dual-view analysis-based medical image segmentation interpretability evaluation method. The system includes: The feature extraction module is used to extract feature maps of at least one target network layer from a pre-trained medical image segmentation model. The first-view analysis module is used to calculate and output a first evaluation index based on feature maps to quantify the feature discrimination capability of the target network layer. This first evaluation index reflects the ability of the feature map of that layer to distinguish between foreground and background without relying on subsequent network layers. The first-view analysis module includes: The prototype building unit is used to determine the foreground pixel set and background pixel set in the feature map based on the predicted mask output by the medical image segmentation model, and to calculate the foreground prototype and background prototype respectively. The mask generation unit is used to calculate the similarity between each spatial location in the feature map and the foreground and background prototypes, and generate an independent prediction mask for the target network layer based on the similarity. The index calculation unit is used to calculate the spatial overlap metric between the independent predicted mask and the true label, and uses this metric as the first evaluation index. The second perspective analysis module is used to calculate and output the second and third evaluation indicators based on the feature map to quantify the basis of model decision-making. The second evaluation indicator reflects the spatial alignment between the model’s region of interest and the real labeled region, and the third evaluation indicator reflects whether the model can make a correct segmentation prediction based solely on the region of interest. The comprehensive evaluation module is used to generate interpretability evaluation results for the medical image segmentation model based on the first evaluation index, the second evaluation index, and the third evaluation index. Specifically, the system consists of a feature extraction module, a first-view analysis module, a second-view analysis module, and a comprehensive evaluation module. Each module adopts a modular design and is connected sequentially through a data interface. The data flow is from the feature extraction module to the first-view analysis module / second-view analysis module and then to the comprehensive evaluation module. The system hardware can be mounted on a server or workstation. The processor can be a multi-core CPU, the acceleration component can be a GPU, the memory capacity can be set to 16GB or more, and the storage device can be a solid-state drive to ensure the processing efficiency of large-size medical image data. The feature extraction module is responsible for taking the pre-trained medical image segmentation model to be evaluated, the input medical image, and the ground truth annotations as input. It extracts the feature maps of the target network layer of the model by registering a forward hook function. After the feature maps are aligned to the input image resolution by bilinear interpolation, they are transmitted to the first-view analysis module and the second-view analysis module respectively. The first-view analysis module includes a prototype construction unit, a mask generation unit, and an index calculation unit. The prototype construction unit receives the aligned feature map and the predicted mask and generates the foreground prototype and the background prototype. The mask generation unit calculates the similarity and generates the layer-independent prediction mask. The index calculation unit calculates the first evaluation index and outputs it to the comprehensive evaluation module. The second-perspective analysis module receives the aligned feature map, generates a saliency heatmap, extracts a binary attention mask, calculates the second and third evaluation indicators, and outputs them to the comprehensive evaluation module. The comprehensive evaluation module receives the first, second, and third evaluation indicators from each level, calculates the overall comprehensive score of the model, and generates an interpretable evaluation report containing level indicators, the comprehensive score, and visualization results. The report can be stored as a local file or displayed through an interface for reference by technical and clinical personnel. This modular system can stably implement a dual-view interpretability evaluation process. Each module is functionally independent and has low coupling, making it easy to maintain and expand. It is compatible with different types of medical image segmentation models and provides an integrated solution for model evaluation.
[0049] In another technical solution, the second-view analysis module includes: The heatmap generation unit is used to generate a saliency heatmap that reflects the model’s attention to each spatial location based on the feature map and through the gradient weighted class activation mapping method. Core region extraction unit, used to extract significant heatmaps using Otsu's algorithm. Figure 2 Value-enhanced, resulting in a binary attention mask; The rationality index calculation unit is used to calculate the Dice coefficient between the binary attention mask and the true annotation, and uses the Dice coefficient as the second evaluation index. The sufficiency index calculation unit is used to mask the original input image using a binary attention mask, re-input the masked image into the medical image segmentation model to obtain a new prediction result, calculate the Dice coefficient between the new prediction result and the true annotation, and use the Dice coefficient as the third evaluation index. Specifically, the second-view analysis module includes a heatmap generation unit, a core region extraction unit, a rationality index calculation unit, and a sufficiency index calculation unit. These units are connected sequentially according to the data processing order, and data is transmitted between units in the form of tensors. The heatmap generation unit receives the aligned feature map output by the feature extraction module, combines it with the model's foreground category prediction score, and generates a saliency heatmap using the gradient-weighted class activation mapping method. The heatmap size is consistent with the input image and is output to the core region extraction unit. The core region extraction unit receives the saliency heatmap, completes grayscale histogram statistics, threshold traversal, and inter-class variance calculation, and then determines the optimal threshold for heatmap analysis. Figure 2 Value-based processing generates a binary attention mask, with values of 0 or 1. This mask is then output to the rationality index calculation unit and the sufficiency index calculation unit. The rationality index calculation unit receives the binary attention mask and the ground truth annotations, calculates their Dice coefficients, and obtains the second evaluation index. Dice pla Output to the comprehensive evaluation module; The sufficiency index calculation unit receives a binary attention mask, the original input image, and a medical image segmentation model. It uses the mask to mask the original image, inputs the masked image back into the model for re-inference, obtains a new prediction result, and calculates the Dice coefficient between the new prediction result and the ground truth annotation to obtain the third evaluation index. Dice suf The results are output to the comprehensive evaluation module. Each unit works together to complete the quantitative calculation of the rationality and sufficiency of the decision, ensuring the accuracy and reliability of the second-perspective analysis results. This unit division method can refine the second-perspective analysis process. Each unit has a single function and clear logic, which is convenient for targeted debugging and optimization, ensuring the accuracy and stability of the evaluation results based on the decision.
[0050] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
[0051] like Figure 4 As shown, the English explanations are as follows: Oursw / KAN indicates the model in this paper that contains the KAN module, Oursw / oKAN indicates the model in this paper that does not contain the KAN module, and Conv1'~Conv8' indicates the feature output of the convolutional layers 1'~8' of the network; like Figure 5As shown, the English explanations are as follows: KC-Unet represents the complete KC-UNet model of this study, Wo-KC-Unet represents the comparative UNet model with the KC module removed, and Conv1~Conv12 represent the performance changes of the network's 1st to 12th convolutional layers; like Figure 6 As shown, the English explanations are as follows: Oursw / KAN indicates the model in this paper that contains the KAN module, Oursw / oKAN indicates the model in this paper that does not contain the KAN module, and Conv1'~Conv8' represents the feature activation heatmap of the 1st to 8th convolutional layers of the network; like Figure 7 As shown, the English explanations are as follows: PlausibilityDicescore represents the Dice coefficient, which is used to measure the reasonableness of the match between the model's prediction results and the real labels; Oursw / KAN represents the model in this paper that includes the KAN module, Oursw / oKAN represents the model in this paper that does not include the KAN module, and Conv1'~Conv8' represents the index changes of the 1st to 8th convolutional layers of the network; like Figure 8 As shown, the English explanations are as follows: SufficiencyDicescore represents the sufficiency Dice coefficient, which is used to measure the sufficiency of the model in extracting features from the target region; Oursw / KAN represents the model in this paper that includes the KAN module, Oursw / oKAN represents the model in this paper that does not include the KAN module, and Conv1'~Conv8' represents the index changes of the 1'~8' convolutional layers of the network.
Claims
1. A method for evaluating the interpretability of medical image segmentation based on dual-view analysis, characterized in that, include: Extract feature maps of at least one target network layer from a pre-trained medical image segmentation model; Based on the feature map, a first evaluation index is calculated and output to quantify the feature discrimination capability of the target network layer. The first evaluation index reflects the ability of the feature map of this layer to distinguish between foreground and background without relying on subsequent network layers. The calculation steps of the first evaluation index include: Based on the predicted mask output by the medical image segmentation model, the foreground pixel set and background pixel set in the feature map are determined, and the foreground prototype and background prototype are calculated respectively. Calculate the similarity between each spatial location in the feature map and the foreground prototype and the background prototype, and generate an independent prediction mask for the target network layer based on the similarity. Calculate the spatial overlap metric between the independent predicted mask and the true annotation, and use the metric value as the first evaluation index; Based on the feature map, a second evaluation index and a third evaluation index are calculated and output to quantify the basis of model decision-making. The second evaluation index reflects the spatial alignment between the model’s region of interest and the real labeled region. The third evaluation index reflects whether the model can make a correct segmentation prediction based solely on the region of interest. Based on the first evaluation index, the second evaluation index, and the third evaluation index, an interpretability evaluation result for the medical image segmentation model is generated.
2. The medical image segmentation interpretability evaluation method based on dual-view analysis as described in claim 1, characterized in that, The calculation steps for the second and third evaluation indicators include: Based on the feature map, a saliency heatmap reflecting the model's attention to each spatial location is generated using the gradient-weighted class activation mapping method. The saliency heatmap is binarized using the Otsu algorithm to obtain a binary attention mask, which serves as the model's region of interest. Calculate the Dice coefficient between the binary attention mask and the true annotation, and use the Dice coefficient as the second evaluation index; The original input image is masked using the binary attention mask, and the masked image is re-input into the medical image segmentation model to obtain a new prediction result. The Dice coefficient between the new prediction result and the ground truth label is calculated, and the Dice coefficient is used as the third evaluation index.
3. The medical image segmentation interpretability evaluation method based on dual-view analysis as described in claim 1, characterized in that, The feature extraction steps include: Register a forward hook function for the target network layer; When the medical image segmentation model performs forward propagation on the input image, the output feature map of the target network layer is automatically intercepted and copied through the forward hook function; The registration and invocation of the forward hook function do not require modification of the network structure or parameters of the medical image segmentation model.
4. The medical image segmentation interpretability evaluation method based on dual-view analysis as described in claim 1, characterized in that, The comprehensive evaluation steps include: For each layer in the target network layer set, obtain the corresponding first evaluation index, second evaluation index and third evaluation index respectively; The average values of the first evaluation metric, the second evaluation metric, and the third evaluation metric for all target network layers are calculated respectively, and used as the overall interpretability score of the medical image segmentation model.
5. The medical image segmentation interpretability evaluation method based on dual-view analysis as described in claim 2, characterized in that, The calculation steps for the foreground prototype and the background prototype include: Using the prediction mask, all spatial locations in the feature map are divided into a foreground pixel set and a background pixel set; Calculate the mean vectors of the foreground pixel set and the background pixel set in the channel dimension, respectively, and use the mean vector of the foreground pixel set as the foreground prototype and the mean vector of the background pixel set as the background prototype. The similarity calculation steps include: Calculate the first negative square Euclidean distance between the feature vector at each spatial location in the feature map and the foreground prototype, and the second negative square Euclidean distance between the feature vector at each spatial location and the background prototype, and use the first negative square Euclidean distance and the second negative square Euclidean distance as the similarity.
6. The medical image segmentation interpretability evaluation method based on dual-view analysis as described in claim 3, characterized in that, The heatmap generation sub-step includes: For the feature map of the target network layer, calculate the gradient of the foreground category prediction score of the medical image segmentation model relative to each channel of the feature map; Global average pooling is performed on the gradient to obtain the importance weights of each channel; The feature map is linearly weighted and summed according to its corresponding importance weight, and then processed by the ReLU activation function to obtain the saliency heatmap.
7. The medical image segmentation interpretability evaluation method based on dual-view analysis as described in claim 3, characterized in that, The core region extraction sub-step includes: Perform grayscale histogram statistics on the saliency heatmap, traverse all possible grayscale thresholds, calculate the inter-class variance between foreground and background at each threshold, and take the threshold that maximizes the inter-class variance as the optimal threshold. The saliency heatmap is binarized using the optimal threshold, with pixels greater than the optimal threshold set to 1 and pixels less than or equal to the optimal threshold set to 0, to obtain the binary attention mask.
8. The medical image segmentation interpretability evaluation method based on dual-view analysis as described in claim 1, characterized in that, Also includes: When the second evaluation index is lower than the first preset threshold, and the segmentation accuracy of the medical image segmentation model on the original complete image is higher than the second preset threshold, it is determined that the medical image segmentation model has a correct error reasoning behavior.
9. A medical image segmentation interpretability assessment system based on dual-view analysis, characterized in that, The system is used to implement the medical image segmentation interpretability assessment method based on dual-view analysis as described in any one of claims 1 to 8, the system comprising: The feature extraction module is used to extract feature maps of at least one target network layer from a pre-trained medical image segmentation model. A first-view analysis module is used to calculate and output a first evaluation index based on the feature map to quantify the feature discrimination capability of the target network layer. The first evaluation index reflects the ability of the feature map of that layer to distinguish between foreground and background without relying on subsequent network layers. The first-view analysis module includes: The prototype construction unit is used to determine the foreground pixel set and background pixel set in the feature map based on the prediction mask output by the medical image segmentation model, and to calculate the foreground prototype and background prototype respectively. A mask generation unit is used to calculate the similarity between each spatial location in the feature map and the foreground prototype and the background prototype, and generate an independent prediction mask for the target network layer based on the similarity. The index calculation unit is used to calculate the spatial overlap metric between the independent prediction mask and the real label, and use the metric value as the first evaluation index. The second perspective analysis module is used to calculate and output a second evaluation index and a third evaluation index based on the feature map to quantify the basis of model decision-making. The second evaluation index reflects the spatial alignment between the model's region of interest and the real labeled region, and the third evaluation index reflects whether the model can make a correct segmentation prediction based solely on the region of interest. The comprehensive evaluation module is used to generate interpretability evaluation results for the medical image segmentation model based on the first evaluation index, the second evaluation index, and the third evaluation index.
10. The system as described in claim 9, characterized in that, The second perspective analysis module includes: The heatmap generation unit is used to generate a saliency heatmap reflecting the model's attention to each spatial location based on the feature map using a gradient-weighted class activation mapping method. The core region extraction unit is used to binarize the saliency heatmap using the Otsu algorithm to obtain a binary attention mask. A rationality index calculation unit is used to calculate the Dice coefficient between the binary attention mask and the real annotation, and to use the Dice coefficient as the second evaluation index. The sufficiency index calculation unit is used to perform masking processing on the original input image using the binary attention mask, re-input the masked image into the medical image segmentation model to obtain a new prediction result, calculate the Dice coefficient between the new prediction result and the ground truth label, and use the Dice coefficient as the third evaluation index.