Robustness Analysis of Visual QA Models by Basic Questions
Jia-Hong Huang

Modar Alfadly

Bernard Ghanem

King Abdullah University of Science and Technology (KAUST), Saudi Arabia

arXiv:1709.04625v2 [cs.CV] 17 Nov 2017

{jiahong.huang, modar.alfadly, bernard.ghanem}@kaust.edu.sa

Abstract
Visual Question Answering (VQA) models should have both
high robustness and accuracy. Unfortunately, most of the current VQA research only focuses on the accuracy because
there is a lack of proper methods to measure the robustness
of VQA models. There are two main modules in our algorithm. Given a natural language question about an image, the
first module takes the question as input and then outputs the
ranked basic questions, with similarity scores, of the main
given question. The second module takes the main question,
image and these basic questions as input and then outputs the
text-based answer of the main question about the given image. We claim that a robust VQA model is one, whose performance is not changed much when related basic questions
as also made available to it as input. We formulate the basic questions generation problem as a LASSO optimization,
and also propose a large scale Basic Question Dataset (BQD)
and Rscore (novel robustness measure), for analyzing the robustness of VQA models. We hope our BQD will be used as
a benchmark for to evaluate the robustness of VQA models,
so as to help the community build more robust and accurate
VQA models.

1

Introduction

Visual Question Answering (VQA) is a challenging and
young research field, which can help machines achieve one
of the ultimate goals in computer vision, holistic scene understanding (Yao, Fidler, and Urtasun 2012). VQA is a
computer vision task: a system is given an arbitrary textbased question about an image, and then tasked to output the text-based answer of the given question about the
image. Currently, most of the state-of-the-art VQA models (Antol et al. 2015; Chen et al. 2016; Lu et al. 2016;
Ben-younes et al. 2017; Fukui et al. 2016; Kim et al. 2017)
only focus on how to improve accuracy. However, accuracy
is not the only metric to score a given VQA model. Robustness is also a crucial property. For the image part, there
is already a rapidly growing research on evaluating the robustness of deep learning models (Fawzi, Moosavi Dezfooli,
and Frossard 2017; Carlini and Wagner 2017; Xu, Caramanis, and Mannor 2009). However, for the question part, we
couldn’t find any acceptable method to measure the robustness of VQA algorithms after extensive literature review. To
Copyright c 2018, Association for the Advancement of Artificial
Intelligence (www.aaai.org). All rights reserved.

Figure 1: Visual Question Answering by Basic Questions
(VQABQ) working pipeline. Note that all of the training and
validation questions are only encoded by Skip-Thoughts one
time for generating the basic question matrix. That is, the
next input of Skip-Thoughts is only the new main question.
Regarding the input question of Module 2, it is the direct
concatenation of a given main question with 3 basic questions of the main question. Here, ”⊕” denotes the direct concatenation of basic questions.
the best of our knowledge, this paper is the first work to analyze the robustness of VQA models.
When we directly add or replace some words or phrases
by similar words or phrases to the given main question, the
VQA model should output the same or a very similar answer. In some sense, we can consider the similar words or
phrases as small perturbation or noise to the input. If the
model can output the same answer as before in the presence
of small noise, we can say that the model is robust. Moreover, if a human is presented with only the main question
or the main question accompanied with some highly similar questions to the main question (called basic questions of
the main question), he/she tends to produce the same or a
highly similar answer in both cases. Based on this observation, we consider the basic question of given main question
as noise to the given main question. That is to say, a basic
question with larger similarity score to the main question is
considered smaller noise to the main question and a basic
question with smaller similarity score is larger noise to the
main question.

The above interesting concepts inspire us to propose a
method, Visual Question Answering by Basic Questions
(VQABQ) illustrated in Figure 1, to measure the robustness of VQA models. In the VQABQ model, there are two
modules: the basic question generation module (Module 1)
and the visual question answering module (Module 2). We
take the query question, called the main question (MQ),
encoded by Skip-Thought Vectors (Kiros et al. 2015), as
the input of Module 1. In Module 1, we encode all of the
questions, also by Skip-Thought Vectors, from the training
and validation sets of VQA (Antol et al. 2015) dataset as
a 4800 by 186027 dimension basic question (BQ) matrix,
and then solve the LASSO optimization problem (Huang,
Alfadly, and Ghanem 2017), with MQ, to find the top 3
similar BQ of MQ. These BQ are the output of Module 1.
Moreover, we take the direct concatenation of MQ and BQ
and the given image as the input of Module 2, the general
VQA module, and then it will output the answer prediction of MQ. We claim that the BQ of given MQ can be
considered as the small noise of MQ and it will affect the
accuracy of VQA model. Then, we verify the above claim
by the detailed experiments and use the VQABQ method
to analyze the robustness of 6 available pretrained stateof-the-art VQA models, provided by papers’ authors, (Antol et al. 2015; Lu et al. 2016; Ben-younes et al. 2017;
Fukui et al. 2016; Kim et al. 2017). Note that the available
pretrained VQA models can be categorized into two main
categories, attention-based and non-attention-based VQA
models. According to the results of our experiments, we discover that attention-based models not only have the higher
accuracy but also the better robustness compared with nonattention-based models. In this work, our main contributions
are summarized below:
• We propose a new method to generate the basic questions
of the given main question and utilize these basic questions to analyze the robustness of 6 available pretrained
state-of-the-art VQA models.
• Also, we propose a novel large scale Basic Question
Dataset (BQD) generated by our basic question generation algorithm and demonstrate how to use it with our
Rscore (novel robustness measure) for the robustness
analysis of VQA models.
• According to our experiments, we also discover that
attention-based mechanism not only can help the accuracy but also the robustness of VQA models.
The rest of this paper is organized as the following. We first
review the related work in Section 2. In Section 3, we discuss
the detailed methodology and shortly introduce the proposed
basic question dataset. Finally, the experimental results are
demonstrated in Section 4.

