VQA:NMN models
team4:
Cheng Chen
Hanrui Huang
21-02-2024
Timeline
2
paper 1. Deep Compositional Question Answering with Neural Module Networks
paper 2. Inferring and Executing Programs for Visual Reasoning
paper 3. Learning to Reason: End-to-End Module Networks for Visual Question Answering
paper 4. FiLM: Visual Reasoning with a General Conditioning Layer
Visual Question Answering, VQA
3
What is VQA?
VQA is answering questions about image (using AI).
example: ChatGPT
What is VQA?
With the development of AI, the VQA form task was first proposed in 2015.
4
It can be defined as a 3-tuple(w,x,y), where:
We want: A model encodes a predictive distribution p(y |w,x;\theta)
Two types of models for VQA
5
Deep Compositional Question Answering with Neural Module Networks
6
https://arxiv.org/pdf/1511.02799.pdf
NMN:motivation
7
There is no single best networks for all tasks. (type1:Monolithic Network)
Though different networks are used for different purposes, it is commonplace to initialize systems for many of vision tasks with a prefix of a network trained for classification
Main ideas of NMN
8
NMN structure
NMN: modules
9
TYPE[INSTANCE](ARG1)
TYPE: high-level module(Attention, Classification)
INSTANCE:Particular instance of the model under consideration
Different type of modules
10
attention module
image → convolve position with a weight vector → heatmap or unnormalized attention
Re-attention module
Shift the attention region
MLP + non-linear activation
Mapping the attention to another.
Different type of modules
11
combine[except]: stack of active and inactive attention region
classify[where]: Mapping the image and attention to an distribution
measurement module
ex: evaluate the existance
From Strings to Network:Parsing
12
Parsing the question with a Stanford Parser to obtain a universal dependency representation.(understanding the question)
Grammatical relationships between parts of a sentence
ex: what color is the truck -> color(truck)
Basic lemmatization, reduce the sparsity
ex: “kites” to “kite”
“were” to “be”
From Strings to Network: Layout
13
Based on specific task : symbolic representation → modular network
What color is his tie?
-> color(tie) #parsing
root leaf
How to build a predictive model based on that understanding?
Mapping:
Layouts, attentions, and answers are real predictions made by the model
assignments of modules
From Strings to Network: structure summary statistic
14
Structure summary statistics for neural module networks used in the paper NMN.
ex:
a network with depth 4 and size 5
NMN: Prediction
15
LTSM + NMN, jointly train
LSTM : model underlying syntactic rules
and capture semantic regularities
ex:
What is flying,
What are flying
parser: is&are →be : what(fly)
answer: “kite” & “kites”
LSTM & NMN module both make prediction over the answer distribution. The final prediction is the mean of these two prob. distribution.
NMN: experiments
16
Experiments show that NMN outperforme the previous works
NMN: examples of output
17
NMN: limitation
18
The NMN model takes a question as input and parses it into a combination of different modules using NLP rules. This combination of modules is often referred to as a "program".�However, for complex questions, the effectiveness of rule-based parsing is limited.
�E.g. Are these people most likely experiencing a work day?
praser -> be(people, likely), but desired analysis is is(people, work).
NMN: Improvement/variant (paper 2,3,4)
19
NMN-Based Models:
Feature Modulation Approaches Model:
Inferring and Executing Programs for Visual Reasoning
20
https://arxiv.org/pdf/1705.03633.pdf
21
NMN
Learning to Reason: End-to-End Module Networks for Visual Question Answering
22
https://arxiv.org/pdf/1704.05526.pdf
23
FiLM: Visual Reasoning with a General Conditioning Layer
24
https://arxiv.org/pdf/1709.07871.pdf
25
FiLM learns to adaptively influence the output of a neural network by applying an affine transformation to the network’s intermediate features(Fi,c), based on some input.
learns directly from visual and textual input!
Conclusions
Film don’t have the need for specific modular designs or program generation logic.
26