StreamMem让大模型高效处理长视频,不依赖问题提前知道也能压缩记忆
StreamMem: Query-Agnostic KV Cache Memory for Streaming Video Understanding
- 流式编码新视频帧,用视觉与通用查询的注意力压缩键值缓存
- 固定大小缓存下在长视频问答任务上达到顶尖性能
- 适合内存受限、需实时交互的长视频理解场景
多模态大模型在视觉语言推理方面取得显著进展,但对长视频的高效处理能力仍受限。尽管长上下文多模态模型已有进展,存储和访问长视觉上下文的键值(KV)缓存仍带来巨大内存和计算开销。现有视觉压缩方法要么需要预先编码整个视觉上下文,要么要求提前获取问题,这在长视频理解和多轮对话场景中不切实际。本文提出 StreamMem,一种面向流式视频理解的查询无关键值缓存内存机制。具体而言,StreamMem以流式方式编码新视频帧,利用视觉标记与通用查询标记之间的注意力得分压缩KV缓存,同时保持固定大小的KV记忆,从而在内存受限的长视频场景中实现高效的问答。在三个长视频理解与两个流式视频问答基准上的评估表明,StreamMem在查询无关的KV缓存压缩中达到最先进水平,并与查询感知压缩方法表现相当。
原文摘要 · Abstract (English)
Multimodal large language models (MLLMs) have made significant progress in visual-language reasoning, but their ability to efficiently handle long videos remains limited. Despite recent advances in long-context MLLMs, storing and attending to the key-value (KV) cache for long visual contexts incurs substantial memory and computational overhead. Existing visual compression methods require either encoding the entire visual context before compression or having access to the questions in advance, which is impractical for long video understanding and multi-turn conversational settings. In this work, we propose StreamMem, a query-agnostic KV cache memory mechanism for streaming video understanding. Specifically, StreamMem encodes new video frames in a streaming manner, compressing the KV cache using attention scores between visual tokens and generic query tokens, while maintaining a fixed-size KV memory to enable efficient question answering (QA) in memory-constrained, long-video scenarios. Evaluation on three long video understanding and two streaming video question answering benchmarks shows that StreamMem achieves state-of-the-art performance in query-agnostic KV cache compression and is competitive with query-aware compression approaches.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。