Representational Strengths and Limitations of Transformers

要約

トランスフォーマーで一般的に使用されているアテンション レイヤーは、現代の深層学習のバックボーンを形成していますが、他のアーキテクチャと比較した場合の利点と欠点については数学的に説明されていません。
この研究では、幅、深さ、埋め込み次元などの本質的な複雑さのパラメーターに焦点を当てて、アテンション レイヤーの表現力に関する肯定的な結果と否定的な結果の両方を確立します。
良い面としては、疎な平均化タスクを提示します。リカレント ネットワークとフィードフォワード ネットワークはすべて、入力サイズで多項式にスケーリングする複雑さを持ちますが、トランスフォーマーは入力サイズで単に対数的にスケーリングします。
さらに、同じ構造を使用して、変圧器における大きな埋め込み寸法の必要性と役割を示します。
マイナス面としては、トリプル検出タスクがあり、アテンション レイヤーの複雑さは入力サイズに線形にスケーリングされます。
このシナリオは実際にはまれであると思われるため、注意層によって効率的に解決できる自然なバリエーションも紹介します。
この証明技術は、変圧器と関連モデルの解析における通信の複雑さの価値と、典型的な注意タスクとしてのスパース平均化の役割を強調しており、三重検出の解析にも使用されています。

要約(オリジナル)

Attention layers, as commonly used in transformers, form the backbone of modern deep learning, yet there is no mathematical description of their benefits and deficiencies as compared with other architectures. In this work we establish both positive and negative results on the representation power of attention layers, with a focus on intrinsic complexity parameters such as width, depth, and embedding dimension. On the positive side, we present a sparse averaging task, where recurrent networks and feedforward networks all have complexity scaling polynomially in the input size, whereas transformers scale merely logarithmically in the input size; furthermore, we use the same construction to show the necessity and role of a large embedding dimension in a transformer. On the negative side, we present a triple detection task, where attention layers in turn have complexity scaling linearly in the input size; as this scenario seems rare in practice, we also present natural variants that can be efficiently solved by attention layers. The proof techniques emphasize the value of communication complexity in the analysis of transformers and related models, and the role of sparse averaging as a prototypical attention task, which even finds use in the analysis of triple detection.

arxiv情報

著者 Clayton Sanford,Daniel Hsu,Matus Telgarsky
発行日 2023-11-16 14:48:16+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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