arXiv reaDer
自己注意を超えて: 視覚的課題のための 2 つの線形層を使用した外的注意
Beyond Self-attention: External Attention using Two Linear Layers for Visual Tasks
注意のメカニズム、特に自己注意は、視覚的なタスクの深い特徴の表現においてますます重要な役割を果たしています。自己注意は、すべての位置のペアワイズ アフィニティを使用して特徴の加重合計を計算することにより、各位置で特徴を更新し、単一のサンプル内の長距離依存関係をキャプチャします。ただし、自己注意には二次的な複雑性があり、異なるサンプル間の潜在的な相関関係を無視します。この論文では、2 つのカスケードされた線形層と 2 つの正規化層を使用するだけで簡単に実装できる、2 つの外部の小さな学習可能な共有メモリに基づいて、外部注意と呼ばれる新しい注意メカニズムを提案します。それは、既存の一般的なアーキテクチャの自己注意に都合よく置き換わります。外部の注意には線形の複雑性があり、すべてのデータ サンプル間の相関関係を暗黙的に考慮します。さらに、マルチヘッド メカニズムを外部アテンションに組み込んで、画像分類用のすべての MLP アーキテクチャである外部アテンション MLP (EAMLP) を提供します。画像分類、オブジェクト検出、セマンティック セグメンテーション、インスタンス セグメンテーション、画像生成、点群分析に関する広範な実験により、私たちの方法は、自己注意メカニズムおよびそのバリアントの一部と同等または優れた結果を提供し、計算とメモリのコストを大幅に削減することが明らかになりました.
Attention mechanisms, especially self-attention, have played an increasingly important role in deep feature representation for visual tasks. Self-attention updates the feature at each position by computing a weighted sum of features using pair-wise affinities across all positions to capture the long-range dependency within a single sample. However, self-attention has quadratic complexity and ignores potential correlation between different samples. This paper proposes a novel attention mechanism which we call external attention, based on two external, small, learnable, shared memories, which can be implemented easily by simply using two cascaded linear layers and two normalization layers; it conveniently replaces self-attention in existing popular architectures. External attention has linear complexity and implicitly considers the correlations between all data samples. We further incorporate the multi-head mechanism into external attention to provide an all-MLP architecture, external attention MLP (EAMLP), for image classification. Extensive experiments on image classification, object detection, semantic segmentation, instance segmentation, image generation, and point cloud analysis reveal that our method provides results comparable or superior to the self-attention mechanism and some of its variants, with much lower computational and memory costs.
updated: Mon May 31 2021 14:49:59 GMT+0000 (UTC)
published: Wed May 05 2021 22:29:52 GMT+0000 (UTC)
参考文献 (このサイトで利用可能なもの) / References (only if available on this site)
被参照文献 (このサイトで利用可能なものを新しい順に) / Citations (only if available on this site, in order of most recent)
Amazon.co.jpアソシエイト