1 of 70

Visual Question and Answering

Shayan and Prem

2 of 70

Overview

  • DAQUAR and the Visual Turing Challenge
  • VQA dataset and methods
  • VQA v2 and a model with explanation

3 of 70

Toward a Visual Turing Challenge

Malinowski et al.

4 of 70

Story so far

  • Tremendous progress in machine perception and language understanding
  • Motivation to attack visual question-answering
  • Performance of different methods:
    • Measured against a crafted set of benchmarks
  • Crowdsourcing generated curated datasets, with a unique ground truth

5 of 70

Challenges of Crafting Good Benchmarks

  • As the complexity and the openness of the task grows, becomes more difficult
    • Interpreting and evaluating the answer of the system
    • Establishing and evaluation methodology that assigns scores
    • Inconsistency even in human answers
      • What are the “true” annotations?
  • Instead, we can use “social consensus”
    • Multiple human answers as different interpretations

6 of 70

Challenges of dealing with difficult tasks

  • Vision and Language
  • Common sense knowledge
  • Defining a benchmark dataset and quantifying performance

7 of 70

Vision and Language

  • Scalability: scale up to thousands of concepts
  • Concept ambiguity: As the number of categories increase, the semantic boundaries become more fuzzy
  • Attributes: human concepts also includes, not only objects, but attributes as well
    • Gender, colors, states (lights can be on or off)
  • Ambiguity in reference resolution
    • Object-centric, observer-centric, or world-centric frames of reference

8 of 70

Common sense knowledge

  • Some question can be answered with high reliability with only access to common sense knowledge
    • “Which object on the table is used for cutting?” Probably knife or scissors
    • “What is in front of scissors?”
  • Can be utilized to fulfill the task or limit the hypothesis space
  • Reduce the computational complexity

9 of 70

Defining a benchmark dataset and quantifying performance

  • VQA is about an end to end system
  • Do not want to enforce any constraints for the internal representation
  • Benchmark dataset for VQA similar to turing test is more tractable
  • QA needs textual annotations for the aspects related to the questions

10 of 70

DAQUAR: dataset for Visual Turing Challenge

  • Images present real-world indoor scenes
  • Based on NYU-Depth v2 dataset, with fine-grained categories
  • Questions are unconstrained natural language sentences
  • Contains 1088 different nouns in the questions, 803 in the answers, 1586 altogether

11 of 70

Quantifying the Performance

  • Complexity and openness of the task makes it challenging:
    • Automation for evaluating different architectures at scale
    • Ambiguity inherent in complex task that we are facing
      • Multiple interpretation, hence many correct answers
    • Coverage: Automatic performance metric should assign similar scores to different ways of expressing the same concept

12 of 70

WUPS Score

  • Automatic metric that quantifies performance of the holistic architecture

13 of 70

Visual Question Answering

Agrawal et al.

14 of 70

Introduction

15 of 70

Motivation

  • Spawning the next generation of AI algorithms requires:
    • Multi-modal knowledge beyond a single sub-domain
    • Well-defined quantitative evaluation metric
  • This paper introduces the task of free-form and open-ended Visual Question Answering

16 of 70

VQA System

  • Input:
    • Image
    • Free-form, open-ended, natural language question about the image
  • Output:
    • Natural language answer as the output
  • Requires a vast set of AI capabilities
    • Fine-grained recognition
    • Activity recognition
    • Knowledge base reasoning
    • Commonsense reasoning

17 of 70

Dataset

18 of 70

Dataset

  • Consists of real images and abstract scenes
  • Real images: 123k training images, 81k test images from MS COCO
    • Contains 5 image captions per image
  • Abstract scenes:To explain the high-level reasoning for VQA, but not the low level vision tasks
    • Contains 50k scenes, 5 single captions for all abstract scenes

19 of 70

Questions

  • Collecting interesting and diverse questions is challenging:
  • Must require the image to answer the question
  • Three question were gathered for each image/scene
  • The subjects were shown previous questions
  • 0.76M questions in total