2

Related Work

Recently, many papers (Antol et al. 2015; Shih, Singh, and
Hoiem 2016; Chen et al. 2016; Kafle and Kanan 2016;
Ma, Lu, and Li 2016; Ren, Kiros, and Zemel 2015; Zhu et al.
2016; Wu et al. 2016; Lu et al. 2016; Ben-younes et al. 2017;
Fukui et al. 2016; Kim et al. 2017) have proposed methods

to solve the challenging VQA task. Our VQABQ method involves in different areas in Machine Learning, Natural Language Processing (NLP) and Computer Vision. The following, we discuss recent works related to our approach.
Sequence Modeling by Recurrent Neural Networks.
Recurrent Neural Networks (RNN) can handle the sequences of flexible length. Long Short Term Memory
(LSTM) (Hochreiter and Schmidhuber 1997) is a particular
variant of RNN and in natural language tasks, such as machine translation (Sutskever, Vinyals, and Le 2014; Cho et
al. 2014), LSTM is a successful application. In (Ren, Kiros,
and Zemel 2015), they exploit RNN and Convolutional Neural Network (CNN) to build a question generation algorithm,
but the generated question sometimes has invalid grammar. The input in (Malinowski, Rohrbach, and Fritz 2015;
2017) is the concatenation of each word embedding with the
same feature vector of the image. (Gao et al. 2015) encodes
the input question sentence by LSTM and join the image
feature to the final output. (Ma, Lu, and Li 2016) groups the
neighboring word and image feature by doing convolution.
In (Noh, Hongsuck Seo, and Han 2016), the question is encoded by Gated Recurrent Unit (GRU) (Chung et al. 2014)
similar to LSTM and they also introduce a dynamic parameter layer in CNN whose weights are adaptively predicted by
the encoded question feature.
Sentence Encoding.
In order to analyze the relationship among words, phrases
and sentences, several works, such as (Pennington, Socher,
and Manning 2014; Kiros et al. 2015; Mikolov et al. 2013),
proposed methods about how to map text into vector space.
After we have the vector representation of text, we can
exploit the vector analysis skill to analyze the relationship among text. (Pennington, Socher, and Manning 2014;
Mikolov et al. 2013) try to map words to vector space, and
if the words share common contexts in the corpus, their encoded vectors will close to each other in the vector space. In
(Kiros et al. 2015), they proposed a framework of encoderdecoder models, called skip-thoughts. In this model, they exploit an RNN encoder with GRU activations (Chung et al.
2014) and an RNN decoder with a conditional GRU (Chung
et al. 2014). Because skip-thoughts model emphasizes more
on whole sentence encoding, in our work, we encode the
whole question sentences into vector space by skip-thoughts
model and use these skip-thought vectors to do further analysis of question sentences.
Image Captioning.
In some sense, VQA is related to image captioning (Xu
et al. 2015; Karpathy and Fei-Fei 2015; Vinyals et al. 2015;
Fang et al. 2015). (Fang et al. 2015) used a language model
to combine a set of possible words detected in several
regions of the image and generate image description. In
(Vinyals et al. 2015), they used CNN to extract the high-level
image features and considered them as the first input of the
recurrent network to generate the caption of the image. (Xu
et al. 2015) proposed an algorithm to generate one word at a
time by paying attention to local image regions related to the
currently predicted word. In (Karpathy and Fei-Fei 2015),
their deep neural network can learn to embed language and

visual information into a common multimodal space. However, the current image captioning algorithms only can generate the rough description of an image and there is no so
called proper metric to evaluate the quality of image caption
, even though BLEU (Papineni et al. 2002) can be used to
evaluate the image caption.
Attention-based VQA.
There are several VQA models that have the ability to
focus on specific image regions related to the input question by integrating the image attention mechanism (Shih,
Singh, and Hoiem 2016; Chen et al. 2016; Yang et al. 2016;
Li and Jia 2016). In (Li and Jia 2016), in the pooling step,
they exploited an image attention mechanism to help determine the relevance of original questions and updated ones.
Before (Lu et al. 2016), no work applied language attention
mechanism to VQA, but the researchers in NLP they had
modeled language attention. In (Lu et al. 2016), they proposed a co-attention mechanism that jointly performs language attention and image attention. Because both question
and image information are important in VQA, adding the
co-attention mechanism in VQA models is very reasonable
and intuitive. According to our experimental results, (Lu et
al. 2016) is the state-of-the-art VQA model in robustness.
Multiple Modalities Fusion Strategies in VQA.
Because VQA task contains the image and text features, it
is a kind of multimodal feature fusion tasks. Recently, there
are some works (Kiros, Salakhutdinov, and Zemel 2014;
Ben-younes et al. 2017; Fukui et al. 2016; Kim et al. 2017;
Lin, RoyChowdhury, and Maji 2015) focus on modeling
the interactions between two embedding spaces. (Kiros,
Salakhutdinov, and Zemel 2014; Lin, RoyChowdhury, and
Maji 2015) show that bilinear interactions can have great
success in deep learning for multimodal language modeling and fine-grained classification. In (Fukui et al. 2016),
Multimodal Compact Bilinear (MCB) pooling uses an outer
product between textural and visual embeddings. (Kim et al.
2017), Multimodal Low-rank Bilinear (MLB) pooling, exploits a tensor to parametrize the full bilinear interactions
between image and question spaces. The newest state-ofthe-art VQA work, (Ben-younes et al. 2017), can efficiently
parametrize bilinear interactions between visual and textual
representations and the authors prove that MCB and MLB
are the special cases of (Ben-younes et al. 2017).

