[論文レビュー] Do You Even Need Attention? A Stack of Feed-Forward Layers Does Surprisingly Well on ImageNet
論文は Vision Transformers における attention をパッチ次元上のフィードフォワード層へ置き換え、FF のみのモデルが ImageNet の top-1 精度で高い性能を達成できることを示唆しており、競争力のある性能には attention が必須ではない可能性を示唆します。
The strong performance of vision transformers on image classification and other vision tasks is often attributed to the design of their multi-head attention layers. However, the extent to which attention is responsible for this strong performance remains unclear. In this short report, we ask: is the attention layer even necessary? Specifically, we replace the attention layer in a vision transformer with a feed-forward layer applied over the patch dimension. The resulting architecture is simply a series of feed-forward layers applied over the patch and feature dimensions in an alternating fashion. In experiments on ImageNet, this architecture performs surprisingly well: a ViT/DeiT-base-sized model obtains 74.9\% top-1 accuracy, compared to 77.9\% and 79.9\% for ViT and DeiT respectively. These results indicate that aspects of vision transformers other than attention, such as the patch embedding, may be more responsible for their strong performance than previously thought. We hope these results prompt the community to spend more time trying to understand why our current models are as effective as they are.
研究の動機と目的
- ImageNet における Vision Transformer の性能に対して attention が必須かを調査する。
- attention を用いた ViT/DeiT と比較してフィードフォワードのみのアーキテクチャの性能を評価する。
- Vision Transformer の高性能に寄与する要素を理解する。
提案手法
- ViT の attention 層をパッチ次元に適用するフィードフォワード層に置換する。
- 公平な比較のため ViT/DeiT のベースラインと同じアーキテクチャと訓練 regime を用いる。
- ImageNet 上で 224px 解像度の ViT/DeiT tiny, base, large 構成を訓練する。
- FF のみのネットワークと attention ベースの対応モデルをモデルサイズごとに比較する。
実験結果
リサーチクエスチョン
- RQ1attention メカニズムを除去しパッチ上にフィードフォワード層を用いると ImageNet Top-1 精度にどのような影響が出るか。
- RQ2強力な Vision Transformer の性能を支える要素(パッチ埋め込み、訓練データ拡張など)はどれか。
- RQ3FF のみのアーキテクチャは標準的な ViT/DeiT サイズで競争力のある結果を得られるか。
主な発見
| Model | Params | ImageNet Top-1 |
|---|---|---|
| 小型 (P=16) ViT | ||
| 小型 (P=16) DeiT | 5.7M | 72.2 |
| 小型 (P=16) FFのみ | 7.7M | 61.4 |
| ベース (P=16) ViT | 86M | 77.9 |
| ベース (P=16) DeiT | 86M | 79.9 |
| ベース (P=16) FFのみ | 62M | 74.9 |
| 大型 (P=32) ViT | 306M | 71.2 |
| 大型 (P=32) DeiT | ||
| 大型 (P=32) FFのみ | 206M | 71.4 |
- FF のみモデルは強い精度を達成する。例えばベースサイズの FF のみは ImageNet で top-1 が 74.9% に達する。
- 注意機構のないモデルは attention ベースのものより性能は劣るが、サイズを問わず意外に高い性能を示す。
- ベースサイズの FF のみモデルは Tiny FF のみよりも圧倒的に高精度だが、attention を持つ ViT/DeiT には及ばない。
- 大規模な FF のみモデルは本研究の設定ではベース/ViT に比べて性能が低下する。
- 小型の純粋な attention のみモデルはこの設定では性能が低く、FF 成分なしの注意の限定的な利益を示す。
- 訓練 regime とパッチ埋め込みが観測された性能に寄与しており、注意機構だけではなく全体の設計が重要である。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。