Skip to main content
QUICK REVIEW

[Paper Review] SoT: Delving Deeper into Classification Head for Transformer

Jiangtao Xie, Ruiren Zeng|arXiv (Cornell University)|Apr 22, 2021
Multimodal Machine Learning ApplicationsComputer Science11 citations
TL;DR

This paper proposes SoT, a novel Transformer-based model that enhances classification heads by jointly leveraging the classification token and high-level word tokens through a multi-headed global cross-covariance pooling with singular value power normalization. The method significantly improves performance on both vision and language tasks by exploiting complementary information from global context and local discriminative features, achieving state-of-the-art results on ImageNet, ImageNet-A, CoLA, and RTE benchmarks.

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

Motivation & Objective

  • To address the limitation of relying solely on the classification token in Transformer models, which overlooks rich, complementary information in high-level word tokens.
  • To investigate whether word tokens alone can serve as strong classifiers and how they can be effectively combined with the classification token.
  • To design a novel, compatible pooling mechanism that captures second-order, cross-covariance representations from word tokens while maintaining efficiency and compatibility with the Transformer architecture.
  • To develop and evaluate multiple early fusion strategies that explicitly combine classification and word token representations for improved classification performance.

Proposed method

  • Proposes multi-headed global cross-covariance pooling (MGCrP), which learns second-order, cross-covariance representations across all word tokens to capture rich, high-level semantic information.
  • Introduces singular value power normalization (svPN), a novel normalization technique tailored for asymmetric matrices produced by MGCrP, ensuring stable and effective representation learning.
  • Designs three early fusion schemes—concatenation, sum, and element-wise multiplication—to explicitly combine the classification token and MGCrP-processed word token representations.
  • Employs a fast, approximate svPN algorithm to maintain computational efficiency while preserving the statistical properties of the full normalization.
  • Uses a single-head MGCrP for simplicity and efficiency, with representation size selected from a predefined set (e.g., 4K, 6K) during fine-tuning.
  • Applies dropout to the MGCrP layer during fine-tuning to prevent overfitting and improve generalization.

Experimental results

Research questions

  • RQ1Can high-level word tokens alone serve as a competent classifier, outperforming or complementing the standard classification token in Transformers?
  • RQ2How can second-order, cross-covariance representations from word tokens be effectively and efficiently aggregated without breaking compatibility with the Transformer architecture?
  • RQ3What normalization strategy is suitable for asymmetric matrices generated by cross-covariance pooling in the context of deep learning?
  • RQ4How do different early fusion strategies (e.g., sum, concatenation) compare in combining classification and word token representations for improved classification?
  • RQ5To what extent does the proposed SoT model improve performance across diverse vision and language benchmarks compared to standard Transformer classifiers?

Key findings

  • On ImageNet, SoT improves DeiT-Tiny by 6.4% accuracy (78.6%) and T2T-14 by 2.8% (74.5%) compared to single-classification-token baselines.
  • On ImageNet-A, SoT achieves a 10.2% improvement over ClassT (17.5%) and a 3.2% improvement over the previous SoT state-of-the-art (27.1%).
  • For NLP, SoT boosts BERT-base performance on CoLA by 3.2% (58.0% vs. 54.8%) and on RTE by 2.1% (69.3% vs. 67.2%).
  • The combination of classification and word tokens (ClassT+WordT) consistently outperforms both individual components, demonstrating strong complementarity.
  • Visualizations using Grad-CAM and attention maps confirm that ClassT focuses on global context while WordT emphasizes local discriminative regions, and their fusion captures both aspects effectively.
  • The proposed MGCrP with svPN normalization achieves better performance than global average pooling and global covariance pooling, especially in capturing complex, high-level representations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.