NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Knowing When to Stop: Efficient Context Processing via Latent Sufficiency Signals

Roy Xie, Junlin Wang, Paul Rosu, Chunyuan Deng, Bolun Sun, Zihao Lin, Bhuwan Dhingra

TL;DR

Researchers have developed a "dynamic context cutoff" method that allows Large Language Models (LLMs) to stop processing input text the moment they have enough information to answer a query. By tapping into internal "sufficiency signals" hidden within specific attention heads, this approach improves accuracy by 3.4% while reducing token processing by 1.33x on average.

The Problem: Brute-Force Processing

Current LLMs are "brute-force" readers. If provided with a 40,000-token document to answer a simple question located in the first paragraph, the model will still process all 40,000 tokens before generating a response. This exhaustive processing is not just computationally expensive; it is often detrimental to performance.

This inefficiency exacerbates the "lost-in-the-middle" phenomenon, where critical information becomes diluted or ignored when buried in long, noisy contexts. While existing solutions like Retrieval-Augmented Generation (RAG) or context compression (e.g., LLMLingua) help, they typically rely on static heuristics—predefining a fixed number of documents or a specific compression ratio regardless of the actual content. The authors pose a critical question: Can we enable LLMs to self-assess when they have read enough?

Methods: Dynamic Context Cutoff

The authors introduce Dynamic Context Cutoff, a method that treats context processing as a sequential, "left-to-right" decision-making task rather than a bulk operation.

Flowchart illustrating the Dynamic Context Cutoff process.
  1. Probing for Sufficiency: The researchers discovered that specific attention heads in the middle layers of LLMs act as internal "thermometers" for information. They trained lightweight binary classifiers on the activations of these heads to predict whether the current chunk of text contains enough information to answer the user's query.
  2. Ensemble Classification: During inference, the context is processed in chunks (e.g., 10% of the total length at a time). After each chunk, an ensemble of these lightweight classifiers checks for a "sufficiency signal." If the signal is high enough, the model stops reading and immediately begins generating the answer.
  3. Self-Prompting (for Large Models): Interestingly, the study found that while smaller models (1B–8B parameters) require these external classifiers, larger models (14B+) exhibit an emergent capability. These larger models can be "meta-prompted" to explicitly state if they have enough information, performing nearly as well as the specialized classifiers.

Datasets and Evaluation

The method was evaluated across six diverse QA datasets, modified to include "long-form" versions of up to 40,000 tokens. These included single-hop tasks (SQuAD, Natural Questions, Code Understanding) and multi-hop tasks (HotpotQA, MuSiQue, Multi-hop Key-Value Retrieval). The datasets were carefully balanced so that the "gold" information was distributed uniformly, ensuring the models were not simply learning a bias to stop early by default.

Key Insights

  • The "Sufficiency Head" Discovery: The most striking finding is that LLMs inherently track whether they have the "answer in hand." This knowledge is not just formulated in the final output; it is encoded in the latent activations of specific attention heads, primarily in the middle layers of the transformer.
  • Efficiency as an Accuracy Booster: Typically, there is a trade-off between speed and quality. In this case, stopping early actually increased accuracy. By cutting off irrelevant "noise" at the end of a long context, the model avoids the confusion that leads to the "lost-in-the-middle" trap.
  • Scaling and Self-Awareness: There is a clear phase shift in capability based on model size. Smaller models are "unconsciously" competent (they possess the signal but need a probe to extract it), while larger models are "consciously" competent (they can report their own sufficiency via prompting).

Key Results

The proposed method demonstrates that models' internal understanding can naturally dictate processing needs, outperforming external compression heuristics.

Accuracy vs. Token Reduction across different models.
  • Performance Gain: The dynamic cutoff method achieved a 3.4% average accuracy improvement over processing the full context.
  • Token Reduction: On average, models processed 1.33x fewer tokens. In several scenarios, the reduction was even more dramatic while still outperforming state-of-the-art compression methods like LLMLingua2.
  • Wall-Clock Savings: For contexts longer than 2,000 tokens, the method provided significant inference time savings, proving that the overhead of running the lightweight classifiers is negligible compared to the computational cost of processing thousands of extra tokens.

Limitations and Future Work

The authors acknowledge that this method is currently optimized for factoid-based tasks where the answer is localized. It is not yet suitable for holistic tasks like summarization or document-wide sentiment analysis, where the "sufficiency" point is effectively the end of the document.

Future research directions include:

  • Developing adaptive thresholds that adjust based on the difficulty of the query rather than using a fixed confidence score.
  • Exploring how these sufficiency signals can be integrated with KV cache optimization to further reduce memory footprints.
  • Testing the approach on more creative or open-ended dialogue where "sufficiency" is more subjective.

Summary updated

BibTeX
@inproceedings{xie2025knowing,
  author = {Roy Xie and Junlin Wang and Paul Rosu and Chunyuan Deng and Bolun Sun and Zihao Lin and Bhuwan Dhingra},
  title = {{Knowing When to Stop: Efficient Context Processing via Latent Sufficiency Signals}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=naAUSeyoZ7},
}
Figure