diff --git "a/parse/train/S1Euwz-Rb/S1Euwz-Rb_content_list.json" "b/parse/train/S1Euwz-Rb/S1Euwz-Rb_content_list.json" new file mode 100644--- /dev/null +++ "b/parse/train/S1Euwz-Rb/S1Euwz-Rb_content_list.json" @@ -0,0 +1,2230 @@ +[ + { + "type": "text", + "text": "COMPOSITIONAL ATTENTION NETWORKS FOR MACHINE REASONING ", + "text_level": 1, + "bbox": [ + 174, + 99, + 676, + 146 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Drew A. Hudson \nDepartment of Computer Science Stanford University \ndorarad@cs.stanford.edu ", + "bbox": [ + 183, + 170, + 411, + 226 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Christopher D. Manning Department of Computer Science Stanford University manning@cs.stanford.edu ", + "bbox": [ + 506, + 171, + 733, + 227 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "ABSTRACT ", + "text_level": 1, + "bbox": [ + 454, + 262, + 544, + 277 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "We present Compositional Attention Networks, a novel fully differentiable neural network architecture, designed to facilitate explicit and expressive reasoning. While many types of neural networks are effective at learning and generalizing from massive quantities of data, this model moves away from monolithic blackbox architectures towards a design that provides a strong prior for iterative reasoning, allowing it to support explainable and structured learning, as well as generalization from a modest amount of data. The model builds on the great success of existing recurrent cells such as LSTMs: It sequences a single recurrent Memory, Attention, and Control (MAC) cell, and by careful design imposes structural constraints on the operation of each cell and the interactions between them, incorporating explicit control and soft attention mechanisms into their interfaces. We demonstrate the model’s strength and robustness on the challenging CLEVR dataset for visual reasoning, achieving a new state-of-the-art $9 8 . 9 \\%$ accuracy, halving the error rate of the previous best model. More importantly, we show that the new model is more computationally efficient and data-efficient, requiring an order of magnitude less time and/or data to achieve good results. ", + "bbox": [ + 233, + 296, + 764, + 518 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "1 INTRODUCTION ", + "text_level": 1, + "bbox": [ + 176, + 550, + 334, + 565 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "This paper considers how best to design neural networks to perform the iterative reasoning necessary for complex problem solving. Putting facts and observations together to arrive at conclusions is a central necessary ability as we work to move neural networks beyond their current great success with sensory perception tasks (LeCun et al., 1998; Krizhevsky et al., 2012) towards displaying Artificial General Intelligence. ", + "bbox": [ + 174, + 583, + 823, + 652 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Concretely, we develop a novel model that we apply to the CLEVR dataset (Johnson et al., 2016) for visual question answering (VQA). VQA (Antol et al., 2015; Gupta, 2017) is a challenging multimodal task that requires responding to natural language questions about images. However, Agrawal et al. (2016) show how the first generation of successful models on VQA tasks tend to acquire only superficial comprehension of both the image and the question, exploiting dataset biases rather than capturing a sound perception and reasoning process that would lead to the correct answer (Sturm, 2014). CLEVR was created to address this problem. As illustrated in figure 1, instances in the dataset consist of rendered images featuring 3D objects of several shapes, colors, materials and sizes, coupled with unbiased, compositional questions that require an array of challenging reasoning skills such as following transitive relations, counting objects and comparing their properties, without allowing any shortcuts around such reasoning. Notably, each instance in CLEVR is also accompanied by a tree-structured functional program that was both used to construct the question and reflects its reasoning procedure – a series of predefined operations – that can be composed together to answer it. ", + "bbox": [ + 174, + 660, + 612, + 881 + ], + "page_idx": 0 + }, + { + "type": "image", + "img_path": "images/674dcd95919d901cb7279f9b0552761c7620c6d163165031e5b1cd19087e50a7.jpg", + "image_caption": [ + "Figure 1: A sample image from the CLEVR dataset, with a question: “There is a purple cube behind a metal object left to a large ball; what material is it?” " + ], + "image_footnote": [], + "bbox": [ + 632, + 678, + 818, + 773 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "", + "bbox": [ + 176, + 883, + 823, + 922 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Most neural networks are essentially very large correlation engines that will hone in on any statistical, potentially spurious pattern that allows them to model the observed data more accurately. In contrast, we seek to create a model structure that requires combining sound inference steps to solve a problem instance. At the other extreme, some approaches adopt symbolic structures that resemble the expression trees of programming languages to perform reasoning (Andreas et al., 2016b; Hu et al., 2017). In particular, some approaches to CLEVR use the supplied functional programs for supervised or semi-supervised training (Andreas et al., 2016a; Johnson et al., 2017). Not only do we wish to avoid using such supervision in our work, but we in general suspect that the rigidity of these structures and the use of an inventory of operation-specific neural modules undermines robustness and generalization, and at any rate requires more complex reinforcement learning methods. ", + "bbox": [ + 174, + 103, + 825, + 242 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "To address these weaknesses, while still seeking to use a sound and transparent underlying reasoning process, we propose Compositional Attention Networks, a novel, fully differentiable, non-modular architecture for reasoning tasks. Our model is a straightforward recurrent neural network with attention; the novelty lies in the use of a new Memory, Attention and Composition (MAC) cell. The constrained and deliberate design of the MAC cell was developed as a kind of strong structural prior that encourages the network to solve problems by stringing together a sequence of transparent reasoning steps. MAC cells are versatile but constrained neural units. They explicitly separate out memory from control, both represented recurrently. The unit contains three sub-units: The control unit updates the control representation based on outside instructions (for VQA, the question), learning to successively attend to different parts of the instructions; the read unit gets information out of a knowledge base (for VQA, the image) based on the control signal and the previous memory; the write unit updates the memory based on soft self-attention to previous memories, controlled by the retrieved information and the control signal. A universal MAC unit with a single set of parameters is used throughout the reasoning process, but its behavior can vary widely based on the context in which it is applied – the input to the control unit and the contents of the knowledge base. With attention, our MAC network has the capacity to represent arbitrarily complex acyclic reasoning graphs in a soft manner, while having physically sequential structure. The result is a continuous counterpart to module networks that can be trained end-to-end simply by backpropagation. ", + "bbox": [ + 174, + 250, + 825, + 500 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "We test the behavior of our new network on CLEVR and its associated datasets. On the primary CLEVR reasoning task, we achieve an accuracy of $9 8 . 9 \\%$ , halving the error rate compared to the previous state-of-the-art FiLM model (Perez et al., 2017). In particular, we show that our architecture yields better performance on questions involving counting and aggregation. In supplementary studies, we show that the MAC network learns more quickly (both in terms of number of training epochs and training time) and more effectively from limited amounts of training data. Moreover, it also achieves a new state-of-the-art performance of $8 2 . 5 \\%$ on the more varied and difficult humanauthored questions of the CLEVR-Humans dataset. The careful design of our cell encourages compositionality, versatility and transparency. We achieve these properties by defining attention-based interfaces that constrict the cell’s input and output spaces, and so constrain the interactions both between and inside cells in order to guide them towards simple reasoning behaviors. Although each cell’s functionality has only a limited range of possible continuous reasoning behaviors, when chained together in a MAC network, the whole system becomes expressive and powerful. In the future, we believe that the architecture will also prove beneficial for other multi-step reasoning and inference tasks, for instance in machine comprehension and textual question answering. ", + "bbox": [ + 174, + 507, + 825, + 714 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "2 RELATED WORK ", + "text_level": 1, + "bbox": [ + 176, + 746, + 344, + 762 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "There have been several prominent models that address the CLEVR task. By and large they can be partitioned into two groups: module networks, which in practice have all used the strong supervision provided in the form of tree-structured functional programs that accompany each data instance, and large, relatively unstructured end-to-end differentiable networks that complement a fairly standard stack of CNNs with components that aid in performing reasoning tasks. In contrast to modular approaches (Andreas et al., 2016a;b; Hu et al., 2017; Johnson et al., 2017), our model does not require additional supervision and makes use of a single computational cell chained in sequence (like an LSTM) rather than a collection of custom modules deployed in a rigid tree structure. In contrast to augmented CNN approaches (Santoro et al., 2017; Perez et al., 2017), we suggest that our approach provides an ability for relational reasoning with better generalization capacity and higher computational efficiency. These approaches and other related work are discussed and contrasted in more detail in the supplementary material in section C. ", + "bbox": [ + 174, + 784, + 825, + 924 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "", + "bbox": [ + 173, + 103, + 823, + 132 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3 COMPOSITIONAL ATTENTION NETWORKS ", + "text_level": 1, + "bbox": [ + 174, + 151, + 553, + 167 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Compositional Attention Networks is an end-to-end architecture for question-answering tasks that sequentially performs an explicit reasoning process by stringing together small building blocks, called MAC cells, each is responsible for performing one reasoning step. ", + "bbox": [ + 174, + 183, + 825, + 224 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "We now provide an overview of the model, and a detailed discussion of the MAC cell. The model is composed of three components: an Input unit, the core MAC network, and an output unit. A TensorFlow implementation of the network, along with pretrained models will be made publicly available. ", + "bbox": [ + 174, + 231, + 823, + 287 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "In this paper we explore the model in the context of VQA. However, it should be noted that while the input and output units are naturally domain-specific and should be designed to fit the task at hand, the MAC network has been designed to be generic and more broadly applicable, and may prove useful in contexts beyond those explored in the paper, such as machine comprehension or question answering over knowledge bases, which in our belief is a promising avenue for future work. ", + "bbox": [ + 174, + 294, + 825, + 364 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3.1 THE INPUT UNIT ", + "text_level": 1, + "bbox": [ + 176, + 381, + 333, + 395 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "The input unit processes the raw inputs given to the system into distributed vector representations. It receives a text question (or in general, a query), and an image (or in general, a Knowledge Base (KB)) and processes each of them with a matching sub-unit, for the query and the KB, here a biLSTM and a CNN. More details can be found in the supplementary material, section A. ", + "bbox": [ + 174, + 406, + 825, + 463 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "At the end of this stage, we get from the query sub-unit a series of biLSTM output states, which we refer to as contextual words, $[ c w _ { 1 } , . . . , c w _ { S } ]$ , where $S$ is the length of the question. In addition, we get $q = [ \\overleftrightarrow { \\lambda \\omega _ { 1 } } , \\overrightarrow { c w _ { S } } ]$ , the concatenation of the hidden states from the backward and forward LSTM passes. We refer to $q$ as the question representation. Furthermore, we get from the Knowledge-Base sub-unit a static representation of the knowledge base. For the case of VQA, it will be represented by a continuous matrix $K B _ { V }$ of dimension $H , W , d$ , where $H = W = 1 4$ are the height and width of the transformed image, corresponding to each of its regions. ", + "bbox": [ + 174, + 469, + 825, + 568 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3.2 THE MAC CELL ", + "text_level": 1, + "bbox": [ + 176, + 583, + 326, + 598 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "The MAC network, which is the heart of our model, chains a sequence of small building blocks, called MAC cells, each responsible for performing one reasoning step. The model is provided access to a Knowledge Base (KB), which is, for the specific case of VQA, the given image, and then upon receiving a query, i.e. a question, the model iteratively focuses, in $p$ steps, on the query’s various parts, each reflects in turn the current reasoning step, which we term the control. Consequently, guided by this control, it retrieves the relevant information from the KB, that is then passed to the next cell in a recurrent fashion. ", + "bbox": [ + 174, + 609, + 825, + 707 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Drawing inspiration from the Model-View-Controller paradigm used in software design and from the commonly exercised separation between control and data paths in computer architecture, the MAC cell is composed of three units: control unit, read unit and write unit. Each has a clearly defined role and an interface through which it interacts with the other units. See figure 2. ", + "bbox": [ + 176, + 714, + 823, + 770 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "The careful design and imposed interfaces that constrain the interaction between the units inside the MAC cell, as described below, serve as structural prior that limits the space of hypotheses it can learn, thereby guiding it towards acquiring the intended reasoning behaviors. As such, this prior facilitates the learning process and mitigate overfitting issues. ", + "bbox": [ + 174, + 777, + 823, + 833 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "In particular, and similar in spirit to Perez et al. (2017), we allow the question to interact with the Knowledge Base – the image for the case of VQA, only through indirect means: by guiding the cell to attend to different elements in the KB, as well as controlling its operation through gating mechanisms. Thus, in both cases, the interaction between these mediums, visual and textual, or knowledge and query, is mediated through probability distributions, either in the form of attention maps, or as gates, further detailed below. This stands in stark contrast to many common approaches that fuse the question and image together into the same vector space through linear combinations, multiplication, or concatenation. Rather, our controlled interaction distills the influence that the query should have in processing the Knowledge Base, casting it onto discrete probability distributions instead. ", + "bbox": [ + 174, + 840, + 825, + 922 + ], + "page_idx": 2 + }, + { + "type": "image", + "img_path": "images/21ef6959e8f5c66e79f26b2aa043aef1bf62c1ad19d7a86079e5194974b914be.jpg", + "image_caption": [ + "Figure 2: The MAC cell, which is a recurrent unit comprised of a Control Unit, Read Unit, and Write Unit. Blue shows the control flow and red shows the memory flow. See section 3.2 for details. " + ], + "image_footnote": [], + "bbox": [ + 351, + 103, + 604, + 250 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "", + "bbox": [ + 176, + 318, + 823, + 359 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "The MAC cell has been designed to replace the discrete and predefined “modules” used in the modular approach (Andreas et al., 2016a;b; Hu et al., 2017; Johnson et al., 2017). Rather, we create one universal and versatile cell that is applied across all the reasoning steps, sharing both its architecture as well as its parameters, across all of its instantiations. In contrast to the discrete modules, each trained to specialize to some specific elementary reasoning task, the MAC cell is capable of demonstrating a continuous range of possible reasoning behaviors conditioned on the context in which it is applied – namely, the inputs it receives from the prior cell. ", + "bbox": [ + 174, + 366, + 825, + 464 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Each cell $M A C _ { i }$ maintains two dual states: control $c _ { i }$ and memory $m _ { i }$ , both are continuous vectors of dimension $d$ . The control $c _ { i }$ represents the reasoning operation the MAC cell should accomplish in the current step – focusing only on some aspect of the whole question. This is represented by a weighted-average attention-based sum of the question words. The memory $m _ { i }$ represents the current context information deemed relevant to respond to the query, or answer the question.This is represented practically by a weighted average over elements from the KB, or for the case of VQA, regions in the image. $m _ { 0 }$ and $c _ { 0 }$ are initialized each to a random vector parameter of dimension $d$ . The memory and control states are passed from one cell to the next in a recurrent fashion, and used in a way reminiscent of Key-Value memory networks (Miller et al., 2016), as discussed below. ", + "bbox": [ + 174, + 470, + 825, + 595 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "3.2.1 THE CONTROL UNIT ", + "text_level": 1, + "bbox": [ + 176, + 611, + 372, + 626 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "The control unit determines the reasoning operation that should be applied at this step. It receives the contextual words $[ c w _ { 1 } , . . . , c w _ { S } ]$ , the question representation $q$ , and the control state from the previous MAC cell $c _ { i - 1 }$ , all of which are vectors of dimension $d$ . ", + "bbox": [ + 174, + 635, + 825, + 676 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "We would like to allow our MAC cell to perform continuously varied and adaptive range of behaviors, as demanded by the question. Therefore, we define the behavior of each cell to be a function of the contextual words $[ c w _ { 1 } , . . . , c w _ { S } ]$ , weighted-averaged according to the attention distribution that the control unit produces at each step. This will allow the cell to adapt its behavior – the reasoning operation it performs – to the question it receives, instead of having a fixed set of predefined behaviours as is the case in competing approaches Andreas et al. (2016a;b); Johnson et al. (2017). ", + "bbox": [ + 174, + 684, + 825, + 768 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "The formal specification of the control unit is shown in figure 3. The question $q$ is linearly transformed into a vector $q _ { i }$ of the same dimension, which in turn is concatenated with the previous control state $c _ { i - 1 }$ and linearly transformed again to a $d$ -dimensional vector $c q _ { i }$ . ", + "bbox": [ + 174, + 775, + 825, + 818 + ], + "page_idx": 3 + }, + { + "type": "equation", + "img_path": "images/629b6ac32640eb52fb3021fd3b45ba817455f27666f7d51a163756755ee964e5.jpg", + "text": "$$\n\\begin{array} { c } { q _ { i } = W _ { i } ^ { d , d } \\cdot q + b _ { i } ^ { d } } \\\\ { c q _ { i } = W ^ { 2 d , d } \\left[ q _ { i } , c _ { i - 1 } \\right] + b ^ { d } } \\end{array}\n$$", + "text_format": "latex", + "bbox": [ + 408, + 839, + 591, + 883 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Note that in contrast to all other parameters of the cell, which are shared across its instantiations at the different steps $i = 1 , . . . , p$ , the parameters $W _ { i } ^ { d , d }$ and $b _ { i } ^ { d }$ are different for each iteration. This is done to allow each cell to attend more readily to different aspects (i.e. parts) of the questions, depending on the index of the current step – its relative stage in the context of the whole reasoning process. ", + "bbox": [ + 173, + 892, + 825, + 924 + ], + "page_idx": 3 + }, + { + "type": "image", + "img_path": "images/432535676eeb69a82d7848d82a8a327d906d019f07db47ee24440c80b3beab34.jpg", + "image_caption": [ + "Figure 3: The Control Unit (CU) of the MAC cell. See section 3.2.1 for details. Best viewed in color. " + ], + "image_footnote": [], + "bbox": [ + 330, + 102, + 663, + 194 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "", + "bbox": [ + 174, + 263, + 825, + 306 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "$c q _ { i }$ represents the current reasoning operation we would like to perform in a continuous way, taking into account both the overall meaning of the question $q _ { i }$ , as well as the words the model attended to in the previous step, $c _ { i - 1 }$ . ", + "bbox": [ + 174, + 313, + 825, + 356 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "However, we would like to prevent the cell from diverging in the reasoning operations it tries to perform, and instead anchor it back in the question words, by using them to represent the reasoning operation of the current step. We can achieve that by computing an attention distribution $c v _ { i }$ over the contextual words $[ c w _ { 1 } , . . . , c w _ { S } ]$ based on their similarity to $c q _ { i }$ . Then, summing the contextual words according to the attention distribution $c v _ { i }$ will allow us to have a new control state, $c _ { i }$ , which is represented again in terms of words from the question. Intuitively, it is the gist of the question that is relevant to the reasoning operation we would like to perform in the current step. ", + "bbox": [ + 173, + 361, + 825, + 459 + ], + "page_idx": 4 + }, + { + "type": "equation", + "img_path": "images/d43f433dbdaf70d728243b740937cc4b7c74be9d6cda3d636612e146da07d190.jpg", + "text": "$$\n\\begin{array} { c l c r } { { c v _ { i , s } = \\displaystyle \\mathrm { s o f t m a x } \\big ( W ^ { d , 1 } \\big ( c q _ { i } \\circ c w _ { s } \\big ) + b ^ { 1 } \\big ) } } \\\\ { { \\big . } } \\\\ { { c _ { i } = \\displaystyle \\sum _ { s = 1 } ^ { S } c v _ { i , s } \\cdot c w _ { s } } } \\end{array}\n$$", + "text_format": "latex", + "bbox": [ + 364, + 486, + 632, + 551 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Finally, the control unit returns the current control state $c _ { i }$ , along with an attention map $c v _ { i }$ over the contextual words. ", + "bbox": [ + 173, + 565, + 823, + 593 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "3.2.2 THE READ UNIT ", + "text_level": 1, + "bbox": [ + 176, + 609, + 344, + 625 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "The Read Unit is provided with access to the knowledge base $K B _ { V }$ , along with the previous memory state $m _ { i - 1 }$ and the current control $c _ { i }$ . It is responsible for retrieving relevant content from the Knowledge Base $K B _ { V }$ for the reasoning task that the MAC cell should accomplish at this step, which is represented by the current control state $c _ { i }$ , as explained above. Figure 4 shows a diagram. ", + "bbox": [ + 174, + 635, + 825, + 690 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "The relevance of the new information is judged in two stages by the “relatedness” of each element in the KB (or for the case of VQA, each region in the image) to either the memory $m _ { i - 1 }$ that has accumulated relevant information from previous iterations, or to the current control $c _ { i }$ , pointing towards the next piece of information that should be taken into account. Here, relatedness is measured by trained linear transformations comparing each element to the previous memory and the current control. ", + "bbox": [ + 174, + 696, + 825, + 781 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "More formally, at the first stage, the interaction between each element $K B _ { h , w }$ , where $\\begin{array} { r l } { h } & { { } = } \\end{array}$ $1 , . . . , H , w = 1 , . . . , W$ , and the previous memory $m _ { i - 1 }$ is computed by: ", + "bbox": [ + 173, + 787, + 823, + 818 + ], + "page_idx": 4 + }, + { + "type": "equation", + "img_path": "images/92d034ab00623a6201883d47cd297723d599fe90d135f474e1198ca4a4622a1a.jpg", + "text": "$$\nm _ { i - 1 } ^ { \\prime } = W ^ { d , d } \\cdot m _ { i - 1 } + b ^ { d }\n$$", + "text_format": "latex", + "bbox": [ + 408, + 835, + 589, + 856 + ], + "page_idx": 4 + }, + { + "type": "equation", + "img_path": "images/ba795ad9270013570f22ffe5663537aa1ee717d610072223ec7afd2128e47f00.jpg", + "text": "$$\n\\begin{array} { r l } { \\boldsymbol { K } \\boldsymbol { B } _ { h , w } ^ { \\prime } = \\boldsymbol { W } ^ { d , d } \\cdot \\boldsymbol { K } \\boldsymbol { B } _ { h , w } + \\boldsymbol { b } ^ { d } } & { { } } \\\\ { \\big ( \\boldsymbol { I } _ { m - K B } \\big ) _ { h , w } = \\boldsymbol { m } _ { i - 1 } ^ { \\prime } \\circ \\boldsymbol { K } \\boldsymbol { B } _ { h , w } ^ { \\prime } } & { { } } \\end{array}\n$$", + "text_format": "latex", + "bbox": [ + 392, + 878, + 604, + 924 + ], + "page_idx": 4 + }, + { + "type": "image", + "img_path": "images/a538d781a85f8151d41cc83e31d872618ae93e0b206ef08dd299f4020e8135bf.jpg", + "image_caption": [ + "Figure 4: The Read Unit (RU) diagram. Blue refers to control flow, purple to knowledge flow and red to memory flow. See section 3.2.2 for description. " + ], + "image_footnote": [], + "bbox": [ + 326, + 102, + 668, + 194 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "These memory-KB interactions measure the relatedness of each element in the KB to the memory accumulated so far, which holds information that has been deemed relevant to handle previous reasoning steps towards addressing the question. They allow the model to perform transitive inference, retrieving a new piece of information that now seems important in light of the recent memory retrieved in a prior iteration. ", + "bbox": [ + 174, + 261, + 823, + 330 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "However, there are cases which necessitate the model to temporarily ignore current memories, when choosing the new information to retrieve. Logical OR is a classical example: when the model has to look at two different objects at the same time, and assuming it stored one of them at the first iteration, it should briefly ignore it, considering new information that is relevant to the question but is unrelated to the memory. In order to achieve such capability, the read unit concatenates the original KB elements to each corresponding memory-KB interaction, which are then projected back to $d$ -dimensional space (equation 6a): ", + "bbox": [ + 174, + 338, + 825, + 436 + ], + "page_idx": 5 + }, + { + "type": "equation", + "img_path": "images/ada1fba84ad0bac03e8e9a8f8cc72cbc8bba767e7414ee8b9b65dab9dee93066.jpg", + "text": "$$\n\\begin{array} { c } { { I _ { m - K B } , ^ { \\prime } = W ^ { 2 d , d } \\left[ I _ { m - K B } , K B _ { h , w } \\right] + b ^ { d } } } \\\\ { { I _ { c m - K B } = c _ { i } \\circ \\left( I _ { m - K B } \\right) ^ { \\prime } } } \\end{array}\n$$", + "text_format": "latex", + "bbox": [ + 357, + 458, + 640, + 502 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "At the second stage, the read unit compares the current $c _ { i }$ with these memory-KB interactions, in order to focus on the information that is relevant to the current reasoning operation that the MAC cell seeks to accomplish. The result is then passed to a softmax layer yielding an attention map $m v _ { i }$ over the KB, which is used in turn to retrieve the relevant information to perform the current reasoning step. ", + "bbox": [ + 174, + 511, + 823, + 580 + ], + "page_idx": 5 + }, + { + "type": "equation", + "img_path": "images/1af356ca707634550da691f9e1c5befb2540a27633c9abfa602dcd4cdf1d0ea5.jpg", + "text": "$$\n\\begin{array} { r } { m v _ { i } = \\operatorname { s o f t m a x } \\left( W ^ { d , d } \\cdot I _ { c m - K B } + b ^ { d } \\right) } \\\\ { m _ { n e w } = \\displaystyle \\sum _ { h , w = 1 , 1 } ^ { H , W } \\left( m v _ { i } \\right) _ { h , w } \\cdot K B _ { h , w } } \\end{array}\n$$", + "text_format": "latex", + "bbox": [ + 366, + 603, + 632, + 671 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Finally, the read unit returns the newly retrieved information $m _ { n e w }$ , along with an attention map $m v _ { i }$ over the Knowledge Base. ", + "bbox": [ + 171, + 683, + 823, + 710 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "To give an example of the read unit operation, assume a given question $q$ such as “What object is located left to the blue ball?”, whose associated answer is “cube”. Initially, no cue is provided to the model to attend to that cube, since no direct information about it presents in the question. Instead, based on its comprehension of the question, the model may start by focusing on the blue ball at the first iteration, such that the memory state $m _ { 1 }$ will capture the blue ball. However, in the second iteration, the control unit, after re-examining the question, may realize it should now look left, storing the word “left” in $c _ { 2 }$ . Then, when considering both $m _ { 1 }$ and $c _ { 2 }$ , the read unit will realize it should perform a reasoning operation corresponding to the word “left” (stored in $c _ { 2 }$ ) given a memory representing the blue ball in $m _ { 1 }$ , thereby allowing it to look left to the blue ball and find the cube. ", + "bbox": [ + 173, + 717, + 825, + 856 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "3.2.3 THE WRITE UNIT ", + "text_level": 1, + "bbox": [ + 176, + 871, + 351, + 886 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "The Write Unit is responsible for creating the new memory state $m _ { i }$ that will reflect all the information considered to be important to answer the question so far, i.e. up to the current iteration in the ", + "bbox": [ + 174, + 895, + 823, + 924 + ], + "page_idx": 5 + }, + { + "type": "image", + "img_path": "images/da3df6ec5443731e5ef4aaf8424acd7af4458f638b9bc19f84b7d1ed88b9267e.jpg", + "image_caption": [ + "Figure 5: The Write Unit (WU) diagram. Blue refers to control flow and red to memory flow. See section 3.2.3 for description. " + ], + "image_footnote": [], + "bbox": [ + 367, + 102, + 632, + 198 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "reasoning process. It receives the last memory state $m _ { i - 1 }$ from the previous MAC cell, along with the newly retrieved information from the read unit in the current iteration, $m _ { n e w }$ . See figure 5 for a diagram. ", + "bbox": [ + 174, + 263, + 825, + 306 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "In the main design we have explored, merging the new information with the previous memory state is done simply by a linear transformation. ", + "bbox": [ + 173, + 313, + 823, + 342 + ], + "page_idx": 6 + }, + { + "type": "equation", + "img_path": "images/fae487b9caae60fb93edbf054820528c6b18061cf0a3ab7e592c6d4fbd281b4a.jpg", + "text": "$$\nm _ { i } ^ { \\prime } = W ^ { 2 d , d } [ m _ { n e w } , m _ { i - 1 } ] + b ^ { d }\n$$", + "text_format": "latex", + "bbox": [ + 392, + 359, + 606, + 378 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "In addition, we have explored two variations of this design. The first, self-attention, allows considering any previous memories rather than just the last one $m _ { i - 1 }$ , thus providing the network with the capacity to model non-sequential reasoning processes. The second variation is adding gating mechanisms to the writing unit. These may allow the model to dynamically adjust the practical length of the computation to the question complexity and stabilize the memory content throughout the sequential network (similarly to GRUs and LSTMs). ", + "bbox": [ + 173, + 386, + 825, + 469 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Self-Attention. The current architecture that we have presented allows the model to perform reasoning steps in a sequence, passing control and memory states from one cell to the following. However, we would like to grant the system with more flexibility. Particularly, we would like to allow it to capture more complicated reasoning processes such as trees and graphs - Directed Acyclic Graph (DAG) in particular, where several branches of reasoning sub-processes are merged together in later stages. Indeed, the CLEVR dataset includes cases where the questions embody tree-like reasoning process, rather than just sequences, which we would like to address correctly in our model. ", + "bbox": [ + 173, + 484, + 825, + 583 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "We achieve that by adding self-attention connections between each MAC cell and all the prior cells. Since each cell can look on all the prior reasoning steps and their corresponding memories retrieved from the Knowledge Base, it can virtually capture any directed acyclic graph, while still having physically sequential layout. ", + "bbox": [ + 174, + 589, + 825, + 645 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "More formally, the current MAC cell, of the $i ^ { t h }$ iteration, is granted with access to $c _ { 1 } , . . . , c _ { i - 1 }$ along with the corresponding $m _ { 1 } , . . . , m _ { i - 1 }$ , that have been computed by the prior MAC cells. It begins by computing the similarity between $c _ { i }$ and $c _ { 1 } , . . . , c _ { i - 1 }$ , and use it to derive an attention map over the prior MAC cells $s a _ { i , j }$ for $j = 1 , . . . , i - 1$ . This represents the relevance of the $j ^ { t h }$ prior reasoning step to the current one $i$ (equation 9a). ", + "bbox": [ + 174, + 650, + 825, + 722 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Then, we average the previous memories according to this resulted attention map $s a _ { i j }$ . We obtain $m _ { s a }$ , representing the information from all the other reasoning steps that is relevant to the current one (equation 9b). ", + "bbox": [ + 176, + 728, + 821, + 771 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "This resembles the approach of Key-Value networks (Miller et al., 2016). The similarity between control states, corresponding to the reasoning operations that are performed in each prior step, allows the model to select which memories should be taken into account, when creating the new memory – namely, which branches of the reasoning process should be merged together at this point. ", + "bbox": [ + 174, + 777, + 825, + 834 + ], + "page_idx": 6 + }, + { + "type": "equation", + "img_path": "images/b2917add3d0ec9deb18d84cf0919d7c999da2714964aba59d6c8b9129667c984.jpg", + "text": "$$\n\\begin{array} { c } { { s a _ { i j } = \\displaystyle \\mathrm { s o f t m a x } \\left( W ^ { d , 1 } ( c _ { i } \\circ c _ { j } ) + b ^ { 1 } \\right) } } \\\\ { { ( m _ { s a } ) _ { i } = \\displaystyle \\sum _ { j = 1 } ^ { i - 1 } s a _ { i j } \\cdot m _ { j } } } \\end{array}\n$$", + "text_format": "latex", + "bbox": [ + 375, + 856, + 622, + 922 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Finally, we use $m _ { s a }$ along with $m _ { i } ^ { \\prime }$ to compute $m _ { i } ^ { \\prime \\prime }$ , the new memory content in this variation. ", + "bbox": [ + 169, + 102, + 785, + 119 + ], + "page_idx": 7 + }, + { + "type": "equation", + "img_path": "images/5e36c1389b375bd38c94672bc787841067c61a64ebb4c06b118a35c4f749cf9f.jpg", + "text": "$$\nm _ { i } ^ { \\prime \\prime } = W ^ { 2 d , d } [ m _ { n e w } , m _ { i } ^ { \\prime } ] + b ^ { d }\n$$", + "text_format": "latex", + "bbox": [ + 398, + 141, + 599, + 160 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Memory Gate. The currently presented MAC network has some fixed number $p$ of concatenated MAC cells, representing the length of the overall reasoning process we perform. However, not all questions require reasoning sequence of the same length. Some questions are simpler while others more complex. ", + "bbox": [ + 173, + 176, + 825, + 233 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Motivated by this observation, we add a gate over the new memory computed at each step, that may selectively keep content of the previous memory $m _ { i - 1 }$ unchanged. Practically, the gate functions in a similar way to a highway network (Srivastava et al., 2015), where the gate value is conditioned on the current reasoning operation, $c _ { i }$ . ", + "bbox": [ + 174, + 239, + 823, + 296 + ], + "page_idx": 7 + }, + { + "type": "equation", + "img_path": "images/06b7c9f2a66fd66b565bd6bf64cfa368a00407f9ea2545d0e729a32d2b2c1b1d.jpg", + "text": "$$\n\\begin{array} { c } { { { c _ { i } } ^ { \\prime } = W ^ { d , d } \\cdot c _ { i } + b ^ { d } } } \\\\ { { m _ { i } = \\mathrm { s i g m o i d } \\left( c _ { i } ^ { \\prime } \\right) \\cdot m _ { i - 1 } + ( 1 - \\mathrm { s i g m o i d } \\left( c _ { i } ^ { \\prime } \\right) ) \\cdot m _ { i } ^ { \\prime \\prime } } } \\end{array}\n$$", + "text_format": "latex", + "bbox": [ + 316, + 324, + 681, + 366 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "The write unit returns the new memory state $m _ { i }$ , that will be passed along with $c _ { i }$ to the next MAC cell. ", + "bbox": [ + 174, + 381, + 823, + 410 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "3.2.4 DISCUSSION ", + "text_level": 1, + "bbox": [ + 174, + 429, + 316, + 443 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Overall, when designing the MAC cell, we have attempted to formulate the inner workings of an elementary, yet generic reasoning skills: the model decomposes the problem into steps, focusing on one at a time. At each such step, it takes into account: ", + "bbox": [ + 176, + 454, + 823, + 497 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "• The control $c _ { i }$ : Some aspect of the task - pointing to the future work that has left to be done. \n• The previous memory or memories: The partial solution or evidence the cell has acquired so far – pointing to the past work that has already been achieved. \n• The newly retrieved information $m _ { n e w }$ : that is retrieved from the knowledge base $K B$ and may or may not be transitively related to that partial solution or evidence - the present, or current work. ", + "bbox": [ + 215, + 510, + 825, + 625 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Considering these three sources of information together, the cell finally adds the new information up into its working memory, $m _ { i }$ , progressing one more step towards the final answer. ", + "bbox": [ + 173, + 637, + 823, + 666 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "3.3 THE OUTPUT UNIT ", + "text_level": 1, + "bbox": [ + 176, + 686, + 348, + 700 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "The output unit receives the question representation $q$ , along with the memory state passed from the last MAC cell $m _ { p }$ , where $p$ is the number of MAC cells in the network – representing the number of reasoning steps in the whole process. It inspects both and predicts an answer based on their concatenation. Intuitively, we would like our model to consider both the question as well as the relevant information that has been progressively retrieved from the KB, deemed the necessary information to answer it. ", + "bbox": [ + 173, + 713, + 825, + 797 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Note that considering both $q$ and $m _ { p }$ is critical to answer the question. While $m _ { p }$ represents the information collected from KB, we still need to recall what has been asked about it to be able to answer accordingly. This is especially true in our case, when all other interactions between the question and the KB are mediated through attention distributions, rather than being transformed into a shared continuous vector space. ", + "bbox": [ + 174, + 804, + 825, + 875 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "The prediction is built out of a standard 2-layers fully-connected softmax-based classifier with hidden dimension $d$ and output dimension that matches the number of possible answers in the dataset. The classifier receives $[ m _ { p } , q ]$ as input and returns a probability distribution over the answers. ", + "bbox": [ + 176, + 881, + 823, + 924 + ], + "page_idx": 7 + }, + { + "type": "table", + "img_path": "images/a8f3f0904dbfbf06b3ae89f9cd0dcd15557eabccb6cf593d1481a4565628f79b.jpg", + "table_caption": [ + "Table 1: CLEVR accuracy by baseline methods, competing methods, and our method (MAC) - for our method we show test results with GLoVE initialization and validation results with and without GLoVE. (\\*) denotes use of extra supervisory information through program labels. $( ^ { \\dagger } )$ denotes use of data augmentation. $( ^ { \\ddagger } )$ denotes training from raw pixels. $( ^ { \\circ } )$ denotes GLoVE word vector initialization. " + ], + "table_footnote": [], + "table_body": "
ModelOverallCountExistCompare NumbersQuery AttributeCompare Attribute
Human (Johnson et al., 2017)92.686.796.686.595.096.0
Q-type baseline (Johnson et al., 2017)41.834.650.251.036.051.3
LSTM (Johnson et al., 2017)46.841.761.169.836.851.8
CNN+LSTM (Johnson et al., 2017)52.343.765.267.149.353.0
CNN+LSTM+SA (Johnson et al., 2016)76.664.482.777.482.675.4
N2NMN* (Hu et al. 2017)83.768.585.784.990.088.7
PG+EE (9K prog.)* (Johnson et al., 2017)88.679.789.779.192.696.0
PG+EE (70oK prog.)* (Johnson et al., 2017)96.992.797.198.798.198.9
CNN+LSTM+RN†‡ (Santoro et al.,2017)95.590.197.893.697.997.1
CNN+GRU+FiLM (Perez et al.,2017)97.794.399.196.899.199.1
CNN+GRU+FiLM* (Perez et al., 2017)97.694.399.393.499.399.3
CNN+GRU+FiLM (Perez et al., 2017)97.794.399.196.899.199.1
MAC (this paper)-val98.997.199.599.399.299.2
MAC-val99.097.299.599.599.599.4
MAC-test98.997.299.599.499.399.5
", + "bbox": [ + 220, + 181, + 777, + 367 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "4 EXPERIMENTS ", + "text_level": 1, + "bbox": [ + 174, + 415, + 326, + 431 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "We evaluate our model on the recent CLEVR dataset (Johnson et al., 2016). CLEVR is a synthetic dataset consisting of 700K tuples; each consists of a 3D-rendered image featuring objects of various shapes, colors, materials and sizes, coupled with compositional multi-step questions that measure performance on an array of challenging reasoning skills such as following transitive relations, counting objects and comparing their properties. In addition, each question is associated with a formal program, specifying the reasoning operations that should be performed to compute the answer, among 28 possibilities. ", + "bbox": [ + 174, + 463, + 825, + 561 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "We first perform experiments on the original 700k CLEVR dataset (Johnson et al., 2016), comparing to prior work. As shown in table 1, our model matches or outperforms all existing models both in overall accuracy, as well as in each category, testing different reasoning skills. In particular, for the overall performance, we achieve $9 8 . 9 4 \\%$ accuracy, more than halving the error rate of the prior best model, FiLM (Perez et al., 2017). ", + "bbox": [ + 174, + 568, + 825, + 638 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Counting and Numerical Comparison. Remarkably, our performance on questions testing counting and numerical comparisons is significantly higher than the competing models, which consistently struggle on this question type. Again, we nearly halve the corresponding error rate. These results demonstrate the aptitude of attention mechanisms to perform counting, reduction and aggregation, in contrast to alternative, CNN-based approaches. ", + "bbox": [ + 174, + 645, + 823, + 715 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Training Length and Computational-Efficiency. We examine the learning curves of our and competing models. We have trained all models on the same architecture and used the author code for the other models. Aiming at having equal settings for comparison, we ran all models including ours with learned random words vectors. In order to make sure the results are statistically significant we ran each model multiple (10) times, and plotted the averages and confidence intervals (figure 4). The results show that our model learns significantly faster than the other leading methods, FiLM (Perez et al., 2017) and $\\mathrm { P G + E E }$ (Johnson et al., 2017). While we do not have learning curves for the Relational Network model, Santoro et al. (2017) report approximately 1.4 million iterations to achieve $9 5 . 5 \\%$ accuracy, which are equivalent to 125 epochs approximately, whereas our model achieves a comparable accuracy after 3 epochs only, yielding 40x reduction in the length of the training process. ", + "bbox": [ + 174, + 722, + 825, + 861 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Naturally, the smaller number of required training steps also translates to comparably shorter training time. Perez et al. (2017) report training time of 4 days, equivalent to 80 epochs, to reach accuracy of $9 7 . 7 \\%$ . In contrast, we achieve higher accuracy in 6 epochs, taking 9.5 hours overall, leading to $1 0 \\mathrm { x }$ reduction in training time. ", + "bbox": [ + 174, + 867, + 823, + 924 + ], + "page_idx": 8 + }, + { + "type": "image", + "img_path": "images/c74201d70aae1d3587e14044064872d252c0e00ec6d3c4fd6b70377bb7088c75.jpg", + "image_caption": [ + "Figure 6: Training curves and accuracies for MACs (our model), FiLM (Perez et al., 2017), $\\mathrm { P G + E E }$ (Johnson et al., 2017) and stacked-attention (Yang et al., 2016; Johnson et al., 2017). (Note: $\\mathrm { P G + E E }$ uses the supported CLEVR programs as strong supervision.) Left: Training curve (accuracy/epoch). Right: Learning curve: Accuracy for $1 \\%$ , $2 \\%$ , $5 \\%$ , $10 \\%$ , $2 5 \\%$ , $50 \\%$ and $100 \\%$ of the $7 0 0 \\mathrm { k }$ CLEVR samples. " + ], + "image_footnote": [], + "bbox": [ + 294, + 108, + 699, + 261 + ], + "page_idx": 9 + }, + { + "type": "table", + "img_path": "images/20d0a9d88276e853b2d4290d832c31f6ed7a6d4ae845cb8a1f4754688e965048.jpg", + "table_caption": [ + "Table 2: Accuracy on CLEVR-Humans of previous methods and our method (MAC), before (left) and after (right) fine-tuning on the CLEVR-Humans training data. $\\mathrm { P G + E E }$ uses supervised data. For our method (MAC) we show test results with GLoVE initialization and validation results with and without GLoVE. " + ], + "table_footnote": [], + "table_body": "
ModelTrain CLEVRTrain CLEVR + fine-tune HUMANS
LSTM (Johnson et al.,2017)27.536.5
CNN+LSTM (Johnson et al.,2017)37.743.2
CNN+LSTM+SA+MLP (Johnson et al.,2016)50.457.6
PG+EE (18K prog.)* (Johnson et al.,2017)54.066.6
CNN+GRU+FiLM (Perez et al., 2017)56.675.9
MAC-val56.981.2
MAC-val58.582.0
MAC-test58.682.5
", + "bbox": [ + 295, + 462, + 700, + 565 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "4.1 DATA EFFICIENCY ", + "text_level": 1, + "bbox": [ + 174, + 619, + 341, + 633 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "We have explored the performance of our and other leading approaches on smaller subsets of the CLEVR dataset, in order to study the ability of models to generalize from smaller amount of data. We sampled at random subsets of CLEVR, with $10 \\%$ , $2 5 \\%$ and $50 \\%$ of its original $7 0 0 \\mathrm { k }$ size, and used them to train our and other 3 proposed models for the CLEVR task: FiLM (Perez et al., 2017), the strongly-supervised $\\mathrm { P G + E E }$ (Johnson et al., 2017), and stacked-attention networks (Johnson et al., 2017; Yang et al., 2016). ", + "bbox": [ + 174, + 659, + 825, + 742 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "As shown in figure 4, our model outperforms the other models by a wide margin for all subsets of the CLEVR dataset. For $50 \\%$ of the data, equivalent to $3 5 0 \\mathrm { k }$ samples, other models obtain accuracies ranging between $70 \\%$ and $92 \\%$ , while our model achieves $9 7 . 9 \\%$ . The gap becomes larger as the dataset size reduces: for $2 5 \\%$ of the data, equivalent to $1 7 5 \\mathrm { k }$ samples, performance of other models is between $50 \\%$ and $7 7 \\%$ , while our model maintains a high $9 5 . 4 \\%$ accuracy. ", + "bbox": [ + 173, + 750, + 825, + 819 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Finally, for $10 \\%$ of the data $- 7 0 \\mathrm { k }$ samples, still a sizeable amount – our model is the only one that manages to generalize, with performance of $8 4 . 7 \\%$ on average, whereas the other three models fail, achieving $4 7 . 6 \\% - 5 7 . 5 \\%$ . Note that as pointed out by (Johnson et al., 2016) a simple baseline that predicts the most frequent answer for each of the question types achieves already $4 2 . 1 \\%$ , suggesting that answering half of the questions correctly means that the competing models barely learn to generalize from the smaller dataset. These results demonstrate the robustness of our architecture and its key role as a structural prior guiding our network to learn the intended reasoning skills. ", + "bbox": [ + 173, + 825, + 825, + 924 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "4.2 CLEVR HUMANS - NATURAL LANGUAGE QUESTIONS ", + "bbox": [ + 176, + 104, + 593, + 117 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "We analyze our model performance on the CLEVR-Humans dataset (Johnson et al., 2017), consisting of natural language questions collected through crowdsourcing. As such, the dataset has diverse vocabulary and linguistic variations, and it also demands more varied reasoning skills. ", + "bbox": [ + 174, + 131, + 825, + 174 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Since the training set is relatively small, consisting of $1 8 \\mathrm { k }$ samples, we use it to finetune a model pretrained on the standard CLEVR dataset. However, since most of the vocabulary in CLEVRHumans is not covered by CLEVR, we do not train the word vectors during the pre-training stage, so to prevent drift in their meaning compared to other uncovered words in CLEVR-Humans that may be semantically related. ", + "bbox": [ + 174, + 180, + 825, + 251 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "As shown in table 2, our model achieves state-of-the-art performance on CLEVR-Humans both before and after fine-tuning. It surpasses the next-best FiLM model, (Perez et al., 2017) by $6 . 6 \\%$ percent, achieving $8 2 . 5 \\%$ . ", + "bbox": [ + 174, + 257, + 825, + 299 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "The results substantiate the model’s robustness against linguistic variations and noise, as well as its ability to adapt to diverse vocabulary and varied reasoning skills. Arguably, the soft attention performed over the question words allows the model to focus on the words that are most critical to answer the question and translate them to corresponding reasoning operations, giving less attention to irrelevant linguistic variations. ", + "bbox": [ + 174, + 306, + 825, + 377 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "4.3 ABLATIONS ", + "text_level": 1, + "bbox": [ + 174, + 400, + 297, + 412 + ], + "page_idx": 10 + }, + { + "type": "image", + "img_path": "images/d542dee22ea6b6971ea171ea3647286d90bc0976dc1e0a42885a1582ff9227cc.jpg", + "image_caption": [ + "Figure 7: Ablations and variations of the MAC network. See text for full detail. " + ], + "image_footnote": [], + "bbox": [ + 176, + 439, + 818, + 768 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Based on the validation set, we have conducted an ablation study on our model to understand better the contribution of each of its component to the overall performance. We tested each setting on the standard 700K CLEVR dataset as well as on $10 \\%$ subset of the dataset. See table 3 for the numerical results. In addition, figure 4.3 presents the training curves for the different settings trained on the standard dataset. Overall, the results demonstrate the robustness of the model to hyperparameter variations such as network dimension and length, and also the impact of different aspect and components of MAC on its performance. ", + "bbox": [ + 173, + 825, + 825, + 924 + ], + "page_idx": 10 + }, + { + "type": "table", + "img_path": "images/cbfa912b869921d24b8997ef84de01c88a55b56dcf5407ed4090070e65e15576.jpg", + "table_caption": [ + "Table 3: Ablations Results for the full standard CLEVR dataset and $10 \\%$ subset of it. See text for full details. " + ], + "table_footnote": [], + "table_body": "
ModelStandard CLEVR10% CLEVR
MAC standard model (dimension 512)98.984.5
dimension 25698.476.3
dimension 12897.677.0
w/o control55.651.5
w/o word-attention95.363.2
full-question-as-control80.765.0
w/o positional encoding99.180.0
linear position encoding99.083.2
identity writing unit98.584.5
only-gating writing unit99.383.1
+ self-attention83.299.2
+ gating99.483.1
+ self-attention and gating99.585.5
gate bias 098.784.9
gate bias 199.468.5
gate bias -199.077.1
unshared weights97.867.5
prediction without question information97.864.7
", + "bbox": [ + 305, + 140, + 691, + 334 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "Network Length. We have tested the model performance as a function of the network’s length – the number of MAC cells that were sequenced together. The results show the positive correlation between the network length and its performance. We can see that for 1 cell the scores are relatively $1 0 \\mathrm { w } - 7 5 \\%$ , but adding at least one more cell leads to a significant increase in performance above $9 5 \\%$ . The performance keeps improving up to lengths 8-16 that achieve $9 8 . 9 – 9 9 . 1 \\%$ . The results also teach us about the complexity of the dataset, by showing the relatively significant benefits of having at least 4 cells, each modeling a reasoning step. ", + "bbox": [ + 173, + 381, + 825, + 479 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "Network Dimension. We have varied the state dimension to check the robustness of the model to hyperparameters. The results on the standard CLEVR dataset show the model is able to maintain high performance with dimension of 128, albeit after a longer training process, achieving $9 7 . 6 \\%$ , compared to $9 8 . 9 4 \\%$ achieved with dimension of 512. However, for $10 \\%$ of CLEVR, the larger 512-dimension allows accuracy increase by $7 . 5 \\%$ over dimension of 128. ", + "bbox": [ + 174, + 486, + 825, + 555 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "Weight Sharing. We have tested the impact of sharing weights between cell has on the model performance for network of length $p = 1 2$ . The results show that for the standard dataset there is only a small difference between these settings of $1 \\%$ . However, for less data, we see much more significant drop $1 6 . 9 \\%$ in the unshared-parameters setting compared to the shared one. Indeed, we observe that a model with less parameter is more data-efficient and has a lower tendency to overfit the data. ", + "bbox": [ + 174, + 561, + 825, + 645 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "Control Unit. We have performed several ablations in the control unit to understand its contribution to the overall model performance. Based on the results, first, we can see the the question information is crucial for the model to handle the questions, as can be noted by the low performance of the model when there is no use of control signal whatsoever. Second, we have tested the model performance when using the continuous control state computed by question (2) in section 3.2.1, without having word-attention, in order to understand its relative contribution. Based on the results, we can indeed see that using word-attention is useful for accelerating the training process and achieving higher accuracies both for the standard dataset as well as for the small subset, where using word-attention increases results in $2 1 . 4 \\%$ . We also see that using the “contextual words” produced by the questionunit LSTM is useful in accelerating the model performance, when compared to using the wordvectors directly. ", + "bbox": [ + 173, + 652, + 825, + 806 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "Reading Unit. We have conducted several ablations for the reading unit to better understand its behavior and contribution to the performance of the model. The standard MAC reading unit uses the control state – which averages the question words based on attention distributions computed per each reasoning step. In this ablation experiment, we have tested using the full question representation $q$ instead across all reasoning steps to gain better understanding of the the contribution of wordattention to the model performance. Indeed, we can see that using $q$ rather then the control state $c _ { i }$ results in a significant drops in performance $- 1 9 . 4 \\%$ for the full CLEVR dataset and $1 9 . 5 \\%$ for $10 \\%$ of the data. ", + "bbox": [ + 173, + 811, + 825, + 924 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "We have conducted additional ablation experiment to better understand the contribution of using the KB features directly in the first-stage information retrieval process described in section 3.2.2, compared to using only the dot-products of the KB elements with the previous memory state $m _ { i - 1 }$ . For the full CLEVR dataset, we can see that this component has only a small impact in the final performance - ultimately resulting in $0 . 0 6 \\%$ performance difference. However, for the $10 \\%$ of the data, we can see that the difference in performance when ablating this component is much larger - $1 1 . 2 \\%$ . ", + "bbox": [ + 174, + 103, + 825, + 200 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Writing Unit Ablations. In our main MAC model variant, the memory unit merges the new information $m _ { n e w }$ with the previous memory state $m _ { i - 1 }$ by combining them through a linear transformation. In this experiment, we have explored other variations, such as assigning $m _ { n e w }$ to $m _ { i }$ directly – ignoring previous memories, or doing a linear transformation based on $m _ { n e w }$ only. The results show that in fact such variant is only slightly worse than our main variant – $0 . 4 \\%$ . We also conducted an experiment in which we merge the new information with the previous memory just by a having a gate that does a weighted average of them. The results show that this variant performs equivalently to our standard linear-transformation variant. ", + "bbox": [ + 174, + 208, + 823, + 319 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Writing Unit Additions. We have explored the impact of the writing unit variants described in section 3.2.3 – adding self-attention, gating mechanisms, or both, compared to our standard main model that uses a linear transformation to merge the newly retrieved information $m _ { n e w }$ with the previous memory $m _ { i }$ . For the complete CLEVR dataset we can see that indeed both these variants are very helpful in increasing the model performance. Compared to our standard MAC model that achieves $9 8 . 9 4 \\%$ on the validation set, self-attention yields accuracy of $9 9 . 2 3 \\%$ , gating yields $9 9 . 3 6 \\%$ and adding both achieves $9 9 . 4 8 \\%$ . ", + "bbox": [ + 174, + 325, + 823, + 424 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Output Unit. In our standard model, the final predictions made in the output unit are based on the final memory state $m _ { p }$ as well as question representation $q$ (stands for the final hidden states of the backward and forwards passes of the LSTM). We have explored the contribution of basing the model prediction on the latter, by testing the model performance when prediction is based on memory alone, for the complete and $10 \\%$ datasets. We can see that in both settings basing the model’s predictions on the question representation allows faster training and higher accuracies. Notable is the gap in performance for the $10 \\%$ CLEVR - $1 9 . 8 \\%$ increase by using the question representation to make predictions. These results are very reasonable intuitively, since the model is structured such that the memory holds only information that was retrieved from the image. Thus, questions that may ask for instance on different aspects (such as color or shape) of the same object in the image may result in the same memory content, which is thus does not directly contain enough information to respond such questions. ", + "bbox": [ + 174, + 431, + 825, + 597 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Position. In our standard model, similarly to the practice of competing models (Santoro et al., 2017; Perez et al., 2017; Hu et al., 2017), we have concatenated positional information to each region of the image, in order to increase the model capability to perform spatial reasoning. We have explored both simple linear maps at a constant $[ - 1 , 1 ]$ as well as more complex positional encoding suggested by (Vaswani et al., 2017). However, the results for both the standard dataset and the $10 \\%$ version show a very negligible improvement at best when adding positional encoding information, demonstrating the capability of MAC to perform spatial reasoning without data augmentation. ", + "bbox": [ + 173, + 604, + 825, + 702 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Gate Bias Initialization. For our model variant with gating mechanism (described in section 3.2.3) we have tested the effect of setting different values for the gate bias - $- 1 , 0$ and 1. for $- 1$ the model is initialized to biased for keeping the previous memory value whereas for 1 it will be biased for using the new memory instead. We can see that for the complete dataset setting the bias to 1 is optimal – apparently since the model has enough data to learn to apply each cell effectively. In contrast, for the small $10 \\%$ CLEVR data, setting the bias to 0 shows better performance, biasing the model to using less cells overall which results ultimately in a theoretically-simpler model that can fit less data more effectively. ", + "bbox": [ + 174, + 708, + 825, + 820 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "4.4 INTERPRETABILITY ", + "text_level": 1, + "bbox": [ + 176, + 851, + 348, + 864 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "We have looked into attention maps over the image and question that the model produces during its computation and provide a few examples in figure 4.4. The first example shows us how the model parses the question in steps, first focusing on the main entity that the question is about, then on ", + "bbox": [ + 176, + 882, + 823, + 924 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "relation of this entity to the “brown matte thing” which is then located in the image. Finally, the model correctly focuses on the small brown cube and predicts the right answer – brown. ", + "bbox": [ + 171, + 103, + 823, + 132 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "The second example shows a model with 4 cells instead of 6, that similarly parse the question in iterations and focuses on the relevant objects at each step, though we can see that the reasoning process looks somewhat different when the MAC network has fewer cells. ", + "bbox": [ + 176, + 138, + 823, + 180 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "The last example shows how how the model handles counting and OR operations. It starts from identifying the task - computing a number, and then red objects as well as the cylinder, one at a time, allowing it ultimately to respond correctly, with the answer 2. ", + "bbox": [ + 174, + 188, + 825, + 229 + ], + "page_idx": 13 + }, + { + "type": "image", + "img_path": "images/e280158a489b95ddeabb4461dda86460910408860df91a493fe23a53648a08b4.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 326, + 273, + 674, + 736 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Figure 8: Three examples of attention maps for the image and the question. See text for full details. ", + "bbox": [ + 171, + 779, + 823, + 795 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "5 CONCLUSION ", + "text_level": 1, + "bbox": [ + 176, + 823, + 318, + 839 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "We have given a first demonstration of how a sequence of Memory, Attention and Control (MAC) cells combined into a Compositional Attention Network provides a very effective tool for neural reasoning. In future work, we wish to explore this promising architecture for other tasks and domains, including real-world VQA, machine comprehension and textual question answering. ", + "bbox": [ + 174, + 854, + 825, + 911 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "REFERENCES ", + "text_level": 1, + "bbox": [ + 176, + 102, + 287, + 118 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Aishwarya Agrawal, Dhruv Batra, and Devi Parikh. Analyzing the behavior of visual question answering models. arXiv preprint arXiv:1606.07356, 2016. ", + "bbox": [ + 173, + 126, + 823, + 155 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Neural module networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 39–48, 2016a. ", + "bbox": [ + 173, + 161, + 823, + 205 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Learning to compose neural networks for question answering. arXiv preprint arXiv:1601.01705, 2016b. ", + "bbox": [ + 173, + 213, + 823, + 243 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2425–2433, 2015. ", + "bbox": [ + 174, + 251, + 823, + 294 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. ", + "bbox": [ + 173, + 301, + 823, + 330 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. ", + "bbox": [ + 173, + 338, + 823, + 367 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Djork-Arne Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep network ´ learning by exponential linear units (elus). arXiv preprint arXiv:1511.07289, 2015. ", + "bbox": [ + 171, + 376, + 823, + 405 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Alex Graves, Navdeep Jaitly, and Abdel-rahman Mohamed. Hybrid speech recognition with deep bidirectional lstm. In Automatic Speech Recognition and Understanding (ASRU), 2013 IEEE Workshop on, pp. 273–278. IEEE, 2013. ", + "bbox": [ + 174, + 412, + 823, + 455 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014. ", + "bbox": [ + 171, + 463, + 825, + 493 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio G ´ omez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, ´ et al. Hybrid computing using a neural network with dynamic external memory. Nature, 538 (7626):471–476, 2016. ", + "bbox": [ + 173, + 501, + 825, + 558 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Akshay Kumar Gupta. Survey of visual question answering: Datasets and techniques. arXiv preprint arXiv:1705.03865, 2017. ", + "bbox": [ + 169, + 565, + 823, + 594 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016. ", + "bbox": [ + 173, + 603, + 821, + 646 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997. ", + "bbox": [ + 168, + 654, + 823, + 683 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Ronghang Hu, Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Kate Saenko. Learning to reason: End-to-end module networks for visual question answering. arXiv preprint arXiv:1704.05526, 2017. ", + "bbox": [ + 173, + 690, + 825, + 733 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, pp. 448–456, 2015. ", + "bbox": [ + 174, + 742, + 823, + 785 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Clevr: A diagnostic dataset for compositional language and elementary visual reasoning. arXiv preprint arXiv:1612.06890, 2016. ", + "bbox": [ + 173, + 792, + 823, + 837 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Judy Hoffman, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Inferring and executing programs for visual reasoning. arXiv preprint arXiv:1705.03633, 2017. ", + "bbox": [ + 171, + 844, + 821, + 887 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ", + "bbox": [ + 171, + 895, + 821, + 924 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012. ", + "bbox": [ + 174, + 103, + 823, + 146 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Ankit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Victor Zhong, Romain Paulus, and Richard Socher. Ask me anything: Dynamic memory networks for natural language processing. In International Conference on Machine Learning, pp. 1378–1387, 2016. ", + "bbox": [ + 174, + 155, + 825, + 210 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. ", + "bbox": [ + 174, + 219, + 821, + 250 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Hierarchical question-image co-attention for visual question answering. In Advances In Neural Information Processing Systems, pp. 289– 297, 2016. ", + "bbox": [ + 174, + 257, + 826, + 300 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Alexander Miller, Adam Fisch, Jesse Dodge, Amir-Hossein Karimi, Antoine Bordes, and Jason Weston. Key-value memory networks for directly reading documents. arXiv preprint arXiv:1606.03126, 2016. ", + "bbox": [ + 174, + 309, + 826, + 352 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pp. 1532–1543, 2014. ", + "bbox": [ + 173, + 361, + 826, + 404 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Ethan Perez, Florian Strub, Harm de Vries, Vincent Dumoulin, and Aaron Courville. Film: Visual reasoning with a general conditioning layer. arXiv preprint arXiv:1709.07871, 2017. ", + "bbox": [ + 173, + 412, + 825, + 443 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Adam Santoro, David Raposo, David GT Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Timothy Lillicrap. A simple neural network module for relational reasoning. arXiv preprint arXiv:1706.01427, 2017. ", + "bbox": [ + 173, + 450, + 823, + 493 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Rupesh Kumar Srivastava, Klaus Greff, and Jurgen Schmidhuber. Highway networks. ¨ arXiv preprint arXiv:1505.00387, 2015. ", + "bbox": [ + 169, + 501, + 825, + 531 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Bob L Sturm. A simple method to determine if a music information retrieval system is a horse. IEEE Transactions on Multimedia, 16(6):1636–1644, 2014. ", + "bbox": [ + 169, + 540, + 823, + 569 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017. ", + "bbox": [ + 173, + 577, + 825, + 621 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Caiming Xiong, Stephen Merity, and Richard Socher. Dynamic memory networks for visual and textual question answering. In International Conference on Machine Learning, pp. 2397–2406, 2016. ", + "bbox": [ + 174, + 628, + 823, + 671 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention networks for image question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 21–29, 2016. ", + "bbox": [ + 174, + 680, + 825, + 723 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "SUPPLEMENTARY MATERIAL ", + "bbox": [ + 176, + 102, + 416, + 118 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "A DETAILS OF INPUT UNIT ", + "text_level": 1, + "bbox": [ + 176, + 138, + 416, + 156 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "The input unit processes the raw inputs given to the system into distributed vector representations. It receives a text question (or in general, a query), and an image (or in general, a Knowledge Base (KB)) and processes each of them with a matching sub-unit. Here we provide details of the Query Unit and the Image Unit used in this work. ", + "bbox": [ + 174, + 174, + 825, + 231 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "A.0.1 THE QUERY UNIT ", + "text_level": 1, + "bbox": [ + 176, + 252, + 357, + 267 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "We encode a query of $S$ words into a continuous representation using a bidirectional LSTM (Hochreiter & Schmidhuber, 1997; Graves et al., 2013). Each word is associated with a word embedding $w _ { s }$ , where $s = 1 , . . . , S$ . In our case, we use GloVE words embeddings (Pennington et al., 2014). Then, these embeddings are processed by a bidirectional LST M of dimension $d$ that outputs: ", + "bbox": [ + 174, + 279, + 825, + 335 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "• a matching sequence of $d$ -dimensional output states, which we refer to as contextual words, $[ c w _ { 1 } , . . . , c w _ { S } ]$ • $d$ -dimensional hidden state $q = [ \\overleftrightarrow { \\lambda \\omega _ { 1 } } , \\overrightarrow { c w _ { S } } ]$ , the concatenation of the hidden states from the backward and forward passes. We refer to $q$ as the question representation. ", + "bbox": [ + 217, + 352, + 825, + 420 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Intuitively, each contextual word $c w _ { s }$ represents the meaning of $s ^ { t h }$ word, in the context of the question, while the hidden state $q$ represents the overall (compositional) meaning of the question. ", + "bbox": [ + 173, + 436, + 823, + 467 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "A.0.2 THE IMAGE UNIT ", + "text_level": 1, + "bbox": [ + 176, + 487, + 354, + 502 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Given an image, and following prior work on CLEVR (?Santoro et al., 2017; Perez et al., 2017), we extract conv4 features from ResNet101 (He et al., 2016) pretrained on ImageNet (Krizhevsky et al., 2012) which we treat as a fixed initial representation of the image, $x$ of dimension $H , W , C$ where $H = W = 1 4$ are the height and width of the transformed image and $C = 1 0 2 4$ is the number of channels. Each feature $x _ { h , w }$ represents one region in the original image. ", + "bbox": [ + 174, + 513, + 825, + 584 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Similar to prior work (Hu et al., 2017; Santoro et al., 2017; Perez et al., 2017), we would like to allow our model to reason explicitly about spatial locations, as required by many of the questions in CLEVR, and therefore we concatenate to this representation a spatial map that represents each of the positions in the image. However, in contrast to prior work that uses a linear meshgrid feature map with 2 features $h$ and $w$ ranging from $- 1$ to 1, and to allow better representation of the positions, we use the positional encoding scheme proposed by Vaswani et al. (2017): ", + "bbox": [ + 173, + 590, + 825, + 675 + ], + "page_idx": 16 + }, + { + "type": "equation", + "img_path": "images/23f67e68bd8fe769889cb65ef6b26ad32ea8c028817ac3af21e7f4e098381e73.jpg", + "text": "$$\n\\begin{array} { l } { p _ { ( h , 2 i ) } = \\sin { \\Big ( h / 1 0 0 0 0 ^ { 2 i / p _ { d } } \\Big ) } } \\\\ { p _ { ( h , 2 i + 1 ) } = \\cos { \\Big ( h / 1 0 0 0 0 ^ { 2 i / p _ { d } } \\Big ) } } \\end{array}\n$$", + "text_format": "latex", + "bbox": [ + 388, + 707, + 607, + 766 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "And similarly for $w$ , where $p _ { d }$ is a hyperparameter. Overall, the positional encoding of a feature at position $( h , w )$ is $[ p _ { h } , p _ { w } ]$ , the concatenation of the positional encodings for $h$ and $w$ . ", + "bbox": [ + 174, + 784, + 823, + 813 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "This positional encoding scheme allows better correspondence between the distance of 2 positions $( x , y )$ and $( x , y )$ in the image and a vector similarity of their positional encodings, even when $p _ { d }$ is larger than two. ", + "bbox": [ + 174, + 818, + 825, + 861 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "We then concatenate the obtained spatial map with $x$ , receiving a spatially-aware image representation $x _ { p }$ . Then, we pass this representation through two CNN layers with $d$ output channels and obtain a final representation of the image, which we refer to as our Visual Knowledge Base $( K B _ { V }$ that is used in further components of the model. ", + "bbox": [ + 174, + 867, + 823, + 924 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "B IMPLEMENTATION AND TRAINING DETAILS ", + "text_level": 1, + "bbox": [ + 174, + 102, + 568, + 118 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "For the question processing, we use GloVE (Pennington et al., 2014) word-vectors with dimension 300. For the image processing, we extract conv4 features from ResNet101 (He et al., 2016) pretrained on ImageNet (Krizhevsky et al., 2012), with dimension $H , W , C$ where $H = W = 1 4$ and $C = 1 0 2 4$ , followed by 2 CNN layers with kernel size 2. We use MAC network with $p = 1 2$ cells, and train it using Adam (Kingma & Ba, 2014), with learning rate $1 0 ^ { - 4 }$ . We train our model for $1 0 - 2 0$ epochs, with batch size 64, and use early stopping based on validation accuracies. During training, the moving averages of all weights of the model are maintained with the exponential decay rate of 0.999. At test time, the moving averages instead of the raw weights are used. We use dropout 0.85, and ELU (Clevert et al., 2015) which in our experience has reduce the training process compared to RELU.The training process takes roughly 10-20 hours on a single Titan X GPU. ", + "bbox": [ + 173, + 135, + 825, + 273 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "C FURTHER DISCUSSION OF RELATED WORK ", + "text_level": 1, + "bbox": [ + 174, + 297, + 558, + 313 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "In this section we provide detailed discussion of related work. Several models have been applied to the CLEVR task. These can be partitioned into two groups, module networks that use the strong supervision provided as a tree-structured functional program associated with each instance, and end-to-end, fully differentiable networks that combine a fairly standard stack of CNNs with components that aid them in performing reasoning tasks. We also discuss the relation of MAC to other approaches, such as memory networks and neural computers. ", + "bbox": [ + 174, + 329, + 825, + 414 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "C.1 MODULE NETWORKS ", + "text_level": 1, + "bbox": [ + 176, + 433, + 366, + 446 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "The modular approach (Andreas et al., 2016a;b; Hu et al., 2017; Johnson et al., 2017) first translates the given question into a tree-structured action plan, aiming to imitate the ground-truth programs provided as a form of strong-supervision. Then, it constructs a tailor-made network that executes the plan on the image in multiple steps. This network is composed of discrete units selected out of a collection of predefined modules, each responsible for an elementary reasoning operation, such as identifying an objects color, filtering them for their shape, or comparing two amounts. Each module has its own set of learned parameters (Johnson et al., 2017), or even hand-crafted design (Andreas et al., 2016a) to guide it towards its intended behavior. ", + "bbox": [ + 174, + 459, + 825, + 570 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Overall, this approach makes discrete choices at two levels: the identity of each module – the behavior it should learn among a fixed set of possible types of behaviors, and the network layout – the way in which these modules are wired together to compute the answer progressively. Hence, their differentiability is confined to the boundaries of a single module, disallowing end-to-end training. ", + "bbox": [ + 174, + 578, + 825, + 633 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Several key differences exist between our approaches. First, our model replaces the fixed modules collection with one versatile and universal cell that shares both its architecture and parameters across all of its instantiations, and is applied across all the reasoning steps. Second, it replaces the dynamic recursive tree structures with a sequential topology, augmented by soft attention mechanisms, as done in Bahdanau et al. (2014). This confers our network with a virtual capacity to represent arbitrarily complex Directed Acyclic Graphs (DAGs) while still having efficient and readily deployed physical sequential structure. Together, both of these relaxations allow us to effectively train our model end-to-end by backpropagation alone, whereas module networks demand a more involved training scheme that relies on the strongly-supervised programs at the first stage, and on various Reinforcement Learning (RL) techniques at the second. Furthermore, while our model can be train without the strong supervisory programs, developing adaptive reasoning skills to address the task is it trained for, the modular approach reliance on questions structured and formal representation hinder its applicability to real-world tasks. ", + "bbox": [ + 174, + 641, + 825, + 820 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "C.2 AUGMENTED CONVOLUTIONAL NEURAL NETWORKS ", + "text_level": 1, + "bbox": [ + 173, + 840, + 586, + 854 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Alternative approaches for the CLEVR task that do not rely on the provided programs as a strong supervision signal are Santoro et al. (2017) and Perez et al. (2017). Both complement standard multi-layer Convolutional Neural Networks (CNNs) with components that aid them in handling compositional and relational questions. ", + "bbox": [ + 176, + 867, + 823, + 922 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Relational Networks. Santoro et al. (2017) appends a Relation Network (RN) layer to the CNN. This layer inspects all pairs of pixels in the image, thereby enhancing the network capacity to reason over binary relations between objects. While this approach is very simple and elegant conceptually, it suffers from quadratic computational complexity, in contrast to our and other leading approaches. But beyond that, closer inspection reveals that this direct pairwise comparison might be unnecessary. Based on the analogy suggested by Santoro et al. (2017), according to which pixels are equivalent to objects and their pairwise interactions to relations, a RN layer attempts to grasp the induced graph between objects all at once in one shallow and broad layer. Conversely, our attention-based model proceeds in steps. It basically compares the image to its current memory and control for this step, aggregates the attended regions into the new memory, and repeats the process. By the same analogy, it traverses a narrow and deep path, progressively following transitive relations. Consequently, our model exhibits a relational capacity while circumventing the computational inefficiency. ", + "bbox": [ + 174, + 103, + 825, + 270 + ], + "page_idx": 18 + }, + { + "type": "text", + "text": "FiLM. FiLM (Perez et al., 2017) is a recently proposed method that interleaves standard CNN layers that process the given image with linear layers, reminiscent of layer normalization techniques (Ba et al., 2016; Ioffe & Szegedy, 2015). Each of these layers, called FiLM, is conditioned on the question: the question words are processed by a GRU, and its output is linearly transformed into matching biases and variances for each of the CNN layers, tilting its activations to reflect the specifics of the given question and affect the computation done over the image. ", + "bbox": [ + 174, + 276, + 825, + 361 + ], + "page_idx": 18 + }, + { + "type": "text", + "text": "Similarly to our model, this approach features distant modulation between the question and the image, where rather than being fused together into the same vector space, the question can affect the image processing only through constrained means – for the case of FiLM – linear transformations. However, since the same transformation is applied to all the activations homogeneously, agnostic to both their spatial location as well as the features values, this approach does not allow the question to differentiate between regions in the image based on the objects or concepts they represent – on the content of the image. This stands in stark contrast to our attention-based model, which readily allows and actually encourages the question to inform the model about relevant regions to focus on. We speculate that this still distant, yet more direct interaction between the question and the data, or image, for the case of VQA, facilitates learning and increases generalizability. It may be more suitable to VQA tasks, and CLEVR in particular, where the questions demand the responder to focus on specific objects, and reason about their properties or relations, rather than respond based only on a holistic view of the image that may lead to sub-optimal results (Yang et al., 2016), as is the case of FiLM. Indeed, as demonstrated in 4, there is significant evidence showing our models better generalization capacity, allowing it to achieve high accuracies much faster, and from less data than FiLM and other competing methods. ", + "bbox": [ + 174, + 367, + 825, + 590 + ], + "page_idx": 18 + }, + { + "type": "text", + "text": "C.3 MEMORY AND ATTENTION ", + "text_level": 1, + "bbox": [ + 176, + 631, + 401, + 645 + ], + "page_idx": 18 + }, + { + "type": "text", + "text": "Our architecture draws inspiration from recent research on memory and attention (Kumar et al., 2016; Xiong et al., 2016; Graves et al., 2014; 2016). Kumar et al. (2016); Xiong et al. (2016) propose the Dynamic Memory Network model that proceeds in an iterative process, applying soft attention to retrieve relevant information from a visual or textual KB, which is in turn accumulated into memory passed from one iteration to the next. However, in contrast to our model, it views the question as an atomic unit, whereas our model decomposes it into a multi-step action plan informing each cell in our sequential network about its current objective. Another key difference is the distant interaction between the question and the KB that characterizes our model. Conversely, DMN fuses their corresponding representations together into the same vector space. ", + "bbox": [ + 174, + 666, + 825, + 791 + ], + "page_idx": 18 + }, + { + "type": "text", + "text": "Graves et al. (2016; 2014) complements a neural network with a memory array it can interact with, through the means of soft attention. Analogously to our model, it partitions the model into a core neural network, called controller, as well as reading and writing heads that interact with external memory array. However, a main point distinguishing our model from this approach, is the use of dynamic memory, as in Kumar et al. (2016), instead of a fixed-array memory. Each MAC cell is associated with a memory state, our reading unit inspects only the latest memory passed from the previous state, and our writing unit creates a new memory state rather than writing to multiple slots in a fixed shared external memory. Notably, our approach is much more reminiscent of the widely successful RNN structure, rather than to Graves et al. (2016; 2014) . ", + "bbox": [ + 174, + 799, + 825, + 922 + ], + "page_idx": 18 + }, + { + "type": "text", + "text": "Finally, our approach has potential ties to the VQA models Hu et al. (2017); Lu et al. (2016) which also attend both the to question words and the image while progressively addressing the given question. However, both of these models have distinct specialized designs for each of their attention layers or modules, and have a discrete or fixed layout in which they are composed together. In contrast, our approach relax both of these limitations, having one universal cell design and one universal self-attending sequential network layout. ", + "bbox": [ + 174, + 103, + 825, + 188 + ], + "page_idx": 19 + }, + { + "type": "text", + "text": "C.4 ATTENTION VS. CONVOLUTION ", + "text_level": 1, + "bbox": [ + 176, + 204, + 434, + 218 + ], + "page_idx": 19 + }, + { + "type": "text", + "text": "Compared to other leading methods, our model stands out by being heavily based on soft attention, whereas most competing approaches are CNN-based, surprisingly lack any attention mechanism. Since attention is commonly used in models designed for standard VQA (Antol et al., 2015; Gupta, 2017; Lu et al., 2016; Yang et al., 2016), it is reasonable to assume that it would be beneficial to incorporate such methods into visual reasoning systems for the CLEVR task as well. In fact, attention mechanisms should be especially useful for multi-step reasoning questions such as those present in CLEVR. Such questions refer to several relations between different objects in the image and feature compositional structure that may be approached one step at a time. Thus, it should be beneficial for a cogent responder to have the capacity to selectively focus on on one or some objects at each step, traversing the relevant relational links one after the other, both at the image level, and at the question level. ", + "bbox": [ + 174, + 231, + 825, + 382 + ], + "page_idx": 19 + }, + { + "type": "text", + "text": "Moreover, attention mechanisms enhance our model’s ability to perform reasoning skills that pertain to aggregation of information across different regions, such as counting, finding maximum value, or performing other reduction operations over information that is spread across the image. Indeed, as discussed in 4, all existing models for visual reasoning, most of which lacking any attention mechanism, struggle with the counting and numerical comparisons questions present in CLEVR. Conversely, our model proves much more capable of performing these reasoning skills, outperforming the other approaches by a wide margin. Noticeably, incorporating soft attention into our model makes it much more adept at performing such aggregation reasoning skills, successfully addressing the this type of questions. ", + "bbox": [ + 174, + 390, + 825, + 515 + ], + "page_idx": 19 + }, + { + "type": "text", + "text": "Finally, as pointed out by Lu et al. (2016); Yang et al. (2016), soft attention confers the model with robustness to noise introduced from irrelevant information presents in the image, and higher capacity for handling larger and more diverse vocabulary, the latter being demonstrated in 4. It allows the model to separate the wheat from the chaff, selectively attending to the relevant information only, and arguably, being more resilient to both visual and linguistic variations. ", + "bbox": [ + 174, + 522, + 823, + 592 + ], + "page_idx": 19 + } +] \ No newline at end of file