The real-world data tends to be heavily imbalanced and severely skew the data-driven deep neural networks, which makes Long-Tailed Recognition (LTR) a massive challenging task. Existing LTR methods seldom train Vision Transformers (ViTs) with Long-Tailed (LT) data, while the off-the-shelf pretrain weight of ViTs always leads to unfair comparisons. In this paper, we systematically investigate the ViTs' performance in LTR and propose LiVT to train ViTs from scratch only with LT data. With the observation that ViTs suffer more severe LTR problems, we conduct Masked Generative Pretraining (MGP) to learn generalized features. With ample and solid evidence, we show that MGP is more robust than supervised manners. In addition, Binary Cross Entropy (BCE) loss, which shows conspicuous performance with ViTs, encounters predicaments in LTR. We further propose the balanced BCE to ameliorate it with strong theoretical groundings. Specially, we derive the unbiased extension of Sigmoid and compensate extra logit margins to deploy it. Our Bal-BCE contributes to the quick convergence of ViTs in just a few epochs. Extensive experiments demonstrate that with MGP and Bal-BCE, LiVT successfully trains ViTs well without any additional data and outperforms comparable state-of-the-art methods significantly, e.g., our ViT-B achieves 81.0% Top-1 accuracy in iNaturalist 2018 without bells and whistles. Code is available at https://github.com/XuZhengzhuo/LiVT.
翻译:现实世界的数据往往存在严重的不平衡性,这会导致数据驱动的深度神经网络产生严重偏差,使得长尾识别成为一项极具挑战性的任务。现有长尾识别方法很少使用长尾数据训练视觉Transformer,而现成的视觉Transformer预训练权重往往导致不公平的比较。本文系统研究了视觉Transformer在长尾识别中的性能,并提出LiVT方法,仅使用长尾数据从零开始训练视觉Transformer。通过观察发现视觉Transformer面临更严重的长尾识别问题,我们采用掩码生成预训练来学习通用特征。基于充分且可靠的证据,我们证明掩码生成预训练比监督方法更具鲁棒性。此外,在视觉Transformer中表现显著的二元交叉熵损失在长尾识别中遇到了困境。我们进一步提出平衡二元交叉熵,基于坚实的理论基础对其加以改进。特别地,我们推导了Sigmoid的无偏扩展,并补偿额外的logit边界以部署该方法。我们的Bal-BCE有助于视觉Transformer在仅需少量训练周期内快速收敛。大量实验表明,结合掩码生成预训练和Bal-BCE,LiVT成功地在无需额外数据的情况下训练视觉Transformer,并显著优于同类最先进方法,例如我们的ViT-B在iNaturalist 2018数据集上以简洁方式达到81.0%的Top-1准确率。代码开源在https://github.com/XuZhengzhuo/LiVT。