Visual Question Answering with Memory-Augmented Networks
2018-05-15 20:15:03

Motivation:

虽然 VQA 已经取得了很大的进步,但是这种方法依然对完全 general,freeform VQA 表现很差,作者认为是因为如下两点:

  1. deep models trained with gradient based methods learn to respond to the majority of training data rather than specific scarce exemplars ;

  用梯度下降的方法训练得到的深度模型,对主要的训练数据有较好的相应,但是对特定的稀疏样本却不是;

  2. existing VQA systems learn about the properties of objects from question-answer pairs, sometimes indepently of the image.

  选择性的关注图像中的某些区域是很重要的策略。

我们从最近的 memory-augmented neural networks 以及 co-attention mechanism 得到启发,本文中,我们利用 memory-networks 来记忆 rare events,然后用 memory-augmented networks with attention to rare answers for VQA.

The Proposed Algorithm :

本文的算法流程如上图所示,首先利用 embedding 的方法,提取问题和图像的 feature,然后进行 co-attention 的学习,然后将两个加权后的feature进行组合,然后输入到 memory network 中,最终进行答案的选择。

Image Embedding:用 pre-trained model 进行特征的提取;

Question Embedding:用双向 LSTM 网络进行语言特征的学习;

Sequential Co-attention

这里的协同 attention 机制,考虑到图像和文本共同的特征,相互影响,得到共同的注意力机制。我们根据 视觉特征和语言特征的平均值,进行点乘,得到一个 base vector m0 :

我们用一个两层的神经网络进行 soft attention 的计算。对于 visual attention,the soft attention 以及 加权后的视觉特征向量分别为:

其中 Wv, Wm,Wh 都表示 hidden states。类似的,我们计算加权后的问题特征向量,如下:

我们将加权后的 v 和 q 组合,用来表示输入图像和问题对,图4,展示了 co-attention 机制的整个过程。

Memory Augmented Network

The RNNs lack external memory to maintain a long-term memory for scarce training data. This paper use a memory-augmented NN for VQA.

特别的,我们采用了标准的 LSTM 模型作为 controller,起作用是 receives input data,然后跟外部记忆模块进行交互。外部记忆,Mt,是有一系列的 row vectors 作为 memory slots。

xt 代表的是视觉特征和文本特征的组合;yt 是对应的编码的问题答案(one-hot encoded answer vector)。然后将该 xt 输入到 LSTM controller,如:

对于从外部记忆单元中读取,我们将 the hidden state ht 作为 Mt 的 query。首先,我们计算 搜索向量 ht  和 记忆中每一行的余弦距离:

然后,我们通过 the cosine distance 用 softmax 计算一个 read weight vector wr:

有这些 read-weights, 一个新的检索的记忆 rt 可以通过下面的式子得到:

最后,我们将 the new memory vector rt 和 controller hidden state ht 组合,然后产生 the output vector ot for learning classifier.

我们采用 the usage weights wu 来控制写入到 memory。我们通过衰减之前的 state 来更新 the usage weights :

为了计算 the write weights,我们引入一个截断机制 来更新 the least-used positions。此处,我们采用 m(v, n) 来表示 the n-th smallest element of a vector v. 我们采用  a learnable sigmoid gate parameter 来计算之前的 read weights 和 usage weights 的 convex combination:

A larger n results in maintaining a longer term of memory of scarce training data. 跟 LSTM 内部的记忆单元相比,这里的两个参数都可以用来调整 the rate of writing to exernal memory. 这给我们更多的自由来调整模型的更新。公式(12)中输出的隐层状态 ht 可以根据 the write weights 写入到 memory 中:

Answer Reasoning

有了 the hidden state ht 以及 那个外部记忆单元中得到的 the reading memory rt,我们将这两个组合起来,作为当前问题和图片的表达,输入到分类网络中,然后得到答案的分布。

--- Done !

