나를 따라 해 보세요: 트랜스포머는 상태 공간 모델보다 복사 작업에서 더 뛰어납니다
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
초록
트랜스포머는 시퀀스 모델링에서 지배적인 아키텍처이지만, 시퀀스 길이에 의존하지 않는 고정 크기의 잠재 상태를 사용하는 모델에 대한 관심이 증가하고 있으며, 이를 "일반화된 상태 공간 모델"(GSSMs)이라고 부른다. 본 논문에서는 GSSMs가 추론 시간 효율성 측면에서 유망하지만, 입력 컨텍스트에서 복사가 필요한 작업에서는 트랜스포머 모델에 비해 제한적임을 보인다. 우리는 문자열 복사라는 간단한 작업에 대한 이론적 분석을 시작으로, 두 층의 트랜스포머가 지수 길이의 문자열을 복사할 수 있는 반면 GSSMs는 고정 크기 잠재 상태로 인해 근본적으로 제한됨을 증명한다. 실험적으로, 컨텍스트 복사가 필요한 합성 작업에서 트랜스포머가 GSSMs보다 효율성과 일반화 측면에서 우수함을 확인한다. 마지막으로, 사전 훈련된 대규모 언어 모델을 평가한 결과, 트랜스포머 모델이 컨텍스트에서 정보를 복사하고 검색하는 작업에서 상태 공간 모델을 크게 능가함을 발견했다. 종합적으로, 이러한 결과는 실용적인 관심사 작업에서 트랜스포머와 GSSMs 사이에 근본적인 격차가 있음을 시사한다.
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.