On Vanishing Variance in Transformer Length Generalization

要約

Transformerが短いシーケンスで学習された場合、テスト時に長いシーケンスにロバストに汎化できないことは広く知られている問題である。このことは、Transformerが数学的な問題解決やコード合成において素晴らしい能力を持つにもかかわらず、真の推論エンジンであるかどうかという問題を提起する。本論文では、この問題に対して消失分散の視点を提供する。我々の知る限り、今日のフロンティアモデルであっても、シーケンス長が長くなると、マルチヘッド注意モジュールの出力の分散が減少することを初めて実証した。argmax検索と辞書検索タスクにおいて、我々の実験は、注意出力の後にレイヤーの正規化を適用することで、長さの汎化が著しく改善されることを示している。我々の分析では、この改善は、分散の消失によって引き起こされる分布シフトの減少(完全な除去ではない)に起因する。

要約(オリジナル)

It is a widely known issue that Transformers, when trained on shorter sequences, fail to generalize robustly to longer ones at test time. This raises the question of whether Transformer models are real reasoning engines, despite their impressive abilities in mathematical problem solving and code synthesis. In this paper, we offer a vanishing variance perspective on this issue. To the best of our knowledge, we are the first to demonstrate that even for today’s frontier models, a longer sequence length results in a decrease in variance in the output of the multi-head attention modules. On the argmax retrieval and dictionary lookup tasks, our experiments show that applying layer normalization after the attention outputs leads to significantly better length generalization. Our analyses attribute this improvement to a reduction-though not a complete elimination-of the distribution shift caused by vanishing variance.

arxiv情報

著者 Ruining Li,Gabrijel Boduljak,Jensen,Zhou
発行日 2025-04-03 17:59:56+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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