Towards Reasoning-Aware Explainable VQA
Abstract
The domain of joint vision-language understanding, especially in the context of reasoning in Visual Question Answering (VQA) models, has garnered signiﬁcant attention in the recent past.
While most of the existing VQA models focus on improving the accuracy of VQA, the way models arrive at an answer is oftentimes a black box.
As a step towards making the VQA task more explainable and interpretable, our method is built upon the SOTA VQA framework [1] by augmenting it with an end-to-end explanation generation module.
In this paper, we investigate two network architectures, including Long Short-Term Memory (LSTM) and Transformer decoder, as the explanation generator.
Our method generates human-readable textual explanations while maintaining SOTA VQA accuracy on the GQA-REX (77.49%) and VQA-E (71.48%) datasets.
Approximately 65.16% of the generated explanations are approved by humans as valid.
Roughly 60.5% of the generated explanations are valid and lead to the correct answers.
Introduction
[Figure]
Problems involving joint vision-language understanding are gaining more attention in both Computer Vision (CV) and
Natural Language Processing (NLP) communities.
In recent years, complex reasoning problems in the vision-language domain have been in the spotlight.
In the classic Visual Question Answering (VQA) problem, reasoning has been highly involved.
In [2, 3, 4], a model needs to reason over spatial and quantiﬁcational relationships within an image-question pair.
[5] incorporates spatial-temporal reasoning as well as domainspeciﬁc knowledge.
A more challenging setting, such as [6, 7], requires the capability to make use of external knowledge to perform reasoning in the vision-language domain.
We see impressive improvements in VQA accuracy in [8, 9, 10, 11] in both the stock setting and its variants, thanks to the large-scale pre-trained models in both single modality and multi-modality.
However, we barely pay attention to how a model reaches an answer given an image-question pair.
Let’s take a look at Figure 1 as an illustrative example.
The groundtruth answer to the question is straightforward, and information from the image is sufﬁcient to answer the question.
There are three different types of VQA models: Model type 1 predicts the correct answer without providing any evidence as to how it was achieved.
Model type 2 answers the question correctly and provides a caption that summarizes the image.
Unfortunately, the caption fails to unveil the reasoning chain behind predicting the correct answer to the question.
Model type 3 successfully generates a logically self-contained explanation which corresponds to the correct answer.
Both Model type 1 and Model type 2 cover most of the SOTA VQA models.
Surprisingly, very few models exist that are similar to Model type 3 .
Motivated by examples like in Figure 1, we investigate the following two open topics in this paper: (i) whether a VQA model can generate a human-readable explanation while maintaining VQA accuracy; (ii) how good are the generated explanations and how should they be evaluated?
Our contribution is two-fold:
• We present easy-to-implement methods on top of a SOTA VQA framework which maintains VQA accuracy while generating human-readable textual explanations.
• We show both quantitative experimental results and human-studies of the proposed explainable VQA method.
Our experiments illustrate the urgency of proposing new metrics to evaluate the predicted explanations in vision-language reasoning problems such as VQA.
Related Work
Reasoning in VQA As an end-to-end task, VQA [4] and its variants have been well explored, and various models have kept achieving better performance along the way.
Built on top of the original setting, complex reasoning tasks are heavily involved.
[4, 12] introduce quantiﬁcational reasoning into the setting.
[3, 13, 2] highlight the importance of ﬁne spatial and compositional reasoning in the
VQA problem.
While the above datasets limit the reasoning domain within the image, [6, 14] propose a visual language task that requires external knowledge, sometimes even domain-speciﬁc knowledge, to answer the question.
In [15], the emphasis is on the logical entailment problem.
Recent methods such as [8, 9, 10] take advantage of the unprecedented amount of vision-language data and large size of models, achieving SOTA performances on the above VQA datasets.
As the reasoning problem in
VQA is becoming more and more complicated, it is urgent to have an interpretable way to analyze and diagnose the model and measure its reliability.
Explainable VQA and Metrics Very few SOTA VQA works investigate model explainability, especially in the age of big data and big models.
[16] is one of the standard datasets that focuses on explainability.
A similarity score between the question and the image caption is computed to check for question-relevant captions.
The caption is then used to generate an explanation that is relevant to the question-answer pair.
[17, 18] use image attributes and captions to provide a naive version of the explanation to the answer.
Some works [19, 11] make use of textual knowledge from external sources to improve the interpretability of the model.
However, such external knowledge is not always able to provide direct evidence to the answer.
The neural-symbolic framework [20] is also applied in the VQA domain since it is naturally more interpretable than the pure deep learning based methods.
More works [21, 22] have recently been proposed for enhancing the explainability of the VQA problem using either natural or synthetic data.
Another topic that is not well-studied in explainable VQA is the evaluation of explanations.
In [16, 22], conventional NLP metrics such as
ROUGE, BLEU scores are used to measure the quality of the generated explanation.
In contrast to [16], [21] doesn’t use a caption as the explanation, instead it uses tokens representing a bounding box in the image to replace key parts in the scene graph.
Methodology
In this section, we describe our method in detail.
Please refer to Figure 2 for an overview of the model ﬂow and architecture.
The proposed method consists of two major components: (i) coarse-to-ﬁne visual language reasoning for VQA and (ii) explanation generation module.
3.1 Extracting Features and Predicates
A pre-trained Faster-RCNN model[23] is used to extract features for each Region of Interest (RoI) in the image I .
The image features are denoted as f I .
Similarly, a Faster-RCNN model is also used to extract objects and attributes that form the image predicates.
We generate the Glove embedding[24] for each word in the set of image predicates, denoted as p I .
The words in the question Q are also encoded using Glove embeddings.
The question embeddings are then passed through a GRU to
[Figure]
extract sequential features f Q .
Together with this, question predicates are extracted by passing the question through a stop word ﬁlter.
The stop words not only consist of words from NLTK[25], but also include those words in questions that occur less frequently (threshold=10).
Each question predicate is then encoded with Glove embedding.
Question predicates are denoted as p Q .
3.2 Coarse-to-Fine Reasoning for VQA
VQA can be generally formulated as ( I, Q )
→ a , where a ∈ A and A is the set of answers.
Usually, the answer set A is ﬁltered by a frequency threshold from the annotated answers.
The coarse-to-ﬁne reasoning framework can be formalized as:
[Equation] [Equation]
where CFR θ is an end-to-end module with learnable parameter θ .
It consists of three different modules, including an information ﬁltering module IF , a multimodal learning module MM , followed by a semantic reasoning module SR .
Information Filtering
The extracted features may be noisy and contain incorrect information as they are extracted from pre-trained models.
This module helps remove unnecessary information and aids in understanding the importance of RoIs in images for each question.
Multimodal Learning Bilinear Attention Networks are used to learn features at both coarsegrained and ﬁne-grained levels.
The coarse-grained module works with image and question features and predicates and produces a joint representation at the coarse-grained level.
The ﬁne-grained module learns the correlation between the ﬁltered image and the question information and learns a joint representation at the ﬁne-grained level.
Semantic Reasoning
This module learns selective information from both the coarse-grained and ﬁne-grained module outputs.
The joint embedding from this module is then fed into a multi-layer perceptron to perform answer prediction and to the explanation module for explanation generation.
3.3 Explanation Generation
The joint embedding from the semantic reasoning module is used to train an explanation generator with ground-truth explanations as supervision.
The VQA backbone is augmented with the explanation generation module.
Two architectures are evaluated for explanation generation: (i) Long Short-Term
Memory (LSTM), (ii) Transformer Decoder.
The LSTM architecture used consists of 2 layers, with an input dimension of 768.
The Transformer Decoder architecture has an input dimension of 768, and consists of 8 attention heads.
In both cases, the input is a joint embedding and is trained using ground-truth explanations from the dataset (discussed in the following section) using cross-entropy loss for each word.
Suppose we have an explanation E = ( w 1 , ..., w i , .., w l ) , where w i ∈ V , the vocabulary and l is the length of the explanation.
The explanation can therefore be represented as a sequence of one-hot encoded vectors.
The loss function is therefore given by:
L expl = − l · | V | · l (cid:88) i = | V | (cid:88) k
= y
i,k · log( p ( w i,k )) (2) where y i,k is the one-hot vector for the i th word in the ground-truth explanation and p ( w i,k ) is the probability of the k th word in V at the i th time step.
We also make use of teacher enforcing to train the explanation module with autoregressive cross-entropy loss.
Experiments 4.1 Datasets and Evaluation
[Figure]
As discussed in section 2, there are a limited number of datasets that come with annotated explanations along with answers.
Owing to the large dataset size, we perform our experiments on the GQA-REX and VQA-E datasets, although they have their own set of limitations.
In this section, we measure the accuracy of the predicted answer and the quality of the generated explanation.
To evaluate the predicted answer, we use the VQA score as the metric.
Unfortunately, we don’t have accurate metrics for explanation evaluation.
Therefore, we report qualitative results from a human-study as well as quantitative results using conventional NLP metrics such as ROUGE and BLEU .
GQA-REX contains explanations for almost 98% of the samples in the GQA-balanced dataset.
It contains around 1.04M question-answer (QA) pairs spanning across 82K images, with annotated explanations (1 explanation per QA pair).
However, the explanations are consistent with the reasoning framework proposed in [21] and are therefore not completely in human-readable form (Refer
Figure 3(a)).
Although the explanations can be converted to human readable form using information from scene graphs, there exist instances of grammatical inaccuracy.
VQA-E contains explanations for around 40% of the QA pairs in the VQA2.0 dataset (1 explanation per QA pair).
The explanations are generated by comparing the similarity scores between the caption candidates and the ground-truth question-answer pair.
It is, therefore, not surprising that the explanations seem more like captions of the image that contains the answer.
Figure 3(b) illustrates a couple of examples from the VQA-E dataset.
4.2 VQA Experimental Results
[Table]
We use the CFRF[1] model as the backbone and augment it with an explanation generation module based on (i) LSTM and (ii) Transformer Decoder.
The baseline model is trained without any explanations as supervision.
Since our goal is to generate explanations while maintaining the
VQA performance, we incorporate both the loss for VQA answer and the supervision from the ground-truth explanation.
In order to investigate the impact of two different training signals, we design the loss function for the end-to-end training as follows:
[Equation]
L expl , where
L ans is the cross-entropy loss between the predicted answer and the ground truth answer, L expl is the loss function of the explanation generation module, as represented by Equation 2, and α ∈ [0 , 1] is the balance factor.
As shown in Table 1, our methods successfully maintain the VQA scores while generating textual explanations.
4.3 Results of Generated Explanations
Quantitative Results We use the explanations generated by the CFRF+LSTM model, corresponding to α = 0 .
75 (Refer Table 1).
The results of BLEU-1 and ROUGE scores are presented.
Note that
ROUGE scores are F1 scores.
As shown in Table 2, although our method outperforms the baseline, the absolute scores are only satisfactory.
[Table]
As mentioned in section 2, in the VQA domain, there is no standard common practice to quantitatively evaluate generated explanations.
Although both VQA-E and GQA-REX suggest using conventional
NLP metrics such as ROUGE and BLEU scores to evaluate generated explanations, it is not ideal.
These metrics are particularly designed for string matching in the form of overlapping n-grams.
Figure 4 illustrates why such metrics are practically unreliable.
[Figure]
In Figure 4(a), our model predicts the correct answer.
However, according to the string matching metrics, the quality of the explanation is poor.
In fact, interestingly, both the generated explanation and the ground-truth explanation in Figure 4(a) are annotated as valid by human annotators.
On the other hand, the generated explanation in Figure 4(b) is almost identical to the ground truth, and both of them are approved by human subjects as valid explanations for the answer.
In Figure 4(c), even though the predicted explanation is wrong, the string matching score is very high.
These examples lead to the following conclusion: we need to ﬁnd a more reliable metric to evaluate generated explanations for the VQA problem.
Human Study Setup Since no mature quantitative metrics are available, we introduce humans into the loop.
We conducted a human subject study using Amazon Mechanical Turk (AMT).
The goal of our subject study is to evaluate the quality of the explanation from human annotation.
One example of the human intelligence task (HIT) is shown in Figure 5:
Given an image-question pair from the VQA-E validation set, we designed two questions for the annotators.
Both questions are the same, asking whether an explanation leads to the answer.
But the contexts are different.
In the ﬁrst question, both the explanation and the answer are generated by our
[Table]
model.
In the second question, we provide the ground-truth explanation and answer.
The subjects have the same set of four options to choose from in both cases.
They are as follows: (i)
Yes; (ii) No, but contains the answer; (iii)
No; (iv) Not determined.
Annotators have no idea which context is the ground truth.
Speciﬁcally, option (ii) "
No, but contains the answer" means the explanation contains a sub-string that matches the predicted answer but it does not lead to the answer.
Option (iv) "Not determined" means the explanation leads to the answer, but the reasoning chain may be contradictory.
Human Approved Results
We randomly selected 4735 unique image-question pairs from the
VQA-E validation set for the human study.
Each image-question pair makes up one HIT with the same setting as in Figure 5.
In order to eliminate individual bias, we assigned each HIT to three different workers.
Therefore, in total, we received 4735 × 3 = 14205 responses from 111 subjects.
The raw distribution of subject annotations for all the 14205 responses (predicted [total] and groundtruth [total]) is shown in Table 3.
From the total set of responses, questions for which there is no consensus among the three annotators (all three responses are different) are discarded (869 out of 4735).
Following this, we calculate the vote using mode, i.e., a majority vote for the unique HITs.
Among the 3866 unique HITs, 65.16% of the generated explanations lead to the predicted answers, while 2.01% of them contain the answers but make no sense.
32.8% of the generated explanations fail to make connections with the predicted answers.
On the other hand, 93.12% of the ground-truth explanations lead to ground-truth answers.
According to [16], because the ground-truth explanations are selected by comparing the similarity between the question-ground-truth-answer pair and the caption candidates, most of them are valid.
[Table]
Besides raw annotations, we also provide a more straightforward result, as shown in Table 4.
Among the 3866 unique HITs, we ﬁnd that in 56.39% of the cases, our model can predict both the correct answer as well as generate valid explanations.
23.77% of the explanations are not valid, although the predicted answers are correct.
It may either make no sense or contain the answer in it, albeit with little signiﬁcance.
Only in 8.77% of the cases, our model generates a good explanation but leads to a wrong answer.
On the other hand, we also observe that 6.88% of the ground-truth explanations are not reasonable.
Therefore, our model is able to answer questions correctly and also generate valid explanations approximately 60.5% of the time.
Conclusion and Future Work
We explore the task of Explainable Visual Question Answering (Explainable-VQA).
We leverage the Coarse-to-Fine reasoning framework as the VQA backbone and augment it with an explanation generation module using two architectures: LSTM and Transformer Decoder.
Our model generates an explanation along with an answer while also maintaining close to SOTA VQA performance.
We conduct both objective experiments and a human study to evaluate the generated explanation, pointing out the urgency of proposing new metrics for explainable VQA.
Future Work We plan to improve the quality of generated explanations as well as leverage them to increase VQA accuracy.
We urge proper metrics to evaluate explanations for the VQA problem.
Acknowledgement We thank Nguyen et al., the authors of [1] for providing us with the features and predicates for the VQA 2.0 dataset and helping with answering all queries in a timely manner.
Appendix A Examples for Predicted Answers and Explanations
[Table]
[Figure]
Q: What type of plant is this?
GT Ans: broccoli
GT Expl: a broccoli plant in the ground near other plant life
Pred
[Table]
: broccoli Pred
[Table]
a
[Table]
up of a broccoli plant with leaves
[Table]
Q: Is this in the forest?
GT Ans: yes GT
[Table]
: a blue bird is sitting in the branch of a tree Pred Ans: yes Pred
[Table]
bird is perched on the branch of a tree
Q:
[Figure]
[Table]
[Figure]
[Table]
sitting in [Table] near the dash
[Table]
[Figure]
[Table]
sitting
[Table]
very
[Table]
What color
[Table]
sheet
[Table]
GT Ans:
GT Expl: a
Pred Ans:
Pred Expl: a comforter and pillows
Q: Is the bird
[Figure]
GT [Figure] : a blue bird is sitting on a tree branch
[Figure]
: a bird is sitting
[Figure]
the
[Figure]
a
[Figure]
it
[Figure]
a snowy area
[Figure]
[Table]
[Table]
toilet
[Table]
bathroom
[Table]
a mirror above it
[Figure]
[Table]
[Figure]