Abstract
Objective The success of deep convolutional neural networks(DCNNs)in image classification,object detection,and semantic segmentation has revolutionized the field of artificial intelligence(AI). Models based on DCNNs have demonstrated exceptional accuracy and have been deployed in various real-world applications. However,a major drawback of DCNNs is their lack of interpretability,which is frequently referred to as the“black-box”problem. When a DCNN makes a prediction,understanding how and why it arrived at that decision is a challenging task. This lack of transparency hinders our ability to trust and rely on these models’output,particularly in critical domains,such as healthcare,autonomous driving,and finance. In medical diagnosis,for example,comprehending the reasoning behind a model’s diagnosis is crucial for healthcare professionals to make informed decisions about patient care. Explainable AI(XAI)aims to address this issue by providing human-interpretable explanations for decisions made by complex machine learning models. XAI seeks to bridge the gap between model performance and interpretability,allowing users to understand the inner workings of a model and have confidence in its output. Researchers have been actively developing techniques and methods for enhancing the interpretability of deep learning models. One approach is to generate visual explanations through techniques,such as class activation map(CAM),gradient-weighted CAM(Grad-CAM),and smooth Grad-CAM. These methods provide heat maps or attention maps that highlight the areas of an input image that influence the model’s decision the most. By visualizing this information,users can gain insights into the features and patterns that the model focuses on when making predictions. Experimental evidence shows that CAM methods can effectively enhance the interpretability of image classification. However,existing methods can only provide rough range explanations and suffer from the issues of excessively large boundary effects and insufficient granularity. To address these problems,spatial attention-based multilayer fusion for high-quality CAM(SAMLCAM)is proposed. SAMLCAM combines channel attention and spatial attention mechanisms based on Gra’d-CAM. SAMLCAM achieves more effective object localization and enhances visual interpretability by addressing the issues of excessively large activation map boundaries and lack of fine granularity through multilayer fusion. Method In existing CAM methods,only the channel weights are considered,while beneficial information from spatial position,which contributes to target localization,is frequently overlooked. In our study,a hybrid attention mechanism that combines channel attention and spatial attention is proposed to enhance the interpretability of target localization. The spatial attention mechanism focuses on the spatial relationship among different regions in feature maps. By assigning higher weights to regions that are more likely to contain the target object,SAMLCAM can enhance the precision of object localization while reducing false positives. This attention mechanism allows the model to allocate more attention to discriminative features,improving object localization. One key improvement of SAMLCAM lies in its multilayer attention mechanism. Previous methods frequently suffer from boundary effects,wherein activation maps tend to have excessively large boundaries that may include irrelevant regions. SAMLCAM addresses this issue by refining attention maps at multiple layers of a network. It not only relies on the results from the final convolutional layer but also considers multiple aspects,including attention to shallow layers. This feature enriches the reference information,resulting in a more comprehensive understanding of the semantic information of the target object while reducing unnecessary background information. This multilayer attention mechanism helps gradually refine boundaries and improve localization accuracy by reducing the influence of irrelevant regions. Moreover,SAMLCAM deals with the problem of insufficient granularity in CAM. In some cases,activation maps generated using previously available methods lack fine details,making precisely identifying the object of interest a challenging task. SAMLCAM overcomes this limitation by leveraging the multilayer attention mechanism to capture more detailed information in activation maps,resulting in high-quality CAM with enhanced visual interpretability. The ImageNet Large-scale Visual Recognition Challenge(ILSVRC)2012 dataset is a large-scale image classification dataset that consists of over a million labeled images from 1 000 different categories. It is widely used in benchmarking computer vision models. The evaluation results on the ILSVRC 2012 validation dataset demonstrate the effectiveness of SAMLCAM in improving object localization and energy localization decision metrics. The proposed method contributes to the field by offering a more comprehensive understanding of how deep models make decisions in visual tasks and provides insights into improving the interpretability of these models. The proposed SAMLCAM method is evaluated on five backbone convolutional network models by using the ILSVRC 2012 validation dataset and compared with five state-of-the-art saliency models,namely,Grad-CAM,Grad-CAM++,XGradCAM,ScoreCAM,and LayerCAM. The results demonstrate the performance improvement of SAMLCAM compared with the lowest-performing methods in the Loc1 and Loc5 metrics,with an increase of over 8%. In addition,when comparing energy localization decision metrics,SAMLCAM exhibits an improvement of more than 7% over the lowest-performing methods. Notably,the improved method reduces the contextual background areas that surround the target sample region,negatively affecting the confidence metric. However,in terms of the credibility metric,SAMLCAM maintains relatively high performance with only a small gap compared with the other methods. In addition,we conduct a series of comparative experiments to clearly demonstrate the effectiveness of the fusion algorithm in the form of images. Result In conclusion,the SAMLCAM method presents a novel approach for enhancing the interpretability of DCNN models. By incorporating channel attention and spatial attention mechanisms,the proposed method improves object localization and overcomes the limitations of previous methods,such as excessive boundary effects and lack of fine granularity,in CAM. The evaluation results on the ILSVRC 2012 dataset highlight the performance improvement of SAMLCAM compared with other methods in terms of localization and energy localization decision metrics. The proposed method contributes to advancing the field of visual deep learning and offers valuable insights into understanding and improving the interpretability of black-box models. Conclusion The proposed method demonstrates superior explanatory performance across various convolutional neural network architectures by expanding the response coverage of target sample regions while effectively suppressing responses in background or irrelevant areas,thereby enhancing the precision and reliability of the interpretability results.
Author supplied keywords
Cite
CITATION STYLE
Zhang, J., Zhang, Y., & Wang, Z. (2025). Spatial attention-based multilayer fusion method for high-quality class activation map. Journal of Image and Graphics, 30(7), 2468–2483. https://doi.org/10.11834/jig.240216
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.