3

Methodology

In Section 3, we mainly discuss how to encode questions
and generate BQ and how do we exploit BQ to do robustness analysis on the 6 available state-of-the-art VQA models. The overall architecture of our VQABQ model can be
referred to Figure 1. The model has two main parts, Module
1 and Module 2. Regarding Module 1, it will take the encoded MQ as the input and uses the encoded BQ matrix to
output the BQ of query question. Then, Module 2 is a VQA
model we want to analyze, and it will take the concatenation
of the output of Module 1 and MQ, and the given image as
input and then outputs the final answer of MQ. The detailed
architecture of Module 1 also can be referred to Figure 1.
Question Data Preprocessing

We take the most popular VQA dataset (Antol et al. 2015)
to develop our BQD. At the beginning, we take all of the
training and validation questions from the VQA dataset (Antol et al. 2015) to be our basic question candidates. Then,
we take all of the testing questions from the VQA dataset
(Antol et al. 2015) to be our main question candidates. That
is to say, our main question candidates and the number of
main question candidates are exactly the same as the testing
question set of VQA dataset (Antol et al. 2015). Because we
model the basic question generation problem by LASSO,
we remove the repeated basic question candidate and the basic question candidate exactly the same as any main question
candidate. The above step guarantees that our LASSO can
work well.
Question Encoding
There are many popular text encoders, such as Word2Vec
(Mikolov et al. 2013), GloVe (Pennington, Socher, and Manning 2014) and Skip-Thoughts (Kiros et al. 2015). In these
encoders, Skip-Thoughts not only can focus on the word-toword meaning but also the whole sentence semantic meaning. So, we choose Skip-Thoughts to be our question encoding method. In Skip-Thoughts model, it uses an RNN
encoder with GRU (Chung et al. 2014) activations, and then
we use this encoder to map an English sentence into a vector. Regarding GRU, it has been shown to perform as well as
LSTM (Hochreiter and Schmidhuber 1997) on the sequence
modeling applications but being conceptually simpler because GRU units only have 2 gates and do not need the use
of a cell.
Question Encoder. Let wi1 , ..., wiN be the words in question
si and N is the total number of words in si . Note that wit
denotes the t-th word for si and xti denotes its word embedding. The question encoder at each time step generates
a hidden state hti . It can be considered as the representation
of the sequence wi1 , ..., wit . So, the hidden state hN
i can represent the whole question. For convenience, here we drop
the index i and iterate the following sequential equations to
encode a question:
rt = σ(Ur ht−1 + Wr xt )
(1)
zt = σ(Uz ht−1 + Wz xt )
t

h̄ = tanh(U(r
t

t

t

t

t−1

h

t

(2)
t

) + Wx )
t−1

(3)

h = z
h̄ + (1 − z ) h
(4)
, where Ur , Uz , Wr , Wz , U and W are the matrices of
weight parameters. h̄t is the state update at time step t, rt
is the reset gate, denotes an element-wise product and zt
is the update gate. These two update gates take the values
between zero and one.
Problem Formulation
Our idea is the BQ generation for MQ and, at the same
time, we only want the minimum number of BQ to represent
the MQ, so modeling our problem as LASSO optimization
problem is an appropriate way:
1
2
(5)
min kAx − bk2 + λ kxk1
x
2
, where A is the matrix of encoded BQ, b is the encode MQ
and λ is a parameter of the regularization term.

Task Type
Method
Test Set
Partition
First-dev
Second-dev
Third-dev
Fourth-dev
Fifth-dev
Sixth-dev
Seventh-dev
First-std
Original-dev
Original-std

Other
29.24
28.02
26.32
25.27
24.73
23.90
22.74
29.68
43.40
43.90

Open-Ended
LSTM Q+I
dev
Num
Y/N
All
33.77 65.14 44.47
32.73 62.68 42.75
33.10 60.22 40.97
31.70 61.56 40.86
32.63 61.55 40.70
32.14 61.42 40.19
31.36 60.60 39.21
33.76 65.09 44.70
36.46 80.87 58.02
36.67 80.38 58.18

diff
All
13.55
15.27
17.05
17.16
17.32
17.83
18.81
13.48
-

Task Type
Method
Test Set
Partition
First-dev
Second-dev
Third-dev
Fourth-dev
Fifth-dev
Sixth-dev
Seventh-dev
First-std
Original-dev
Original-std

Other
44.44
42.62
41.60
41.09
39.83
39.60
38.33
44.77
49.14
49.15

Open-Ended
HieCoAtt (Alt,VGG19)
dev
Num
Y/N
All
37.53 71.11 54.63
36.68 68.67 52.67
35.59 66.28 51.08
35.71 67.49 51.34
35.55 65.72 49.99
35.99 66.56 50.27
35.47 64.89 48.92
36.08 70.67 54.54
38.35 79.63 60.48
36.52 79.45 60.32

diff
All
5.85
7.81
9.4
9.14
10.49
10.21
11.56
5.78
-

