用浅层模型构建视频索引,加速深度模型实时问答。
ShallowStream: Index Shallow then Answer Deep for Streaming Video Understanding

- 用浅层网络同时编码帧并建索引,降低计算负担。
- 相比最强方法,每帧预填充延迟降低52.1倍,端到端延迟降11.9倍。
- 适合需要低延迟的实时视频理解场景,如自动驾驶、监控。
流式视频理解对智能体、自动驾驶、工业监控、安防预警和可穿戴助手等实际应用至关重要。然而,使用多模态大语言模型(MLLM)处理连续视频流计算开销巨大。现有方法通过视觉标记剪枝、合并、量化、按需帧检索和上下文卸载来降低流式处理成本,但大多忽视了模型深度的影响。反复对新帧执行全深度MLLM预填充代价高昂,导致显著计算开销,且KV缓存增长速度与预填充深度成正比。为此,我们提出ShallowStream,利用MLLM的浅层网络同时完成帧编码与检索索引构建。在流处理期间,始终维持一个轻量级索引,基于浅层网络的KV缓存实现。查询时,利用浅层生成的注意力分数对上下文帧进行评分,并采用多样性感知策略精准检索证据。ShallowStream性能媲美最强现有方法,同时将每帧预填充延迟降低最多52.1倍,10秒端到端延迟降低最多11.9倍。代码已开源:https://github.com/CURRENTF/ShallowStream。
原文摘要 · Abstract (English)
Streaming video understanding is a critical capability for real-world applications, including embodied intelligence, autonomous driving, industrial monitoring, surveillance and early warning, and wearable assistants. However, processing continuous video streams with multimodal large language models (MLLMs) is computationally expensive. Existing efforts have explored reducing streaming overhead through visual token pruning, token merging, quantization, on-demand frame retrieval, and context offloading. However, most existing methods overlook the dimension of model depth. Repeatedly executing full-depth MLLM prefill over incoming frames is prohibitively expensive, incurring substantial computational overhead and causing the KV cache to grow at a rate directly proportional to the prefill depth. To address these challenges, we propose ShallowStream, a novel framework that leverages the shallow layers of an MLLM to simultaneously perform frame encoding and retrieval index building. During stream processing, ShallowStream maintains an always-on lightweight index using the KV cache of shallow layers. During query-time answering, we leverage the attention scores generated by the shallow layers to score context frames and employ a diversity-aware selection strategy to retrieve precise and comprehensive evidence. ShallowStream achieves performance on par with the strongest existing streaming methods, while reducing per-frame prefill latency and 10-second end-to-end latency by up to 52.1x and 11.9x, respectively. Our code is available at https://github.com/CURRENTF/ShallowStream.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。