Pythia v0.1: the Winning Entry to the VQA Challenge 2018

07/26/2018 ∙ by Yu Jiang, et al. ∙ 12

This document describes Pythia v0.1, the winning entry from Facebook AI Research (FAIR)'s A-STAR team to the VQA Challenge 2018. Our starting point is a modular re-implementation of the bottom-up top-down (up-down) model. We demonstrate that by making subtle but important changes to the model architecture and the learning rate schedule, fine-tuning image features, and adding data augmentation, we can significantly improve the performance of the up-down model on VQA v2.0 dataset -- from 65.67 Furthermore, by using a diverse ensemble of models trained with different features and on different datasets, we are able to significantly improve over the 'standard' way of ensembling (i.e. same model with different random seeds) by 1.31 dataset. Our code in its entirety (training, evaluation, data-augmentation, ensembling) and pre-trained models are publicly available at: https://github.com/facebookresearch/pythia.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

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

Chaerephon: Pythia – Is there any man alive
wiser than Socrates?
Pythia:

We present Pythia v0.1, a modular framework for Visual Question Answering research, which formed the basis for the winning entry to the VQA Challenge 2018 from Facebook AI Research (FAIR)’s A-STAR222Agents that See, Talk, Act, and Reason. team.

The motivation for Pythia comes from the following observation – a majority of today’s Visual Question Answering (VQA) models fit a particular design paradigm, with modules for question encoding, image feature extraction, fusion of the two (typically with attention), and classification over the space of answers. The long-term goal of Pythia is to serve as a platform for easy and modular research & development in VQA 

[2] and related directions like visual dialog [3]. The name ‘Pythia’ is an homage to the Oracle of Apollo at Delphi, who answered questions in Ancient Greece.

The starting point for Pythia v0.1 is a modular reimplementation of the bottom-up top-down (up-down) model [14]. In this study, we demonstrate that by making a sequence of subtle but important changes, we can significantly improve the performance as summarized in Table 1333FAIR A-STAR’s entry in the VQA 2018 Challenge was 72.25%. This document describes results produced by our code release which reaches 72.27%..

2 Bottom-Up and Top-Down Attention

We perform ablations and augmentations over the baseline system of the up-down model [1], which was the basis of the winning entry to the 2017 VQA challenge. The key idea in up-down is the use of an object detector – Faster RCNN [12] pre-trained on the Visual Genome dataset [9] – to extract image features with bottom-up attention, i.e

., visual feed-forward attention. Specifically, a ResNet-101 was chosen as the backbone network, and its entire Res-5 block was used as the second-stage region classifier for detection. After training, each region was then represented by the 2048

feature after average pooling from a grid.

The question text is then used to compute the top-down attention, i.e

., task specific attention, for each object in the image. Multi-modal fusion is done through a simple Hadamard product followed by a multi-label classifier using a sigmoid activation function to predict the answer scores. Their performance reached 70.34% on VQA 2.0 test-std split with an ensemble of 30 models trained with different seeds. For presentation clarity, we present our proposed changes (and the respective improvements) in a sequence; however, we also found them to be independently useful.

2.1 Model Architecture

We made a few changes to the up-down model to improve training speed and accuracy. Instead of using the gated hyperbolic tangent activation [1], we use weight normalization [13]

followed by ReLU to reduce computation

444https://github.com/hengyuan-hu/bottom-up-attention-vqa. We also replaced feature concatenation with element-wise multiplication to combine the features from text and visual modalities when computing the top-down attention. To compute the question representation, we used 300 GloVe [11]vectors to initialize the word embeddings and then passed it to a GRU network and a question attention module to extract attentive text features [16]. For fusing the image and text information, we found the best-performing hidden size to be 5000. With these modifications, we were able to improve the performance of the model from 65.32% to 66.91% on VQA v2.0 test-dev.

2.2 Learning Schedule

Our model is optimized by Adamax, a variant of Adam with infinite norm [8]. In one popular implementation of up-downfootnotemark: learning rate is set to 0.002 with a batch size of 512. We found that reducing the batch size improves performance – which suggests that there is potential for improving performance by increasing the learning rate. However, naively increasing the learning rate resulted in divergence. To increase the learning rate, we thus deployed the warm up strategy [5] commonly used for large learning-rate training of networks. Specifically, we begin with a learning rate of 0.002, linearly increasing it at each iteration till it reaches 0.01 at iteration 1000. Next, we first reduce the learning rate by a factor of 0.1 at 5 and then reduce it every 2 iterations, and stop training at 12. With this we increase the performance from 66.91% to 68.05% on test-dev.

