Beyond position: how rotary embeddings shape representations and memory in autoregressive transfomers

要約

Rotary Positional Embeddings (RoPE) は、Transformer モデルの位置エンコーディングを強化しますが、モデルのダイナミクスに対するその完全な影響はまだ解明されていません。
この論文では、RoPE がどのように位置依存の回転を導入し、モデルの内部表現内の高周波成分に影響を与えるトークン埋め込みに位相シフトを引き起こすかを研究します。
スペクトル解析を通じて、RoPE の回転行列が埋め込みの振動挙動を誘発し、層間の情報保持に影響を与え、時間モデリング機能を形成することを実証します。
フィードフォワードネットワークの活性化関数がRoPE変調された埋め込みと相互作用して高調波を生成し、位相調整に基づいて建設的または破壊的干渉を引き起こすことを示します。
私たちの研究結果は、位相の整合が活性化を増幅させ、注意を鋭敏にする一方、位相の整合がずれると活性化を弱め、位置パターンへの集中を乱すことを明らかにしました。
この研究は、モデルの動作の本質的な要素としての周波数成分の重要性を強調し、従来の分析を超えた新しい洞察を提供します。

要約(オリジナル)

Rotary Positional Embeddings (RoPE) enhance positional encoding in Transformer models, yet their full impact on model dynamics remains underexplored. This paper studies how RoPE introduces position-dependent rotations, causing phase shifts in token embeddings that influence higher-frequency components within the model’s internal representations. Through spectral analysis, we demonstrate that RoPE’s rotation matrices induce oscillatory behaviors in embeddings, affecting information retention across layers and shaping temporal modeling capabilities. We show that activation functions in feed-forward networks interact with RoPE-modulated embeddings to generate harmonics, leading to constructive or destructive interference based on phase alignment. Our findings reveal that phase alignment amplifies activations and sharpens attention, while misalignment weakens activations and disrupts focus on positional patterns. This study underscores the importance of frequency components as intrinsic elements of model behavior, offering new insights beyond traditional analyses.

arxiv情報

著者 Valeria Ruscio,Fabrizio Silvestri
発行日 2024-10-23 17:48:28+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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