Skip to main content
QUICK REVIEW

[论文解读] SoT: Delving Deeper into Classification Head for Transformer

Jiangtao Xie, Ruiren Zeng|arXiv (Cornell University)|Apr 22, 2021
Multimodal Machine Learning Applications被引用 11
一句话总结

本文提出 SoT,一种基于 Transformer 的新型模型,通过多头全局交叉协方差池化与奇异值幂归一化,联合利用分类标记和高层词标记,增强分类头。该方法通过利用全局上下文与局部判别特征之间的互补信息,在图像识别与自然语言处理任务中显著提升性能,在 ImageNet、ImageNet-A、CoLA 和 RTE 基准上均达到当前最优结果。

ABSTRACT

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

研究动机与目标

  • 为解决 Transformer 模型中仅依赖分类标记所导致的局限性,该方法避免忽略高层词标记中丰富的互补信息。
  • 探究仅使用词标记是否可作为强分类器,以及如何有效结合分类标记。
  • 设计一种新颖且兼容的池化机制,从词标记中捕捉二阶交叉协方差表征,同时保持高效性与与 Transformer 架构的兼容性。
  • 开发并评估多种早期融合策略,显式结合分类标记与词标记表征,以提升分类性能。

提出的方法

  • 提出多头全局交叉协方差池化(MGCrP),通过学习所有词标记之间的二阶交叉协方差表征,捕捉丰富、高层级的语义信息。
  • 引入奇异值幂归一化(svPN),一种专为 MGCrP 生成的非对称矩阵设计的新归一化技术,确保表征学习的稳定与高效。
  • 设计三种早期融合方案——拼接、求和与逐元素相乘,显式结合分类标记与 MGCrP 处理后的词标记表征。
  • 采用快速近似 svPN 算法,在保持完整归一化统计特性的同时,维持计算效率。
  • 为简化与高效,使用单头 MGCrP,其表征尺寸在微调阶段从预定义集合(如 4K、6K)中选取。
  • 在微调过程中对 MGCrP 层应用 Dropout,以防止过拟合并提升泛化能力。

实验结果

研究问题

  • RQ1高层词标记是否可独立作为有效分类器,其性能是否优于或可补充标准分类标记?
  • RQ2如何在不破坏与 Transformer 架构兼容性的前提下,高效且有效地聚合词标记的二阶交叉协方差表征?
  • RQ3在深度学习背景下,针对交叉协方差池化生成的非对称矩阵,应采用何种归一化策略?
  • RQ4不同早期融合策略(如求和、拼接)在结合分类标记与词标记表征以提升分类性能方面表现如何?
  • RQ5与标准 Transformer 分类器相比,所提出的 SoT 模型在多样化视觉与语言基准上的性能提升程度如何?

主要发现

  • 在 ImageNet 上,与仅使用单一分类标记的基线相比,SoT 将 DeiT-Tiny 的准确率提升 6.4%(达 78.6%),将 T2T-14 的准确率提升 2.8%(达 74.5%)。
  • 在 ImageNet-A 上,SoT 相较于 ClassT 提升 10.2%(17.5% → 27.1%),相较此前 SoT 的 SOTA 水平提升 3.2%(27.1% → 30.3%)。
  • 在自然语言处理任务中,SoT 将 BERT-base 在 CoLA 上的性能提升 3.2%(58.0% vs. 54.8%),在 RTE 上提升 2.1%(69.3% vs. 67.2%)。
  • 分类标记与词标记的组合(ClassT+WordT)始终优于单独使用任一组件,表明其具有显著互补性。
  • 通过 Grad-CAM 与注意力图可视化结果表明,ClassT 关注全局上下文,而 WordT 强调局部判别区域,其融合能有效捕捉两者特征。
  • 所提出的 MGCrP 搭配 svPN 归一化在性能上优于全局平均池化与全局协方差池化,尤其在捕捉复杂高层表征方面表现更优。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。