Table 1: LSTM Q+I model evaluation results on BQD and
VQA dataset (Antol et al. 2015). ”-” indicates the results
are not available, ”-std” means the accuracy of VQA model
evaluated on the complete testing set of BQD and VQA
dataset and ”-dev” means the accuracy of VQA model evaluated on the partial testing set of BQD and VQA dataset.
In addition, dif f = OriginaldevAll − XdevAll , where X is
equal to ”First”, ”Second”,..., ”Seventh”.

Table 2: HieCoAtt model evaluation results on BQD and
VQA dataset (Antol et al. 2015). ”-” indicates the results
are not available, ”-std” means the accuracy of VQA model
evaluated on the complete testing set of BQD and VQA
dataset and ”-dev” means the accuracy of VQA model evaluated on the partial testing set of BQD and VQA dataset.
In addition, dif f = OriginaldevAll − XdevAll , where X is
equal to ”First”, ”Second”,..., ”Seventh”.

Basic Question Generation
We now describe how to generate the BQ of a query question, illustrated in Figure 1. According to the above subsections, Question Encoding and Problem Formulation, we
can encode all basic question candidates from the training
and validation question sets of VQA dataset (Antol et al.
2015) by Skip-Thought Vectors, and then we have a matrix of basic question candidates. Each column of the matrix
is a vector representation, 4800 by 1 dimensions, of a specific basic question candidate and we have 186027 columns.
That is, the dimension of BQ matrix, called A, is 4800 by
186027. Also, we encode the given query question as a column vector, 4800 by 1 dimensions, by Skip-Thought Vectors, called b. Regarding the selection of the parameter, λ,
we will discuss this in Section 4. Now, we can solve the
LASSO optimization problem, mentioned in the above subsection of Problem Formulation, to get the solution, x. Here,
we consider the elements of the solution vector, x, as the
similarity score of the corresponding BQ in the BQ matrix,
A. The first element of x corresponds to the first column,
i.e. the first BQ, of A. Then, we rank all of the similarity scores in x and pick up the top 21 large weights with
corresponding BQ to be the ranked BQ of the given query
question. Intuitively, if a BQ has a larger similarity score to
the given MQ, then this BQ can be considered as a question more similar to the given MQ. Finally, we find the
ranked BQ of all 244302 testing questions from the testing
question set of VQA dataset (Antol et al. 2015) and collect
them together, with the format {Image, M Q, 21 (BQ +
corresponding similarity score)}, as our Basic Question
Dataset (BQD).
Basic Question Dataset
We propose a novel large scale dataset, called Basic
Question Dataset (BQD), for robustness analysis of VQA
models. BQD is the first basic question dataset generated

by our basic question generation algorithm. Regarding the
BQD, the dataset format is {Image, M Q, 21 (BQ +
corresponding similarity score)}. All of our 81434 images are from the testing images of MS COCO dataset (Lin
et al. 2014), all of our 244302 main questions (MQ) are exactly same as the testing questions of VQA dataset (openended task) (Antol et al. 2015), the basic questions (BQ) are
from the training and validation questions of VQA dataset
(open-ended task) (Antol et al. 2015), and the corresponding
similarity scores of BQ are generated by our basic question
generation method, referring to Section 3. Note that we preprocess the training and validation question datasets from
the VQA dataset (Antol et al. 2015), so the total number
of basic question candidates is less than the total number
of training and validation question datasets in VQA dataset
(Antol et al. 2015). In BQD, we have 81434 images, 244302
MQ and 5130342 (BQ + corresponding similarity score).
Furthermore, we exploit the BQD to do robustness analysis of the 6 available pretrained state-of-the-art VQA models
(Antol et al. 2015; Lu et al. 2016; Ben-younes et al. 2017;
Fukui et al. 2016; Kim et al. 2017) in the next subsection.
Robustness Analysis by Basic Questions
To measure the robustness of any model, we should evaluate it on clean and noisy input and compare the performance. The noise can be completely random, have a specific structure and/or be semantically relevant to the final
task. For VQA the input is an image question pair and
therefore the noise should be introduced to both. The noise
to the question shouldn’t be random and it should have
some contextual semantics for the measure to be informative. For the image part, there is already a rapidly growing research on evaluating the robustness of deep learning models (Fawzi, Moosavi Dezfooli, and Frossard 2017;
Carlini and Wagner 2017; Xu, Caramanis, and Mannor
2009). However, for the question part, we couldn’t find any

Task Type
Method
Test Set
Partition
First-dev
Second-dev
Third-dev
Fourth-dev
Fifth-dev
Sixth-dev
Seventh-dev
First-std
Original-dev
Original-std

Other
37.78
37.29
34.81
34.25
33.89
33.15
32.80
38.24
47.16
47.57

Open-Ended
MUTAN without Attention
dev
Num
Y/N
All
34.93 68.20
49.96
35.03 65.62
48.67
34.39 62.85
46.27
34.29 63.60
46.30
34.66 64.19
46.41
34.68 64.59
46.22
33.99 63.59
45.57
34.54 67.55
49.93
37.32 81.45
60.16
36.75 81.56
60.45

diff
All
10.20
11.49
13.89
13.86
13.75
13.94
14.59
10.52
-

Task Type
Method
Test Set
Partition
First-dev
Second-dev
Third-dev
Fourth-dev
Fifth-dev
Sixth-dev
Seventh-dev
First-std
Original-dev
Original-std

Other
51.51
49.86
49.15
47.96
47.20
46.48
46.88
51.34
56.73
56.29

