BiViT:极致压缩的二值视觉Transformer
BiViT: Extremely Compressed Binary Vision Transformer
AI总结:
针对视觉Transformer二值化研究不足的问题,提出Softmax感知二值化、跨层二值化方案与参数化权重尺度,构建极致压缩的BiViT,在多个视觉任务上取得优异性能。
摘要:
模型二值化可通过高效的位运算大幅压缩模型尺寸、降低能耗并加速推理。尽管卷积神经网络的二值化已得到广泛研究,但针对支撑近期视觉识别领域多数突破的视觉Transformer的二值化探索工作却寥寥无几。为此,我们提出解决两大核心挑战,以推动二值视觉Transformer(BiViT)的发展边界。首先,传统二值化方法未考虑softmax注意力的长尾分布,会在注意力模块中带来较大的二值化误差。针对这一问题,我们提出Softmax感知二值化(Softmax-aware Binarization),该方法可动态适配数据分布,降低二值化带来的误差。其次,为更好地保留预训练模型的信息并恢复精度,我们提出跨层二值化方案(Cross-layer Binarization),将自注意力与多层感知机(MLPs)的二值化解耦;还提出参数化权重尺度(Parameterized Weight Scales),为权重二值化引入可学习的缩放因子。总体而言,在TinyImageNet数据集上,我们的方法性能较当前最优方法高出19.8%。在ImageNet数据集上,我们的BiViT基于Swin-S模型取得了具有竞争力的75.6%的Top-1准确率。此外,在COCO目标检测任务中,我们的方法以Swin-T为骨干网络、基于Cascade Mask R-CNN框架,取得了40.8的mAP。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。