通过扩展视觉上下文窗口,让小模型也能高效理解长视频。
Visual Context Window Extension: A New Perspective for Long Video Understanding
- 分析发现视觉与语言模态的上下文窗口不匹配,是长视频理解瓶颈。
- 无需重新训练,仅扩展视觉上下文窗口,性能随帧数增加持续提升。
- 采用渐进池化策略,内存降低45%且无性能损失,适合资源受限场景。
大型多模态模型(LMMs)在短视频理解任务中表现优异,但在长视频理解方面面临巨大挑战。相比之下,大语言模型(LLMs)在长文本建模方面表现出色。现有方法通过在训练中引入长视频-文本对来解决此问题,但需大量计算和数据资源。本文从上下文窗口角度出发,旨在不重新训练大规模长视频数据集的前提下,使LMMs适用于长视频任务。我们深入分析了预训练LMMs难以理解长视频内容的原因,发现视觉与语言模态间存在上下文窗口差异,导致视觉标记无法直接扩展以匹配语言上下文窗口。基于此,提出通过扩展视觉上下文窗口来适配长视频理解任务,避免大规模重训练。为进一步缓解长序列带来的高内存消耗,引入渐进池化推理策略,选择性调整帧嵌入的空间分辨率,在减少视觉标记数量的同时保留重要空间信息。在多个长视频理解基准测试中,我们的方法随着视频帧数增加,性能持续提升。在MLVU基准上,尽管模型仅7B,仍优于GPT-4o;在256帧设置下,内存使用量相比基线降低约45%,且无性能损失。
原文摘要 · Abstract (English)
Large Multimodal Models (LMMs) have demonstrated impressive performance in short video understanding tasks but face great challenges when applied to long video understanding. In contrast, Large Language Models (LLMs) exhibit outstanding capabilities in modeling long texts. Existing work attempts to address this issue by introducing long video-text pairs during training. However, these approaches require substantial computational and data resources. In this paper, we tackle the challenge of long video understanding from the perspective of context windows, aiming to apply LMMs to long video tasks without retraining on long video datasets. We first conduct an in-depth analysis of why pretrained LMMs struggle to understand lengthy video content, identifying that discrepancies between visual and language modalities lead to different context windows for visual and language tokens, making it difficult to directly extend the visual tokens to match the language context window. Based on this, we propose to adapt LMMs for long video understanding tasks by extending the visual context window, eliminating the need for retraining on large scalelong video datasets. To further mitigate the significant memory consumption caused by long sequences, we introduce a progressive pooling inference strategy that selectively adjusts the spatial resolution of frame embeddings, reducing the number of visual tokens while retaining important spatial information. Across multiple long video understanding benchmarks, our method consistently improves the performance as the number of video frames increases. On the MLVU benchmark, our method outperforms GPT-4o, even though our model size is only 7B. Additionally, in the 256-frame setting, our method reduces memory usage by approximately 45% compared to the baseline, without introducing any performance loss.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。