atlas

Research map / Architectures and efficiency / Attention and transformers

Can Mamba Learn How To Learn? A Comparative Study on In-Context Learning Tasks

ICML 2024 · Architectures and efficiency › Attention and transformers · approach: Training dynamics of in-context learning · 10 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Evaluates in-context learning of Mamba and other SSMs against Transformers trained from scratch on synthetic ICL tasks, and proposes MambaFormer, a hybrid of Mamba and attention without positional encoding.

Problem

Whether attention-free state-space models such as Mamba can perform in-context learning, which has mainly been studied for Transformers, and how they compare on synthetic ICL tasks.

Approach

Train SSMs (Mamba, S4, S4-Mamba) and Transformers from scratch on a suite of synthetic ICL tasks at matched FLOPs, then introduce MambaFormer, which interleaves Mamba and attention blocks and starts with a Mamba block so no positional encoding is needed; this combines Mamba's sparse-parity ability with the Transformer's retrieval ability.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add an attention layer within the Mamba blocks (ablation)Mamba · Vector MQARtest loss (MSE)Helped
Add an initial Mamba block to the hybrid architecture (ablation)Vanilla hybrid · Sparse parityconvergence timeHelped
Add an initial Mamba block without positional encoding (ablation)Transformer · Sparse parityparity learning efficiencyHelped
Use Mamba instead of TransformerICL models · Sparse parityaccuracyHelped
Use Mamba instead of TransformerICL models · Vector MQARtest loss (MSE)Hurt
Use Mamba instead of TransformerICL models · Orthogonal-outlier regressionperformanceHurt
Use Mamba instead of TransformerICL models · Many-outlier regressionOOD accuracyHelped
Replace Mamba with MambaFormerICL models · Vector MQARtest loss (MSE): 8.64e-1 -> 7.30e-6Helped
Replace Mamba with MambaFormerICL models · GINC, 64 examplesICL accuracy: 87.1 ± 7.8 -> 79.6 ± 3.8Hurt
Replace Mamba with MambaFormerICL models · RegBench, 15 epochsaccuracy: 69.4 -> 99.8Helped
Replace Mamba with MambaFormerICL models · RegBench, 120 epochsaccuracy: 87.8 -> 99.8Helped
Replace Adam with AdamW plus a learning-rate scheduler (ablation)Mamba and MambaFormer · Linear regressionperformanceHelped

Surprising findings

Limitations

Experimental setup

Datasets: GINC RegBench

Benchmarks: linear regression sparse linear regression 2NN regression decision tree orthogonal-outlier regression many-outlier regression sparse parity chain-of-thought I/O vector MQAR GINC RegBench

Metrics: squared error loss classification accuracy mean squared error perplexity greedy-decoding accuracy convergence time

Baselines: Transformer Mamba S4 S4-Mamba LSTM Transformer with PE Transformer without PE

Builds on: Mamba S4 Transformer in-context learning regression (Garg et al.) GINC benchmark RegBench

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy