EL-VIT: Probing Vision Transformer with Interactive Visualization
Hong Zhou, Rui Zhang, Peifeng Lai, Chaoran Guo, Yong Wang, Zhida Sun, Junjie Li
TL;DR
The paper tackles the steep learning curve of Vision Transformers by introducing EL-VIT, a web-based, multi-view visualization system. EL-VIT employs four interconnected views—Model Overview, Knowledge Background Graph, Model Detail View, and Interpretation View—to explain architectural, mathematical, and interpretability aspects of ViT. A key novelty is the cosine-similarity interpretation that reveals patch-level relationships across Transformer blocks, offering an alternative to traditional attention-weight visualizations. The authors demonstrate the tool's educational value through two usage scenarios and provide a browser-accessible implementation built on TensorFlow.js with a ViT model fine-tuned on CIFAR-10 from Hugging Face.
Abstract
Nowadays, Vision Transformer (ViT) is widely utilized in various computer vision tasks, owing to its unique self-attention mechanism. However, the model architecture of ViT is complex and often challenging to comprehend, leading to a steep learning curve. ViT developers and users frequently encounter difficulties in interpreting its inner workings. Therefore, a visualization system is needed to assist ViT users in understanding its functionality. This paper introduces EL-VIT, an interactive visual analytics system designed to probe the Vision Transformer and facilitate a better understanding of its operations. The system consists of four layers of visualization views. The first three layers include model overview, knowledge background graph, and model detail view. These three layers elucidate the operation process of ViT from three perspectives: the overall model architecture, detailed explanation, and mathematical operations, enabling users to understand the underlying principles and the transition process between layers. The fourth interpretation view helps ViT users and experts gain a deeper understanding by calculating the cosine similarity between patches. Our two usage scenarios demonstrate the effectiveness and usability of EL-VIT in helping ViT users understand the working mechanism of ViT.