Open-Ended
MUTAN with Attention
dev
Num
Y/N
All
35.62 68.72 56.85
34.43 66.18 54.88
34.50 64.85 54.00
34.26 64.72 53.35
33.93 64.53 52.88
33.90 64.37 52.46
33.13 64.10 52.46
35.22 68.32 56.66
38.35 84.11 65.98
37.47 84.04 65.77

diff
All
9.13
11.10
11.98
12.63
13.10
13.52
13.52
9.11
-

Table 3: MUTAN without Attention model evaluation results
on BQD and VQA dataset (Antol et al. 2015). ”-” indicates
the results are not available, ”-std” means the accuracy of
VQA model evaluated on the complete testing set of BQD
and VQA dataset and ”-dev” means the accuracy of VQA
model evaluated on the partial testing set of BQD and VQA
dataset. In addition, dif f = OriginaldevAll − XdevAll ,
where X is equal to ”First”, ”Second”,..., ”Seventh”.

Table 4: MUTAN with Attention model evaluation results on
BQD and VQA dataset (Antol et al. 2015). ”-” indicates the
results are not available, ”-std” means the accuracy of VQA
model evaluated on the complete testing set of BQD and
VQA dataset and ”-dev” means the accuracy of VQA model
evaluated on the partial testing set of BQD and VQA dataset.
In addition, dif f = OriginaldevAll − XdevAll , where X is
equal to ”First”, ”Second”,..., ”Seventh”.

acceptable method to measure the robustness of visual question answering algorithms after extensive literature review.
Here we propose a novel robustness measure for VQA by introducing semantically relevant noise to the questions where
we can control the strength of noisiness.
First, we measure the accuracy of the model on the clean
VQA dataset (Antol et al. 2015) and we call it Accvqa . Then,
we append the top ranked k BQs to each of the MQs in the
clean dataset and recompute the accuracy of the model on
this noisy input and we call it Accbqd . Finally, we compute
the absolute difference Accdif f = |Accvqa − Accbqd | and
we report the robustness score Rscore .

 

q
Accdif f
,0
m

 max 1 −
q
, 1
Rscore = min 
 (6)

t
1− m

for validation and 244302 for testing. In the VQA dataset,
each question is associated with 10 answers annotated by
different people from Amazon Mechanical Turk (AMT).
About 98% of answers do not exceed 3 words and 90% of
answers have single words. Note that we only develop our
work on the open-ended case in VQA dataset because it is
the most popular task and we also think the open-ended task
is closer to the real situation than multiple-choice one.
Setup
In our LASSO model, we use λ = 10−6 to be our parameter and in the later subsection, we will discuss how the
λ affects the quality of BQ. Furthermore, although we rank
all of the basic question candidates for each MQ, we only
collect top 21 BQ to put into our BQD. The most important
reason is that the similarity scores are too small after twentyfirst BQ. Regarding the limit of number of words of question
input, for most of available pretrained state-of-the-art VQA
models they are trained under the condition maximum number of words of input 26 words. Based on the above limitation, we divide each 21 ranked BQs into 7 partitions to do
detailed analysis, referring Table 1 to Table 5, because the
total number of words of each MQ with 3 BQs is less than
or equal to 26 words.
Evaluation Metrics
VQA dataset provides multiple-choice and open-ended
task for evaluation. Regarding open-ended task, the answer
can be any phrase or word. However, in the multiple-choice
task, an answer should be chosen from 18 candidate answers. For both cases, answers are evaluated by accuracy
which can reflect human consensus. The accuracy is given
by the following:
P

N
1 X
t∈Ti I[ai = t]
(7)
min
,1
AccuracyV QA =
N i=1
3
, where N is the total number of examples, I[·] denotes an
indicator function, ai is the predicted answer and Ti is an

,where 0 ≤ t < m ≤ 100. The parameters t and m are the
tolerance and the maximum robustness limit, respectively,
i.e., the robustness score Rscore decreases smoothly between
1 and 0 as Accdif f moves from t to m and remain constant
out side this range. The rate of change of this transition is exponentially decreasing from exponential to sublinear in the
range [t, m]. The reasoning behind this is that we want the
score to be sensitive if the difference is small, but not before
t, and less sensitive if it is large, but not after m.

4

Experiment

In Section 4, we describe the details of our implementation
and experimental results of the proposed method.
Datasets
We conduct our experiments on BQD and VQA (Antol et
al. 2015) dataset. VQA dataset is based on the MS COCO
dataset (Lin et al. 2014) and it contains a large number of
questions. There are questions, 248349 for training, 121512

Task Type
Method
Test Set
Partition
First-dev
Second-dev
Third-dev
Fourth-dev
Fifth-dev
Sixth-dev
Seventh-dev
First-std
Original-dev
Original-std

Other
49.31
48.53
48.01
47.20
45.85
44.61
44.71
49.07
57.01
56.60

Open-Ended
MLB with Attention
dev
Num
Y/N
All
34.62 72.21 57.12
34.84 70.30 55.98
33.95 69.15 55.16
34.02 69.31 54.84
34.07 68.95 54.05
34.30 68.59 53.34
33.84 67.76 52.99
34.13 71.96 56.95
37.51 83.54 65.79
36.63 83.68 65.68

diff
All
8.67
9.81
10.63
10.95
11.74
12.45
12.80
8.73
-

