In-context learning works beyond model training support with task breakdown
Out of Support, Not Out of Reach: In-Context Learning with Unsupported Instructions and Composed Tasks
Machine Learning
Summary
In-context learning helps language models understand new tasks by showing examples, without changing the model itself. The paper shows that even when instructions or tasks are not part of the model's training, the model can still learn by recognizing smaller supported parts and putting them together. The authors use math to explain how this works and when it succeeds. They show that giving more examples or breaking a big task into smaller familiar tasks helps the model perform better.
What this means in practice
- •For natural language processing engineers: Design prompts and demonstrations that enable language models to handle tasks not seen during their training by decomposing complex tasks into familiar subtasks.
- •For workflow automation teams: Create multi-step processes where large language models follow a plan of known subtasks, improving automation of new or unsupported tasks.
A theory result. No direct application yet.
Authors
Xuhan Tong, Yuchen Zeng, Jiawei Zhang
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 $N$-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.