Number of Attention Heads vs Number of Transformer-Encoders in Computer Vision

要約

一方ではアテンション ヘッドの適切な数を決定し、他方ではトランス エンコーダーの数を決定することは、Transformer アーキテクチャを使用するコンピューター ビジョン (CV) タスクにとって重要な選択です。
コンピューティング実験により、パラメーターの総数が過決定の条件 (つまり、パラメーターの数を大幅に超える制約の数) を満たさなければならないという期待が確認されました。
そうすれば、良好な汎化性能が期待できます。
これにより、ヘッドの数とトランスの数を選択できる境界が設定されます。
分類される画像におけるコンテキストの役割が小さいと想定できる場合は、ヘッドの数が少ない (1 つまたは 2 つなど) 複数のトランスフォーマーを使用することが望ましいです。
クラスが画像内のコンテキストに大きく依存する可能性があるオブジェクトを分類する場合 (つまり、パッチが他のパッチに依存しているという意味)、ヘッドの数はトランスフォーマーの数と同様に重要です。

要約(オリジナル)

Determining an appropriate number of attention heads on one hand and the number of transformer-encoders, on the other hand, is an important choice for Computer Vision (CV) tasks using the Transformer architecture. Computing experiments confirmed the expectation that the total number of parameters has to satisfy the condition of overdetermination (i.e., number of constraints significantly exceeding the number of parameters). Then, good generalization performance can be expected. This sets the boundaries within which the number of heads and the number of transformers can be chosen. If the role of context in images to be classified can be assumed to be small, it is favorable to use multiple transformers with a low number of heads (such as one or two). In classifying objects whose class may heavily depend on the context within the image (i.e., the meaning of a patch being dependent on other patches), the number of heads is equally important as that of transformers.

arxiv情報

著者 Tomas Hrycej,Bernhard Bermeitinger,Siegfried Handschuh
発行日 2022-09-15 11:26:44+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CV, cs.LG パーマリンク