atlas

Research map / Large language models / Language, safety and interpretability

From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and When

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: Mechanistic analysis of attention and representations · 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.

Theoretically and empirically shows that in-context learning can arise from co-occurrence modeling with CBOW for word analogy tasks, while logic-reasoning ICL requires positional information and blocked nuisance structure, and identifies two data structures where ICL fails.

Problem

Existing theories of in-context learning assume structured training data resembling ICL tasks (e.g., x-y pairs), whereas LLMs are trained unsupervised on unstructured text; it is unclear what tasks can be learned in context from such data and which model components and data structures are needed.

Approach

Links ICL for word analogy to co-occurrence modeling with classical CBOW (no positional encoding or attention), shows positional information and blocked nuisance token structure are necessary for pattern-based logic reasoning ICL, and identifies training-data structures under which ICL provably fails.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use prompts whose capital is also the largest city rather than type A promptsLLaMA 2 · Country-capital promptsaccuracy: 0.58 -> 0.96Helped
use prompts whose capital is also the largest city rather than type A promptsLLaMA 2 · US state-capital promptsaccuracy: 0.69 -> 0.84Helped
use a consistent country-IOC position pattern rather than variable country-capital positions5-layer 2-head transformer · Synthetic corpus, ICLaccuracy: (0.00, 0.15, 0.34, 0.22, 0.07) vs (1.00, 0.77, 0.78, 0.97, 0.99)Mixed
add learned positional embeddings instead of using sinusoidal embeddings (ablation)single-pattern transformer · Single-pattern ICL, block-noisy, d_E = 100accuracy: 0.55 -> 1.00Helped
add sinusoidal positional embeddings rather than use learned embeddings (ablation)single-pattern transformer · Single-pattern ICL, one-noisy, d_E = 10accuracy: 0.00 -> 0.10Helped
add learned positional embeddings instead of RoPE (ablation)single-pattern transformer · Single-pattern ICL, block-noisy, d_E = 100accuracy: 0.00 -> 1.00Helped
use 5 layers instead of 1 layer (ablation)dual-pattern transformer with learned positional embeddings · Dual-pattern ICL, clean, d_E = 100accuracy: (0.51, 0.49) -> (0.97, 0.98)Helped
add learned positional embeddings instead of sinusoidal embeddings (ablation)5-layer dual-pattern transformer · Dual-pattern ICL, block-noisy, d_E = 100accuracy: (0.04, 0.07) -> (0.87, 0.70)Helped
add positional embeddings (ablation)1-layer transformer · Position generalization, Both splitaccuracy: 0.30 -> 1Helped
add positional embeddings (ablation)5-layer transformer · Position generalization, Both splitaccuracy: 0.89 -> 1Helped
ensure every token appears as the first token in both training and test sets rather than splitting first tokens between sets (ablation)transformer · Position generalizationaccuracy: 0 -> 1Helped
include blocked nuisance tokens rather than one randomly inserted nuisance token (ablation)position-aware autoregressive model · Single-pattern ICLaccuracy: 0.00 -> 1.00Helped

Surprising findings

Limitations

Experimental setup

Datasets: country-capital pairs from population data US state-capital pairs synthetic country-capital and country-IOC corpus synthetic pattern sequences (abacdc, abcadefd, etc.)

Metrics: ICL accuracy prediction accuracy

Baselines: LLaMA 2 five-layer autoregressive transformer one-layer transformer

Builds on: continuous bag of words (CBOW) induction heads RoPE

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