atlas

Research map / Architectures and efficiency / Attention and transformers

Emergence and Effectiveness of Task Vectors in In-Context Learning: An Encoder Decoder Perspective

ICML 2025 · 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.

Uses an encoder-decoder view of in-context learning to show that task encoding (separable latent-task representations) and task decoding emerge together during pretraining, and that a kNN-based task decodability score predicts ICL accuracy in LLMs.

Problem

How task vectors form during pretraining and why their effectiveness for in-context learning varies across tasks.

Approach

Frames ICL as task encoding (mapping latent tasks to separable representations) plus task decoding (conditional algorithms), introduces Task Decodability (kNN accuracy on intermediate representations) as a geometric proxy that predicts ICL performance, and shows finetuning early layers improves encoding more than finetuning late layers.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Finetune the first 10 layers instead of using the pretrained modelLlama-3.1-8B · POS taggingAvg. Acc.: 25.5 { $\pm$ 6.7} -> 69.4 { $\pm$ 14.2}Helped
Finetune the first 10 layers instead of using the pretrained modelLlama-3.1-8B · POS taggingAvg. TD: 0.68 { $\pm$ 0.11} -> 0.95 { $\pm$ 0.02}Helped
Finetune the first 10 layers instead of using the pretrained modelLlama-3.1-8B · Bitwise arithmeticAvg. Acc.: 26.2 { $\pm$ 15.5} -> 90.2 { $\pm$ 15.0}Helped
Finetune the first 10 layers instead of using the pretrained modelLlama-3.1-8B · Bitwise arithmeticAvg. TD: 0.43 { $\pm$ 0.13} -> 0.85 { $\pm$ 0.11}Helped
Finetune the last 10 layers instead of using the pretrained modelLlama-3.1-8B · POS taggingAvg. TD: 0.68 { $\pm$ 0.11} -> 0.68 { $\pm$ 0.11}No clear effect
Finetune the last 10 layers instead of using the pretrained modelLlama-3.1-8B · Bitwise arithmeticAvg. TD: 0.43 { $\pm$ 0.13} -> 0.43 { $\pm$ 0.13}No clear effect
Finetune the last 10 layers instead of using the pretrained modelLlama-3.1-8B · POS taggingAvg. Acc.: 25.5 { $\pm$ 6.7} -> 33.9 { $\pm$ 12.3}Helped
Finetune the last 10 layers instead of using the pretrained modelLlama-3.1-8B · Bitwise arithmeticAvg. Acc.: 26.2 { $\pm$ 15.5} -> 66.3 { $\pm$ 9.01}Helped
Provide the true task concept in the prompt instead of using the pretrained promptLlama-3.1-8B · POS taggingAvg. Acc.: 25.5 { $\pm$ 6.7} -> 34.4 { $\pm$ 10.3}Helped
Provide the true task concept in the prompt instead of using the pretrained promptLlama-3.1-8B · Bitwise arithmeticAvg. Acc.: 26.2 { $\pm$ 15.5} -> 57.2 { $\pm$ 30.1}Helped
Provide the true task concept in the prompt instead of using the pretrained promptLlama-3.1-8B · POS taggingAvg. TD: 0.68 { $\pm$ 0.11} -> 0.97 { $\pm$ 0.02}Helped
Provide the true task concept in the prompt instead of using the pretrained promptLlama-3.1-8B · Bitwise arithmeticAvg. TD: 0.43 { $\pm$ 0.13} -> 0.90 { $\pm$ 0.10}Helped

Surprising findings

Limitations

Experimental setup

Datasets: Penn Treebank (POS tagging) synthetic sparse linear regression bitwise arithmetic (constructed)

Benchmarks: POS tagging (constructed from Penn Treebank) bitwise arithmetic (constructed) synthetic sparse linear regression

Metrics: exact-match accuracy task decodability (kNN accuracy) MSE

Baselines: Prompting FT (last 10 layers) FT (first 10 layers)

Builds on: task vectors (Hendel et al.) Bayesian view of in-context learning activation patching LoRA

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