Question-Agnostic Attention for Visual Question Answering

08/09/2019 ∙ by Moshiur R Farazi, et al. ∙ Australian National University 0

Visual Question Answering (VQA) models employ attention mechanisms to discover image locations that are most relevant for answering a specific question. For this purpose, several multimodal fusion strategies have been proposed, ranging from relatively simple operations (e.g., linear sum) to more complex ones (e.g., Block). The resulting multimodal representations define an intermediate feature space for capturing the interplay between visual and semantic features, that is helpful in selectively focusing on image content. In this paper, we propose a question-agnostic attention mechanism that is complementary to the existing question-dependent attention mechanisms. Our proposed model parses object instances to obtain an `object map' and applies this map on the visual features to generate Question-Agnostic Attention (QAA) features. In contrast to question-dependent attention approaches that are learned end-to-end, the proposed QAA does not involve question-specific training, and can be easily included in almost any existing VQA model as a generic light-weight pre-processing step, thereby adding minimal computation overhead for training. Further, when used in complement with the question-dependent attention, the QAA allows the model to focus on the regions containing objects that might have been overlooked by the learned attention representation. Through extensive evaluation on VQAv1, VQAv2 and TDIUC datasets, we show that incorporating complementary QAA allows state-of-the-art VQA models to perform better, and provides significant boost to simplistic VQA models, enabling them to performance on par with highly sophisticated fusion strategies.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 3

page 7

page 8

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

An attention mechanism in a VQA system identifies the relevant visual information to intelligently answer a given question. Therefore, attention is central to recent state-of-the-art VQA models. Existing VQA models generally use grid-level or object-level convolutional features to learn an attention distribution over the given image. In the former case, this attention is dispersed over the spatial grid [3, 9, 23] while in the later case, attention is applied on a set of object proposals [1, 5]. Recent best performing methods combine the strengths of both these approaches to obtain attention maps with a better context [8, 18].

Learned attention mechanisms have been shown to significantly enhance the performance of VQA systems. However, learning attention on dense grid- and object-level features is a computationally demanding task that results in increased model complexity. Furthermore, learned attention is tuned for a specific dataset and thereby fails to generalize well to novel scenarios. To address these problems, we undertake a tangential path and propose a Question-Agnostic Attention (QAA) approach that is independent of a given question. Our approach is based on the insight that questions generally relate to the state, number, type and actions of the ‘objects’ present in an image and their ‘mutual relationships’. Therefore, we propose to use an object parsing module to generate question-agnostic attention maps based only on the given images. This attention generation procedure acts as a simple pre-processing step that encodes salient instance-centric visual cues (location, shape) and object-relationship information which in turn leads to a performance boost for all evaluated models and difficult question types (‘What sports are they playing?’, ‘What kind of furniture is in the picture?’)

We note that our proposed question-agnostic attention has some resemblance to bottom-up saliency based attention methods. The saliency maps can be obtained from the human-viewers or predicted using learned machine learning models. The literature shows that human eye fixations as an attention mechanism, works poorly for VQA and has less correlation with machine attention

[6]. On the other hand, several efforts in VQA literature show the importance of object-aware visual attention for improved VQA [17, 1, 8] which emphasizes the notion that better localization of object instances results in higher VQA accuracy. However, these attention procedures are learned on top of object proposals while we propose an attention approach with minimal training cost. Our approach uses instance segmentation to generate an object map on the spatial image grid in a bottom-up fashion that is demonstrated to improve performance for simple as well as complex VQA models.

Our results provide an interesting perspective on VQA showing that question-agnostic attention can help achieve competitive VQA performance and provides complementary information for existing VQA models, that results in notable performance gain. In an extreme case, when we apply a fixed attention map computed from a prior based on the training data, the VQA model still performs on par with existing models with learned attention. Firstly, this highlights the performance-complexity trade-off that is offered by recent multimodal fusion mechanisms for VQA task. Our results show that even with very simple multimodal operations, a VQA model can perform as well as more sophisticated models if question-agnostic attention is used. Secondly, the performance improvement across all the models illustrates the complementary nature of QAA, that highlights the room for improvement in learned ‘question-aware’ attention. Finally, the relatively stronger improvement for simpler models shows that the information learned with QAA features is somewhat similar to the high-order representation modelling through complex multimodal fusion techniques.

The main contributions of our paper include:

  • [topsep=-5pt,noitemsep]

  • An inexpensive VQA pre-possessing step, dubbed Question-Agnostic Attention (QAA), that localizes object instances in an image irrespective of the question.

  • A modular co-attention architecture that allows any off-the-shelf VQA model to incorporate complementary QAA features.

  • An extensive set of experiments on large scale VQA datasets and the TDIUC dataset to showcase the effectiveness of using complementary QAA features, especially helping simplistic VQA models achieve near state-of-the art performance.

2 Related Works

Visual feature extraction:

State-of-the-art VQA models either use deep CNN based feature extraction networks (ResNet 

[12]) to generate visual features for each gird location in an image [9, 4, 23], or employ object detectors (. Faster-RCNN [21]) to detect the best object proposals for a given image and extract a corresponding set of object-level features [1, 5, 25]. Attention mechanisms are then applied to selectively consider the relevant information on the spatial grid or the object proposals. Some recent approaches also combine spatial grid and object-level attention to leverage the best of both approaches [8, 18]. However, the feature maps generated from the object proposals are discrete and do not encode the spatial relationship between the objects present in the image. Thus there exists a semantic gap since the two sets of approaches look at different kinds of features, one from image level and one from object level. Here, we propose to use the object location information on top of spatial-grid features to bridge this semantic gap.
Attention mechanisms: For an improved VQA capability, attention has been focused on either or both the image [22] and the natural language questions [17]. Stacked attention networks [23] generate an attention map by recursively attending to salient image details. VQA-HAT [6] studies human attention maps for VQA and quantifies how they correlate with automatically learned attention maps. Task-independent saliency prediction methods have also been used as an attention mechanism for VQA. There exists a strong center-bias in human eye-fixation and saliency based methods [6, 13]. Our study also confirms this behaviour as we show that the global representation of object map is more concentrated towards the image-center. However, human and saliency-based methods were shown to correlate less with machine-learned attention. In contrast, as our results show, the proposed QAA mechanism provides significant gains for VQA.

Figure 2: Architecture of our Question-Agnostic Attention (QAA) based VQA model. QAA features are generated using instance segmentation (generated by Mask-RCNN) to create a binary object map with the same resolution of the convolutional feature map. The object map is applied as a mask on the convolutional feature map (generated by ResNet) of the whole image. This ‘modular attention’ with minimal training cost delivers strong improvement while used in complement with existing VQA models on a number of VQA benchmarks.

3 Method

Given a question about an image , an AI agent designed for the VQA task will predict an answer based on the learning acquired from training examples. Benchmark VQA models frame this task as a multi-class classification problem in the candidate answer space, and the models learn to predict the correct answer for a given Image-Question (IQ) pair. This task can be formulated as:

(1)

where denotes the model parameters and is predicted from the dictionary of candidate answers .

A simplistic VQA model consists of two major parts: (1) Feature extraction module, and (2) Multimodal feature embedding. The first part of the model extracts visual features from an Image and semantic features from a Question . The visual features from an image are extracted using deep CNN based object recognition models (ResNet [12]

) which are pretrained on large-scale image recognition datasets such as ImageNet 

[7]. The image feature map from the last convolution layer of the model is extracted as the visual feature , where is the index of the spatial location in the image over a coarse grid and is the feature embedding dimension for each spatial grid location. On the other hand, for extracting the language feature from a Question, each word is fed to a pretrained encoder (GloVe [20], Skip-thought [15]

) to get vector embeddings of the question words. These vectors are then passed through a language model which consists of Gated Recurrent Units (GRUs) to generate a semantic feature

.

In the second

part, extracted visual and semantic features are combined into a multimodal representation, which in turn is used to minimize a loss function to predict the correct answer. A VQA model employs a joint embedding function

to merge the extracted features in a common multimodal space. The function can be a simple fixed function (a linear sum, concatenation followed by MLP) or a complex operation (multimodal pooling [9] or fusion [4, 5]

). Most importantly, the multimodal embedding is used to selectively attend to visual features using a learned attention mechanism. This attention is derived jointly from the given question and image pair. Different from these attention approaches, we propose a pre-prcoessing step that estimates an attention map

without considering at-all the input questions. This simple approach with no-training cost surprisingly gives highly compelling results.

Our proposed question-agnostic attention model is illustrated in Fig. 

2. We first employ an attention mechanism that focuses on different object instances by creating an ‘object map’ with which the question-agnostic features are generated (Sec. 3.1). The question-agnostic attention enables the model to focus on arbitrary object shapes and object parts which results in an improved model attention. Instead of the original CNN extracted spatial grid feature map, the question-agnostic features are passed through the VQA model where the given language query is used to further refine the visual features. These refined visual features are used to generate final predictions for classification. The modular architecture of our model enables it to combine predictions from other VQA models that aggregates multiple predictions to generate an intelligent answer for the given question (Sec. 3.2).

3.1 Question-Agnostic Attention

The input image is passed through a pre-trained instance segmentation module to predict the pixels that correspond to object instances. Notably, we ensure that the pre-trained network has not seen any of the test images for the evaluated datasets and is pre-trained on an altogether different task (instance segmentation as opposed to VQA). These instances have arbitrary shape and size which makes it harder to encode them and computationally infeasible for a VQA model to train with instance-level features. To remedy this, a coarse representation of the object instances is generated by creating a grid of size over the whole image and the object instances are mapped onto this grid. A binary representation of this grid is called the object map , which essentially identifies if an object instance occupies a grid location or not.

One can learn a non-linear mapping function that maps the object instances to an arbitrary high-dimensional space. However, we adopt a simplistic approach to set the size of the object map equal to spatial grid size for primarily three reasons. Firstly, having the grid size equal to the CNN features allows our approach to establish a one-to-one correspondence to the spatial grids of the CNN extracted convolutional feature map, which enables the model to access the visual features of that gird region without requiring another explicit ROI pooling like Faster-RCNN. This avoids expensive computations in our model. Secondly, the binary -dimensional object map can be applied as a mask to select only the visual features at grid locations that have an object instance with a computationally inexpensive element-wise multiplication between and to generate question-agnostic feature . Finally, as the question-agnostic features have the same size as CNN extracted visual features, it can be easy for any VQA model to incorporate the question-agnostic features by only adjusting the size of object map equal to the size of CNN spatial grid. Thus, this simplistic approach fashions question-agnostic attention mechanism as an inexpensive pre-processing step that is easily applicable to any CNN based VQA model.

3.2 Multiple Prediction Embedding

The modular architecture of QAA enables it to jointly consider predictions from any other VQA model to generate a final prediction vector. In order to further validate the complementary nature of our proposed QAA model, we include a simple spatial attention mechanism, commonly used in most VQA models [9, 4, 5] to refine the visual features according to the question. In addition to a fixed object map used to generate question-agnostic features, this optional module can be used to refine the question-agnostic features according to the question, providing flexibility to incorporate a spatial attention mechanism on top of QAA. We achieve this by calculating a similarity measure between each question-agnostic feature grid location and by projecting them in a common space by a joint embedding function . This, in general, represents the relevance of a spatial grid location for answering that input question. This similarity measure is applied as a semantic weighting function, called Spatial Attention , that takes a weighted sum over the spatial grids of input visual features. It can be expressed as:

(2)

where represents a combination of question-agnostic attention features that are emphasized by the input question. Finally, it undergoes a second multimodal embedding with the question feature to generate a prediction vector which has the same dimension as the candidate answer dictionary . Predictions from any other VQA model can be concatenated with the prediction of our model. The concatenated predictions are passed through a multiple prediction embedding layer that learns to generate a dimensional final prediction vector.

4 Experiments and Results

VQA dataset: Firstly, we evaluate our QAA model on two large scale benchmark VQA datasets, namely VQAv1 [3] and VQAv2 [10]. Among the two datasets, VQAv2 contains complementary question-answer pairs which mitigates language bias present in the VQAv1 dataset, making VQAv2 a more challenging test setting. Both versions of the VQA dataset contain over 200K real images sourced from the MS COCO dataset [16] and placed into respective train/val/test splits. These images are paired with complex open-ended natural language questions and answers. The ground truth answers for train and val split are publicly available, but the test split is not. To evaluate on the test split (both test-dev and test-std), the prediction needs to be submitted to the VQA test server. We perform ablation experiments on validation sets of VQAv1 and VQAv2 (Tab. 1) and compare with other state-of-the-art methods on VQAv2 test-dev and test-std dataset (Tab. 2). Following the standard evaluation strategy, we calculate the accuracy of the predicted answer as , which means that the answer provided by the model is given 100% accuracy if at least 3 human annotators who helped create the VQA dataset gave the exact answer.

TDIUC dataset: Task Directed Image Understanding Challenge (TDIUC) dataset [14] consists of questions and images sourced from MS COCO and the Visual Genome Dataset. These Image-Question pairs are split into 12 categories and 4 additional evaluation matrices ( column of Tab. 3) which help evaluate a model’s robustness against answer imbalance and its ability to answer questions that require higher reasoning capability. We evaluate and perform ablation on TDUIC testset, and report accuracy for all 12 question types along with overall arithmetic mean-per-type (MPT) and harmonic MPT, and overall normalized arithmetic MPT and harmonic MPT in Tab. 3.

Instance Segmentation: We employ a pre-trained Mask-RCNN [11] model111github.com/facebookresearch/maskrcnn-benchmark to generate instance masks by running inference on the input image. Specifically, the Mask-RCNN model was trained on COCO train and the val-minus-minival split with a ResNet-50-FPN backbone. Note that although the ‘training data’ (images) of the VQA datasets have an overlap with the ‘training set’ of COCO, none of the test images have been previously seen by the pre-trained model. Also, we do not use any object-level information in our attention map, rather only a simple binary mask showing the location of detected objects is used in our approach. Therefore, our setting has no extra advantage or external supervision compared to other approaches.

Model Architecture: We use ResNet [12] pretrained on ImageNet [7] to extract the visual features of an image with dimensions . Here, which represents the spatial grid corresponding to image regions and is the dimension of visual features for each grid location. The language model generates a dimensional feature for each question in a fashion similar to [9, 4, 24]. The question words are first preprocessed, tokenized and encoded through a embedding layer that consists of GRUs and uses a pretrained skip-thought encoder. For the models without the optional spatial attention mechanism, the input visual feature is averaged across the spatial grid to generate a -d feature vector from the dimensional feature map and passed on to be jointly embedded with the question feature. On the other hand, the models with spatial attention learn to generate -d feature vector as discussed in Sec. 3.2. Following the VQA benchmark [3], the dictionary of candidate answers consists of the top frequent answers from the respective versions of VQA dataset. A cross entropy loss is minimized to predict the correct answer from the dictionary . While performing experiments on the TUDIC dataset, dimension of is set to .

Baseline Model:

We setup our VQA baseline model with four variants where the model employs different multimodal operations for combining the question and image features. All other setup and hyperparameters are kept exactly the same for fair comparison. Each variant can have the optional spatial attention module. The first two variant of our baseline model incorporate simpler multimodal operation (liner summation and concatenation followed by MLP). The latter two variants use a more complex multimodal operation, namely Mutan 

[4] and Block [5], which achieve the state-of-the-art performance for the VQA task, and have a considerably higher number of trainable parameters for multimodal embedding. Mutan and Block operation are implemented using their publicly available code222github.com/Cadene/block.bootstrap.pytorch. The following are the four variants of our baseline model:

VQAv1 Dataset VQAv2 Dataset
Spatial Multimodal Operation Multimodal Operation
Visual Feature Attention Linear C-MLP Mutan Block Linear C-MLP Mutan Block
(1) Spatial Grid (SG) 39.7 57.2 56.3 58.2 38.2 51.9 55.6 56.8
(2) QAA 41.4 40.5 57.3 58.4 39.7 53.2 56.3 56.5
(3) Ours(SG+QAA) ✗✗ 57.9 58.3 57.5 58.4 56.2 56.8 57.0 57.1
18.2 1.1 1.2 0.2 18.2 4.9 1.4 0.3
(4) Spatial Grid (SG) 41.8 60.4 58.6 61.2 41.0 54.4 57.9 60.1
(5) QAA 41.4 59.6 57.9 60.5 37.3 57.3 56.5 59.3
(6) Ours(SG+QAA) ✓✓ 60.6 60.7 59.2 61.6 59.1 59.5 58.2 60.5
18.8 0.3 0.6 0.3 18.1 5.2 0.3 0.4
Multimodal Parameters 8M 13M 14M 18M 8M 13M 14M 18M
Table 1: Comparison of different multimodal operations when using complementary QAA features on VQA datasets. The models are evaluated on validation sets of VQAv1[3] and VQAv2[10] dataset, and we report the overall accuracy (higher the better). Models in rows (1)-(3) do not have any spatial attention mechanism whereas the models in rows (4)-(6) learn spatial attention as described in Sec.3.2

Linear: The question and image features are projected onto a common space using fully connected layers and the projected vectors are summed to obtain a joint feature representation. This joint representation is projected to the prediction space which is then passed through the answer prediction network to generate the final prediction. This can be expressed as: where represents the fully connected layer weights used for projection.

Concat-MLP:

The question and image features are concatenated and passed through a 3-layer MultiLayer Perceptron (MLP) with ReLU activation and dropout to combine the input features. The resulting vector is projected onto the prediction space for answer classification.

Mutan:

The Mutan model learns a multimodal interaction between question and image using rank constrained Tucker tensor decomposition 

[4]. In this model, the visual and language features are decomposed into three matrices and a core tensor that is somewhat capable of modelling the fully parameterized interaction in the multimodal space.

Block: It employs block-term tensor decomposition following a super-diagonal fusion framework[5]. This is the most computationally expensive model that we experiment with and achieves state-of-the-art performance. The complexity of a multimodal operation is inferred by calculating the number of trainable parameters from attended image features, the question embedding, and the answer prediction.

Ablation study: In Sec. 4.1 we perform ablation to showcase the effectiveness of using complementary question-agnostic attention on VQA models employing different multimodal operation by evaluating on the VQAv2 Valset [10] and the TDIUC testset [14]. Furthermore, in Sec. 4.2 we show that without an explicit object map during inference, our model can utilize image independent QAA features generated from a global representation of training examples.

4.1 Ablation on Different Multimodal Operations

Simplistic VQA models get a significant performance boost using complementary QAA features and perform on par with the state-of-the-art. In row (1) of Tab. 1, we report that our baseline VQA model employing state-of-the-art Block fusion achieves and accuracy, whereas with a linear-sum operation, the same model achieves accuracy of only and on VQAv1 and VQAv2 validation sets, respectively. When the Linear model is trained with complementary QAA features, the accuracy increases to and on the VQAv1 and VQAv2 datasets, respectively; performing very close to the state-of-the-art Block model (row (3)). This pattern also exists when these same models include the optional spatial attention module (comparing rows (4) and (6)). The simpler Linear model benefits from using complementary QAA features as it represents a subset of the spatial locations of the whole image that has object instances and encodes visual cues like count, location and attributes which are most important to predict the correct answer. The Linear model with only 8M trainable parameters and relatively simpler multimodal operation cannot learn to identify these visual cues on its own. Thus the performance boost while using complementary QAA feature is more significant ( vs ) for VQA models employing a simplistic multimodal operation (Linear and Concat-MLP) compared to the models employing a more sophisticated fusion operation (Mutan[4] and Block[5]). Since more complex multimodal operations learn salient visual cues by modeling the interaction between visual and semantic features through significantly more parameters; VQA models employing such complex operations benefit less from using complementary QAA features. Overall, it can be seen from Tab. 1 that all variants of our VQA baseline employing different multimodal operations, with or without optional spatial attention, benefit from using complementary QAA features.

Test-dev Test-Standard
Model All All Y/N Num. Other
(1) MCB[9] - 62.3 78.8 38.3 53.3
Mutan [4] 63.2 63.5 80.9 38.6 54.0
Ours(SG+QAA) 64.7 65.0 81.8 43.6 55.4
(2) Up-Down[1] 65.3 65.7 82.2 43.9 56.3
Block [5] 66.4 66.9 83.8 45.7 57.1
Ours(BU+QAA) 66.7 67.0 83.8 45.9 57.1
Table 2: Comparison with state-of-the-art single (not ensemble) VQA models with our proposed QAA model, evaluated on VQAv2 Test-dev and Test-std dataset. The models in (1) are trained with spatial grid features and in (2) with Bottom-Up features [1]. With QAA, in both cases, our model outperform contemporary VQA models.

Complementary QAA features help answer rare question more accurately. In Tab. 3, we valuate our baseline models with and without complementary QAA features on the TDIUC testset and compare it against other state-of-the-art models using spatial grid features. The baseline models reported in this table use the optional spatial attention module. We can see that the accuracy for the difficult question categories (Object Utility, Object Presence) increased when using QAA features, and this improvement is more prominent for models using Linear and Concat-MLP operations. Further, for all variants of the baseline model, both versions of Arithmetic and Harmonic MPT improved, and this improvement is more significant for Harmonic MPT and Harmonic N-MPT. This is particularly important as Harmonic MPTs is a more strict metric as it measures the ability of a model to have high scores across ‘all’ question-types and it consequently puts an emphasis on lowest performing categories. In the last row of Tab. 3, we report the traditional VQA accuracy and observe that the Block variant of our(SG+QAA) model achieves higher accuracy than other state-of-the-art methods. Furthermore, the Concat-MLP model achieves almost same traditional VQA accuracy with or without QAA features (). Interestingly, one can notice that, even with same VQA accuracy, our model achieves a significant boost in both versions of Arithmetic and Harmonic MPT. These findings support our hypothesis that the QAA features encode salient object-level information that helps consider high-level visual concepts when answering difficult questions.

MCB NMN RAU Linear Ours Concat Ours Mutan Ours Block Ours
[9] [2] [19] (SG+QAA) -MLP (SG+QAA) (SG+QAA) (SG+QAA)
Scene Recog. 93.0 91.9 94.0 50.9 93.1 92.5 93.0 92.2 92.4 92.8 92.8
Sport Recog. 92.8 90.0 93.5 19.0 93.7 93.4 94.1 93.0 92.9 93.5 93.5
Color Attributes 68.5 54.9 66.9 55.7 67.1 65.4 68.2 66.3 66.2 68.6 64.5
Other Attributes 56.7 47.7 56.5 0.1 54.9 56.3 56.4 52.1 52.4 57.9 56.1
Activity Recog. 52.4 44.3 51.6 0.0 50.9 52.3 53.0 49.3 50.2 53.2 52.4
Pos. Reasoning 35.4 27.9 35.3 7.3 33.4 32.2 35.4 29.4 29.9 36.1 34.7
Sub-Obj Recog. 85.4 82.0 86.1 23.8 85.7 86.1 86.5 85.2 85.5 86.2 85.9
Absurd 84.8 87.5 96.0 90.3 88.2 92.4 92.4 90.0 89.1 90.7 92.1
Object Utility 35.0 25.1 31.6 15.2 29.3 26.2 35.7 27.4 30.4 34.5 37.4
Object Presence 93.6 92.5 94.4 93.5 94.3 94.3 94.4 93.8 93.9 94.1 94.2
Counting 51.0 49.2 48.4 50.1 51.2 53.0 52.6 51.2 50.4 51.1 51.2
Sentiment Undstd. 66.3 58.0 60.1 56.3 65.8 65.7 66.3 63.2 61.0 66.0 63.5
Arithmetic MPT 67.9 62.6 67.8 38.5 68.3(29.8) 67.6 69.0(1.4) 66.2 66.3(0.1) 68.4 68.8(0.4)
Harmonic MPT 60.5 51.9 59.0 0.0 58.1(58.1) 57.3 61.3(4.0) 55.1 56.7(1.6) 60.0 61.1(1.1)
Arithmetic N-MPT 42.5 34.0 41.0 29.8 54.1(34.3) 53.4 56.4(3.0) 53.1 53.7(0.6) 54.7 55.9(1.2)
Harmonic N-MPT 27.3 16.7 24.0 0.0 32.3(32.3) 28.2 38.8(3.0) 32.3 32.8(0.6) 34.1 38.2(1.2)
Simple Accuracy 81.9 79.6 84.3 72.9 82.6(9.7) 83.9 84.0(0.1) 82.5 82.7(0.2) 84.5 84.6(0.1)
Table 3: Evaluation of our QAA models on the testset of TDIUC [14] dataset and comparison with state-of-the-art methods. The first 12 rows report the unnormalized accuracy for each question-type. The Arithmetic MPT and Harmonic MPT are unnormalized averages, and Arithmetic N-MPT and Harmonic N-MPT are normalized averages of accuracy scores for all question type. The last row shows the simple VQA accuracy for all models. Using complementary QAA features, the models ability to answer rare questions increased significantly (higher Harmonic MPT and N-MPT) for all cases.
Figure 3: VQA accuracy (right y-axis) using complementary Image-Question-Agnostic Attention (IQAA) Features. IQAA feature is generated by selecting a global representation threshold (x-axis) and corresponding spatial grid locations (left y-axis).

4.2 Inference with Global Representation

We further experiment with Image-Question-Agnostic Attention (IQAA) where the attention feature is generated without looking at the input question and image. To do so, first, we create a global representation of object maps by counting object presence at each spatial grid location for all images in the dataset. In Fig. 4, we show such a global representation from the count of object presence, , of VQA dataset training images (COCO trainset 2014 images) on a grid. We can see from this figure that most objects present in an image occupy the center grids. We leverage this centre bias to create fixed object maps, that in turn is used to generate IQAA features. Second, the count vector is min-max normalized between (x-axis of Fig. 3). The left y-axis shows the number of grid locations selected when applying different thresholds on the normalized count measures. It ranges from to grid locations when the threshold is varied between to . Third, we treat the selected grid location for a set threshold as fixed object maps and apply fixed map on the input visual feature as discussed in Sec. 3.1 for generating IQAA features. These IQAA features can be used instead of QAA features in a similar fashion to train any VQA model.

Figure 4: Global Representation of object maps: Count of object presence at each of the spatial grid locations generated from the training images of VQA dataset.
Figure 5: Qualitative results on VQAv2 val-set to demonstrate the effectiveness of using complementary QAA. The learned spatial attention ( and columns) focuses on regions with or without objects, but QAA map is focused on objects.

By only using complementary IQAA features VQA models achieve reasonable performance. We report the VQA accuracy score on VQAv2 validation set using our Block baseline model without spatial attention on the right y-axis of Fig. 3. When using IQAA features, the VQA accuracy ranges from to when the global representation threshold is varied between to . This means if one selects a fixed set of spatial grid locations at the center of the image, and trains a state-of-the-art VQA model with visual features of only these grid locations; the model can still achieve VQA accuracy comparable to when it looks at the whole image. A similar finding was reported by Judd et al. [13] where they show that humans tend to focus the object at the center when they take picture. Our finding further adds to that notion of Center Prior by showing that humans also tend to ask questions about objects that are at the center of the image. Even though we run inference with pre-trained Mask-RCNN to generate QAA features as a light-weight prepossessing step, by modeling the object presence prior in the dataset, one can further reduce pre-training computational burden by replacing QAA with IQAA, and achieve reasonable performance.

4.3 Evaluation on the VQAv2 Testset

We evaluate our model’s performance on the VQAv2 Test server and report accuracy for different question types on the Test-dev and Test-std dataset to compare with other contemporary state-of-the-art VQA models. For fair comparison, in Tab. 2 (1), we separate models that use spatial grid features (visual features extracted by ResNet) and compare it with our SG+QAA model; in (2) the models that use Bottom-Up [1] features and we compare our BU+QAA model. For both cases, our question-agnostic models employ Block fusion to jointly embed image and question features with a spatial attention mechanism. From Tab. 2, we can see that when the QAA features are used alongside spatial grid features, the gain is more, compared to when used with BU features. As the BU features are a collection of top object bounding box features generated using Faster-RCNN, it also offers some object-level information to the VQA model. Thus, when used in combination with BU features, the overall performance gain in relatively small. However, as the question-agnostic features encompass the Object Map of an image, it somewhat encodes the global spatial relationship between object and count information of object instances; it provides accuracy gain when answering Number (‘How many?’) question ( in test-standard). Overall, if a parallel branch trained using question-agnostic features is added to an existing VQA model, accuracy of the model increases.

4.4 Qualitative Results

We present qualitative results of our SG+QAA model with Block fusion in Fig. 5 to showcase the effectiveness of having complementary question-agnostic features. In the second row, first example, the model is tasked with a count question, asking ‘How many animals are on the grass?’ The learned spatial attention map is scattered in different image locations whereas the question-agnostic feature localizes five object instances that help the model answer correctly. Altogether, from the qualitative results, we can deduce that learned and question-agnostic attention provides complementary information which can be leveraged by VQA models to be able to correctly answer intelligent questions.

5 Conclusion

In this paper, we introduced Question-Agnostic Attention that can be used to augment existing VQA approaches. Rather than using computationally intensive methods to learn question-specific attention, our approach derives attention only from the image, based on the insight that questions generally relate to object instances. We use an object parsing model to automatically generate an Object Map, that has the same resolution as the feature map from a pre-existing classification network. The Object Map is used to mask the convolutional feature map to generate question-agnostic attention features. When high-performing computationally-intensive VQA models are augmented with QAA, it improves their accuracy to be a new state-of-the-art. When simple linear models are augmented with QAA, they preform significantly better when answering question that require a higher level of visual reasoning (activity recognition), which a simplistic model cannot learn on its own. This capability provides the simplistic (low-complexity) models a significant boost that brings them close to state-of-the-art.

References

  • [1] P. Anderson, X. He, C. Buehler, D. Teney, M. Johnson, S. Gould, and L. Zhang (2018) Bottom-up and top-down attention for image captioning and visual question answering. In CVPR, Cited by: §1, §1, §2, §4.1, §4.3, Table 2.
  • [2] J. Andreas, M. Rohrbach, T. Darrell, and D. Klein (2016) Neural module networks. In

    Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition

    ,
    pp. 39–48. Cited by: Table 3.
  • [3] S. Antol, A. Agrawal, J. Lu, M. Mitchell, D. Batra, C. Lawrence Zitnick, and D. Parikh (2015) Vqa: visual question answering. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2425–2433. Cited by: §1, Table 1, §4, §4.
  • [4] H. Ben-Younes, R. Cadene, M. Cord, and N. Thome (2017) Mutan: multimodal tucker fusion for visual question answering. In Proceedings of the IEEE international conference on computer vision, pp. 2612–2620. Cited by: Figure 1, §2, §3.2, §3, §4.1, §4.1, §4, §4, §4.
  • [5] H. Ben-Younes, R. Cadene, N. Thome, and M. Cord (2019) BLOCK: Bilinear Superdiagonal Fusion for Visual Question Answering and Visual Relationship Detection. In

    The Thirty-Third AAAI Conference on Artificial Intelligence

    ,
    Cited by: Question-Agnostic Attention for Visual Question Answering, Figure 1, §1, §2, §3.2, §3, §4.1, §4.1, §4, §4.
  • [6] A. Das, H. Agrawal, C. L. Zitnick, D. Parikh, and D. Batra (2016) Human Attention in Visual Question Answering: Do Humans and Deep Networks Look at the Same Regions?. In

    Conference on Empirical Methods in Natural Language Processing (EMNLP)

    ,
    Cited by: §1, §2.
  • [7] J. Deng, W. Dong, R. Socher, L. Li, K. Li, and L. Fei-Fei (2009) Imagenet: a large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp. 248–255. Cited by: §3, §4.
  • [8] M. R. Farazi and S. Khan (2018-09) Reciprocal attention fusion for visual question answering. In The British Machine Vision Conference (BMVC), Cited by: §1, §1, §2.
  • [9] A. Fukui, D. H. Park, D. Yang, A. Rohrbach, T. Darrell, and M. Rohrbach (2016) Multimodal compact bilinear pooling for visual question answering and visual grounding. arXiv preprint arXiv:1606.01847. Cited by: §1, §2, §3.2, §3, §4.1, Table 3, §4.
  • [10] Y. Goyal, T. Khot, D. Summers-Stay, D. Batra, and D. Parikh (2017-07) Making the v in vqa matter: elevating the role of image understanding in visual question answering. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Cited by: Table 1, §4, §4.
  • [11] K. He, G. Gkioxari, P. Dollár, and R. Girshick (2017) Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pp. 2961–2969. Cited by: §4.
  • [12] K. He, X. Zhang, S. Ren, and J. Sun (2016) Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778. Cited by: §2, §3, §4.
  • [13] T. Judd, K. Ehinger, F. Durand, and A. Torralba (2009) Learning to predict where humans look. In 2009 IEEE 12th international conference on computer vision, pp. 2106–2113. Cited by: §2, §4.2.
  • [14] K. Kafle and C. Kanan (2017) An analysis of visual question answering algorithms. In ICCV, Cited by: Table 3, §4, §4.
  • [15] R. Kiros, Y. Zhu, R. R. Salakhutdinov, R. Zemel, R. Urtasun, A. Torralba, and S. Fidler (2015) Skip-thought vectors. In Advances in neural information processing systems, pp. 3294–3302. Cited by: §3.
  • [16] T. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick (2014) Microsoft coco: common objects in context. In European Conference on Computer Vision, pp. 740–755. Cited by: §4.
  • [17] J. Lu, J. Yang, D. Batra, and D. Parikh (2016) Hierarchical question-image co-attention for visual question answering. In Advances In Neural Information Processing Systems, pp. 289–297. Cited by: §1, §2.
  • [18] P. Lu, H. Li, W. Zhang, J. Wang, and X. Wang (2018) Co-attending free-form regions and detections with multi-modal multiplicative feature embedding for visual question answering. In Thirty-Second AAAI Conference on Artificial Intelligence, Cited by: §1, §2.
  • [19] H. Noh and B. Han (2016) Training recurrent answering units with joint loss minimization for vqa. arXiv preprint arXiv:1606.03647. Cited by: Table 3.
  • [20] J. Pennington, R. Socher, and C. Manning (2014) Glove: global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pp. 1532–1543. Cited by: §3.
  • [21] S. Ren, K. He, R. Girshick, and J. Sun (2015) Faster r-cnn: towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pp. 91–99. Cited by: §2.
  • [22] K. J. Shih, S. Singh, and D. Hoiem (2016) Where to look: focus regions for visual question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4613–4621. Cited by: §2.
  • [23] Z. Yang, X. He, J. Gao, L. Deng, and A. Smola (2016) Stacked attention networks for image question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 21–29. Cited by: §1, §2.
  • [24] Z. Yu, J. Yu, C. Xiang, J. Fan, and D. Tao (2018) Beyond bilinear: generalized multimodal factorized high-order pooling for visual question answering.

    IEEE Transactions on Neural Networks and Learning Systems

    .
    Cited by: §4.
  • [25] Y. Zhang, J. Hare, and A. Prügel-Bennett (2018) Learning to count objects in natural images for visual question answering. In International Conference on Learning Representations, External Links: 1802.05766 Cited by: §2.