1D Gradient-Weighted Class Activation Mapping, Visualizing Decision Process of Convolutional Neural Network-Based Models in Spectroscopy Analysis

Guo-yang Shi,Hao-ping Wu,Si-heng Luo,Xin-yu Lu,Bin Ren,Qian Zhang,Wei-qi Lin,Rui-yun Chen,Ping Guo,Hua-bin Chen,Zhong-qun Tian,Gui-fang Shao,Liu Yang,Guo-kun Liu
DOI: https://doi.org/10.1021/acs.analchem.3c01101
IF: 7.4
2023-01-01
Analytical Chemistry
Abstract:Being characterized by the self-adaption and high accuracy,thedeep learning-based models have been widely applied in the 1D spectroscopy-relatedfield. However, the "black-box" operation and "end-to-end"working style of the deep learning normally bring the low interpretability,where a reliable visualization is highly demanded. Although thereare some well-developed visualization methods, such as Class ActivationMapping (CAM) and Gradient-weighted Class Activation Mapping (Grad-CAM),for the 2D image data, they cannot correctly reflect the weights ofthe model when being applied to the 1D spectral data, where the importanceof position information is not considered. Here, aiming at the visualizationof Convolutional Neural Network-based models toward the qualitativeand quantitative analysis of 1D spectroscopy, we developed a novelvisualization algorithm (1D Grad-CAM) to more accurately display thedecision-making process of the CNN-based models. Different from theclassical Grad-CAM, with the removal of the gradient averaging (GAP)and the ReLU operations, a significantly improved correlation betweenthe gradient and the spectral location and a more comprehensive spectralfeature capture were realized for 1D Grad-CAM. Furthermore, the introductionof difference (purity or linearity) and feature contribute in theCNN output in 1D Grad-CAM achieved a reliable evaluation of the qualitativeaccuracy and quantitative precision of CNN-based models. Facing thequalitative and adulteration quantitative analysis of vegetable oilsby the combination of Raman spectroscopy and ResNet, the visualizationby 1D Grad-CAM well reflected the origin of the high accuracy andprecision brought by ResNet. In general, 1D Grad-CAM provides a clearvision about the judgment criterion of CNN and paves the way for CNNto a broad application in the field of 1D spectroscopy.
What problem does this paper attempt to address?