Table 5: MLB with Attention model evaluation results on
BQD and VQA dataset (Antol et al. 2015). ”-” indicates the
results are not available, ”-std” means the accuracy of VQA
model evaluated on the complete testing set of BQD and
VQA dataset and ”-dev” means the accuracy of VQA model
evaluated on the partial testing set of BQD and VQA dataset.
In addition, dif f = OriginaldevAll − XdevAll , where X is
equal to ”First”, ”Second”,..., ”Seventh”.
answer set of the ith example. That is, a predicted answer is
considered as a correct one if at least 3 annotators agree with
it and the score depends on the total number of agreements
when the predicted answer is not correct.
Results and Analysis
We describe final results and analysis by the following:
i.) Are The Rankings of BQs Effective? The answer is
yes. According to the Figure 2, we divide the top 21 ranked
BQs into 7 partitions and each partition contains 3 ranked
BQs and the accuracy is decreasing from the first partition
to the seventh partition. Moreover, based on Figure 3, we
can discover that the difference of accuracy of VQA models
is increasing from the first partition to the seventh partition.
These trends imply that the similarity of BQs to the given
MQ is decreasing from the first partition to the seventh partition. That is to say, the noise strength is increasing from the
first partition to the seventh partition because we assume that
a BQ with lower similarity score to the given MQ means the
BQ is a larger noise for the given MQ. Based on the Figure
2 and Figure 3, we can say the rankings are effective.
ii.) Who Can Affect The Quality of BQs? In our model,
λ is one of the most important factors to affect the quality
of BQ. Note that if a BQ can have highly enough similarity score and provide enough extra useful information to a
given MQ, then we say that the BQ has the well enough
quality. We discover that when λ is greater than 10−5 or less
than 10−6 , the quality of BQ is obviously not good based on
the common sense knowledge. However, if we compare the
quality of BQ of λ equal to 10−5 with λ equal to 10−6 , we
think the BQ quality of λ equal to 10−6 is slightly better than
λ equal to 10−5 based on our common sense knowledge.
We will put some randomly selected BQ examples from our
BQD in the supplementary material for references. Note that
we use the state-of-the-art question encoder, skip-thoughts
(Kiros et al. 2015), to encode all questions.

Figure 2: The accuracy of state-of-the-art VQA models evaluated on BQD and VQA dataset (Antol et al. 2015). Note
that we divide the top 21 ranked BQs into 7 partitions and
each partition contains 3 ranked BQs. Here, ”First top 3”
means the first partition, ”Second top 3” means the second
partition,..., and ”Seventh top 3” means the seventh partition.
Model
Rscore

LQI
0.19

HAV
0.48

HAR
0.45

MU
0.30

MUA
0.34

MLB
0.36

Table 6: Rscore of state-of-the-art VQA models. Note that
LQI means LSTM Q+I, HAV means HieCoAtt-AlternatingVGG19, HAR means HieCoAtt-Alternating-Res200, MU
means MUTAN without Attention, MUA means MUTAN
with Attention and MLB means MLB with Attention. Here,
our Rscore parameters are (t, m) = (0.05, 20).
iii.) Which One Is The Most Robust VQA Model? According to Table 6, there are two categories, attention-based
and non-attention-based, of VQA models. We can discover
that attention-based VQA models are more robust than nonattention-based VQA models. Furthermore, the only difference between MU and MUA is the attention mechanism.
Based on the above observation, we can say that attention
mechanism can help robustness. Finally, we also can discover that HieCoAtt (Lu et al. 2016) is the most robust VQA
model. In addition, when we compare HAV with HAR, the
only difference between them is using the different neural
networks to extract image features. Although using Resnet200 instead of VGG-19 can help the accuracy of HieCoAtt
VQA model (Lu et al. 2016), it reduces the robustness of the
model. We conjecture that if a convolutional neural network
is too deep, it probably can harm the robustness of VQA
models. In the next subsection, we will do further analysis
on the most robust HieCoAtt VQA model (Lu et al. 2016).
iv.) Can Basic Questions Directly Help Accuracy? According to Table 6, we know that HieCoAtt (Lu et al. 2016)
is the robustness VQA model. We want to do more advanced
analysis on this model, so we claim that if the quality of
BQs are well enough, then even we use the naive concate-

Algorithm 1 Basic Question Concatenation
Note that s1, s2, s3 are thresholds we can choose.
1: if score1 >s1
2:
Append BQ1 with the largest score
3:
if score2/score1 >s2
4:
Append BQ2 with the second large score
5:
if score3/score2 >s3
6:
Append BQ3 with the third large score
Table 8: Note that appending BQ means doing the concatenation with MQ.
Opend-Ended Case (Total: 244302 questions)
0 BQ
1 BQ
2 BQ
3 BQ
(96.84%) (3.07%) (0.09%) (0.00%)
# Q 236570
7512
211
9

Figure 3: The accuracy decrement of state-of-the-art VQA
models evaluated on BQD and VQA dataset (Antol et al.
2015). Note that we divide the top 21 ranked BQs into 7
partitions and each partition contains 3 ranked BQs. Here,
”First top 3” means the first partition, ”Second top 3” means
the second partition,..., and ”Seventh top 3” means the seventh partition.
avg
std

score1
0.33
0.20

score2/score1
0.61
0.27

score3/score2
0.73
0.21

Table 7: ”avg” denotes average and ”std” denotes standard
deviation.
nation, i.e. direct concatenation, method to concatenate MQ
and BQs, it still can directly help the accuracy of VQA models. For justifying our claim, we propose a thresholding criterion, referring to Table 8, to select the BQ with good quality.
v.) Basic Question Concatenation. In this subsection,
we propose a thresholding criterion to select the BQ
with good quality. In BQD, each MQ has 21 corresponding BQ with scores. We can have the following format,
{M Q, (BQ1, score1), ..., (BQ21, score21)}, and these
scores are all between 0 and 1 with the following order:
score1 ≥ score2 ≥ ... ≥ score21

