Research map / Large language models / Language, safety and interpretability
Stress-Testing Long-Context Language Models with Lifelong ICL and Task Haystack
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Introduces Lifelong ICL, a setting where long-context LMs must handle a stream of classification tasks via in-context learning, and Task Haystack, a NIAH-style suite with a pass-rate metric that benchmarks 14 long-context LMs and diagnoses their failures.
Problem
Existing long-context evaluations (NIAH, key-value retrieval) mostly test shallow copying and do not measure whether models use long contexts of evolving tasks for in-context learning.
Approach
Treat a stream of classification tasks' demonstrations as one long prompt and call a model "passing" when its accuracy with the full Lifelong ICL prompt is not significantly worse than single-task ICL with only the relevant task's demonstrations, measured by a paired t-test across few-shot samples and permutations.
Key results
- GPT-4o and Gemini-1.5-Flash reach an average pass rate of 85%, while Llama-3.1-70B is the best open-weight model at 80%.
- At 32k context with 8 shots and 16 tasks, 9 of 11 open-weight models have pass rates below 60%; Yi-6B is lowest at 38.8%.
- Nearly all open models score near 100% on the original NIAH test, yet fail Task Haystack, with failure rates reaching up to 61% for open-weight models.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Replay the test task's ICL demonstrations immediately before testing (ablation) | Mistral-7B and FILM-7B · Task Haystack controlled analysis, 16 tasks, 4-shot | accuracy: +1.6% for Mistral-7B; +2.9% for FILM-7B | Helped |
| Prepend irrelevant long text (ablation) | Mistral-7B and FILM-7B · Task Haystack controlled analysis | accuracy | Hurt |
| Repeat the relevant ICL prompt to make the input longer (ablation) | Mistral-7B and FILM-7B · Task Haystack controlled analysis, 16 tasks, 4-shot | accuracy: -1.3% for Mistral-7B; -3.1% for FILM-7B | Hurt |
| Remove the test task's instruction and ICL examples from the lifelong prompt (ablation) | Mistral-7B and FILM-7B · Task Haystack controlled analysis, 16 tasks, 4-shot | accuracy: -3.3% for Mistral-7B; -4.1% for FILM-7B | Hurt |
| Paraphrase task instructions at test time (ablation) | Mistral-7B and FILM-7B · Task Haystack controlled analysis | accuracy | Hurt |
| Repeat ICL examples multiple times (ablation) | Mistral-7B and FILM-7B · Single-task multi-epoch ICL | accuracy | Mixed |
| Shuffle examples between repeated ICL demonstrations (ablation) | Mistral-7B and FILM-7B · Single-task multi-epoch ICL | accuracy | Helped |
| Repeat ICL examples more than 8 times (ablation) | Mistral-7B and FILM-7B · Single-task multi-epoch ICL | accuracy | Hurt |
| Interleave examples from multiple tasks rather than keeping task examples grouped | Mistral-7B and FILM-7B · Task Haystack, 16 tasks, 4-shot | accuracy: 74.8 -> 72.1 for Mistral-7B; 75.4 -> 74.7 for FILM-7B | Hurt |
| Use the instruct version instead of the base version | Llama-3.1-70B · Task Haystack, 16 tasks, 4-shot | pass rate: 83.8 -> 72.5 | Hurt |
Surprising findings
- Repeating the test task's demonstrations (Repeat setting, no distractors) lowers performance, suggesting longer inputs alone can trigger failures.
- Models with lower single-task accuracy but higher pass rates (Llama-2-7B 80k) show that pass rate alone can be gamed; tasks ICL can learn are more prone to forgetting.
Limitations
- Only English classification tasks with fewer than 20 classes and short inputs; not representative of generation or QA tasks.
- Pass rate performs many parallel t-tests; Bonferroni and Benjamini-Hochberg corrections were considered but not adopted.
- Evaluation limited to up to 32k tokens and 5 permutations by 5 few-shot samples due to compute.
Experimental setup
Datasets: 64 HuggingFace classification datasets (e.g., boolq, dbpedia14, emo, sst2, mnli)
Benchmarks: Task Haystack (Scale-Shot, Scale-Task) original NIAH
Metrics: pass rate accuracy (S-acc, L-acc)
Baselines: Single-task ICL Gemini-1.5-Flash GPT-3.5-Turbo Llama-3.1-70B FILM-7B Mistral-7B
Builds on: needle-in-a-haystack rank classification many-shot in-context learning
Closest papers by meaning
- A Controllable Examination for Long-Context Language Models (NeurIPS 2025 · similarity 0.90)
- Beyond task performance: evaluating and reducing the flaws of large multimodal models with in-context-learning (ICLR 2024 · similarity 0.90)
- HELMET: How to Evaluate Long-context Models Effectively and Thoroughly (ICLR 2025 · similarity 0.89)
- Dual Operating Modes of In-Context Learning (ICML 2024 · similarity 0.89)
- Training with “Paraphrasing the Original Text” Teaches LLM to Better Retrieve in Long-Context Tasks (AAAI 2025 · similarity 0.88)
- In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steering (ICML 2024 · similarity 0.88)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
