Transformers as Support Vector Machines

要約

「Attention Is All You Need」で始まって以来、トランスフォーマー アーキテクチャは NLP に革命的な進歩をもたらしてきました。
トランスフォーマー内のアテンション層は、一連の入力トークン $X$ を受け入れ、softmax$(XQK^\top X^\top)$ として計算されるペアごとの類似性を通じてそれらを相互作用させます。$(K,Q)$ はトレーニング可能なキーです。
-クエリパラメータ。
この研究では、自己注意の最適化幾何学と、トークン ペアの外積に対する線形制約を使用して最適な入力トークンを最適でないトークンから分離するハード マージン SVM 問題との間の形式的等価性を確立します。
この形式主義により、勾配降下法で最適化された 1 層変換器の暗黙的なバイアスを特徴付けることができます。 (1) $(K,Q)$ でパラメータ化された消失正則化による注目層の最適化は、核エネルギーを最小化する SVM ソリューションの方向に収束します。
結合パラメータ $W=KQ^\top$ のノルム。
代わりに、$W$ によって直接パラメータ化すると、フロベニウスのノルム目標が最小化されます。
私たちはこの収束を特徴づけ、それが全体的な方向ではなく、局所的に最適な方向に向かって発生する可能性があることを強調します。
(2) これを補足して、適切な幾何学的条件下での勾配降下のローカル/グローバル方向収束を証明します。
重要なのは、過剰なパラメータ化が SVM 問題の実現可能性を確保し、定常点のない良好な最適化ランドスケープを保証することによって大域的収束を促進することを示していることです。
(3) 私たちの理論は主に線形予測ヘッドに適用されますが、非線形ヘッドで暗黙的なバイアスを予測する、より一般的な SVM 等価性を提案します。
私たちの発見は任意のデータセットに適用でき、その有効性は実験によって検証されます。
また、いくつかの未解決の問題と研究の方向性も紹介します。
私たちは、これらの発見が、最適なトークンを分離して選択する SVM の階層としてのトランスフォーマーの解釈にインスピレーションを与えたと考えています。

要約(オリジナル)

Since its inception in ‘Attention Is All You Need’, transformer architecture has led to revolutionary advancements in NLP. The attention layer within the transformer admits a sequence of input tokens $X$ and makes them interact through pairwise similarities computed as softmax$(XQK^\top X^\top)$, where $(K,Q)$ are the trainable key-query parameters. In this work, we establish a formal equivalence between the optimization geometry of self-attention and a hard-margin SVM problem that separates optimal input tokens from non-optimal tokens using linear constraints on the outer-products of token pairs. This formalism allows us to characterize the implicit bias of 1-layer transformers optimized with gradient descent: (1) Optimizing the attention layer with vanishing regularization, parameterized by $(K,Q)$, converges in direction to an SVM solution minimizing the nuclear norm of the combined parameter $W=KQ^\top$. Instead, directly parameterizing by $W$ minimizes a Frobenius norm objective. We characterize this convergence, highlighting that it can occur toward locally-optimal directions rather than global ones. (2) Complementing this, we prove the local/global directional convergence of gradient descent under suitable geometric conditions. Importantly, we show that over-parameterization catalyzes global convergence by ensuring the feasibility of the SVM problem and by guaranteeing a benign optimization landscape devoid of stationary points. (3) While our theory applies primarily to linear prediction heads, we propose a more general SVM equivalence that predicts the implicit bias with nonlinear heads. Our findings are applicable to arbitrary datasets and their validity is verified via experiments. We also introduce several open problems and research directions. We believe these findings inspire the interpretation of transformers as a hierarchy of SVMs that separates and selects optimal tokens.

arxiv情報

著者 Davoud Ataee Tarzanagh,Yingcong Li,Christos Thrampoulidis,Samet Oymak
発行日 2024-02-22 18:38:14+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.LG, math.OC パーマリンク