cd /news/large-language-models/when-does-in-context-search-help-a-s… · home topics large-language-models article
[ARTICLE · art-52019] src=arxiv.org ↗ pub= topic=large-language-models verified=true sentiment=· neutral

When Does In-Context Search Help? A Sampling-Complexity Theory of Reflection-Driven Reasoning

A new theoretical analysis of in-context search in large language models shows that when self-reflection reliably localizes early mistakes, sequential reasoning can yield exponential improvements over the base model, solving problems with exponentially small zero-shot pass rates using only a polynomial number of attempts. The study further demonstrates that these gains are robust and learnable, with cross-entropy training on search rollouts recovering the required behavior with polynomial sample complexity.

read1 min views1 publishedJul 9, 2026

arXiv:2607.06720v1 Announce Type: new Abstract: Training large language models (LLMs) with extended reasoning has enabled in-context search, in which models iteratively generate, critique, and revise solution attempts. We provide a theoretical analysis of in-context search by modeling it as approximate inference over reasoning traces, where the base model defines a prior and self-reflection provides feedback for posterior updates, and study the resulting inference-time sampling complexity - the number of sequential attempts needed to achieve high success probability. We show that when reflections reliably localize early mistakes, in-context search can yield exponential improvements over the base model, solving problems with exponentially small zero-shot pass rates using only a polynomial number of sequential attempts, whereas when this property fails, conditioning on past attempts offers no asymptotic benefit over parallel sampling. We further show that these gains are robust and learnable: approximate posterior updates suffice, and cross-entropy training on search rollouts recovers the required behavior with polynomial sample complexity. Finally, we show that under a stagewise abstraction of reinforcement learning with verifiable rewards, the optimal policy extension implements the same posterior reweighting rule. We validate key qualitative predictions of the theory on real large reasoning models.

── more in #large-language-models 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/when-does-in-context…] indexed:0 read:1min 2026-07-09 ·