20 of 70

Answers

  • 10 answered were gathered from unique workers for each question
  • Answers are “ brief phrases
  • Subjects also provide the level of confidence in answering the question
    • “Do you think you were able to answer the question correctly?”
      • Yes, no, maybe

21 of 70

Testing

  • Two modalities in answering the question
    • Open-ended
    • Multiple choice
  • Accuracy metric for open-ended task

  • Multiple choice task: 18 candidate answers were created for each question

22 of 70

Testing (Cont.)

  • Generated a candidate set of correct and incorrect answers from four sets of answers
  • Correct: The most common out of 10 correct answers
  • Plausible: three subjects answered the questions without seeing the image
    • Ensures that the image is necessary to answer the question
  • Popular: 10 most popular answers
    • “Yes”, ”no, ”2”, “1”, “white”, “3”, ”red”, “blue”, “4”, “green” for real images
  • Random: Correct answers from random questions in the dataset
  • 18 candidate answers: union of correct, plausible, and popular, and then random answers added

23 of 70

Questions Analysis

Questions can be clustered based on the words that start the question

24 of 70

Questions Analysis (Cont.)

  • Length of the questions:

  • Most questions range from 4 to 10 words

25 of 70

Answers Analysis

  • Length of the answers:
    • Real images: one, two, three words are 89.32%, 6.91%, and 2.74% respectively
    • Abstract images: one, two, three words are 90.51%, 5.89%, and 2.94% respectively
  • The brevity of the answers make automatic evaluation feasible
  • Brevity of the answer does not necessarily make the problem easier
    • Open-ended answers to open-ended questions
  • Questions require complex reasoning to arrive at these “simple” answers

26 of 70

Answer Analysis (Cont.)

  • Subject confidence and inter-human agreement
  • Self-judgement of confidence -> Answer agreement between subjects ??

27 of 70

Is the image necessary?

Test accuracy of human subjects when asked to answer the question

28 of 70

Answers Analysis

29 of 70

Answer Analysis (Cont.)

30 of 70

Which Questions Require Common Sense?

  • Two AMT studies on a subset of 10k images from the real images
  • Subjects were asked:
    • Whether or not they believed a question required commonsense to answer the question
    • The youngest age group that can answer the question
  • Each question was shown to 10 subjects
  • For 47.43% of questions 3 or more subjects voted yes to commonsense
  • Degree of commonsense to answer a question: percentage of subjects who voted yes

ُُ

31 of 70

Evaluation

32 of 70

VQA Baselines

  • Random: Randomly choose an answer from the top 1k answers
  • Prior (“yes”): Most popular answer
  • Per question type prior: Most popular answer per question type
  • Nearest neighbor: find k nearest neighbors, pick the most frequent ground truth

33 of 70

Methods

  • 2-channel model: Vision (image) channel, and language (question) channel
  • Top k=1000 most frequent answers are chosen as the possible outputs
  • Covers 82.67% of the train+val answers
  • Image Channel:
    • I : activation from the last layer of VGGNet are used as 4096-dim image embedding
    • Norm I : l2 normalized activations from the last hidden layer of VGGNet

34 of 70

Methods (Cont.)

  • Question Channel
    • Bag-of-words Question (BoW Q): top 1000 words in the question + top 10 first, second and third word of the question -> 1030 dim embedding of the question
    • LSTM Q: One hidden layer -> 1024 dim embedding of the question
    • Deeper LSTM Q: Two hidden layer

35 of 70

Methods (Cont.)

  • Multilayer Perceptron: Two embeddings are combined to obtain a single embedding
    • BoW Q + I : concatenate BoW Q and I embeddings
    • LSTM Q + I , deeper LSTM Q+ norm I: image embedding transformation, and fusion with LSTM embedding

36 of 70

Results

37 of 70

Results (Cont.)

38 of 70

Results (Cont.)

39 of 70

Results (Cont.)

40 of 70

Conclusion

