[論文レビュー] ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biases
ガテッドポジショナルセルフアテンション(GPSA)を導入し、Vision Transformersに畳み込み帰納的バイアスを穏やかに注入して、DeiTより外部データPretrainingなしでサンプル効率とImageNet性能を向上させる。
Convolutional architectures have proven extremely successful for vision tasks. Their hard inductive biases enable sample-efficient learning, but come at the cost of a potentially lower performance ceiling. Vision Transformers (ViTs) rely on more flexible self-attention layers, and have recently outperformed CNNs for image classification. However, they require costly pre-training on large external datasets or distillation from pre-trained convolutional networks. In this paper, we ask the following question: is it possible to combine the strengths of these two architectures while avoiding their respective limitations? To this end, we introduce gated positional self-attention (GPSA), a form of positional self-attention which can be equipped with a ``soft" convolutional inductive bias. We initialise the GPSA layers to mimic the locality of convolutional layers, then give each attention head the freedom to escape locality by adjusting a gating parameter regulating the attention paid to position versus content information. The resulting convolutional-like ViT architecture, ConViT, outperforms the DeiT on ImageNet, while offering a much improved sample efficiency. We further investigate the role of locality in learning by first quantifying how it is encouraged in vanilla self-attention layers, then analysing how it is escaped in GPSA layers. We conclude by presenting various ablations to better understand the success of the ConViT. Our code and models are released publicly at https://github.com/facebookresearch/convit.
研究の動機と目的
- ソフトな畳み込み帰納的バイアスを導入することでCNNとViTの橋渡しを動機づける。
- 畳み込みとして初期化でき、徐々に内容に依存するGPSA層を開発する。
- 追加データなしで精度とサンプル効率を向上させるConViTがDeiTを上回ることを示す。
- GPSAと従来の自己注意における局所性の学習と脱却を分析する。
- 初期化・ゲーティング・GPSA配置の役割を理解するためのアブレーションを提供する。
提案手法
- 学習可能なゲートλ_hを用いて、内容項と位置項を組み合わせたゲーティッドポジショナルセルフアテンション(GPSA)を定義する。
- GPSAを畳み込みカーネルを模した初期化(畳み込み初期化)とし、相対的位置エンコーディングを固定する。
- softmax後に位置ベースと内容ベースのアテンションを混合するゲーティング機構を導入する(式7)。
- DeiTベースのアーキテクチャでViT自己注意層の一部をGPSA層に置換してConViTを作成する。
- 非局所性指標による局所性のダイナミクスを分析し、層(およびヘッド)を横断するゲーティングパラメータを検査する。
- 再現性のためのオープンソースコードと事前学習モデルを提供する。
実験結果
リサーチクエスチョン
- RQ1ソフトで学習可能な畳み込み帰納的バイアスを、モデルを固定されたCNN風の領域に固定することなくVision Transformersに組み込むことはできるか?
- RQ2素の自己注意における局在性はどのように現れ、訓練中にGPSA層は局在性からどのように脱出するのか?
- RQ3GPSAベースのConViTはDeiTと比較してサンプル効率を改善し、特にデータが限られた状況で競争力のある精度を達成するのか?
主な発見
| モデル | N_h | D_emb | サイズ | フロップ数 | 速度 | Top-1 | Top-5 |
|---|---|---|---|---|---|---|---|
| DeiT | 3 | 192 | 6M | 1G | 1442 | 72.2 | - |
| ConViT | 4 | 192 | 6M | 1G | 734 | 73.1 | 91.7 |
| DeiT Ti+ | 4 | 256 | 10M | 2G | 1036 | 75.9 | 93.2 |
| ConViT Ti+ | 4 | 256 | 10M | 2G | 625 | 76.7 | 93.6 |
| DeiT S | 6 | 384 | 22M | 4.3G | 587 | 79.8 | - |
| ConViT S+ | 9 | 432 | 27M | 5.4G | 305 | 81.3 | 95.7 |
| DeiT S+ | 9 | 576 | 48M | 10G | 480 | 79.0 | 94.4 |
| ConViT S+ | 9 | 576 | 48M | 10G | 382 | 82.2 | 95.9 |
| DeiT B | 12 | 768 | 86M | 17G | 187 | 81.8 | - |
| ConViT B | 16 | 768 | 86M | 17G | 141 | 82.4 | 95.9 |
| DeiT B+ | 16 | 1024 | 152M | 30G | 114 | 77.5 | 93.5 |
| ConViT B+ | 16 | 1024 | 152M | 30G | 96 | 82.5 | 95.9 |
- ConViTは同じ規模と計算量のDeiTよりも性能が高く、複数の構成でImageNetのTop-1およびTop-5が向上。
- ConViT-S+は82.2%のTop-1を達成(DeiT-Sは81.4%)、いくつかのベースラインと比較してスループットが改善。
- GPSA層はソフトで制御可能な畳み込みバイアスを提供し、初期訓練動作とサンプル効率を向上させる。
- ゲーティングパラメータは、初期層で位置情報へより多く依存するヘッドを示し、後の層で内容情報へ移行することを示す。
- アブレーションにより、畳み込み初期化とゲーティングが共同で利益に寄与し、特にデータが少ない条件で顕著であることが示された。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。