Is Mamba Capable of In-Context Learning?

ICLR 2024 Workshop ME-FoMo Submission90 Authors

Published: 04 Mar 2024, Last Modified: 24 Apr 2024ME-FoMo 2024 PosterEveryoneRevisionsBibTeXCC BY 4.0
Keywords: meta, meta-learning, learning to learn, in-context, mechanistic, understanding, simple function
TL;DR: We show that Mamba, as transformers, is capable of in-context learning on simple regression tasks and more complex NLP tasks
Abstract: 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. The code to reproduce our experiments is available at github.com/automl/is_mamba_capable_of_icl.
Submission Number: 90
Loading