GSB: Group Superposition Binarization for Vision Transformer with Limited Training Samples
Tian Gao, Cheng-Zhong Xu, Le Zhang, Hui Kong
TL;DR
This work tackles overfitting and high resource demands of Vision Transformers when training data are scarce by introducing Group Superposition Binarization (GSB), a 1-bit binarization scheme that preserves information in attention and value matrices via grouped masks and learnable scales. It frames a baseline binarization method for linear layers and attention, analyzes why ViT binarization underperforms relative to CNN/MLP, and develops GSB to form a linear combination of binarized components for attention and value with STE-guided gradients. The method is complemented by a two-stage training regimen and hard-label Distillation from a pretrained teacher, enabling strong performance on small datasets (CIFAR-100, Oxford-Flowers102, Chaoyang) while drastically reducing computational costs. Empirical results show substantial accuracy gains over baselines, robustness to label noise, and major efficiency advantages, suggesting practical viability for edge devices and constrained environments. Overall, GSB provides a principled, scalable route to deploy binarized ViTs without sacrificing performance on limited-data tasks.
Abstract
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....
