@inproceedings{
shu2024realtime,
title={Real-time Core-Periphery Guided ViT with Smart Data Layout Selection on Mobile Devices},
author={Zhihao Shu and Xiaowei Yu and Zihao Wu and Wenqi Jia and Yinchen Shi and Miao Yin and Tianming Liu and Dajiang Zhu and Wei Niu},
booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
year={2024},
url={https://openreview.net/forum?id=lD7ziaMHbf}
}
Mobile devices have become essential enablers for AI applications, particularly in scenarios that require real-time performance. Vision Transformer (ViT) has become a fundamental cornerstone in this regard due to its high accuracy. Recent efforts have been dedicated to developing various transformer architectures that offer im- proved accuracy while reducing the computational requirements. However, existing research primarily focuses on reducing the theoretical computational complexity through methods such as local attention and model pruning, rather than considering realistic performance on mobile hardware. Although these optimizations reduce computational demands, they either introduce additional overheads related to data transformation (e.g., Reshape and Transpose) or irregular computation/data-access patterns. These result in significant overhead on mobile devices due to their limited bandwidth, which even makes the latency worse than vanilla ViT on mobile. In this paper, we present ECP-ViT, a real-time framework that employs the core-periphery principle inspired by the brain functional networks to guide self-attention in ViTs and enable the deployment of ViT models on smartphones. We identify the main bottleneck in transformer structures caused by data transformation and propose a hardware-friendly core-periphery guided self-attention to decrease computation demands. Additionally, we design the system optimizations for intensive data transformation in pruned models. ECP-ViT, with the proposed algorithm-system co-optimizations, achieves a speedup of 4.6× to 26.9× on mobile GPUs across four datasets: STL-10, CIFAR100, TinyImageNet, and ImageNet.
Real-time Core-Periphery Guided ViT with Smart Data Layout Selection on Mobile Devices
Zhihao Shu Xiaowei Yu Zihao Wu Wenqi Jia Yinchen Shi Miao Yin Tianming Liu Dajiang Zhu Wei Niu