atlas

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

Revisiting In-context Learning Inference Circuit in Large Language Models

ICLR 2025 · Large language models › Language, safety and interpretability · approach: Reasoning mechanisms and failure modes · 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.

Proposes a three-step inference circuit (input text encode, semantics merge, feature retrieval and copy) that explains ICL inference phenomena in large LMs such as Llama 3 70B.

Problem

Existing explanations of in-context learning inner mechanisms (often based on synthetic or toy settings) fail to capture the full set of inference phenomena observed in large language models.

Approach

Decomposes ICL inference into three atomic operations on Transformer layers (input text encoding on forerunner tokens, semantics merge of demonstration text into label tokens, and induction-style feature retrieval and copy to the query), validated with kernel alignment, centroid probes, head counting, and ablations on real LLMs.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use a centroid classifier instead of the LM headFull ICL inference on Llama 3 70B · ICL classification (average across six datasets)accuracy: 66.19% -> 83.24%Helped
Prune layers after Layer34 and use a centroid classifierICL inference on Llama 3 70B · ICL classification (average across six datasets)accuracy: 83.24% -> 84.27%Helped
Disconnect demo text x_i → forerunner s_i attention (ablation)ICL on Llama 3 8B · ICL classificationaccuracy change: -4.98, -15.82, -23.43, -30.60Hurt
Disconnect query text x_q → forerunner s_q attention (ablation)ICL on Llama 3 8B · ICL classificationaccuracy change: -13.87, -21.10, -24.74, -28.38Hurt
Disconnect demo forerunner s_i → label y_i attention (ablation)ICL on Llama 3 8B · ICL classificationaccuracy change: -2.24, -3.45, -3.39, -3.42Hurt
Disconnect label y_i → query forerunner s_q attention (ablation)ICL on Llama 3 8B · ICL classificationaccuracy change: -5.14, -10.03, -11.36, -10.22Hurt
Disconnect forerunner-to-forerunner shortcut attention (ablation)ICL on Llama 3 70B · ICL classificationaccuracy change: -1.30, -0.75, -0.78, -1.56Hurt

Surprising findings

Limitations

Experimental setup

Datasets: SST-2 MR Financial Phrasebank SST-5 TREC AGNews

Benchmarks: SST-2 MR Financial Phrasebank SST-5 TREC AGNews

Metrics: accuracy kernel alignment centroid classification accuracy accuracy drop under ablation

Baselines: zero-shot random prediction PPL-ICL ICCL

Builds on: induction circuit mutual nearest-neighbor kernel alignment centroid classifier probing

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