# QueryStop: Dynamic Stop Signals for Efficient Streaming Inference

*Michelle Shu, Jingyao Li, Pengguang Chen, Shu Liu, Ramin Zabih, Jiaya Jia*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/151351) · [Open on the map](../papers.html#p151351)

Category: [Efficient LLM Inference & Training](../pcat/14.md) › [Sparse Long-Context Attention](../pgroup/226.md) · Type: new method · Keywords: streaming inference, stop signal prediction, query relevance, attention head aggregation, sufficiency prediction, efficient language model inference

Areas: [Long Context](../areas/longcontext.md) › Long-context mechanisms › Efficient attention

## Summary
QueryStop introduces a query-focused attention-aggregation method that dynamically identifies stop signals for efficient streaming inference, improving sufficiency prediction and downstream task accuracy.

## Explained to a 5-year-old
When a computer reads a long story, it needs to know when to stop reading to save time. The computer looks at special clues that tell it if it has enough information for the question. These clues are based on what the question is about, not just the whole story. The computer uses these clues to decide when to stop, which helps it work faster and give better answers. This makes the computer smarter and faster when answering questions.

## Explained to a 5-year-old, longer
When a computer reads a long story, it can take a lot of time. It needs to know when it has enough information to answer a question. Some computers look at clues that tell them if they have enough. Old clues were the same for any question, but they were not always right. This new idea says the clues should match the question being asked. The computer finds the clues that are most about the question. It uses those clues to decide when to stop reading. By doing this, the computer can stop earlier and save time. It also gives better answers because it stops when it really knows the answer. This helps when the computer is used in real life, like helping people quickly. It makes the computer work faster and use less energy. Overall, it makes the computer smarter at reading long texts.

## For a technical reader
The paper addresses the problem of determining when to halt context processing during streaming language model inference. It observes that certain attention heads encode query-specific sufficiency signals and proposes an aggregation technique that selects those heads based on their alignment with the input query. This query-focused ensemble produces high-fidelity representations that improve stop-signal prediction. Experiments on multiple benchmarks show gains in F1 score, a new stopping-adequacy metric (SRR), and downstream task accuracy. The results demonstrate that leveraging query-relevant signals can reduce unnecessary token processing while preserving answer quality.

## Problem
Deciding when to stop processing context in streaming language model inference is crucial for efficiency, yet existing stop signals rely on static, task-agnostic features that may not align with the specific query.

## Method
The approach aggregates attention heads that are focused on the input query, selecting those whose hidden representations best indicate sufficiency, and uses this query-aligned ensemble to predict stop signals dynamically.

## Results
The approach improves sufficiency stop prediction F1 by 3.52% on average, raises Sufficiency Reach Rate from 87.12% to 94.73%, and yields a 7.09% gain in downstream task accuracy over the prior baseline.

## Contributions
It demonstrates that stop signals are query-relevant and introduces an attention-aggregation technique that leverages query-focused heads to improve sufficiency prediction, along with a new stopping-adequacy metric (SRR).

## Practical relevance
The approach enables more efficient streaming inference for language models, reducing computation while maintaining or improving answer quality.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/151351)
