arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.19535cs.CVcs.AI
收藏

CASA: 交叉注意力优于自注意力用于高效的视觉-语言融合

CASA: Cross-Attention over Self-Attention for Efficient Vision-Language Fusion

Kyutai

Moritz Böhle, Amélie Royer, Juliette Marrie, Edouard Grave, Patrick Pérez

AI总结:

CASA通过交叉注意力机制提升视觉-语言模型的效率,实现实时视频字幕处理中的低延迟和恒定内存成本。

摘要:

视觉-语言模型(VLMs)通常通过直接将预训练视觉编码器生成的图像标记插入到语言模型的文本流中进行训练。这允许文本和图像信息在模型内部相互完全关注,但对长多图像对话或流媒体视频应用来说,这在内存和计算上都变得迅速昂贵。利用交叉注意力(CA)的VLMs是比标记插入更高效的替代方案,因为图像标记不会被添加到KV缓存中。尽管交叉注意力机制早在早期就被引入,但目前的VLM文献中多模态CA模型却很少,且往往在性能上不如标记插入的对应物。在本工作中,我们重新审视交叉注意力在视觉-语言建模中的有效性:(i)我们分析了交叉注意力和自注意力机制的核心差异;(ii)我们从纯文本LLM和通过适应预训练的插入式VLM训练交叉注意力VLMs,显示简单的交叉注意力比之前报告的要与标记插入更具竞争力;(iii)我们展示了交叉注意力在实时视频字幕中的实际优势,其中它自然地保持了低延迟和近似恒定的内存成本。有关样本和代码,请参见我们的项目页面:https://kyutai.org/casa。

英文摘要:

Vision-language models (VLMs) are commonly trained by directly inserting image tokens from a pretrained vision encoder into the text stream of a language model. This allows text and image information to fully attend to one another within the model, but becomes rapidly costly for long multi-image conversations or streaming video applications, both in terms of memory and compute. VLMs leveraging cross-attention (CA) are an efficient alternative to token insertion as image tokens are not added to the KV cache. Despite being introduced early on, multimodal CA models are scarce in the current VLM literature and often underperform their token insertion counterparts. In this work, we reinvestigate the effectiveness of cross-attention for vision-language modeling: (i) We analyze the core differences between the cross-attention and self-attention mechanisms, (ii) we train cross-attention VLMs both from a text-only LLM and by adapting a pretrained insertion-based VLM, showing that simple cross-attention is far more competitive with token insertion than previously reported, and (iii) we demonstrate the practical advantages of cross-attention on real-time video captioning, where it naturally maintains low latency and near-constant memory cost. For samples and code, please see our project page at https://kyutai.org/casa .

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

↑