(8)

and we define 3 thresholds, s1, s2 and s3. Note that, for convenience, we only take the top 3 BQs to do selection because
our BQs are ranked. Moreover, we compute the following 3
averages (avg) and 3 standard deviations (std) to score1,
score2/score1 and score3/score2, respectively, and then
use avg ± std, referring to Table 7, to be the initial estimation of proper thresholds. The BQ utilization process can be
explained as the Table 8.
Does BQ can directly help accuracy? The answer probably is yes. In our experiment, we use the avg ± std, referring to Table 7, to be the initial guess of proper thresholds
of s1, s2 and s3. We discover that when s1 = 0.60, s2 = 0.58
and s3 = 0.41, we can get the BQs, referring to Table 9,

Table 9: The number of BQs are appended. Here, ”X BQ”
means X BQs are appended by MQ, where X = 0, 1, 2, 3,
and ”# Q” denoted the number of questions.
who can directly help accuracy with the naive concatenation
method. Accordingly to the Table 9, 96.84% of testing questions from VQA dataset cannot find the proper basic questions to help the accuracy by naive concatenation method.
Although we only have 3.16% of testing questions can benefit from the basic questions, our method still can improve
the state-of-the-art accuracy (Lu et al. 2016) from 60.32%
to 60.34%, referring to supplementary material. Then, we
have 244302 testing questions, so that means the number of
correctly answering questions of our method is more than
state-of-the-art method 49 questions. In other words, if we
have well enough basic question dataset, we can increase
accuracy more, especially in the counting-type question, referring to supplementary material. We conjecture that because the Co-Attention Mechanism is good at localizing, the
counting-type question is improved more than others. Accordingly, based on our experiment, we believe that basic
questions with well enough quality can directly help accuracy by only using the naive concatenation method.

5

Conclusion and Future Work

In this paper, we propose a novel VQABQ method and Basic Question Dataset (BQD) for robustness analysis of VQA
models. The VQABQ method has two main modules, Basic
Question Generation Module and VQA Module. The former
one can generate the basic questions for the query question,
and the latter one can take an image, basic and query questions as the input and then output the text-based answer of
the query question about the given image. Furthermore, we
can use the proposed BQD, Rscore and VQA dataset (Antol
et al. 2015) to measure the robustness of VQA models.
According to previous state-of-the-art VQA methods,
most of them get the highest accuracy in the Yes/No-type
question. Accordingly, how to effectively only exploit the
Yes/No-type basic questions to do VQA will be an interesting work. Furthermore, how to build a VQA model with high
robustness and accuracy at the same time will be also an interesting research direction. The above future works will be

our next research focus.

Acknowledgement
This work is supported by competitive research funding
from King Abdullah University of Science and Technology
(KAUST) and the High Performance Computing Center in
KAUST. Also, we would like to acknowledge Fabian Caba,
Humam Alwassel and Adel Bibi. They always provide helpful discussion about this work.

References
Antol, S.; Agrawal, A.; Lu, J.; Mitchell, M.; Batra, D.;
Lawrence Zitnick, C.; and Parikh, D. 2015. Vqa: Visual question
answering. In Proceedings of the IEEE International Conference
on Computer Vision, 2425–2433.
Ben-younes, H.; Cadene, R.; Cord, M.; and Thome, N. 2017. Mutan: Multimodal tucker fusion for visual question answering. arXiv
preprint arXiv:1705.06676.
Carlini, N., and Wagner, D. 2017. Towards evaluating the robustness of neural networks. In Security and Privacy (SP), 2017 IEEE
Symposium on, 39–57. IEEE.
Chen, K.; Wang, J.; Chen, L.-C.; Gao, H.; Xu, W.; and Nevatia, R.
2016. Abc-cnn: An attention based convolutional neural network
for visual question answering. In Computer Vision and Pattern
Recognition Workshop (CVPRW) 2016. IEEE Conference on.
Cho, K.; van Merrienboer, B.; Gulcehre, C.; Bougares, F.;
Schwenk, H.; and Bengio, Y. 2014. Learning phrase representations using rnn encoder-decoder for statistical machine translation. In Conference on Empirical Methods in Natural Language
Processing.
Chung, J.; Gulcehre, C.; Cho, K.; and Bengio, Y. 2014. Empirical
evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555.
Fang, H.; Gupta, S.; Iandola, F.; Srivastava, R. K.; Deng, L.; Dollár,
P.; Gao, J.; He, X.; Mitchell, M.; Platt, J. C.; et al. 2015. From
captions to visual concepts and back. In Proceedings of the IEEE
Conference on CVPR, 1473–1482.
Fawzi, A.; Moosavi Dezfooli, S. M.; and Frossard, P. 2017. A geometric perspective on the robustness of deep networks. Technical
report, Institute of Electrical and Electronics Engineers.
Fukui, A.; Park, D. H.; Yang, D.; Rohrbach, A.; Darrell, T.; and
Rohrbach, M. 2016. Multimodal compact bilinear pooling for
visual question answering and visual grounding. In Conference
on Empirical Methods in Natural Language Processing.
Gao, H.; Mao, J.; Zhou, J.; Huang, Z.; Wang, L.; and Xu, W. 2015.
Are you talking to a machine? dataset and methods for multilingual
image question. In Advances in Neural Information Processing
Systems, 2296–2304.
Hochreiter, S., and Schmidhuber, J. 1997. Long short-term memory. Neural computation 9(8):1735–1780.
Huang, J.; Alfadly, M.; and Ghanem, B. 2017. VQABQ: visual
question answering by basic questions. CoRR abs/1703.06492.
Kafle, K., and Kanan, C. 2016. Answer-type prediction for visual
question answering. In Proceedings of the IEEE Conference on
Computer Vision and Pattern Recognition, 4976–4984.
Karpathy, A., and Fei-Fei, L. 2015. Deep visual-semantic alignments for generating image descriptions. In Proceedings of the
IEEE Conference on CVPR, 3128–3137.

