arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.02528cs.AIcs.LG
收藏

视觉关系的多模态函数向量

Multimodal Function Vectors for Visual Relations

University of California, Berkeley(加州大学伯克利分校)

Shuhao Fu, Esther Goldberg, Ying Nian Wu, Hongjing Lu

AI总结:

通过因果中介分析提取多模态函数向量,操纵注意力头以改善视觉关系推理,并实现零样本和微调性能提升。

摘要:

大型多模态模型(LMMs)从少量多模态演示中展现出令人印象深刻的上下文学习能力,然而支持这种任务学习的内部机制仍不透明。基于大型语言模型的先前工作,我们表明大型多模态模型中一小部分注意力头负责传递视觉关系的表示。这些注意力头的激活,称为函数向量,可以被提取和操纵以改变LMM在关系任务上的性能。首先,使用合成和真实图像数据集,我们应用因果中介分析来识别强烈影响关系预测的注意力头,并提取多模态函数向量,以提高推理时的零样本准确率。我们进一步证明,这些多模态函数向量可以在保持LMM参数冻结的情况下,用适量的训练数据进行微调,从而显著优于上下文学习基线。最后,我们展示了特定关系的函数向量可以线性组合,以解决涉及新颖和未经训练的视觉关系的类比问题,突显了该方法的强大泛化能力。通过在两个LMM(包括OpenFlamingo和Qwen3-VL)上的实验,我们的结果表明这些模型在局部内部结构中编码了视觉关系知识,这些知识可以被系统地提取和优化,从而增进了我们对模型模块化的理解,并增强了对LMM中关系推理的控制。

英文摘要:

Large Multimodal Models (LMMs) demonstrate impressive in-context learning abilities from few multimodal demonstrations, yet the internal mechanisms supporting such task learning remain opaque. Building on prior work of Large Language Models, we show that a small subset of attention heads in Large Multimodal Models is responsible for transmitting representations of visual relations. The activations of these attention heads, termed function vectors, can be extracted and manipulated to alter an LMM's performance on relational tasks. First, using synthetic and real image datasets, we apply causal mediation analysis to identify attention heads that strongly influence relational predictions, and extract multimodal function vectors that improve zero-shot accuracy at inference time. We further demonstrate that these multimodal function vectors can be fine-tuned with a modest amount of training data, while keeping LMM parameters frozen, to significantly outperform in-context learning baselines. Finally, we show that relation-specific function vectors can be linearly combined to solve analogy problems involving novel and untrained visual relations, highlighting the strong generalization ability of this approach. Through experiments on two LMMs, including OpenFlamingo and Qwen3-VL, our results show that these models encode visual relational knowledge within localized internal structures, which can be systematically extracted and optimized, thereby advancing our understanding of model modularity and enhancing control over relational reasoning in LMMs.

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

↑