arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2104.10935cs.CVcs.AIcs.LG
收藏

SoT:深入研究Transformer的分类标题

SoT: Delving Deeper into Classification Head for Transformer

Dalian University of Technology(大连理工大学);Tianjin University(天津大学);MEGVII Technology(旷视科技)

Jiangtao Xie, Ruiren Zeng, Qilong Wang, Ziqi Zhou, Peihua Li

摘要:

Transformer模型不仅在自然语言处理(NLP)中取得了成功,而且在计算机视觉(CV)中也表现出很高的潜力。尽管取得了很大的进步,但大多数工作只关注体系结构的改进,而对分类头的关注很少。多年来,Transformer模型完全基于分类标记来构建最终的分类器,而没有显式地利用高级单词标记。在本文中,我们提出了一种新的Transformer模型称为二阶Transformer(SoT),同时利用分类令牌和单词令牌的分类器。具体来说,我们经验性地揭示,高级别的单词令牌包含丰富的信息,其本身是非常称职的分类器,而且,是补充的分类令牌。为了有效地利用这些丰富的信息,我们提出了具有奇异值功率归一化的多头全局互协方差池化,其具有相似的理念,因此与Transformer块兼容,比常用的池化方法更好。然后,我们全面研究了如何显式地将词标记与分类标记相结合,以构建最终的分类头。对于CV任务,我们的SoT在ImageNet和ImagNet-A等具有挑战性的基准测试上显著改进了最先进的视觉Transformer。对于NLP任务,通过基于预训练的语言Transformers(包括GPT和BERT)进行微调,我们的SoT大大提高了CoLA和RTE等广泛使用的任务的性能。代码将在https://peihuali.org/SoT上提供

英文摘要:

Transformer models are not only successful in natural language processing (NLP) but also demonstrate high potential in computer vision (CV). Despite great advance, most of works only focus on improvement of architectures but pay little attention to the classification head. For years transformer models base exclusively on classification token to construct the final classifier, without explicitly harnessing high-level word tokens. In this paper, we propose a novel transformer model called second-order transformer (SoT), exploiting simultaneously the classification token and word tokens for the classifier. Specifically, we empirically disclose that high-level word tokens contain rich information, which per se are very competent with the classifier and moreover, are complementary to the classification token. To effectively harness such rich information, we propose multi-headed global cross-covariance pooling with singular value power normalization, which shares similar philosophy and thus is compatible with the transformer block, better than commonly used pooling methods. Then, we study comprehensively how to explicitly combine word tokens with classification token for building the final classification head. For CV tasks, our SoT significantly improves state-of-the-art vision transformers on challenging benchmarks including ImageNet and ImageNet-A. For NLP tasks, through fine-tuning based on pretrained language transformers including GPT and BERT, our SoT greatly boosts the performance on widely used tasks such as CoLA and RTE. Code will be available at https://peihuali.org/SoT

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