Kim, J.-H.; On, K.-W.; Lim, W.; Kim, J.; Ha, J.-W.; and Zhang,
B.-T. 2017. Hadamard product for low-rank bilinear pooling. In
5th International Conference on Learning Representations.
Kiros, R.; Zhu, Y.; Salakhutdinov, R. R.; Zemel, R.; Urtasun, R.;
Torralba, A.; and Fidler, S. 2015. Skip-thought vectors. In NIPS,
3294–3302.
Kiros, R.; Salakhutdinov, R.; and Zemel, R. S. 2014. Multimodal
neural language models. In Icml, volume 14, 595–603.
Li, R., and Jia, J. 2016. Visual question answering with question
representation update (qru). In NIPS, 4655–4663.
Lin, T.-Y.; Maire, M.; Belongie, S.; Hays, J.; Perona, P.; Ramanan,
D.; Dollár, P.; and Zitnick, C. L. 2014. Microsoft coco: Common
objects in context. In ECCV, 740–755. Springer.
Lin, T.-Y.; RoyChowdhury, A.; and Maji, S. 2015. Bilinear cnn
models for fine-grained visual recognition. In Proceedings of the
IEEE International Conference on Computer Vision, 1449–1457.
Lu, J.; Yang, J.; Batra, D.; and Parikh, D. 2016. Hierarchical question-image co-attention for visual question answering. In
NIPS, 289–297.
Ma, L.; Lu, Z.; and Li, H. 2016. Learning to answer questions from
image using convolutional neural network. In AAAI, 16.
Malinowski, M.; Rohrbach, M.; and Fritz, M. 2015. Ask your
neurons: A neural-based approach to answering questions about
images. In Proceedings of the IEEE International Conference on
Computer Vision, 1–9.
Malinowski, M.; Rohrbach, M.; and Fritz, M. 2017. Ask your
neurons: A deep learning approach to visual question answering.
International Journal of Computer Vision. to appear.
Mikolov, T.; Sutskever, I.; Chen, K.; Corrado, G. S.; and Dean, J.
2013. Distributed representations of words and phrases and their
compositionality. In NIPS, 3111–3119.
Noh, H.; Hongsuck Seo, P.; and Han, B. 2016. Image question answering using convolutional neural network with dynamic parameter prediction. In Proceedings of the IEEE Conference on CVPR,
30–38.
Papineni, K.; Roukos, S.; Ward, T.; and Zhu, W.-J. 2002. Bleu:
a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting on association for computational linguistics, 311–318. Association for Computational Linguistics.
Pennington, J.; Socher, R.; and Manning, C. D. 2014. Glove:
Global vectors for word representation. In EMNLP, volume 14,
1532–1543.
Ren, M.; Kiros, R.; and Zemel, R. 2015. Exploring models and data
for image question answering. In Advances in Neural Information
Processing Systems, 2953–2961.
Shih, K. J.; Singh, S.; and Hoiem, D. 2016. Where to look: Focus
regions for visual question answering. In Proceedings of the IEEE
Conference on CVPR, 4613–4621.
Sutskever, I.; Vinyals, O.; and Le, Q. V. 2014. Sequence to sequence learning with neural networks. In NIPS, 3104–3112.
Vinyals, O.; Toshev, A.; Bengio, S.; and Erhan, D. 2015. Show and
tell: A neural image caption generator. In Proceedings of the IEEE
Conference on CVPR, 3156–3164.
Wu, Q.; Wang, P.; Shen, C.; Dick, A.; and van den Hengel, A. 2016.
Ask me anything: Free-form visual question answering based on
knowledge from external sources. In CVPR, 4622–4630.
Xu, K.; Ba, J.; Kiros, R.; Cho, K.; Courville, A. C.; Salakhutdinov,
R.; Zemel, R. S.; and Bengio, Y. 2015. Show, attend and tell:

Neural image caption generation with visual attention. In ICML,
volume 14, 77–81.
Xu, H.; Caramanis, C.; and Mannor, S. 2009. Robustness and regularization of support vector machines. Journal of Machine Learning Research 10(Jul):1485–1510.
Yang, Z.; He, X.; Gao, J.; Deng, L.; and Smola, A. 2016. Stacked
attention networks for image question answering. In Proceedings
of the IEEE Conference on CVPR, 21–29.
Yao, J.; Fidler, S.; and Urtasun, R. 2012. Describing the scene as
a whole: Joint object detection, scene classification and semantic
segmentation. In CVPR 2012, 702–709. IEEE.
Zhu, Y.; Groth, O.; Bernstein, M.; and Fei-Fei, L. 2016. Visual7w:
Grounded question answering in images. In Proceedings of the
IEEE Conference on CVPR, 4995–5004.

