A preprint posted to arXiv on October 19 puts forward a theoretical framework showing that in-context learning (ICL) in large language models can succeed even when the instruction or target task falls outside the pretraining distribution.

The work addresses a limitation in current ICL theory, which has primarily explained the phenomenon as identifying a latent task already represented in training data, leaving open whether models can adapt to genuinely novel prompts or long-horizon tasks. According to the arXiv preprint, the framework separates two forms of distribution shift under mild assumptions.

For target tasks that were present in pretraining, the authors show that demonstrations can identify the task and that sensitivity to supported prompt templates decreases as the number of examples grows. When the instruction itself is unsupported, they find that under a fixed model-induced reference extension, demonstration evidence can dominate an instruction shift while preserving an exponential identification rate.

The preprint then uses the same ICL framework to interpret long-horizon tasks that never appeared in pretraining but can be decomposed into a plan of supported subtasks. Applying the supported-task analysis step by step yields an accumulated-error bound and demonstrates how a trajectory through intermediate states can avoid directly selecting the unsupported complete task.

No empirical tests or model-specific results accompany the paper, which is a preprint and has not been peer-reviewed. The abstract states that together the results “characterize when demonstrations, instructions, and task decomposition can support ICL beyond the corresponding pretraining supports.”.