BiViT: Extremely compressed Binary Vision Transformers

Yefei He, Zhenyu Lou, Luoming Zhang, Jing Liu, Weijia Wu, Hong Zhou, Bohan Zhuang

Research output: Chapter in Book/Report/Conference proceedingConference PaperResearchpeer-review

4 Citations (Scopus)

Abstract

Model binarization can significantly compress model size, reduce energy consumption, and accelerate inference through efficient bit-wise operations. Although binarizing convolutional neural networks have been extensively studied, there is little work on exploring binarization of vision Transformers which underpin most recent breakthroughs in visual recognition. To this end, we propose to solve two fundamental challenges to push the horizon of Binary Vision Transformers (BiViT). First, the traditional binary method does not take the long-tailed distribution of softmax attention into consideration, bringing large binarization errors in the attention module. To solve this, we propose Softmax-aware Binarization, which dynamically adapts to the data distribution and reduces the error caused by binarization. Second, to better preserve the information of the pretrained model and restore accuracy, we propose a Cross-layer Binarization scheme that decouples the binarization of self-attention and multi-layer perceptrons (MLPs), and Parameterized Weight Scales which introduce learnable scaling factors for weight binarization. Overall, our method performs favorably against state-of-the-arts by 19.8% on the TinyImageNet dataset. On ImageNet, our BiViT achieves a competitive 75.6% Top-1 accuracy over Swin-S model. Additionally, on COCO object detection, our method achieves an mAP of 40.8 with a Swin-T backbone over Cascade Mask R-CNN framework.

Original languageEnglish
Title of host publicationProceedings - 2023 IEEE/CVF International Conference on Computer Vision, ICCV 2023
EditorsFrédéric Jurie, Gaurav Sharma
Place of PublicationPiscataway NJ USA
PublisherIEEE, Institute of Electrical and Electronics Engineers
Pages5628-5640
Number of pages13
ISBN (Electronic)9798350307184
ISBN (Print)9798350307191
DOIs
Publication statusPublished - 2023
EventIEEE International Conference on Computer Vision 2023 - Paris, France
Duration: 2 Oct 20236 Oct 2023
https://ieeexplore.ieee.org/xpl/conhome/10376473/proceeding (Proceedings)
https://iccv2023.thecvf.com/ (Website)

Conference

ConferenceIEEE International Conference on Computer Vision 2023
Abbreviated titleICCV 2023
Country/TerritoryFrance
CityParis
Period2/10/236/10/23
Internet address

Cite this