【文献阅读】seada-VQA对数据进行对抗增强并保留语义正确性(R. Tang等人,ArXiv,2020)

一、背景

文章题目:《Semantic Equivalent Adversarial Data Augmentation for Visual Question Answering》

文章下载地址https://arxiv.org/pdf/2007.09592.pdf

文章引用格式:Ruixue Tang, Chao Ma, Wei Emma Zhang, Qi Wu, and Xiaokang Yang. "Semantic Equivalent Adversarial Data Augmentation for Visual Question Answering". arXiv preprint, arXiv: 2007.09592, 2020.

项目地址:https://github.com/zaynmi/seada-vqa.

二、文章摘要

Visual Question Answering (VQA) has achieved great success thanks to the fast development of deep neural networks (DNN). On the other hand, the data augmentation, as one of the major tricks for DNN, has been widely used in many computer vision tasks. However, there are few works studying the data augmentation problem for VQA and none of the existing image based augmentation schemes (such as rotation and flipping) can be directly applied to VQA due to its semantic structure - an <image; question; answer> triplet needs to be maintained correctly. For example, a direction related Question-Answer (QA) pair may not be true if the associated image is rotated or flipped. In this paper, instead of directly manipulating images and questions, we use generated adversarial examples for both images and questions as the augmented data. The augmented examples do not change the visual properties presented in the image as well as the semantic meaning of the question, the correctness of the <image; question; answer> is thus still maintained. We then use adversarial learning to train a classic VQA model (BUTD) with our augmented data. We find that we not only improve the overall performance on VQAv2, but also can withstand adversarial attack effectively, compared to the baseline model. The source code is available at https://github.com/zaynmi/seada-vqa.

一方面,数据增强是深度学习中的一个技巧,但是目前并没有这方面的研究应用在VQA的,因为需要同时确保图像和问答的语义正确性。比如,一个关于方向的问答,如果图像做了旋转,那么它很有可能失效。本文作者基于GAN来做一个数据增强。这些增强的样本不会改变他们的视觉属性和问题的语义性。然后将数据增强用在了BUTD算法上,发现基于VQAv2数据集,不仅提高了模型性能,还可以抵挡对抗攻击。

三、文章详细介绍

一般的数据增强方式有两种:图像内容变换(data warping),包括几何、颜色变换,随机擦除,对抗训练,风格迁移;和图像采样(oversampling)。对于VQA的数据增强目前也没有相关工作,这是因为增强的同时还需要维持语义的正确性。

之前的类似工作是基于给定图片和答案,来生成类似问题,这种task叫VQG(Visual Question Generation),之前也读过类似文献(比如【文献阅读】具有循环一致性的鲁棒VQA与数据集VQA-Rephrasings(M. Shah等人,CVPR,2019))。但是这种方法会生成一些奇怪的句子或者存在语法错误。而且使用了和原数据集相同的分布,这样并不会减轻过拟合。

这篇文章作者也提到,尽管有一些类似工作,但是本文还是第一个对VQA中的文本和图像同时增强的。本文主要贡献有3:

- We propose to generate visual and textual adversarial examples to augment the VQA dataset. Our generated data preserve the semantics and explore the learned decision boundary to help improve the model generalization. 提出了一个VQA中图像和文本对抗样本增强的方法。且增强的样本能够保留语义正确性

- We propose an adversarial training scheme that enables VQA models to take advantage of the regularization power of adversarial examples. 提出了一个对抗训练机制。使得VQA能够利用这些对抗样本。

- We show that the model trained with our method achieves 65.16% accuracy on the clean validation set, beating its vanilla training counterpart by 1.84%. Moreover, the adversarially trained model signicantly increases accuracy on adversarial examples by 21.55%. 达到了65.16%的精度,相较于原始模型提升了1.84%。

1. 相关工作

VQA:主要方法有三类,注意力,合成方法,双线性池化。

数据增强:文本增强目前只有少量工作用于分类问题。另有一些工作是对文本添加噪声。虽然VQA中也有少部分相关工作,但是这些工作全都是针对单模态来做的。

对抗攻防:这个重点说一下。大概就是一些工作,给输入的图片增加微小的扰动,但是却可能带来模型参数的巨大变化,导致预测结果不对,添加微小扰动生成的样本一般称之为对抗样本。在NLP领域,本文工作主要灵感来自于SCPN和SEA。一些结果表明,该方法在小数据集上可以提升模型性能,但是在大数据集上反而会降低。在VQA中,考虑过对抗攻击的研究有下面两篇:

  • Sharma, V., Vaibhav, A., Chaudhary, S., Patel, L., Morency, L.: Attend and attack: Attention guided adversarial attacks on visual question answering models (2018)
  • Xu, X., Chen, X., Liu, C., Rohrbach, A., Darrell, T., Song, D.: Fooling vision and language models despite localization and attention mechanism. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. pp. 4951-4961 (2018)

2. 模型

模型结构 如下所示:

这里的baseline采用BUTD模型,图像特征的提取采用Fastert RCNN。上图表示了模型的大致思路:对于给定的IQA,先生成一个问题的解释并保存,然后根据该解释生成对抗样本。

(1)数据增强

考虑到图像变化可能会对答案产生影响,因此这里尽可能的不会直接对图像做变换,比如旋转。

对抗样本生成:主要目的是对输入数据增加少量扰动,来产生错误结果。这里作者使用基于梯度的攻击方法IFGSM(Iterative Fast Gradient Sign Method),以生成对抗样本。

语义保留:上述方法不能直接用于生成对抗样本,主要是因为文本是离散的,另外Lp范数自然也就不合适。此外,文本中的个别单词的改变也会改变其语义。因此作者采用了句子到句子的解释模型sequence-to-sequence paraphrasing model。盖默星基于自编码的自然机器翻译框架(Neural Machine Translation)(模型代码参见https://github.com/OpenNMT/OpenNMT-py),RNN编码器将源句子编码为一个向量,条件RNN解码器逐字生成目标语句。模型的损失函数用的softmax。

最终一些生成的对抗样本如下所示,括号里的代表语义一致性的得分:

(2)利用增强的样本进行对抗训练

这里主要就是训练过程的一些参数,比如loss函数包含了4部分。算法最终的伪代码如下:

3. 实验

整体的数据集基于VQAv2,模型基于BUTD。在验证集上的总体表现大约提升了1.8%个百分点。与其他模型的比较结果:

四、小结

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

全部梭哈迟早暴富

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值