[论文解读] Causal Attention for Vision-Language Tasks
本文提出一种新型注意力机制——因果注意力(Causal Attention, CATT),通过利用前门调整来缓解视觉-语言模型中的虚假相关性,从而应对未观测到的混杂因子。通过结合样本内注意力(In-Sample Attention)与跨样本注意力(Cross-Sample Attention),CATT 在视觉-语言任务中提升了模型的泛化能力,在 LXMERT 和基于 Transformer 的模型上均取得了显著的性能提升,达到当前最优水平。
We present a novel attention mechanism: Causal Attention (CATT), to remove the ever-elusive confounding effect in existing attention-based vision-language models. This effect causes harmful bias that misleads the attention module to focus on the spurious correlations in training data, damaging the model generalization. As the confounder is unobserved in general, we use the front-door adjustment to realize the causal intervention, which does not require any knowledge on the confounder. Specifically, CATT is implemented as a combination of 1) In-Sample Attention (IS-ATT) and 2) Cross-Sample Attention (CS-ATT), where the latter forcibly brings other samples into every IS-ATT, mimicking the causal intervention. CATT abides by the Q-K-V convention and hence can replace any attention module such as top-down attention and self-attention in Transformers. CATT improves various popular attention-based vision-language models by considerable margins. In particular, we show that CATT has great potential in large-scale pre-training, e.g., it can promote the lighter LXMERT~\cite{tan2019lxmert}, which uses fewer data and less computational power, comparable to the heavier UNITER~\cite{chen2020uniter}. Code is published in \url{https://github.com/yangxuntu/catt}.
研究动机与目标
- 解决注意力机制驱动的视觉-语言模型中长期存在的混淆偏差问题,即模型从训练数据中学习到虚假相关性。
- 克服现有去混淆方法依赖可观测混杂因子或强假设的局限性。
- 开发一种可插入现有 Transformer 架构的注意力机制,以提升模型的鲁棒性与泛化能力。
- 在不观测混杂因子的情况下,利用前门调整原理实现有效的因果干预。
- 在多个视觉-语言基准测试中(包括图像字幕生成与 VQA)验证 CATT 的有效性,尤其在低数据量与大规模预训练设置下表现突出。
提出的方法
- 提出因果注意力(CATT)作为标准注意力模块的替代方案,结合样本内注意力(IS-ATT)与跨样本注意力(CS-ATT),以模拟因果干预。
- 将 IS-ATT 实现为同一样本内特征的标准注意力机制,而 CS-ATT 则通过其他样本的全局特征字典引入注意力,以模拟干预分布。
- 采用前门调整框架,在不观测混杂因子的前提下,估计视觉输入对语言输出的因果效应,依赖于可观测的后门路径。
- 保留标准的 Q-K-V 注意力机制,使 CATT 可直接嵌入现有模型(如 Transformer 和自顶向下注意力模块)中。
- 通过 K-means 初始化与微调,端到端训练全局视觉与词汇特征字典,确保模型学习到具有代表性的因果特征。
- 在每个 CATT 模块中,共享 IS-ATT 与 CS-ATT 的参数,以保持特征空间一致性并减少参数开销。

实验结果
研究问题
- RQ1在不依赖混杂因子知识的前提下,因果注意力机制是否能有效减少视觉-语言模型中的虚假相关性?
- RQ2CATT 在存在数据集偏差(如齐普夫定律与社会惯例)的情况下,如何提升模型的泛化能力?
- RQ3在低数据量与大规模预训练场景(如 LXMERT)中,CATT 能在多大程度上提升性能?
- RQ4CATT 在图像字幕生成与 VQA 基准测试中是否优于标准注意力机制?
- RQ5CATT 是否能无缝集成到现有基于 Transformer 的架构中,而无需进行架构层面的重构?
主要发现
- CATT 显著提升了图像字幕生成与 VQA 任务的性能,其中 Transformer + CATT 在 BLEU-4、CIDEr 和测试损失上分别达到 38.8、70.6 和 128.8,优于基础 Transformer 模型。
- 在 LXMERT 模型上,CATT 使轻量化模型达到与更大型的 UNITER 模型相当的性能,展现出强大的效率与泛化优势。
- 定性分析表明,CATT 在图像字幕生成中能正确预测性别信息(如“woman”与“kitchen”),而无需依赖虚假相关性。
- CATT 缓解了大规模预训练对注意力质量的负面影响,逆转了标准模型在大规模预训练后注意力性能下降的趋势。
- 当正确上下文为“driving carriage”时,CATT 有效减少了对虚假物体对(如“person”与“horse”)的注意力关注。
- CATT 在多个数据集与任务中保持性能优势,包括 VQA 与图像字幕生成,在 BLEU、CIDEr 与精确匹配等指标上均表现出一致的提升。
![Figure 2: Before pre-training ( \eg , LXMERT [ 61 ] ), attentions are correct (blue). After pre-training, attentions are wrong (red). This is because the co-occurrences of some concepts appear much more often than others, \eg , “Sport+Man” appears 213 times more than “Sport+Screen” in the pre-traini](https://ar5iv.labs.arxiv.org/html/2103.03493/assets/x2.png)
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。