要約
変圧器モデルは、トークンの依存関係をキャプチャするために自己関節に依存していますが、マルチヘッドの注意(MHA)の柔軟性を可能にしながら、位置情報を効果的に統合する上で課題に直面しています。
多くの場合、以前の方法はセマンティックと位置の違いを誤用したり、頭全体に均一な位置調整を適用したり、表現能力を制限する可能性があります。
このペーパーでは、ComplexFormerを紹介し、複雑なマルチヘッド注意CMHAを特徴としています。
CMHAは、各ヘッドが複雑な平面内で統一されたセマンティックと位置の違いを独立してモデル化し、回転とスケーリングとしての相互作用を表します。
complexFormerには、2つの重要な改善が組み込まれています。(1)ヘッドごとのクエリ/キー投影を、頭固有の複雑なサブスペース動作のための極形式の複雑なベクトルに変換するヘッドごとのオイラー変換。
(2)ヘッドごとの適応微分回転メカニズム、exp [I(ASMN、I) + Delta(PMN)、I)]。
言語モデリング、テキスト生成、コード生成、数学的推論に関する広範な実験により、複合施設は、ロープ変換者のような強力なベースラインと比較して、優れたパフォーマンス、大幅に低い世代の困惑、および長いコンテキストの一貫性を改善することを示しています。
ComplexFormerは強力なパラメーター効率を示し、より表現力のある適応性のある注意メカニズムを提供します。
要約(オリジナル)
Transformer models rely on self-attention to capture token dependencies but face challenges in effectively integrating positional information while allowing multi-head attention (MHA) flexibility. Prior methods often model semantic and positional differences disparately or apply uniform positional adjustments across heads, potentially limiting representational capacity. This paper introduces ComplexFormer, featuring Complex Multi-Head Attention-CMHA. CMHA empowers each head to independently model semantic and positional differences unified within the complex plane, representing interactions as rotations and scaling. ComplexFormer incorporates two key improvements: (1) a per-head Euler transformation, converting real-valued query/key projections into polar-form complex vectors for head-specific complex subspace operation; and (2) a per-head adaptive differential rotation mechanism, exp[i(Adapt(ASmn,i) + Delta(Pmn),i)], allowing each head to learn distinct strategies for integrating semantic angle differences (ASmn,i) with relative positional encodings (Delta(Pmn),i). Extensive experiments on language modeling, text generation, code generation, and mathematical reasoning show ComplexFormer achieves superior performance, significantly lower generation perplexity , and improved long-context coherence compared to strong baselines like RoPE-Transformers. ComplexFormer demonstrates strong parameter efficiency, offering a more expressive, adaptable attention mechanism.
arxiv情報
著者 | Jintian Shao,Hongyi Huang,Jiayi Wu,Beiwen Zhang,ZhiYu Wu,You Shan,MingKai Zheng |
発行日 | 2025-05-15 12:30:33+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google