ChatPaper.aiChatPaper

逐令牌关注多模态生成

Attending to Multimodal Generation One Token at a Time

July 4, 2026
作者: Varun Gupta, Vineet Gandhi, Makarand Tapaswi
cs.AI

摘要

多模态大语言模型(MLLMs)通过自回归方式生成响应,在不断演化的上下文中融合视觉与语言信息。现有可解释性研究聚焦于单层和电路("何处"),未深入探究生成过程中多模态计算的词元级动态("何时")。我们针对这一空白展开研究,基于语义角色分析注意力转移模式——逐词元追踪模型对图像、文本、指令及先前生成词元的注意力(OTaT)。我们设计了需要在单次响应中显式切换视觉与文本上下文的的多模态任务。在两大主流模型家族及四个不同规模的开源多模态大语言模型上,我们发现了稳定规律:对图像的注意力在需要图像信息的词元处达到峰值;指令词元在任务转换时被重新关注;而对先前生成词元的注意力随生成过程推进逐渐增强。因果注意力阻断实验验证了这些趋势的功能性角色。通过分析注意力受干扰时的模型行为,我们观察到响应会退化为依赖语言先验,或出现跨模态泄露、否定性回复及恢复性调整。最终,基于注意力动态分析的新见解,我们提出了一种简易的测试时干预方法——在适当时机增强模型对相关模态的注意力,从而显著提升多模态任务性能。
English
Multimodal large language models (MLLMs) generate responses autoregressively, integrating visual and linguistic information in an evolving context. Prior work on interpretability has focused on individual layers and circuits (where), leaving the token-level dynamics of multimodal computation during generation (when) underexplored. We address this gap and study attention shifts as per semantic role; tracking model attention to image, text, instruction, and previously generated tokens, One Token at a Time (OTaT). We introduce multimodal tasks that require explicit switching between visual and textual context within a single response. Across two mainstream model families and four open-weight MLLMs of varying sizes, we establish consistent patterns: attention to image peaks at tokens requiring image-derived information, instruction tokens are revisited during task transitions, and attention to previously generated tokens increases as the generation progresses. Causal attention blocking interventions validate the functional role of these trends. We profile model behavior under disrupted attention and observe responses falling back to language priors, or exhibiting cross-modal leakage, denial, or recovery. Finally, informed of the attention dynamics through our novel analysis, we propose a simple test-time intervention to boost attention to the relevant modality at the right time, significantly improving multimodal task performance.