[논문 리뷰] Is Mamba Capable of In-Context Learning?
본 논문은 선택적 구조적 상태공간 모델인 Mamba가 간단한 함수 과제와 NLP 벤치마크에서 트랜스포머와의 인-context 학습(ICL) 성능을 맞출 수 있음을 실증적으로 제시하며, 긴 입력 시퀀스에 대한 효율적인 대안을 제공할 수 있음을 시사한다.
State of the art foundation models such as GPT-4 perform surprisingly well at in-context learning (ICL), a variant of meta-learning concerning the learned ability to solve tasks during a neural network forward pass, exploiting contextual information provided as input to the model. This useful ability emerges as a side product of the foundation model's massive pretraining. While transformer models are currently the state of the art in ICL, this work provides empirical evidence that Mamba, a newly proposed state space model which scales better than transformers w.r.t. the input sequence length, has similar ICL capabilities. We evaluated Mamba on tasks involving simple function approximation as well as more complex natural language processing problems. Our results demonstrate that, across both categories of tasks, Mamba closely matches the performance of transformer models for ICL. Further analysis reveals that, like transformers, Mamba appears to solve ICL problems by incrementally optimizing its internal representations. Overall, our work suggests that Mamba can be an efficient alternative to transformers for ICL tasks involving long input sequences. This is an exciting finding in meta-learning and may enable generalizations of in-context learned AutoML algorithms (like TabPFN or Optformer) to long input sequences.
연구 동기 및 목표
- Mamba가 간단한 함수 클래스와 NLP 태스크 전반에 걸쳐 인-context 학습(ICL)을 수행할 수 있는지 입증한다.
- Mamba의 ICL 성능을 트랜스포머 기반 베이스라인 및 관련 SSM 변형(S4)과 RWKV와 비교한다.
- Mamba가 ICL을 해결하는 메커니즘을 조사하며, 증분 내부 표현 최적화를 포함한다.
- 증가하는 컨텍스트 길이와 모델 크기에 대한 Mamba ICL의 확장성을 평가한다.
제안 방법
- Mamba와 베이스라인을 간단한 회귀 태스크 분포(선형, 비대칭 LR, 노이즈 LR, 임의 사분면)에서 학습시키고, 매개변수 수를 맞춘 상태에서 GPT-2/Transformer, S4, RWKV와 비교한다.
- 간단한 함수 클래스에 대한 ICL 성능을 평가하고, 동일 분포 내 일반화와 분포 외 일반화를 평가한다.
- 트랜스포머와 유사한 반복적 최적화에 의해 Mamba가 ICL을 해결하는지 분석하기 위한 프로빙 전략을 사용하고, 중간 표현에 대한 선형 프로브를 포함한다.
- Pile에서 다양한 크기의 Mamba 언어 모델(130M에서 2.8B 매개변수)을 사전 학습 및 미세조정하고, Hendel et al. NLP 태스크에서 RWKV 및 일반적인 트랜스포머와의 ICL 성능을 비교한다.

실험 결과
연구 질문
- RQ1Mamba가 단순 회귀 태스크에서 트랜스포머 수준의 ICL 성능에 도달하고 더 긴 입력 시퀀스로 일반화할 수 있는가?
- RQ2Mamba가 트랜스포머와 유사한 증분 내부 표현 최적화를 통해 ICL을 보여주는가?
- RQ3NL P 벤치마크에서 모델 크기와 컨텍스트 길이가 증가함에 따라 Mamba의 ICL 성능이 어떻게 확장되는가?
주요 결과
- Mamba는 몇몇 간단한 함수 클래스와 NLP 태스크에서 ICL에 대한 트랜스포머 성능과 일치한다.
- 테스트 설정 전반에서 ICL에서 S4 및 RWKV 기준선보다 Mamba가 우수하다.
- 프로빙은 Mamba와 트랜스포머가 ICL 중에 해법을 다듬기 위해 반복적 최적화와 유사한 메커니즘을 활용하는 것을 시사한다.
- NLP 태스크에서 더 큰 Mamba 모델과 더 긴 컨텍스트에서 ICL 성능이 향상된다.
- 선형 회귀에서 더 긴 입력으로의 외삽이 강하고 NLP 벤치마크 전반에서 경쟁력 있는 정확도를 유지한다.

이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.