



























Abstract:This paper investigates context stickiness in in-context learning (ICL), a phenomenon where earlier examples in a prompt interfere with a transformer's ability to adapt to later tasks. Using synthetic regression tasks over linear and quadratic functions, we examine how models trained under sequential, mixed, and random curricula handle abrupt task switches during inference. By sweeping over structured combinations of misleading linear examples followed by recovery quadratic examples, we quantify how prior context biases prediction error and how quickly models realign. Our results show strong evidence of persistent interference: more preceding linear examples reliably degrade quadratic predictions, while additional quadratic examples reduce error but with diminishing returns. We further find that training curricula significantly modulate resilience, with sequential training on the target function class yielding the fastest recovery, and surprisingly, random training producing the least robust behavior.
| Comments: | 14 pages, 6 figures, 2 tables. Code available at: this https URL |
| Subjects: | Machine Learning (cs.LG) |
| Cite as: | arXiv:2604.23371 [cs.LG] |
| (or arXiv:2604.23371v1 [cs.LG] for this version) | |
| https://doi.org/10.48550/arXiv.2604.23371 arXiv-issued DOI via DataCite (pending registration) |
From: Nils Selte [view email]
[v1]
Sat, 25 Apr 2026 16:35:25 UTC (1,152 KB)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。