Manuscript Offprint

arXiv:2610.25551

StreamAhead: Real-Time Streaming Video Question Answering via Adaptive Precomputation

Haoyang Fan, Dhruv Parikh, Rajgopal Kannan, Viktor Prasanna

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Haoyang Fan 1^{1} Dhruv Parikh 1^{1} Rajgopal Kannan 2^{2} Viktor Prasanna 1^{1}

1^{1}University of Southern California (USC), Los Angeles, CA, USA

2^{2}DEVCOM Army Research Office

{haoyangf, dhruvash, prasanna}@usc.edu

rajgopal.kannan.civ@army.mil

Abstract—Real-time streaming video question answering with vision-language models must answer queries that arrive at any time with low latency while sustaining the video-processing rate required by the application. Existing systems construct key-value (KV) caches for the entire video as it arrives, although a query typically uses only a few of the preceding frames as evidence. This highlights a fundamental trade-off: performing more computation as video arrives reduces query-time computation but can increase processing lag, whereas deferring computation can increase the video-processing rate but requires additional query-time computation for retrieved content.

We present StreamAhead, an algorithm–system co-design that exploits this trade-off through adaptive precomputation: dynamically controlling how much computation to complete for each video segment before a query arrives. StreamAhead encodes video segments independently and lets each remain at a different representation level, from inexpensive visual features to costly KV caches, completing KV caches only for the retrieved segments when a query arrives. StreamAhead profiles offline the cost of advancing a segment to each representation level. Its runtime uses these profiles to schedule segment computation concurrently with query execution, pipelining it across heterogeneous CPU and GPU resources while maintaining the required video-processing rate. StreamAhead achieves accuracy competitive with state-of-the-art methods with up to 10.4×10.4\times lower time-to-first-token (TTFT), and up to 5.9×5.9\times lower TTFT than state-of-the-art streaming systems. It sustains 30 FPS with P95 TTFT under 0.5 s, and up to 57 FPS with P95 TTFT under 2 s. To our knowledge, StreamAhead is the first real-time streaming video QA system with competitive accuracy, setting a new Pareto frontier between video-processing rate and TTFT.

I. INTRODUCTION

Streaming video question answering with vision–language models (VLMs) considers a continuously arriving video stream in which users may issue questions at arbitrary times [1]–[6]. An application specifies the video sampling rate and resolution that the system is expected to process. The system must sustain this processing rate; otherwise, a growing backlog creates processing lag, i.e., a delay between video arrival and completion of the required processing [7], making recent video unavailable when a query needs it. In this paper, we therefore study a fundamental question for streaming video question answering: how can we sustain the required video-processing rate while simultaneously minimizing time-to-first-token (TTFT), measured from query arrival to the first generated token? We call a system real-time when it achieves both: it keeps pace with the incoming video and answers queries with low latency.

Existing streaming video QA systems reduce query-time computation by precomputing reusable video representations, such as visual features or key-value (KV) caches, that can later be reused when relevant historical content is retrieved [2], [8]–[12]. For example, ReKV [2] incrementally constructs reusable KV states for incoming video and retrieves query-relevant cached states for answer generation. However, constructing deeper representations such as video KV caches requires substantial computation before the relevance of that content to a future query is known. A particular query typically depends on only a small subset of the retained video history, which can be identified through retrieval mechanisms [2], [9], [13], [14]. Fully constructing deep representations for the remaining history therefore spends processing capacity on content that may never be used by that query. This extra computation can cause the system to fall behind the incoming stream and accumulate processing lag, without benefiting the query.

Rather than constructing full KV caches for the entire stream as video arrives, a system can retain intermediate results and postpone the remaining computation [15]–[17]. This exposes a fundamental trade-off: performing more computation as video arrives reduces query-time computation but can increase processing lag, whereas deferring computation increases the video-processing rate but requires additional computation at query time if that content is later retrieved. This motivates what we call adaptive precomputation: deciding at runtime how much computation to complete before a query arrives, based on the current workload and available resources.

Exploiting this trade-off, however, raises two challenges. First, the system must be able to complete different amounts of computation for different parts of the video. Many existing systems build the KV caches of new frames from the cached states of earlier frames [2], [9], [10], [18], [19]. Under this temporal dependency, completing one retrieved segment at query time first requires completing every earlier segment. The query-time cost then grows with the length of the video history, not with the retrieved content required as evidence for that query. Second, the system must decide at runtime which segments to precompute and how much computation to complete for each. It must also decide when to run this work,

StreamAhead motivation: adaptive precomputation sustains high video-processing rate while minimizing TTFT

