Ripeti dopo di me: i Transformer sono migliori dei modelli State Space nel copiare
Repeat After Me: Transformers are Better than State Space Models at Copying
February 1, 2024
Autori: Samy Jelassi, David Brandfonbrener, Sham M. Kakade, Eran Malach
cs.AI
Abstract
I transformer sono l'architettura dominante per la modellazione di sequenze, ma c'è un crescente interesse verso modelli che utilizzano uno stato latente di dimensione fissa che non dipende dalla lunghezza della sequenza, che definiamo "modelli di spazio degli stati generalizzati" (GSSM). In questo articolo dimostriamo che, sebbene i GSSM siano promettenti in termini di efficienza durante l'inferenza, presentano limitazioni rispetto ai transformer in compiti che richiedono la copia dal contesto di input. Iniziamo con un'analisi teorica del semplice compito di copia di stringhe e dimostriamo che un transformer a due strati può copiare stringhe di lunghezza esponenziale, mentre i GSSM sono fondamentalmente limitati dal loro stato latente di dimensione fissa. Empiricamente, osserviamo che i transformer superano i GSSM in termini di efficienza e generalizzazione su compiti sintetici che richiedono la copia del contesto. Infine, valutiamo modelli linguistici preaddestrati di grandi dimensioni e scopriamo che i transformer superano in modo significativo i modelli di spazio degli stati nella copia e nel recupero di informazioni dal contesto. Nel complesso, questi risultati suggeriscono un divario fondamentale tra transformer e GSSM in compiti di interesse pratico.
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.