atlas

Research map / Architectures and efficiency / Attention and transformers

Is attention required for ICL? Exploring the Relationship Between Model Architecture and In-Context Learning Ability

ICLR 2024 · Architectures and efficiency › Attention and transformers · approach: Training dynamics of in-context learning · 0 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.

Trains thirteen causal sequence architectures (RNNs, CNNs, SSM-inspired models, RetNet, RWKV, transformers) from scratch on synthetic ICL tasks to test whether attention is necessary for in-context learning.

Problem

Whether attention mechanisms are necessary for in-context learning to emerge, and how different model architectures compare in ICL ability, statistical efficiency, consistency, and predisposition toward memorization versus ICL.

Approach

A controlled, from-scratch comparison of thirteen causal architectures across synthetic ICL tasks (associative recall, linear regression, multiclass classification, bursty image classification, language modeling) rather than pretrained LLMs, showing that all considered architectures can in-context learn, not only transformers.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use Mamba instead of other evaluated architecturesMamba · Associative recall, 63 examplesaccuracyHelped
Use sinusoidal or no positional embeddings instead of other positional embedding options (ablation)Transformers · Associative recall, prompt lengths beyond trainingaccuracyHelped
Remove positional embeddings (ablation)Transformers · Linear regression, prompt lengths beyond trainingmean squared errorHelped
Remove positional embeddings (ablation)Transformers · Multiclass classificationaccuracyHelped
Use ALiBi positional embeddings instead of other positional embedding options (ablation)Transformers · TinyStories language modelingvalidation lossHelped
Remove positional embeddings (ablation)Transformers · TinyStories language modelingvalidation lossHurt
Concatenate rather than sum input and output embeddings (ablation)Transformers · Linear regression and image classificationperformanceHelped
Use a single token for each in-context example pair rather than two tokens (ablation)Transformers · Associative recall and multiclass classificationperformanceNo clear effect
Remove positional embeddings (ablation)Transformers · Permutation-invariant in-context tasksperformanceNo clear effect
Use an encoder-only rather than decoder-only attention mask (ablation)Transformers · Linear regression, difficult settings (d=20, 30)performanceHelped
Use an encoder-only rather than decoder-only attention mask (ablation)Transformers · Permutation-invariant in-context tasks other than difficult linear regressionperformanceNo clear effect
Increase Gaussian noise in the input-output examplesAll evaluated architectures · Noisy linear regressionmean squared errorHurt

Surprising findings

Limitations

Experimental setup

Datasets: TinyStories Omniglot synthetic associative recall synthetic linear regression synthetic multiclass classification

Benchmarks: synthetic associative recall synthetic linear regression synthetic multiclass classification bursty Omniglot image classification TinyStories language modeling simple natural-language happy/sad ICL task

Metrics: test accuracy mean squared error validation loss ICL score

Baselines: ridge regression logistic regression LSTM GRU RNN

Builds on: Chan et al. bursty data ICL Akyürek et al. linear regression ICL Mamba Hyena RetNet

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