改进视觉语言模型的因果掩码,让模型能合理利用未来信息提升推理准确率。
Rethinking Causal Mask Attention for Vision-Language Inference
- 提出面向视觉查询的未来感知注意力机制,通过池化融合未来视觉上下文
- 实验证明严格屏蔽未来位置会降低模型对语义线索的捕捉能力
- 适合需要精准跨模态推理的研究者和开发者使用
因果注意力已成为自回归视觉语言模型(VLMs)的基础机制,将文本与视觉输入统一于单一生成框架中。然而,现有基于因果掩码的策略继承自仅处理文本的大语言模型(LLMs),其对视觉标记在预填充阶段的适应性不足。对视觉查询严格屏蔽未来位置引入了过于僵化的约束,阻碍模型利用通常包含关键语义线索的未来上下文。本文通过实证研究不同因果掩码策略对视觉语言推理的影响,提出一套专为此场景设计的未来感知注意力方法。我们首先分析视觉查询预览未来标记的效果,证明严格掩码会削弱模型捕获有用上下文语义表征的能力。基于此,提出一种轻量级注意力族,通过池化将未来视觉上下文聚合到过去表示中,有效保持自回归结构的同时增强跨标记依赖。我们在多种视觉语言推理任务上评估了多类因果掩码,结果表明选择性地将未来语义上下文压缩至过去表示有助于提升推理性能。
原文摘要 · Abstract (English)
Causal attention has become a foundational mechanism in autoregressive vision-language models (VLMs), unifying textual and visual inputs under a single generative framework. However, existing causal mask-based strategies are inherited from large language models (LLMs) where they are tailored for text-only decoding, and their adaptation to vision tokens is insufficiently addressed in the prefill stage. Strictly masking future positions for vision queries introduces overly rigid constraints, which hinder the model's ability to leverage future context that often contains essential semantic cues for accurate inference. In this work, we empirically investigate how different causal masking strategies affect vision-language inference and then propose a family of future-aware attentions tailored for this setting. We first empirically analyze the effect of previewing future tokens for vision queries and demonstrate that rigid masking undermines the model's capacity to capture useful contextual semantic representations. Based on these findings, we propose a lightweight attention family that aggregates future visual context into past representations via pooling, effectively preserving the autoregressive structure while enhancing cross-token dependencies. We evaluate a range of causal masks across diverse vision-language inference settings and show that selectively compressing future semantic context into past representations benefits the inference.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。