Login / Signup

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

Guo-Yang ShiHao-Ping WuSi-Heng LuoXin-Yu LuBin RenQian ZhangWei-Qi LinRui-Yun ChenPing GuoHua-Bin ChenZhong-Qun TianGui-Fang ShaoLiu YangGuo-Kun Liu
Published in: Analytical chemistry (2023)
Being characterized by the self-adaption and high accuracy, the deep learning-based models have been widely applied in the 1D spectroscopy-related field. 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 there are some well-developed visualization methods, such as Class Activation Mapping (CAM) and Gradient-weighted Class Activation Mapping (Grad-CAM), for the 2D image data, they cannot correctly reflect the weights of the model when being applied to the 1D spectral data, where the importance of position information is not considered. Here, aiming at the visualization of Convolutional Neural Network-based models toward the qualitative and quantitative analysis of 1D spectroscopy, we developed a novel visualization algorithm (1D Grad-CAM) to more accurately display the decision-making process of the CNN-based models. Different from the classical Grad-CAM, with the removal of the gradient averaging (GAP) and the ReLU operations, a significantly improved correlation between the gradient and the spectral location and a more comprehensive spectral feature capture were realized for 1D Grad-CAM. Furthermore, the introduction of difference (purity or linearity) and feature contribute in the CNN output in 1D Grad-CAM achieved a reliable evaluation of the qualitative accuracy and quantitative precision of CNN-based models. Facing the qualitative and adulteration quantitative analysis of vegetable oils by the combination of Raman spectroscopy and ResNet, the visualization by 1D Grad-CAM well reflected the origin of the high accuracy and precision brought by ResNet. In general, 1D Grad-CAM provides a clear vision about the judgment criterion of CNN and paves the way for CNN to a broad application in the field of 1D spectroscopy.
Keyphrases