Model test-dev test-std
up-down [1] 65.32 65.67
up-down Model Adaptation (§2.1) 66.91
+ Learning Schedule (§2.2) 68.05
    + Detectron & Fine-tuning (§2.3) 68.49
        + Data Augmentation2.4) 69.24
            + Grid Feature2.5) 69.81
                + 100 bboxes2.5) 70.01 70.24
Ensemble, 30 same model (§2.6) 70.96
Ensemble, 30 diverse model (§2.6) 72.18 72.27
Table 1: Accuracy (%) on VQA v2.0. For ease of presentation, our changes are presented as a sequence building on top of previous changes. denotes that these models are not included in our ensemble results submitted to the challenge.

2.3 Fine-Tuning Bottom-Up Features

Fine tuning pre-trained features is a well known technique to better tailor the features to the task at hand and thus improve model performance [12].

Different from Anderson et al. [1], we also used the new state-of-the-art detectors based on feature pyramid networks (FPN) [10] from Detectron555https://github.com/facebookresearch/Detectron, which uses ResNeXt  [15] as backbone and has two fully connected layers (fc6 and fc7) for region classification. This allows us to extract the 2048 fc6 features and fine-tune the fc7 parameters, as opposed to the original up-down [1], where fine-tuning previous layers requires significantly more storage/IO and computation on convolutional feature maps. Similar to up-down, we also used Visual Genome (VG) [9] with both objects and attributes annotations to train the detector.

We set the fine-tune learning rate as 0.1 times the overall learning rate. We are able to reach a performance of 68.49% on test-dev with this fine-tuning.

2.4 Data Augmentation

We added additional training data from Visual Genome [9] and Visual Dialog (VisDial v0.9) [3] datasets. For VisDial, we converted the 10 turns in a dialog to 10 independent question-answer pairs. Since both VG and VisDial datasets only have a single ground-truth answer while VQA has 10, we simply replicated the answer to each question in VG and VisDial 10 times to make the data format compatible with the VQA evaluation protocol.

We also performed additional data augmentation by mirroring the images in the VQA dataset. We do some basic processing of the questions and answers for the mirrored images by interchanging the tokens “left” and “right” in the questions and answers which contain them. When adding these additional datasets, we reduce the learning rate as we described in Section 2.2 first at 15 iterations, respectively, and stop training at 22 iterations. As a result of data augmentation, we are able to improve our single model performance from 68.49% to 69.24% on test-dev.

Figure 1: Performance with different ensemble strategies.

2.5 Post-Challenge Improvements

Anderson et al. [1] uses only the features pooled from object proposals (called bottom-up features) to represent an image. Our hypothesis is that such a representation does not fully capture a holistic spatial information about the image and visual representations from image regions not covered by the proposals. To test this hypothesis, we combined grid-level image features together with bottom-up features. We follow the same procedure as  [4] to extract grid-level features from ResNet152 [7]. Object-level features and grid-level features are separately fused with features from questions and then are concatenated to fed to classification. Before the challenge deadline, we had experimented with this only on images from the VQA dataset without fine-tuning. After the challenge, we performed more comprehensive experiments and found that adding grid level features helps to further improve the performance to 69.81%.

Instead of using an adaptive protocol for choosing the number of object proposals (between 10 and 100) per image as as done in [14], we also experimented with using a simpler (but slower) strategy of using 100 objects proposals for all images. As can be seen in Table 1, with features from 100 bounding-boxes, we reach 70.01% for test-dev and 70.24% for test-std on VQA 2.0.

2.6 Model Ensembling

All ensembling experiments described below involve models trained before the challenge deadline. That is, they do not include the two after-challenge experiments described in Section 2.5. We tried two strategies for ensembling. First, we choose our best single model and train the same network with different seeds, and finally average the predictions from each model. As can be seen from Fig 1, the performance plateaus at 70.96%. Second, we choose models trained with different settings, i.e., the tweaked up-down model trained on the VQA dataset with/without data augmentation and models trained with image features extracted from different Detectron models with/without data augmentation. As can be seen, this ensembling strategy is much more effective than the previous one. Ensembling 30 diverse models, we reach 72.18% on test-dev and 72.27% on test-std of VQA v2.0.

Acknowledgements

We would like to thank Peter Anderson, Abhishek Das, Stefan Lee, Jiasen Lu, Jianwei Yang, Licheng Yu, Luowei Zhou for helpful discussions, Peter Anderson for providing training data for the Visual Genome detector, Deshraj Yadav for responses on EvalAI related questions, Stefan Lee for suggesting the name ‘Pythia’, Abhishek Das, Abhishek Kadian for feedback on our codebase and Meet Shah for making a docker image for our demo.

References