L1: selected frames L2: visual features L3: query-independent KV

(a) Deep precomputation for each segment

Build L3 for every incoming segment

Incoming video stream (required rate)

Figure

Wastes compute + memory on segments query does not need

Query retrieves only s2 and s4

s2

s4

Retrieved representation

composition

Answer

L3 retained for s2 and s4

High ingestion cost can cause processing lag under load

Query construction fast, but lag can still delay answers

(b) Deferral with temporal dependencies

Retain intermediate states and postpone work

Incoming video stream (required rate)

Figure

Completion depends on preceding segment states

Query retrieves s2 and s4

s1

s2

s3

s4

Retrieved representation

composition

Answer

Complete unfinished history through s4

Remaining work grows with dependent history

Deferred dependencies increase query-time work and TTFT

(c) Ours: StreamAhead (adaptive precomputation)

Independent, resumable segments at mixed depths

Incoming video stream (required rate)

Figure

Runtime adaptively advances segments independently

Query retrieves s2 and s4

s2

s4

Retrieved representation

composition

Answer

Complete s2 and s4 only, independently and compose

Sustain required stream progress while reducing query-time work

Fig. 1. (a) Building KV caches for every segment, (b) deferring computation under temporal dependencies, and (c) adaptive precomputation in StreamAhead.

since video processing, query answering, and precomputation share the same compute. Finally, it must place the results across CPU and GPU memory, as GPU memory is limited and loading results back from CPU memory delays the query. Throughout, the system must not fall behind the incoming video stream.

To address these challenges, we present StreamAhead, an algorithm–system co-design for adaptive precomputation in streaming video QA (Figure 1). StreamAhead divides the incoming video into fixed-duration segments and precomputes each segment independently, without any temporal dependency on other segments' KV caches. Each segment retains results at one of three representation levels, corresponding to successive stages of processing that segment: raw frames and a retrieval key (L1), visual features (L2), or a query-independent KV cache (L3). Later processing continues from the stored results without repeating completed stages. Before a query arrives, different segments can remain at different levels according to the available resources. At query time, StreamAhead retrieves relevant segments, reuses existing KV caches, and completes KV construction for retrieved segments still at L1 or L2. StreamAhead then combines the retrieved KV caches through retrieved representation composition, placing them in video order with continuous positions to form a single context [20], [21]. Because segments never attend to one another, we also propose a lightweight mechanism to recompute each segment's short text suffix in this context, adding cross-segment interaction without rebuilding visual KV states.

To address the second challenge, StreamAhead first profiles offline the compute and memory cost of advancing a segment to each representation level. It also profiles query TTFT over segments at each level, and uses both profiles to select the processing configuration and required representation level for the target workload [7], [22]. Online, a shared segment table tracks each segment's completed representation level and whether its results are in CPU or GPU memory. It also tracks ongoing work on the segment, such as advancing it to a deeper level or moving it between CPU and GPU. With this table, video processing and query execution run concurrently: a query that needs a segment already being advanced reuses that work instead of repeating it. The runtime pipelines segment computation across heterogeneous CPU and GPU resources, overlapping CPU preparation and data movement with GPU execution. It also places representations across CPU and GPU memory [23]–[25]. Its scheduler keeps pace with the incoming video, gives priority to query work when a query arrives, and uses spare capacity for additional precomputation. While a query runs, processing of newly arriving video may fall behind. After the query, the runtime first clears this backlog and only then resumes additional precomputation. We make the following contributions:

• Algorithm. We process video as independent segments with three reusable representation levels, so that different amounts of computation can be completed for each segment before a query arrives. We combine retrieved segments through retrieved representation composition, with a lightweight mechanism that adds cross-segment interaction.

• Scheduling. We design profile-guided scheduling for adaptive precomputation. Offline profiling selects the required representation level. Online scheduling keeps pace with the incoming video, prioritizes queries, and uses spare capacity for additional precomputation.

• Runtime. We build a runtime that executes video processing and queries concurrently. It uses a shared segment table, pipelining across heterogeneous CPU and GPU resources, and a CPU–GPU memory hierarchy.

StreamAhead achieves accuracy competitive with state-of-the-art methods with up to 10.4×10.4\times lower TTFT, and up to 5.9×5.9\times lower TTFT than state-of-the-art streaming systems. It sustains 30 FPS with P95 TTFT under 0.5 s, and up to 57 FPS with P95 TTFT under 2 s. To our knowledge, StreamAhead is the first real-time streaming video QA system with competitive accuracy, setting a new Pareto frontier between video-processing rate and TTFT.

References (58)