arXiv reaDer
自己注意を超えて:視覚的タスクのための2つの線形層を使用した外部注意
Beyond Self-attention: External Attention using Two Linear Layers for Visual Tasks
注意メカニズム、特に自己注意は、視覚的タスクにおける深い特徴表現においてますます重要な役割を果たします。自己注意は、単一のサンプル内の長距離依存関係をキャプチャするために、すべての位置にわたるペアワイズアフィニティを使用して特徴の加重和を計算することにより、各位置で特徴を更新します。ただし、自己注意は2次の複雑さを持ち、異なるサンプル間の潜在的な相関関係を無視します。この論文は、2つのカスケード線形層と2つの正規化層を使用するだけで簡単に実装できる、2つの外部、小さく、学習可能で共有された記憶に基づいて、外部注意と呼ばれる新しい注意メカニズムを提案します。これは、既存の人気のあるアーキテクチャの自己注意を便利に置き換えます。外部の注意は線形の複雑さを持ち、すべてのサンプル間の相関を暗黙的に考慮します。画像分類、セマンティックセグメンテーション、画像生成、点群分類、および点群セグメンテーションタスクに関する広範な実験により、私たちの方法は、計算コストとメモリコストを大幅に削減しながら、自己注意メカニズムとそのバリアントの一部に匹敵する、または優れたパフォーマンスを提供することが明らかになりました。
Attention mechanisms, especially self-attention, play an increasingly important role in deep feature representation in 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 long-range dependency within a single sample. However, self-attention has a 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, and 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 samples. Extensive experiments on image classification, semantic segmentation, image generation, point cloud classification and point cloud segmentation tasks reveal that our method provides comparable or superior performance to the self-attention mechanism and some of its variants, with much lower computational and memory costs.
updated: Wed May 05 2021 22:29:52 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アソシエイト