Skip to main content
QUICK REVIEW

[論文レビュー] Contextual Transformer Networks for Visual Recognition

Yehao Li, Ting Yao|arXiv (Cornell University)|Jul 26, 2021
Advanced Neural Network Applications被引用数 42
ひとこと要約

論文は、局所的な隣接関係間の静的コンテキストを掘り起こし、動的な文脈注意を学習する Contextual Transformer (CoT) ブロックを導入し、ResNet風バックボーンの3x3畳み込みを置換してCoTNet/CoTNeXtバックボーンを形成し、ImageNetとCOCOの性能を向上させる。

ABSTRACT

Transformer with self-attention has led to the revolutionizing of natural language processing field, and recently inspires the emergence of Transformer-style architecture design with competitive results in numerous computer vision tasks. Nevertheless, most of existing designs directly employ self-attention over a 2D feature map to obtain the attention matrix based on pairs of isolated queries and keys at each spatial location, but leave the rich contexts among neighbor keys under-exploited. In this work, we design a novel Transformer-style module, i.e., Contextual Transformer (CoT) block, for visual recognition. Such design fully capitalizes on the contextual information among input keys to guide the learning of dynamic attention matrix and thus strengthens the capacity of visual representation. Technically, CoT block first contextually encodes input keys via a $3 imes3$ convolution, leading to a static contextual representation of inputs. We further concatenate the encoded keys with input queries to learn the dynamic multi-head attention matrix through two consecutive $1 imes1$ convolutions. The learnt attention matrix is multiplied by input values to achieve the dynamic contextual representation of inputs. The fusion of the static and dynamic contextual representations are finally taken as outputs. Our CoT block is appealing in the view that it can readily replace each $3 imes3$ convolution in ResNet architectures, yielding a Transformer-style backbone named as Contextual Transformer Networks (CoTNet). Through extensive experiments over a wide range of applications (e.g., image recognition, object detection and instance segmentation), we validate the superiority of CoTNet as a stronger backbone. Source code is available at \url{https://github.com/JDAI-CV/CoTNet}.

研究の動機と目的

  • 従来の自己注意機構による2D視覚特徴マップの文脈モデリングの制限を動機付けて対処する。
  • キーの静的コンテキスト化と動的自己注意を組み合わせた CoT ブロックを提案する。
  • ResNet/ResNeXt の3x3畳み込みを置換して CoTNet/CoTNeXt バックボーンを構築する方法を示す。
  • ImageNet による画像認識性能と COCO の下流タスクでの性能向上を実証する。

提案手法

  • CoT ブロックを導入し、まず3x3畳み込みによってキーを文脈化して静的コンテキストを作成する。
  • 文脈化されたキーをクエリと連結し、2つの連続した1x1畳み込みを通して動的なマルチヘッド注意マトリクスを学習する。
  • 注意を値に適用して動的コンテキスト表現を計算し、静的コンテキストと動的コンテキストを出力として融合する。
  • ResNet/ResNeXt の各3x3畳み込みを CoT ブロックに置換して CoTNet および CoTNeXt バックボーンを形成する。
  • CoTNet-50/101 および CoTNeXt-50/101 のようなバリアントを提供し、ImageNet および COCO で最先端バックボーンと比較する。

実験結果

リサーチクエスチョン

  • RQ1隣接キー間の文脈情報は2D視覚特徴マップにおける自己注意学習を改善するか?
  • RQ2標準バックボーン(ResNet/ResNeXt)で3x3畳み込みをCoTブロックに置換することは認識・検出タスクに有益か?
  • RQ3CoTNetおよびCoTNeXtバックボーンはImageNetおよびCOCOで最先端のアーキテクチャと比べてどうか?
  • RQ4CoTブロックを使用する際のパラメータ数、FLOPs、精度のトレードオフはどうなるか?

主な発見

ModelTop-1 Acc.Top-5 Acc.ParamsGFLOPs
CoTNet-5079.294.522.2M3.3
CoTNeXt-5079.594.530.1M4.3
CoTNet-10180.094.938.3M6.1
CoTNeXt-10180.395.053.4M8.2
  • CoT ブロックは、同等のパラメータと FLOPs で ImageNet の top-1/top-5 精度においていくつかの最先端バックボーンを上回る。
  • ResNet/ResNeXt バックボーンで 3x3 畳み込みを CoT ブロックに置換すると、FLOPs が同等または低い状態で精度が向上する。
  • CoTNet-50、CoTNeXt-50、CoTNet-101、CoTNeXt-101 はデフォルトの学習設定下で peers より優れた top-1 精度を達成(例:CoTNeXt-50 79.5% top-1、94.5% top-5)。
  • 高度な学習では CoTNet-50/101 および CoTNeXt-50/101 がより高い top-1 精度に到達し、CoTNeXt-101 は 83.2% の top-1 を達成。
  • CoTNeXt-50/101 バリアントは類似 FLOPs に対して有利な精度を示し、SE-CoTNetD-152 は競争力のある効率で強力な結果を達成。
  • 推論時の分析は CoTNet 系が複数のベースラインと比較して精度-時間のトレードオフで優れていることを示す。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。