Visualization Comparison of Vision Transformers and Convolutional Neural Networks
- 12 July 2023
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Multimedia
- Vol. 26 (15209210) , 2327-2339
Abstract
Recent research has demonstrated that Vision Transformers (ViTs) are capable of comparable or even better performance than convolutional neural network (CNN) baselines. The differences in their structural designs are obvious, but our understanding of the differences in their feature representations remains limited. In this work, we propose several techniques to achieve high-quality visualization of representations in ViTs. Both qualitative and quantitative experiments show that our technical improvements can observably improve ViT visualization quality compared to previous studies. Furthermore, we conduct visualizations to explore the disparities between ViTs and CNNs pre-trained on ImageNet1K, revealing three intriguing properties of ViTs: (a) ViT feature propagation retains image detail information with minimal loss, whereas CNNs discard most image details for class discrimination. (b) Different from CNNs, object-related features do not show in ViT higher layers, suggesting that class-discriminative features may not be required for ViT classification. (c) Our visualization-assisted texture-bias experiment reveals that both ViTs and CNNs exhibit texture bias, of which ViTs seem to be more biased towards local textures.Keywords
Funding Information
- National Natural Science Foundation of China (U2233211)
- Japan Society for the Promotion of Science (20H04203)
This publication has 33 references indexed in Scilit:
- Explaining a series of models by propagating Shapley valuesNature Communications, 2022
- Output-targeted baseline for neuron attribution calculationImage and Vision Computing, 2022
- Group visualization of class-discriminative featuresNeural Networks, 2020
- Understanding Neural Networks via Feature Visualization: A Survey2019
- Visualizing Deep Convolutional Neural Networks Using Natural Pre-imagesInternational Journal of Computer Vision, 2016
- Visualizing and Understanding Convolutional Networks2014
- ImageNet: A large-scale hierarchical image database2009
- Inverting feedforward neural networks using linear and nonlinear programmingIEEE Transactions on Neural Networks, 1999
- Texture information in run-length matricesIEEE Transactions on Image Processing, 1998
- Inverse mapping of continuous functions using local and global informationIEEE Transactions on Neural Networks, 1994