When Context Sticks: Studying Interference in In-Context Learning
Hanna R{\o}d, Dagny Streit, Nils Valseth Selte, and Justin Li

TL;DR
This study explores how earlier examples in in-context learning prompts interfere with model adaptation, revealing persistent bias effects and the impact of training curricula on model resilience.
Contribution
It provides empirical evidence of context interference in ICL and analyzes how training strategies influence model robustness to task switches.
Findings
Linear examples bias predictions negatively, especially with more preceding examples.
Quadratic examples help reduce error but with diminishing returns.
Sequential training on target functions enhances model recovery speed.
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
