Out of Support, Not Out of Reach: In-Context Learning with Unsupported Instructions and Composed Tasks
Organizations: Department of Computer Sciences, University of Wisconsin–Madison. · Microsoft Research.
Abstract
In-Context Learning (ICL) enables pretrained LLMs to adapt to downstream tasks from a small set of input-output demonstrations, without parameter updates. Yet existing theory primarily explains ICL as identifying a latent task already represented in pretraining, leaving unclear whether ICL can succeed when either the instruction or the target task falls outside the pretraining support. We develop a theoretical framework under mild assumptions that separates these two forms of distribution shift. For target tasks represented in pretraining, we show that demonstrations can identify the task and reduce sensitivity to pretrain-supported prompt templates as their number increases. For an unsupported instruction, we show that under a fixed model-induced reference extension, demonstration evidence can dominate an -independent instruction shift while preserving the exponential identification rate. We then use the same ICL framework as an interpretive lens for long-horizon target tasks that are not represented in pretraining but admit a plan that decomposes them into pretraining-supported subtasks. Applying the supported-task analysis step by step yields a standard accumulated-error bound and clarifies how invoking familiar subtasks along an intermediate-state trajectory can avoid directly selecting the unsupported complete task. Together, our results characterize when demonstrations, instructions, and task decomposition can support ICL beyond the corresponding pretraining supports.
Figures & tables
| # | Support | Appearance | Prompt format | Example |
|---|---|---|---|---|
| 1 | Supported | Single | A standard instruction stated once: “Classify ticket priority.” | |
| 2 | Unsupported | Single | Indian-English revert used once to mean “reply.” | |
| 3 | Supported | Repeated | A standard schema key, e.g. task: sentiment , repeated in every record. | |
| 4 | Unsupported | Repeated | One private API label, e.g. operation: Atlas , reused in every record. | |
| 5 | Supported | Varying | Retrieved examples using familiar paraphrases such as “sentiment” and “tone.” | |
| 6 | Unsupported | Varying | Multi-tenant examples carrying distinct private labels such as triage_acme and route_7G . |
| Demonstration | Qwen3-30B-A3B | Qwen3-235B-A22B |
|---|---|---|
| Ambiguous / Identifying | 0.164\pm 0.039/\textbf{0.559 \pm 0.074} | 0.202\pm 0.037/\textbf{0.602 \pm 0.043} |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| ( ) | ( ) | ||
|---|---|---|---|
| 1 | |||
| 2 | |||
| 4 | |||
| 8 | |||
| 16 | |||
| 32 |
| Demo number | Ambiguous Acc (235B) | Identifying Acc (235B) | Ambiguous Acc (30B) | Identifying Acc (30B) |
|---|---|---|---|---|
| 2 | ||||
| 4 | ||||
| 8 |
| Demo number | Ambiguous Acc (235B) | Identifying Acc (235B) | Ambiguous Acc (30B) | Identifying Acc (30B) |
|---|---|---|---|---|
| 2 | ||||
| 4 | ||||
| 8 |
| Exact | Subtraction competitor | Multiplication competitor | |
|---|---|---|---|
| Training regime | 95% CI | 95% CI | ||
|---|---|---|---|---|
| Shared-template | ||||
| Hierarchical | ||||
| Independent-occurrence |
| Direct error | Supported-agent rollout | OOD-agent rollout | ||
|---|---|---|---|---|
| 1 | ||||
| 2 | ||||
| 4 | ||||
| 8 | ||||
| 16 | ||||
| 32 |
| Path | Region | |||
|---|---|---|---|---|
| Symbolic mismatch | Anchor | |||
| Middle | ||||
| Endpoint | ||||
| Synthetic soft-OOD | Anchor | |||
| Middle | ||||
| Endpoint |
In-Context Learning
In-context learning studies how models adapt to new tasks from examples or instructions supplied at inference time, without changing their weights.
See all 386 papers