| Models based on Transformer architecture have made remarkable progress in the field of computer vision,but the corresponding interpretability research is lagging behind.The visual Transformer model is currently the best cornerstone framework in computer vision,however,its low interpretability has hindered the promotion of this framework.Transformer architecture and the convolutional neural network used in traditional computer vision is different,Transformer architecture lacks pooling layers and convolutional layers.Traditional interpretability algorithms are mainly based on the above two network modules for analysis.Therefore,it is difficult for traditional interpretability algorithms to be directly applied to the Transformer architecture.In existing interpretation methods for Transformer architecture,either direct attention matrices are used or heuristics are applied along the attention matrices.These interpretation methods ignore the other contents of the Transformer architecture except the attention matrix.Aiming at the above problems,this paper uses visualization technology to study the multi-head self-attention mechanism and multi-layer perceptron module of the visual Transformer architecture.The main work of this paper includes:An analysis of a multilayer perceptron module is performed,and a neuron knowledge base is derived by multiplying the activation function feature matrix and self-attention weight matrix.Also,bilinear interpolation is used to generate a visualization matrix,and the interpretation results are analyzed through visualization to make the model more interpretable.Additionally,it proves that different knowledge neurons in the model cluster information rationally.The interpretability algorithm is validated by quantitative experiments to verify its credibility and effectiveness.The multi-head self-attention mechanism is analyzed,and an attention mechanism-based integral gradient Rollout interpretability algorithm is proposed.After an integral gradient calculation is performed on the attention weight matrix,the integral gradient matrix is redistributed using the Rollout algorithm to simulate the information flow of Transformer model,and linear multiplication is used to simulate the internal nonlinear connection and residual connection in the Transformer model.Thus,class-specific interpretation results are provided for the visual Transformer model,which improves the performance of the interpretable algorithm.Meanwhile,a variety of class-specific algorithms are used as baseline algorithms,and reliability analysis is conducted using quantitative evaluation standards,which verify the algorithm ’s feasibility and superiority. |