Visual Question Answering with Memory-Augmented Networks的更多相关文章

  1. 论文笔记:Visual Question Answering as a Meta Learning Task

    Visual Question Answering as a Meta Learning Task ECCV 2018 2018-09-13 19:58:08 Paper: http://openac ...

  2. Hierarchical Question-Image Co-Attention for Visual Question Answering

    Hierarchical Question-Image Co-Attention for Visual Question Answering NIPS 2016 Paper: https://arxi ...

  3. 【自然语言处理】--视觉问答(Visual Question Answering,VQA)从初始到应用

    一.前述 视觉问答(Visual Question Answering,VQA),是一种涉及计算机视觉和自然语言处理的学习任务.这一任务的定义如下: A VQA system takes as inp ...

  4. 论文阅读:Learning Visual Question Answering by Bootstrapping Hard Attention

    Learning Visual Question Answering by Bootstrapping Hard Attention Google DeepMind  ECCV-2018   2018 ...

  5. Learning Conditioned Graph Structures for Interpretable Visual Question Answering

    Learning Conditioned Graph Structures for Interpretable Visual Question Answering 2019-05-29 00:29:4 ...

  6. 第八讲_图像问答Image Question Answering

    第八讲_图像问答Image Question Answering 课程结构 图像问答的描述 具备一系列AI能力:细分识别,物体检测,动作识别,常识推理,知识库推理..... 先要根据问题,判断什么任务 ...

  7. 论文:Bottom-Up and Top-Down Attention for Image Captioning and Visual Question Answering-阅读总结

    Bottom-Up and Top-Down Attention for Image Captioning and Visual Question Answering-阅读总结 笔记不能简单的抄写文中 ...

  8. 论文笔记:Heterogeneous Memory Enhanced Multimodal Attention Model for Video Question Answering

    Heterogeneous Memory Enhanced Multimodal Attention Model for Video Question Answering 2019-04-25 21: ...

  9. SalGAN: Visual saliency prediction with generative adversarial networks

    SalGAN: Visual saliency prediction with generative adversarial networks 2017-03-17 摘要:本文引入了对抗网络的对抗训练 ...

随机推荐

  1. Applegate 方法使用

    1. - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotif ...

  2. Java重排序

    重排序数据依赖性 如果两个操作访问同一个变量,且这两个操作中有一个为写操作,此时这两个操作之间就存在数据依赖性.数据依赖分下列三种类型: 名称 代码示例 说明 写后读 a = 1;b = a; 写一个 ...

  3. loadRunner手动关联, web_reg_save_param_regexp()函数正则匹配字符,赋值给变量

    loadRunner写脚本实现登录机票网站,手动关联,获取页面源码中特定字符 手动关联,就是通过函数获取某个步骤生成的字符,赋值给一个变量,这个变量可以作为接下来某个步骤的输入, 以便这个脚本能够在存 ...

  4. 微信小程序制作家庭记账本之六

    第六天,自己根据样本代码做的记账本可实现添加账目,删除账目和消费总和,实机可以测试,但是没有域名,别人无法访问.

  5. CentOS下shell显示-bash-4.1$不显示用户名路径

    Linux CentOS下shell显示-bash-4.1$不显示用户名路径的解决方法. 问题描述: CentOS下新增一个用户,登录进去之后shell脚本的信息如下: -bash-4.1$ \ -b ...

  6. AJAX异步请求,局部刷新

    AJAX异步请求,局部刷新 window.onload=function(){ //dom事件,页面加载完成执行如下函数 doGetObjects(); } function doGetObjects ...

  7. 目标检测论文阅读:Deformable Convolutional Networks

    https://blog.csdn.net/qq_21949357/article/details/80538255 这篇论文其实读起来还是比较难懂的,主要是细节部分很需要推敲,尤其是deformab ...

  8. HTML5 canvas游戏工作原理

    HTML5已经不是一个新名词.它看上去很cool,有很多feature,大多数人普遍看好它的发展.对于我来说,最感兴趣的是它的canvas标签,可以结合Javascript来绘制游戏画面. 我们可以在 ...

  9. Kafka学习笔记之为什么使用Kafka

    在介绍为什么使用kafka之前,我们有必要来了解一下什么是kafka? 0x00 什么是kafka Kafka是由LinkedIn开发的一个分布式的消息系统,使用Scala编写,它以可水平扩展和高吞吐 ...

  10. php实现共享内存进程通信函数之_shm

    前面介绍了php实现共享内存的一个函数shmop,也应用到了项目中,不过shmop有局限性,那就是只支持字符串类型的:sem经过我的测试,是混合型,支持数组类型,可以直接存储,直接获取,少了多余的步骤 ...