41 of 70

Conclusion

  • Images are important in answering the question (both for humans and the models)
  • The accuracy of the best model is still far from human accuracy
  • The best model performs as well as a 4.74 year old child !

42 of 70

Making the V in VQA Matter

Goyal et al.

43 of 70

Some problems with VQA

Language priors can overshadow visual information and lead to good performance.

  • Tennis is the most popular sport (41%)
  • 2 is the most popular number (39%)

“Visual priming bias”

  • Do you see a...? Yes (87%)
  • “Is there a clock tower?” only asked when there are clock towers

44 of 70

VQA v2

  • For every (I, Q, A) triple have (I’, Q, A’) where A != A’
  • Increases entropy of P(A|Q) to make vision more important
  • SOTA v1 models do worse on v2
  • The dataset formulation allows for a new kind of explainable model

45 of 70

Dataset creation

46 of 70

Expand VQA v1

Dataset: a large set of (I, Q, A) tuples

We want to find another relevant (I’, Q, A’) such that A’ != A.

Additional requirements

  • Q should make sense for I’ as well
  • Method should work for entire dataset

47 of 70

I restricted to abstract scenes, Q restricted to binary questions, only one possible A’ (Zhang et al.)

48 of 70

AMT interface from Zhang et al.

49 of 70

This paper’s AMT interface to select I’

50 of 70

Statistics

  • Not possible selected 22% of the time (135k questions)
    • Object too small, similar images don’t have it
    • Any A’ is rare (consider Q “What color is the banana?”)
  • A=A’ about 9% of the time (worker was inaccurate?)
  • 195k/93k/191k additional images for train/test/val
  • Total is now 443k/214k/453k (question, image) pairs
  • Entropy across answer distributions, weighted by question type is +56%

51 of 70

Sample complementary images

52 of 70

Increase in entropy of answer distributions

53 of 70

Benchmark

54 of 70

Models compared

  • Deeper LSTM + norm I from VQA paper
  • Hierarchical Co-Attention (previously SOTA)
  • Multimodal Compact Bilinear Pooling (MCB) (2016 challenge winner)
  • Baselines
    • Always yes (27% on unbalanced v1, 24% on balanced v2)
    • Similar to Deeper LSTM + norm I but without I (question only)

55 of 70

First character is training, second character is testing

56 of 70

Models trained on v1 do worse on v2

57 of 70

When training on similar size v2, we improve

58 of 70

Performance increases with more data

59 of 70

Table of two models divided into question types

60 of 70

Large decrease in yes/no

61 of 70

Large increase in Y/N and number

62 of 70

Counterexample explanation

63 of 70

Explainable models

Related work:

  • Generate natural language explanation (Hendricks et al.)
  • Heatmap of important image regions (many papers)

Explanation by counterexample: find a similar image which we would have returned a different answer

64 of 70

First attempt

Model takes in (Q, I) and produces Apred.

Search through INN for I’ with the lowest P(Apred).

But Q might not apply to I’!

65 of 70

Two headed neural network

Shared trunk: Generate QI embeddings for I and INN

Answering head: Predict Apred from QI embedding of I.

Explaining head: Score all of INN using their QI embeddings and Apred.

Loss function is cross-entropy (for A) + sum of pairwise hinge losses (for I’)

66 of 70

Sample output of the model

67 of 70

Nearly worse than a naive baseline!

68 of 70

Improvements?

Models

  • Similar images I and I’ still have very high answer equivalence
  • Limited to fixed number of answers

Explanation

  • The fancy explanation model isn’t much better than a close image.

Dataset

  • 22% “not possible”

69 of 70

Wrap up

70 of 70

Wrap up

Is VQA an ultimate Turing Test for AI? Perception, language, KBs, etc. all needed

VQA v2 is today’s dataset of choice, accumulating improvements from DAQUAR and VQA v1

VQA challenge accuracy is around 69-70%, still has room for improvement

Why was Anton demoted on the arXiv VQA v1 paper author list?