Skip to main content
QUICK REVIEW

[Paper Review] TokenMixup: Efficient Attention-guided Token-level Data Augmentation for Transformers

Hyeong Kyu Choi, Joonmyung Choi|arXiv (Cornell University)|Oct 14, 2022
Advanced Neural Network ApplicationsComputer Science14 citations
TL;DR

TokenMixup proposes an efficient, attention-guided token-level data augmentation method for Vision Transformers that replaces computationally expensive gradient-based saliency detection with self-attention maps, achieving a ×15 speed-up while improving performance. It introduces curriculum learning via ScoreNet and a multi-scale variant, Vertical TokenMixup, leading to state-of-the-art accuracy on CIFAR-100 among models trained from scratch.

ABSTRACT

Mixup is a commonly adopted data augmentation technique for image classification. Recent advances in mixup methods primarily focus on mixing based on saliency. However, many saliency detectors require intense computation and are especially burdensome for parameter-heavy transformer models. To this end, we propose TokenMixup, an efficient attention-guided token-level data augmentation method that aims to maximize the saliency of a mixed set of tokens. TokenMixup provides x15 faster saliency-aware data augmentation compared to gradient-based methods. Moreover, we introduce a variant of TokenMixup which mixes tokens within a single instance, thereby enabling multi-scale feature augmentation. Experiments show that our methods significantly improve the baseline models' performance on CIFAR and ImageNet-1K, while being more efficient than previous methods. We also reach state-of-the-art performance on CIFAR-100 among from-scratch transformer models. Code is available at https://github.com/mlvlab/TokenMixup.

Motivation & Objective

  • To address the high computational cost of gradient-based saliency detection in mixup methods for parameter-heavy Vision Transformers.
  • To leverage self-attention maps as an efficient, intrinsic saliency detector for token-level data augmentation.
  • To introduce a curriculum learning approach that adaptively applies mixup based on sample difficulty via ScoreNet.
  • To enable multi-scale feature learning through vertical mixing of tokens across transformer layers within a single sample.
  • To achieve state-of-the-art performance on CIFAR-100 with models trained from scratch, while improving generalization on CIFAR-10 and ImageNet-1K.

Proposed method

  • TokenMixup uses self-attention maps as a fast, differentiable proxy for saliency to identify important tokens for mixing, replacing gradient-based saliency estimation.
  • It employs Hungarian matching to optimally assign instance pairs to maximize batch-level saliency, solving the assignment problem exactly.
  • A lightweight ScoreNet module estimates sample difficulty and guides adaptive mixup application, implementing a curriculum learning strategy.
  • Vertical TokenMixup (VTM) performs intra-sample mixing by combining tokens from different layers of a single input, enabling multi-scale feature augmentation.
  • The method supports parallel application with other mixup techniques, such as input mixup and CutMix, enhancing overall performance.
  • Saliency-based label reassignment is applied by computing the proportion of mixed tokens to generate soft labels, preserving semantic consistency.

Experimental results

Research questions

  • RQ1Can self-attention maps effectively replace gradient-based saliency detection in mixup while reducing computational cost?
  • RQ2How does curriculum learning via ScoreNet improve the effectiveness of token-level mixup during training?
  • RQ3Can intra-sample mixing across transformer layers enhance multi-scale feature representation and model generalization?
  • RQ4What is the impact of combining TokenMixup with existing mixup methods on image classification benchmarks?
  • RQ5Does attention-guided token mixing lead to better performance and robustness compared to soft mixing methods like Manifold Mixup?

Key findings

  • TokenMixup achieves a ×15 speed-up in saliency detection compared to gradient-based methods, with improved accuracy on CIFAR-100.
  • The method reaches state-of-the-art performance of 83.57% top-1 accuracy on CIFAR-100 among vision transformers trained from scratch.
  • Combining TokenMixup with input mixup and CutMix yields 83.57% accuracy on CIFAR-100, outperforming the original CCT baseline by over 6 percentage points.
  • Vertical TokenMixup enables effective multi-scale feature learning, contributing to improved performance when combined with other mixup methods.
  • Ablation studies confirm that optimal assignment, saliency-based label reassignment, and ScoreNet-based curriculum learning all contribute significantly to performance gains.
  • Manifold Mixup leads to performance degradation when applied to intermediate tokens, suggesting that hard token replacement (as in TokenMixup) is more suitable for self-attention mechanisms.

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.