arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.00540cs.CV
收藏

基于上下文视频 KV-Cache 检索的流式视频问答

Streaming Video Question-Answering with In-context Video KV-Cache Retrieval

Shanghai Jiao Tong University(上海交通大学);Alibaba Group(阿里巴巴集团)

Shangzhe Di, Zhelun Yu, Guanghao Zhang, Haoyuan Li, Tao Zhong, Hao Cheng, Bolin Li, Wanggui He, Fangxun Shu, Hao Jiang

AI总结:

提出免训练方法 ReKV,通过滑动窗口注意力、KV-Cache 存储与按需检索机制,实现视频编码与问答分离,显著提升流式长视频问答的效率与准确性。

摘要:

我们提出了 ReKV,一种新颖的免训练方法,通过与现有的视频大语言模型(Video-LLMs)无缝集成,实现高效的流式视频问答(StreamingVQA)。传统的 VideoQA 系统在处理长视频时存在困难,因为它们必须在响应查询前处理整个视频,并为每个新问题重复此过程。相比之下,我们的方法以流式方式分析长视频,允许在接收到用户查询后立即做出快速响应。基于常见的 Video-LLM,我们首先引入了滑动窗口注意力机制,确保输入帧仅关注有限数量的前序帧,从而降低计算开销。为防止信息丢失,我们将已处理的视频键值缓存(KV-Caches)存储在 RAM 和磁盘中,并根据需要将其重新加载到 GPU 内存中。此外,我们引入了一种检索方法,利用外部检索器或 Video-LLMs 内部的参数,仅检索与查询相关的 KV-Caches,从而确保问答的效率和准确性。ReKV 实现了视频编码和问答在不同进程和 GPU 上的分离,显著提升了 StreamingVQA 的效率。通过全面的实验,我们验证了该方法的有效性和实用性,与现有的 VideoQA 模型相比,显著提升了效率并增强了适用性。

英文摘要:

We propose ReKV, a novel training-free approach that enables efficient streaming video question-answering (StreamingVQA), by seamlessly integrating with existing Video Large Language Models (Video-LLMs). Traditional VideoQA systems struggle with long videos, as they must process entire videos before responding to queries, and repeat this process for each new question. In contrast, our approach analyzes long videos in a streaming manner, allowing for prompt responses as soon as user queries are received. Building on a common Video-LLM, we first incorporate a sliding-window attention mechanism, ensuring that input frames attend to a limited number of preceding frames, thereby reducing computational overhead. To prevent information loss, we store processed video key-value caches (KV-Caches) in RAM and disk, reloading them into GPU memory as needed. Additionally, we introduce a retrieval method that leverages an external retriever or the parameters within Video-LLMs to retrieve only query-relevant KV-Caches, ensuring both efficiency and accuracy in question answering. ReKV enables the separation of video encoding and question-answering across different processes and GPUs, significantly enhancing the efficiency of StreamingVQA. Through comprehensive experimentation, we validate the efficacy and practicality of our approach, which significantly boosts efficiency and enhances applicability over existing VideoQA models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