mlsanityData to 7 Oct 2026

Can Language Models Actually Retrieve In-Context? Drowning in Documents at Million Token Scale

arXiv 2607.01538 ↗First posted 1 Jul 2026cs.CLcited by 2

Not on the map. Why?

Abstract (arXiv)

Language models (LMs) raise an intriguing alternative to vector-based retrieval: conditioning on an in-context corpus and directly generating a relevant answer. However, prior work has largely focused on proprietary systems or the smaller-scale reranking task, leaving corpus-scale in-context retrieval largely unexplored. In this work, we present the first systematic study of in-context retrieval on two scales practical retrievers demand: million-token corpora and length-generalization far beyond training-time sizes. We first introduce BLOCKSEARCH, an 0.6B LCLM retriever whose architectural and training modifications improve over prior LM baselines and length-generalize up to 10x beyond its training regime. Nevertheless, its retrieval still collapses under more extreme extrapolation. We trace this failure to an attention dilution effect: as the corpus grows, irrelevant documents dominate the softmax denominator and the normalized mass on the gold document collapses. Individual attention heads continue to locate the gold document more reliably than the model decodes it, even at million-token scale, though this signal also weakens as the corpus grows. Motivated by this analysis, we introduce length-aware adjustments to the attention softmax and document-level sparse attention, improving retrieval at million-token scale to performance comparable to a same-backbone dense retriever. On the lexical LIMIT benchmark, these gains also transfer out of distribution: at a million-token corpus, Recall@1 reaches 13.5% versus 2.9% for the dense baseline. Together, our results position in-context retrieval a promising alternative to classical retrieval while emphasizing attention control under extreme context growth as a new challenge.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 45 of its 48 references that are in the map. First posted on arXiv 1 Jul 2026.

Builds on

45 of 48 references.

References · 45

  1. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  2. 2025Qwen3 Technical Reportcited by 8,195
  3. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  4. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
  5. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  6. 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,591
  7. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
  8. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
  9. 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,258
  10. 2021BEIR: A Heterogenous Benchmark for Zero-shot Evaluation of Information Retrieval Modelscited by 1,225
  11. 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,175
  12. 2020ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERTcited by 1,160
33 more
  1. 2022In-context Learning and Induction Headscited by 930
  2. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
  3. 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 487
  4. 2020RocketQA: An Optimized Training Approach to Dense Passage Retrieval for Open-Domain Question Answeringcited by 410
  5. 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 367
  6. 2025SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Modelcited by 307
  7. 2022Transformer Memory as a Differentiable Search Indexcited by 242
  8. 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 219
  9. 2023Recommender Systems with Generative Retrievalcited by 191
  10. 2025MoBA: Mixture of Block Attention for Long-Context LLMscited by 188
  11. 2024Flex Attention: A Programming Model for Generating Optimized Attention Kernelscited by 180
  12. 2022A Neural Corpus Indexer for Document Retrievalcited by 107
  13. 2025On the Theoretical Limitations of Embedding-Based Retrievalcited by 98
  14. 2024Transformers need glasses! Information over-squashing in language taskscited by 87
  15. 2024Can Long-Context Language Models Subsume Retrieval, RAG, SQL, and More?cited by 53
  16. 2024Softmax is not Enough (for Sharp Size Generalisation)cited by 42
  17. 2024TokenSelect: Efficient Long-Context Inference and Length Extrapolation for LLMs via Dynamic Token-Level KV Cache Selectioncited by 38
  18. 2025Scalable-Softmax Is Superior for Attentioncited by 38
  19. 2024Block-Attention for Efficient Prefillingcited by 34
  20. 2025Query-Focused Retrieval Heads Improve Long-Context Reasoning and Re-rankingcited by 30
  21. 2025Long-Context Generalization with Sparse Attentioncited by 18
  22. 2025Hard Negatives, Hard Lessons: Revisiting Training Data Quality for Robust Information Retrieval with LLMscited by 17
  23. 2025Eliciting In-context Retrieval and Reasoning for Long-context Large Language Modelscited by 11
  24. 2024Efficient Length-Generalizable Attention via Causal Retrieval for Long-Context Language Modelingcited by 8
  25. 2024Drowning in Documents: Consequences of Scaling Reranker Inferencecited by 8
  26. 2025Scalable In-context Ranking with Generative Modelscited by 8
  27. 2025Optimizing Mixture of Block Attentioncited by 8
  28. 2025On Vanishing Variance in Transformer Length Generalizationcited by 6
  29. 2025Understanding and Improving Length Generalization in Hierarchical Sparse Attention Modelscited by 6
  30. 2026MSA: Memory Sparse Attention for Efficient End-to-End Memory Model Scaling to 100M Tokenscited by 5
  31. 2026OBLIQ-Bench: Exposing Overlooked Bottlenecks in Modern Retrievers with Latent and Implicit Queriescited by 5
  32. 2025Block Sparse Flash Attentioncited by 1
  33. 2026LUCID: Attention with Preconditioned Representationscited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 2.

2 papers.