Metraipolis › archive › dc_b9c427b04376

Targeted Retrieval, Compact Representations: How CoT Reasoning Improves Long-Context Counting — arXiv:2609.38958

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.38958
License (as archived)
CC0-1.0
Archived
2026-10-07T12:42:23.128Z
SHA-256 of the archived text
9fc2281c2b0862a7f366fce5350fa7cb9b33bc89791291e000e5b996c5f40d43
Stable URL of this page
https://metraipolis.com/documento/dc_b9c427b04376

How to cite

Targeted Retrieval, Compact Representations: How CoT Reasoning Improves Long-Context Counting — arXiv:2609.38958 — arXiv (en), https://arxiv.org/abs/2609.38958 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_b9c427b04376 (Metraipolis archive dc_b9c427b04376, sha256 9fc2281c2b0862a7f366fce5350fa7cb9b33bc89791291e000e5b996c5f40d43)
BibTeX
@misc{dcb9c427b04376,
  title = {Targeted Retrieval, Compact Representations: How CoT Reasoning Improves Long-Context Counting — arXiv:2609.38958},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.38958},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_b9c427b04376; sha256 9fc2281c2b0862a7f366fce5350fa7cb9b33bc89791291e000e5b996c5f40d43},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.38958. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Large language models (LLMs) have been rapidly improving in long-context tasks, powered by Chain-of-Thought (CoT) reasoning. However, the internal mechanisms underlying this improvement remain unclear. We investigate these mechanisms through a needle-in-a-haystack (NIAH) counting task, where an LLM is asked to count the number of records dispersed in a long text. Across twelve model comparison groups, Thinking (or reasoning) improves counting accuracy over Non-thinking, with pronounced gains at larger counts. This motivates our mechanistic analysis, which identifies two contrasting mechanisms: (i) broad retrieval, where Non-thinking models broadly attend to multiple needles; (ii) targeted retrieval, where Thinking models use enumeration in CoT traces to successively retrieve needles. Targeted retrieval concentrates attention on individual needles and is accompanied by more compact internal representations. Moreover, causal intervention analysis suggests that Thinking models use the CoT trace to maintain and update an internal counter as needles are successively retrieved, even without explicit numbering. In small controlled experiments, both retrieval mechanisms and counter states emerge under standard autoregressive training. Together, our results connect long-context retrieval with representation geometry of counting, supporting a state-tracking account of CoT reasoning.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-10-01 in cs.AI).
Categorie arXiv: Artificial Intelligence (cs.AI) ; Computation and Language (cs.CL); Machine Learning (cs.LG); Applications (stat.AP).
Pagina del lavoro: https://arxiv.org/abs/2609.38958 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-07T12:14:13.719Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-10-01?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).