GSB:面向有限训练样本视觉Transformer的组叠加二值化方法
GSB: Group Superposition Binarization for Vision Transformer with Limited Training Samples
AI总结:
本文针对视觉Transformer在有限训练样本下易过拟合且计算资源需求高的问题,提出组叠加二值化方法GSB,通过改进梯度计算并结合知识蒸馏,有效缓解注意力模块信息损失,提升二值化ViT性能。
摘要:
视觉Transformer(ViT)在各种计算机视觉任务中表现出色。然而,受参数量巨大的影响,当训练样本数量相对有限时,ViT通常会出现严重的过拟合问题。此外,ViT通常需要大量的计算资源,这限制了其在资源受限设备上的部署。作为一种模型压缩方法,模型二值化是解决上述问题的一个潜在良好选择。与全精度模型相比,采用二值化方法的模型用简单的按位二进制运算替代复杂的张量乘法,并仅用1比特表示全精度模型参数和激活值,从而分别有望解决模型规模和计算复杂度的问题。本文研究了一种二值化ViT模型。通过实验,我们观察到为卷积神经网络(CNN)设计的现有二值化技术无法很好地迁移到ViT的二值化任务中。我们还发现,二值ViT模型精度下降的主要原因是注意力模块和Value向量的信息损失。因此,我们提出了一种新颖的模型二值化技术,称为组叠加二值化(GSB),以解决这些问题。此外,为了进一步提高二值化模型的性能,我们研究了二值化过程中的梯度计算流程,并为GSB推导出更合适的梯度计算公式,以减少梯度失配的影响。随后,引入知识蒸馏技术来缓解模型二值化引起的性能下降。从分析角度看,模型二值化可以在训练模型时限制参数更新过程中的参数搜索空间。
英文摘要:
Vision Transformer (ViT) has performed remarkably in various computer vision tasks. Nonetheless, affected by the massive amount of parameters, ViT usually suffers from serious overfitting problems with a relatively limited number of training samples. In addition, ViT generally demands heavy computing resources, which limit its deployment on resource-constrained devices. As a type of model-compression method, model binarization is potentially a good choice to solve the above problems. Compared with the full-precision one, the model with the binarization method replaces complex tensor multiplication with simple bit-wise binary operations and represents full-precision model parameters and activations with only 1-bit ones, which potentially solves the problem of model size and computational complexity, respectively. In this paper, we investigate a binarized ViT model. Empirically, we observe that the existing binarization technology designed for Convolutional Neural Networks (CNN) cannot migrate well to a ViT's binarization task. We also find that the decline of the accuracy of the binary ViT model is mainly due to the information loss of the Attention module and the Value vector. Therefore, we propose a novel model binarization technique, called Group Superposition Binarization (GSB), to deal with these issues. Furthermore, in order to further improve the performance of the binarization model, we have investigated the gradient calculation procedure in the binarization process and derived more proper gradient calculation equations for GSB to reduce the influence of gradient mismatch. Then, the knowledge distillation technique is introduced to alleviate the performance degradation caused by model binarization. Analytically, model binarization can limit the parameters search space during parameter updates while training a model....
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。