Saved in:
Bibliographic Details
Main Authors: Rød, Hanna, Streit, Dagny, Selte, Nils Valseth, Li, Justin
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2604.23371
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915958580314112
author Rød, Hanna
Streit, Dagny
Selte, Nils Valseth
Li, Justin
author_facet Rød, Hanna
Streit, Dagny
Selte, Nils Valseth
Li, Justin
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2604_23371
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle When Context Sticks: Studying Interference in In-Context Learning
Rød, Hanna
Streit, Dagny
Selte, Nils Valseth
Li, Justin
Machine Learning
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.
title When Context Sticks: Studying Interference in In-Context Learning
topic Machine Learning
url https://arxiv.org/abs/2604.23371