arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2305.14730cs.CV
收藏

BinaryViT:迈向高效且准确的二值化视觉Transformer

BinaryViT: Towards Efficient and Accurate Binary Vision Transformers

Junrui Xiao, Zhikai Li, Lianwei Yang, Qingyi Gu

AI总结:

针对视觉Transformer二值化性能下降问题,提出BinaryViT,通过梯度正则化和激活移位模块减少权重振荡与信息失真,在ImageNet上提升2.05%准确率,并大幅压缩模型。

摘要:

视觉Transformer(ViTs)已成为大多数计算机视觉领域的基础架构,但其巨大的内存和计算开销阻碍了其在资源受限设备上的应用。作为最强大的压缩方法之一,二值化通过将权重和激活值量化为±1来减少神经网络的计算量。尽管现有的二值化方法在卷积神经网络(CNNs)上已展现出优异的性能,但ViTs的完全二值化仍研究不足,且性能下降显著。在本文中,我们首先通过实验论证,严重的性能退化主要由二值化训练中的权重振荡和ViTs激活中的信息失真导致。基于这些分析,我们提出了BinaryViT,一种针对ViTs的精确完全二值化方案,将ViTs的量化推向极限。具体而言,我们提出了一种新颖的梯度正则化方案(GRS),用于驱动权重的双峰分布以减少二值化训练中的振荡。此外,我们设计了一个激活移位模块(ASM),自适应地调整激活分布以减少二值化引起的信息失真。在ImageNet数据集上的大量实验表明,我们的BinaryViT持续超越强基线2.05%,并将完全二值化ViTs的准确率提升至可用水平。此外,与全精度DeiT-S相比,我们的方法在模型大小和操作数(OPs)上实现了16.2倍和17.7倍的显著节省。

英文摘要:

Vision Transformers (ViTs) have emerged as the fundamental architecture for most computer vision fields, but the considerable memory and computation costs hinders their application on resource-limited devices. As one of the most powerful compression methods, binarization reduces the computation of the neural network by quantizing the weights and activation values as $\pm$1. Although existing binarization methods have demonstrated excellent performance on Convolutional Neural Networks (CNNs), the full binarization of ViTs is still under-studied and suffering a significant performance drop. In this paper, we first argue empirically that the severe performance degradation is mainly caused by the weight oscillation in the binarization training and the information distortion in the activation of ViTs. Based on these analyses, we propose $\textbf{BinaryViT}$, an accurate full binarization scheme for ViTs, which pushes the quantization of ViTs to the limit. Specifically, we propose a novel gradient regularization scheme (GRS) for driving a bimodal distribution of the weights to reduce oscillation in binarization training. Moreover, we design an activation shift module (ASM) to adaptively tune the activation distribution to reduce the information distortion caused by binarization. Extensive experiments on ImageNet dataset show that our BinaryViT consistently surpasses the strong baseline by 2.05% and improve the accuracy of fully binarized ViTs to a usable level. Furthermore, our method achieves impressive savings of 16.2$\times$ and 17.7$\times$ in model size and OPs compared to the full-precision DeiT-S.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