私の後に続いて言ってください:トランスフォーマーは状態空間モデルよりもコピーが得意です
Repeat After Me: Transformers are Better than State Space Models at Copying
February 1, 2024
著者: Samy Jelassi, David Brandfonbrener, Sham M. Kakade, Eran Malach
cs.AI
要旨
Transformerはシーケンスモデリングにおける主要なアーキテクチャですが、シーケンス長に依存しない固定サイズの潜在状態を使用するモデル、いわゆる「一般化状態空間モデル」(GSSM)に対する関心が高まっています。本論文では、GSSMが推論時の効率性の点で有望である一方、入力コンテキストからのコピーを必要とするタスクにおいてTransformerモデルに比べて限界があることを示します。まず、文字列コピーという単純なタスクに対する理論的分析を行い、2層のTransformerが指数関数的な長さの文字列をコピーできるのに対し、GSSMはその固定サイズの潜在状態によって根本的に制限されることを証明します。実験的には、コンテキストのコピーを必要とする合成タスクにおいて、TransformerがGSSMを効率性と汎化性能の点で上回ることを確認します。最後に、事前学習済みの大規模言語モデルを評価し、Transformerモデルがコンテキストからの情報のコピーと検索において状態空間モデルを大幅に上回ることを見出します。これらの結果を総合すると、実用的なタスクにおいてTransformerとGSSMの間に根本的なギャップが存在することが示唆されます。
English
Transformers are the dominant architecture for sequence modeling, but there
is growing interest in models that use a fixed-size latent state that does not
depend on the sequence length, which we refer to as "generalized state space
models" (GSSMs). In this paper we show that while GSSMs are promising in terms
of inference-time efficiency, they are limited compared to transformer models
on tasks that require copying from the input context. We start with a
theoretical analysis of the simple task of string copying and prove that a two
layer transformer can copy strings of exponential length while GSSMs are
fundamentally limited by their fixed-size latent state. Empirically, we find
that transformers outperform GSSMs in terms of efficiency and generalization on
synthetic tasks that require copying the context. Finally, we evaluate
pretrained large language models and find that transformer models dramatically
outperform state space models at copying and retrieving information from
context. Taken together, these results suggest a fundamental gap between
transformers and GSSMs on tasks of practical interest.