atlas

Research map / Architectures and efficiency / Attention and transformers

Why Larger Language Models Do In-context Learning Differently?

ICML 2024 · Architectures and efficiency › Attention and transformers · approach: Training dynamics of in-context learning · 2 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 analyzes why larger transformers are more sensitive to noise in in-context learning, via closed-form optimal solutions for rank-constrained linear self-attention (regression) and multi-head two-layer transformers (sparse parity), and checks the trend with Llama 2 experiments on five NLP classification tasks.

Problem

Explaining why larger LLMs are more sensitive to noisy in-context examples than smaller ones, a behavior difference across model scales in in-context learning that existing theory does not explain.

Approach

Model scale is measured by attention rank (linear regression) or number of attention heads (parity). Closed-form optimal solutions show smaller models keep only the most important hidden feature directions, while larger models also cover less important and noisy features, so larger models are more distracted by label and input noise at inference.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
increase model rank from r to r'optimal rank-r linear self-attention transformer · linear regression ICL, evaluation task uses only the top r featuresevaluation loss: {1\over M} \left(\|\mathbf{s} \|_\mathbf{D}^2 + \sigma^2\right) \left(\sum_{i = {r}+1}^{{r'}} \left({N \lambda_i \over {Hurt
increase model rank while evaluation tasks contain residual useful featuresoptimal rank-r linear self-attention transformer · linear regression ICL with label or input noiseevaluation lossMixed
increase model head number to cover more featurestwo-layer multiple-head transformer · sparse parity classification ICLnoise influence: {\nu_1+1 \over \nu_2+1}Hurt
increase Llama model sizeLlama chat models · five binary classification NLP tasks, 16-shot ICL with flipped labelsaccuracyHurt
increase Llama model sizeLlama base models · five binary classification NLP tasks, 16-shot ICL with flipped labelsaccuracyHurt
use a larger modelLlama model families · five binary classification NLP tasks with 0% label flipsaccuracyHelped
concatenate an irrelevant GSM-IC sentence to an SST-2 input-label pair (ablation)Llama 2-13b and Llama 2-70b · SST-2 attention analysis, 100 evaluation promptsattention correlation magnitudeMixed

Surprising findings

Limitations

Experimental setup

Datasets: GLUE Subj GSM-IC

Benchmarks: SST-2 GLUE Subj

Metrics: accuracy attention norm magnitude

Builds on: linear self-attention learning to learn in-context (Ahn et al. / Zhang et al.) sparse parity learning Larger language models do in-context learning differently (Wei et al. 2023)

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