A Formal Framework for Understanding Length Generalization in Transformers

要約

トランスの主要な課題は、トレーニング中に観察されたものよりも長くシーケンスに一般化することです。
以前の作品は、トランスがタスクに応じて成功または長さの一般化を成功させるか失敗させることができることを経験的に示していますが、この現象の理論的理解は限られたままです。
この作業では、学習可能な絶対位置エンコーディングを備えた因果変圧器の長さの一般化を分析するための厳しい理論的枠組みを紹介します。
特に、ノルムベースの正規者を使用した理想化された推論スキームの下で絶対的な位置エンコーディングを使用して、十分に長い入力から制限で識別できる機能を特徴付けます。
これにより、問題の豊富な家族の長さの一般化の可能性を証明することができます。
私たちは、さまざまなアルゴリズムおよび正式な言語タスクにわたる長さの一般化の成功と失敗の予測因子として理論を実験的に検証します。
私たちの理論は、経験的観察の広範なセットを説明するだけでなく、変圧器の長さの一般化能力を実証する方法も開きます。

要約(オリジナル)

A major challenge for transformers is generalizing to sequences longer than those observed during training. While previous works have empirically shown that transformers can either succeed or fail at length generalization depending on the task, theoretical understanding of this phenomenon remains limited. In this work, we introduce a rigorous theoretical framework to analyze length generalization in causal transformers with learnable absolute positional encodings. In particular, we characterize those functions that are identifiable in the limit from sufficiently long inputs with absolute positional encodings under an idealized inference scheme using a norm-based regularizer. This enables us to prove the possibility of length generalization for a rich family of problems. We experimentally validate the theory as a predictor of success and failure of length generalization across a range of algorithmic and formal language tasks. Our theory not only explains a broad set of empirical observations but also opens the way to provably predicting length generalization capabilities in transformers.

arxiv情報

著者 Xinting Huang,Andy Yang,Satwik Bhattamishra,Yash Sarrof,Andreas Krebs,Hattie Zhou,Preetum Nakkiran,Michael Hahn
発行日 2025-04-30 15:01:01+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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