Hierarchical Question-Image Co-Attention for Visual Question Answering
当前基于视觉注意的一些VQA方法主要关注:”where to look”或者 visual attention。本文认为基于问题的attention “which word to listen to ” 或者question attenion也相当重要。基于这个动机,文中提出一种多模注意模型:Co-attention + Question Hierarchy。
Co-attention:这个部分包括基于图像的attention和基于问题的attention。图像的表示有助于提取Question Attention,同理问题的表示也有助于视觉注意的提取。
Question Hierarchy:论文提出一种图像和问题协同注意的分层架构,主要分为三层。
a).word level。将每个单词表示成向量
b) phrase level 利用一个1D CNN提取特征
c) question level 利用RNN编码整个问题。
这篇论文的主要贡献:
1.提出co-attention mechanism 机制处理VQA任务,并且采用两种策略应用这中机制,parallel and alternating co-attention。
2.采用分层结构表示问题,因此构建的image-question co-attention maps分为三个层次:word level, phrase level and question level.
3.在phrase level,采用convolution-pooling strategy 自适应选择phrase size。
4.在VQA dataset和COCO-QA上进行测试。
论文整体框架:

Method介绍
一些符号表示,

Question Hierarchy
首先将问题映射到一个向量空间

为了提取phrase features,在Qw序列上通过一维卷积神经网络进行处理,在每个单词的位置上计算该单词的向量与相应卷积核的点积。其中使用的三种不同尺寸(unigram, bigram and trigram)的卷积核经过上述操作后得到的输出特征图

之后在三个卷积核卷积之后的结果中做一次max-pooling,

最后将得到的max-pooling结果送入到LSTM中提取特征。整个框架如图:

The paper explores two Co-attention mechanisms: parallel co-attention and alternating co-attention. The former establishes concurrent attention between image and question representations, while the latter employs an alternating strategy to generate attention maps. For parallel co-attention, it is computed through similarity-based feature integration between image feature map V and question representation Q, resulting in a similarity matrix C as follows:

将C当作是一种特征,可以预测image和question attention maps:


Taking into account the above attention weights, the image and question attention maps can be calculated using the image features and question features.


Alternating Co-Attention是一种计算机制。它由三个关键步骤构成:第一步是将问题转化为一个单一的向量q;第二步是在得到q后进行图像特征分析;第三步是通过关注attented image特征来聚焦于问题

在第一步中设置X=Q并令g=0;接着,在第二步中令X=V并使其中的g由上一步骤产生的attentive question feature决定;最终将上一步骤产生的attentive image feature用于计算上一步骤产生的attentive question feature对应的g值。


该编码方法用于预测答案。在论文研究中提取了1, 研究者将视觉问答任务(VQA)视为一个具有丰富语义信息的问题,并将其建模为一个多标签分类任务。通过三个层次的co-attention机制融合图像与问题特征来预测答案。具体而言,在注意力机制的基础上构建多层感知机(MLP)模型来进行特征编码:


结果展示:

