<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Dual Reinforcement-Based Specification Generation for Image De-Rendering</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ramakanth Pasunuru</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mohit Bansal</string-name>
          <email>mbansalg@cs.unc.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Bloomberg LP</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>David Rosenberg</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Advances in deep learning have led to promising progress in inferring graphics programs by de-rendering computergenerated images. However, current methods do not explore which decoding methods lead to better inductive bias for inferring graphics programs. In our work, we first explore the effectiveness of LSTM-RNN versus Transformer networks as decoders for order-independent graphics programs. Since these are sequence models, we must choose an ordering of the objects in the graphics programs for likelihood training. We found that the LSTM performance was highly sensitive to the sequence ordering (random order vs. pattern-based order), while Transformer performance was roughly independent of the sequence ordering. Further, we present a policy gradient based reinforcement learning approach for better inductive bias in the decoder via multiple diverse rewards based both on the graphics program specification and the rendered image. We also explore the combination of these complementary rewards. We achieve state-of-the-art results on two graphics program generation datasets.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        The large majority of computer vision work deals in the
domain of natural images or video. However, there is
tremendous potential for applying computer vision techniques to
computer-generated images, such as plots, charts,
schematics, complicated math formulas, and even a page of printed
text. For these domains, there is often a domain-specific
language for precisely specifying the image, such as
matplotlib code for a chart, PicTeX for a schematic1, and
LaTeX for math formulas and text. “De-rendering” a
computergenerated image back to the original (or a different)
domainspecific language specification can be a useful first step in
many tasks, such as changing the visual appearance of an
image
        <xref ref-type="bibr" rid="ref16 ref35">(Huang et al. 2016; Wu, Tenenbaum, and Kohli 2017)</xref>
        or extracting information contained in an image
        <xref ref-type="bibr" rid="ref22 ref6">(Cliche et
al. 2017; Mishchenko and Vassilieva 2011)</xref>
        .
      </p>
      <p>The de-rendering problem is part of a larger class of
“image-to-text” problems, in which an input image is
&lt;object&gt;
&lt;supercategory&gt;C-1&lt;/supercategory&gt;
&lt;category&gt;CS-3&lt;\category&gt;
&lt;x-coordinate&gt;120&lt;/x-coordinate&gt;
&lt;y-coordinate&gt;240&lt;/y-coordinate&gt;
&lt;depth&gt;1&lt;/depth&gt;
&lt;flip&gt;0&lt;/flip&gt;
&lt;/object&gt;
&lt;object&gt;....</p>
      <p>
        &lt;object&gt;
&lt;category&gt;Rectangle&lt;\category&gt;
&lt;x1-coordinate&gt;7&lt;/x1-coordinate&gt;
&lt;y1-coordinate&gt;1&lt;/y1-coordinate&gt;
&lt;x2-coordinate&gt;11&lt;/x2-coordinate&gt;
&lt;y2-coordinate&gt;16&lt;/y2-coordinate&gt;
&lt;/object&gt;
&lt;object&gt;....
mapped to some sequence of output tokens. The neural
encoder-decoder approach has proved to be very
successful for this class of problems, including image
captioning
        <xref ref-type="bibr" rid="ref18 ref19 ref36 ref38">(Karpathy and Fei-Fei 2015; Xu et al. 2015)</xref>
        ,
handwriting recognition
        <xref ref-type="bibr" rid="ref3">(Bluche, Louradour, and Messina 2016)</xref>
        , as
well as the de-rendering problem for math formulas
        <xref ref-type="bibr" rid="ref9">(Deng et
al. 2017)</xref>
        and graphics images
        <xref ref-type="bibr" rid="ref12 ref35">(Ellis et al. 2018; Wu,
Tenenbaum, and Kohli 2017)</xref>
        . In this paper, we improve these
encoder-decoder models for the specific case of graphical
images, via methods based on Transformer models with both
cross-entropy training and reinforcement learning with up to
two “dual modality” reward functions. De-rendering
graphical images is a problem that differs in several interesting
ways from image captioning and OCR problems. Two
examples of the de-rendering problem we consider are shown
in Fig. 1. Each image is an input, and a portion of the desired
output is displayed below each image. In de-rendering, every
object in the image must be described in the specification,
and typically many output tokens are required to describe
each object. Thus outputs from de-rendering are typically
much longer than those in image captioning datasets
        <xref ref-type="bibr" rid="ref5">(Chen
et al. 2015)</xref>
        , since caption labels (e.g., in COCO
        <xref ref-type="bibr" rid="ref20">(Lin et al.
2014)</xref>
        ) tend to focus on simple descriptions involving only
the most salient objects in the image. OCR and de-rendering
are similar in that they encode information about all
elements of the image, but the order of the output sequence
in OCR is completely determined by the image, while in
derendering, the output sequences represent sets2, and as such
the final rendering is invariant to a large degree of reordering
in the output sequence (e.g., by shuffling the sub-sequences
of tokens that correspond to separate objects).
      </p>
      <p>
        We start our investigation with a basic image captioning
model (similar to Wu, Tenenbaum, and Kohli (2017)) and
extend it with an attention mechanism. We then swap out the
LSTM-RNN decoder with a Transformer network
        <xref ref-type="bibr" rid="ref32">(Vaswani
et al. 2017)</xref>
        . Our original motivation for this replacement is
that we think that output generation requires long-term
dependencies to avoid representing the same object multiple
times. As mentioned above, de-rendered output sequences
can be quite long, and we thought the multi-head attention
mechanism of the Transformer would handle the long-range
dependencies better than the LSTM-RNN. Unexpectedly,
we found another advantage of Transformers over
LSTMRNNs for handling output sequence that can be reordered
in many ways and still be correct. We expand on this in
Sec. 7.1. To our knowledge, we are the first ones to use
Transformer networks for de-rendering graphical images,
and we find this change is a significant source of our
performance improvement.
      </p>
      <p>
        Another challenge with graphics de-rendering is that
changing one or a few tokens in the specification can cause
a significant change in many pixel values (e.g., by changing
the location or color of a large object). Conversely, one can
have two images that are very close visually, yet have
completely different specifications. To this end, we explore the
error minimization in the image as well as the specification
space via a dual-modality, two-way reward reinforcement
learning approach
        <xref ref-type="bibr" rid="ref18 ref19 ref34 ref38">(Williams 1992; Zaremba and Sutskever
2015)</xref>
        . We train with non-differentiable reward functions
that reflect performance measures of interest in both the
image space and the specification space (the “dual modes”). We
further explore training a single model using rewards from
both modalities, with the hopes that we get complementary
feedback from each.
      </p>
      <p>
        We empirically evaluate our methods on two image
de-rendering datasets: Noisy Shapes dataset
        <xref ref-type="bibr" rid="ref12">(Ellis et al.
2018)</xref>
        and Abstract Scene dataset
        <xref ref-type="bibr" rid="ref35 ref41">(Zitnick and Parikh 2013;
Wu, Tenenbaum, and Kohli 2017)</xref>
        . Our Transformer
models trained with cross-entropy loss achieve very significant
improvement over previous work on these datasets. We
show even more improvement when we train the
Transformer models using policy gradients-based methods, both
via single-modality rewards and further improvements via
dual-modality joint rewards. Finally, in our analysis we find
evidence that the performance of Transformers is relatively
insensitive to the ordering of objects in the output sequence,
while the performance of LSTM-RNN’s can decay
substan2We say sets, rather than sequences, because in our datasets
object ordering does not affect the rendering.
tially for a poorly chosen object ordering. This suggests that
the advantage of Transformers over LSTM-RNNs may be
particularly strong in tasks where we are using an output
sequence to represent an unordered set of objects.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2 Related Work</title>
      <p>
        De-rendering a computer-generated image to a
domainspecific language provides an abstraction that is easy to
change, store, compare and match to other images. As a
consequence, there has been recent interest and work in this
area.
        <xref ref-type="bibr" rid="ref16">Huang et al. (2016)</xref>
        used CNNs to translate a
handdrawn sketch of an object (e.g., jewellery) to a fixed set of
parameters for a procedural model. In a similar vein,
        <xref ref-type="bibr" rid="ref23">Nishida
et al. (2016)</xref>
        proposed a simple procedural grammar as a
building block to turn sketches into realistic 3D models.
        <xref ref-type="bibr" rid="ref12">Ellis et al. (2018)</xref>
        proposed an automatic visual program
induction model to infer programs from hand-drawn images,
where the images are encoded via CNNs and a multi-layer
perceptron predicts a distribution over drawing commands.
      </p>
      <p>
        <xref ref-type="bibr" rid="ref14">Ha and Eck (2018)</xref>
        presented a recurrent neural network
based sketch-rnn to construct conditional and unconditional
sketch generation of common objects, constrained by a very
simple set of primitives. Their model describes images as
pen movements either in a drawing mode or in a
nondrawing mode. Unlike our approach, this program is highly
sequence dependent and non-compositional. While there are
different solutions to the problem by re-ordering, one
cannot arbitrarily shuffle the sequence of pen movements.
        <xref ref-type="bibr" rid="ref21">Liu
et al. (2019)</xref>
        infer scene programs by exploiting
hierarchical object-based scene representations. Sun et al. (2018)
proposed a neural program synthesizer that generates
underlying programs for behaviorally diverse demonstration
videos. In this work, we use Transformer networks
        <xref ref-type="bibr" rid="ref32">(Vaswani
et al. 2017)</xref>
        for decoding the specification from the given
input image. Transformers have been used in other
generation tasks such as image and video captioning
        <xref ref-type="bibr" rid="ref29 ref40">(Sharma et
al. 2018; Zhou et al. 2018)</xref>
        , however, we are the first ones
to use Transformer networks for the image de-rendering
problem. Vinyals,
        <xref ref-type="bibr" rid="ref1">Bengio, and Kudlur (2015)</xref>
        shows that
an LSTM trained with shuffled targets (unordered) using
cross-entropy has a substantial drop in performance
compared to natural orderings. Our result supports their findings
and moreover we find that Transformers, by contrast, are
relatively insensitive to the ordering of the objects.
      </p>
      <p>
        Recently, policy gradient-based reinforcement learning
(RL) methods have been widely used for sequence
generation tasks: machine translation
        <xref ref-type="bibr" rid="ref27">(Ranzato et al. 2016)</xref>
        ,
image captioning
        <xref ref-type="bibr" rid="ref27 ref28">(Ranzato et al. 2016; Rennie et al. 2017)</xref>
        ,
and textual summarization
        <xref ref-type="bibr" rid="ref14 ref14 ref25 ref25 ref26">(Paulus, Xiong, and Socher 2018;
Pasunuru and Bansal 2018)</xref>
        .
        <xref ref-type="bibr" rid="ref8">Daume´, Langford, and Marcu
(2009</xref>
        ) proposed to improve sequence generation by
allowing a model to use its own prediction at training time,
extending their work in structured prediction. In the context of
program synthesis,
        <xref ref-type="bibr" rid="ref4">Bunel et al. (2018)</xref>
        used RL for
generating semantically correct programs. In the context of image
de-rendering, Wu, Tenenbaum, and Kohli (2017) proposed
a neural scene de-rendering model (NSD) with a neural
encoder and a graphics engine as a decoder. The encoder has an
object proposal generator that produces segment proposals,
and then it tries to interpret objects and their properties from
these segments. They use RL to better sample the proposals
and use the rendered image reconstruction error as reward.
      </p>
      <p>
        Recently,
        <xref ref-type="bibr" rid="ref13">Ganin et al. (2018)</xref>
        introduced an adversarially
trained agent that is trained via a reinforcement learning
setup without any supervision to generate a program that
is executed by a graphics engine to interpret and sample
images. In contrast, our work presents two complementary
rewards (one in image space and another in specification
space) in a reinforcement learning setup for the image
derendering problem.
      </p>
      <p>3</p>
    </sec>
    <sec id="sec-3">
      <title>Models</title>
      <p>Task. For each task we consider, there is a simple graphics
specification language that can be used to specify a
particular image. While differing in details, the overall scheme
of the specifications are the same for each. A specification
consists of a set of “objects”, and each object is specified
by a set of properties. Examples of an object specification
for each of our tasks can be seen in Fig. 1. Given an
image rendered from a specification, our task is to “de-render”
this image back to the original specification. We can
evaluate a predicted specification by looking for exact matches
between the objects in the predicted specification and the
objects in the original specification. We can summarize the
object matches with standard measures, such as precision,
recall, F1, and intersection-over-union. While these
measures describe performance on a single image, we can
average these measures across a collection of images, to get a
performance measure of a method overall. We provide more
details in Sec. 5.2. Another approach to evaluation is to
generate the image corresponding to a predicted specification,
and see how well it matches the original image, using some
reasonable metric on the space of images.</p>
      <sec id="sec-3-1">
        <title>Reduction to sequence prediction. While each specifica</title>
        <p>tions is represented by a set of objects with specific
properties, our models require sequences of tokens. We convert the
set of objects to a sequence of tokens via some ordering of
the objects. We investigate various approaches to ordering
(Sec. 7.1), and find that ordering by object type works best.
Once the model predicts a sequence of tokens, we can parse
it back into original structure to compute performance
measures and our reward functions for reinforcement learning.
3.1</p>
      </sec>
      <sec id="sec-3-2">
        <title>Image-to-LSTM Sequence Model</title>
        <p>
          Our baseline model is similar to an image captioning model
with an attention mechanism
          <xref ref-type="bibr" rid="ref36">(Xu et al. 2015)</xref>
          . We use the
ResNet-18 architecture
          <xref ref-type="bibr" rid="ref15">(He et al. 2016)</xref>
          for encoding the
input image, and we use an LSTM-RNN for predicting the
corresponding specification as a sequence of tokens.
        </p>
        <p>We will denote the convolutional features from the
ResNet-18 as ffigi=1, where fi 2 Rd. For any decoder
outm
put token o, let Eo 2 Rd0 denote its embedding, which will
be learned during training. Let st be the decoder state at step
t, ot be the output token at step t, and ct be the image context
vector at step t, which will be defined below. Then at step t,
the decoder state st is given by
st = F(ct; st 1; Eot 1 );
(1)</p>
        <p>ResNet
CNN
(or)</p>
        <p>Output
Softmax</p>
        <p>Linear
Add &amp; Norm
Feed Forward
Add &amp; Norm
Multi-Head
Attention
Add &amp; Norm</p>
        <p>Masked
Multi-Head
Attention</p>
        <p>+</p>
        <p>Output
Embedding</p>
        <p>Outputs
(shifted right)</p>
        <p>Positional
Embedding
where F is a trainable non-linear function. The context
vector ct is a convex combination of the image features: ct =
Pm
i=1 t;ifi, where t;i are “attention weights” defined as
t;i =</p>
        <p>exp(et;i)
Pm</p>
        <p>k=1 exp(et;k)
et;i = vT tanh(W fi + U st 1 + b);
(2)
(3)
where v, W , U , and b are the trainable parameters.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.2 Image-to-Transformer Sequence Model</title>
        <p>
          Recently, there is an increasing amount of interest in
Transformer networks
          <xref ref-type="bibr" rid="ref32">(Vaswani et al. 2017)</xref>
          , which are said to
train faster and to better capture long-term dependencies
than LSTM-based RNN models. In our specification
prediction problem, the length of the specification can be large,
and we need long-term dependencies to avoid generating
objects that have already been generated. This suggests
Transformer networks would be a better fit for our scenario. In
this work, we only use the decoder part of the Transformer
network
          <xref ref-type="bibr" rid="ref32">(Vaswani et al. 2017)</xref>
          . The Transformer encoder
is for use on sequences, and we replace it with ResNet-18
CNN described above. We give a high-level description of
the Transformer decoder below, and refer to
          <xref ref-type="bibr" rid="ref32">Vaswani et al.
(2017)</xref>
          for full details.
        </p>
        <p>
          The decoder of the Transformer has a stack of N
identical layers containing self-attention modules,
normalization modules, and feed-forward modules, along with
positional encoding module for output embeddings (see Fig. 2).
While the original model in
          <xref ref-type="bibr" rid="ref32">Vaswani et al. (2017)</xref>
          took N =6,
through hyperparameter tuning we found N =4 to work
better for our problem. Besides that, we used the
hyperparameter settings as in
          <xref ref-type="bibr" rid="ref32">Vaswani et al. (2017)</xref>
          . The decoder has two
attention modules: one for attending to the image
convolution features and another self-attention module to attend to
different previous positions in the decoder state.
        </p>
      </sec>
      <sec id="sec-3-4">
        <title>Attention in Transformer. As shown in Fig. 2, we have</title>
        <p>two attention mechanisms in the model: one attending to the
CNN features, and another attending to different parts of the
decoder state. They all have the same structure, which we
describe below.</p>
        <p>An attention mechanism in the Transformer can be
viewed as a mapping from a query (Q) and a key-value
(K; V ) pair to an output. An attention weight is computed
using the query and key and those weights are used with
values to compute the output of the attention module.
Empirically, it has been proven that instead of performing a
single attention function, linearly projecting the queries, keys,
and values with different learned projection layers and then
performing the attention function in parallel and
concatenating those outputs to get the final attention module output to
work better. This attention mechanism is called multi-head
attention mechanism (MH), which is defined as follows:
MH(Q; K; V ) = Concat(head1; ::; headh)W O
headi = Attention(QWiQ; KWiK ; V WiV )
Attention(Q; K; V ) = softmax
QKT
dk</p>
        <p>V
(4)
(5)
(6)
where, dk is the dimension of the queries and keys, WiQ,
WiK , and WiV are the parameters of the projection matrices.</p>
      </sec>
      <sec id="sec-3-5">
        <title>Position-wise Feed-Forward Networks. In addition to</title>
        <p>the attention sub-layers, each of the layers in the
Transformer decoder contains a fully connected feed-forward
network that is applied to each position of the decoder
separately and identically. This network is defined as
FFN(x) = max(0; xW1 + b1)W2 + b2;
(7)
where W1, W2, b1, and b2 are the linear projection
parameters which are same across different positions but are
different from layer to layer.</p>
        <p>Positional Encoding. In the model described thus far, the
model is symmetric with respect to sequence position. For
example, at the bottom right of Fig. 2, the model has no
structural way to determine which output embeddings come
from which part of the output sequence. To remedy this
issue, we concatenate a “positional encoding” (PE) to the
embedding representation of the tokens. We use the sine and
cosine functions for positional encoding:</p>
        <p>PE(pos; 2i) = sin(pos=100002i=dmodel )</p>
        <p>PE(pos; 2i + 1) = cos(pos=100002i=dmodel )
where pos is the position, i is the dimension, and dmodel is
the dimension of the embedding vector representation.
(8)</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Dual-Modality Two-Way Reinforcement</title>
    </sec>
    <sec id="sec-5">
      <title>Learning</title>
      <p>
        Traditionally, sequence generation models are trained using
a cross-entropy loss. More recently, a policy gradient-based
reinforcement learning approach has been explored for
sequence generation tasks
        <xref ref-type="bibr" rid="ref27 ref28">(Ranzato et al. 2016; Rennie et al.
2017)</xref>
        , which has two advantages over the cross-entropy loss
optimization approach: (1) avoiding the exposure bias issue,
which is about the imbalance in the output distributions
created by different train and test time decoding approaches
in cross-entropy loss optimization
        <xref ref-type="bibr" rid="ref1 ref27 ref33">(Bengio et al. 2015;
Ranzato et al. 2016)</xref>
        ; (2) allows direct optimization of the
evaluation metric of interest, even if it is not differentiable.
To this end, we use a policy gradient-based approach via
rewards in both the specification space and the image space.
Also, we explore joint rewards based on these two spaces
for better capturing feedback that is complementary between
these two modalities.
      </p>
      <p>
        For this reward optimization, we use the REINFORCE
algorithm
        <xref ref-type="bibr" rid="ref18 ref19 ref34 ref38">(Williams 1992; Zaremba and Sutskever 2015)</xref>
        to
learn a policy p that produces a distribution over sequences
os for any given input. We try to find a policy p such that
the expected reward for a label sequence os drawn according
to the predicted distribution has maximum expected reward.
Equivalently, we minimize the following loss function, in
average across all training inputs:
(9)
(10)
LRL =
      </p>
      <p>
        Eos p [r(os)];
where os is the sequence of sampled tokens with ots sampled
at time step t of the decoder. We can approximate the
gradient of this loss function with respect to the parameter using
a single sample os drawn from p as:
r LRL =
(r(os)
be)r log p (os);
where the leading factor is included for variance reduction
using a baseline estimator
        <xref ref-type="bibr" rid="ref18 ref19 ref38">(Zaremba and Sutskever 2015)</xref>
        .
There are several ways to calculate the baseline
estimator; we employ the effective SCST approach
        <xref ref-type="bibr" rid="ref28">(Rennie et al.
2017)</xref>
        .
4.1
      </p>
      <sec id="sec-5-1">
        <title>Rewards</title>
        <p>In this work we consider three different reward functions.
Two of the rewards are based in “specification space”, which
make a direct comparison between the predicted
specification and the ground truth specification, and one of the
rewards is based in “image space”, which compares the image
rendered from the predicted specification with original input
image. We also investigate using these rewards in
combination, with the hope that there is complementary information
in the feedback based on the two spaces.</p>
        <p>Intersection-Over-Union Reward (IOU) As mentioned
in Sec. 3, after the specification is predicted as a sequence
of tokens, we can parse the sequence into a set of object
specifications. The intersection-over-union (IOU) reward is
based in specification space. Roughly speaking, the IOU
reward gives credit for predicting objects that exactly match
objects in the ground truth specification, and penalizes both
Graphics
Renderer</p>
        <p>Image Distance Reward
Specs
from os
Output
Softmax
Linear
Ad &amp;Norm
Fe dForward
Ad &amp;Norm
Multi-Head
Atention
Ad &amp;Norm
Masked
Multi-Head
Atention
Ou+tput EPmosbietidonianlg
Embed ing
Outputs
(shiftedright)</p>
        <p>T
r
a
n
s
aSm rfeo</p>
        <p>m
lep rD
r e
c
o
d
e
r
[Object(type(boy), 60, 240),
Object(type(tree), 100, 20),
Object(type(bear), 360, 220)]
[Object(type(boy), 60, 240),
Object(type(tree), 440, 20),</p>
        <p>Object(type(bear), 360, 220)]
IOU Reward
for predicting objects that do not match ground truth objects
and for failing to predict objects that are part of the ground
m n
truth. More formally, let foigi=1 and foj gj=1 represent the
objects in predicted and ground-truth specifications,
respectively. Then the IOU reward is defined as:
riou =
count(foigim=1 \ foj gj=1)</p>
        <p>n
count(foigim=1 [ foj gjn=1)
(11)
The object oi in the prediction specification is the same as
object oj in the ground-truth specification if and only if all
the properties of these objects match exactly.</p>
        <p>Inference Reward Our second reward, which we call the
“inference reward”, is also a reward in specification space.
The name is based on the “inference error”, which is a
performance measure introduced in Wu, Tenenbaum, and Kohli
(2017) for the Abstract Scenes dataset. While IOU is based
on exact matches between predicted objects and
groundtruth objects, the inference error and inference reward are
based on the number of properties (within objects) that
correctly match the corresponding properties in the
groundtruth. For those properties specifying location in pixel
coordinates, we follow Wu, Tenenbaum, and Kohli (2017) and
divide the space of each coordinate into 20 bins of equal
size, and we consider it a match if the predicted and
groundtruth locations are in the same bin. We define the inference
error as the fraction of predicted properties that fail to match
the corresponding ground-truth properties. The inference
reward is one minus the inference error.</p>
        <p>Image Distance Reward Our third and final reward, the
“image distance reward”, is in image space. We define it
generically first, as it takes slightly different forms in our
two datasets. If we let I and IR represent vectorized
versions of the input image and the image rendered from the
predicted specification, respectively, then we define the
image distance as
dimg = jjI
(IR)jj22;
(12)
where jj jj2 is the `2-norm.</p>
        <p>
          For Noisy Shapes dataset, we follow
          <xref ref-type="bibr" rid="ref12">Ellis et al. (2018)</xref>
          and take to be a Gaussian blurring function, as the objects
(13)
(14)
in the target image have noise (see Fig. 1). We take to
be a simple subtraction operation. The image reward for this
dataset is:
rimg =
        </p>
        <p>c
dimg
where c is a tunable parameter.</p>
        <p>
          For the Abstract Scene dataset, is a logical operator that
takes the value 0 in every position where the pixel values
“match”, and 1 in every other position. The range of possible
pixel values is 0-255 and, similarly to the discretization of
position in the inference reward, we divide the pixel value
range into 20 equisized buckets and consider pixel values to
match if they are in the same bucket. We take to be the
identity function. The image reward for the Abstract Scenes
dataset is then defined as:
rimg = 1
dimg
w h
where w and h are width and height of the image.
Joint Dual-Modality Reward Since we expect the
rewards based in specification space to be complementary to
the reward based in image space, we want a way to combine
rewards on the two spaces. One way to combine two rewards
is to create a weighted combination of individual rewards to
formulate the joint reward. Another approach is to alternate
the reward used during the learning process
          <xref ref-type="bibr" rid="ref14 ref25">(Pasunuru and
Bansal 2018)</xref>
          . In this work, we follow the latter approach, as
the former approach requires expensive tuning for scale and
weight balancing. Let r1 and r2 be the two reward functions
that we want to optimize. In our approach, we first take a1
optimization steps to minimize the reinforcement learning
loss LRL1 (r1; ) (i.e. we use a1 mini-batches). Then we take
a2 optimization steps to minimize the reinforcement
learning loss LRL2 (r2; ). We then repeat this cycle of steps until
convergence. All other optimization parameters, such as step
size, remain the same for each set of steps. The values a1 and
a2 are tuning parameters.3 The two rewards r1 and r2 could
be based on different aspects of the output, such as IOU and
image distance reward.
        </p>
        <p>
          3
          <xref ref-type="bibr" rid="ref25">Pasunuru and Bansal (2018)</xref>
          set a1 and a2 to 1, without tuning.
        </p>
        <sec id="sec-5-1-1">
          <title>Image2LSTM+atten. Image2Transformer</title>
        </sec>
        <sec id="sec-5-1-2">
          <title>IOU Reward</title>
          <p>Image-distance Reward
Image-distance + IOU Reward
Precision</p>
        </sec>
        <sec id="sec-5-1-3">
          <title>Recall F1 CROSS-ENTROPY LOSS</title>
          <p>
            97.6
98.5
Noisy Shapes Dataset.
            <xref ref-type="bibr" rid="ref12">Ellis et al. (2018)</xref>
            provides a
synthetic dataset of images containing multiple simple objects
(lines, circles, and rectangles), each with various properties
that can be specified. The images are specified using a small
subset of LATEX drawing commands. Additional noise is
introduced into the rendered images by rescaling image
intensity, translating the image by a few pixels, rendering the
LATEX using the pencildraw style, and randomly perturbing
the position and sizes of these LATEX drawing commands.
The dataset was created by randomly sampling image
specifications with between 1 and 12 objects, excluding any
specifications that lead to images with overlapping objects. The
size of each image is 256x256. The dataset contains 100,000
images paired with specifications, from which we use 1000
for testing and the rest for training.
          </p>
          <p>
            Abstract Scene Dataset. The Abstract Scene dataset
            <xref ref-type="bibr" rid="ref41">(Zitnick and Parikh 2013)</xref>
            contains 10,020 images, each of
which has 3-18 objects. There are over 100 types of objects,
each of which is specified by two integers, one indicating
a broad category (e.g. sky object, animal, boy, girl) and
another indicating a subcategory (e.g. girl pose, animal type,
etc.). Each object can be drawn at one of 3 scales, with or
without a horizontal flip, and at any pixel location in the
500x400 image. These properties are specified by 4
additional integers. Thus each object is specified by 6 integers.
There are often heavy occlusions among these objects when
rendered in an image (see input image in Fig. 2). However,
the objects are rendered in a deterministic order based on
the object types and other properties, and thus the image is
independent of the order of the objects in the specification.
Similar to Wu, Tenenbaum, and Kohli (2017), we randomly
sample 90% of the images for training and rest for testing.
5.2
          </p>
        </sec>
      </sec>
      <sec id="sec-5-2">
        <title>Evaluation Metrics</title>
        <p>
          Noisy Shapes Dataset. As described in the Task
description of Sec. 3, we can summarize performance on a single
image with precision, recall, F1, and IOU (intersection over
union) at the object level. Following previous work
          <xref ref-type="bibr" rid="ref12">(Ellis
et al. 2018)</xref>
          , we summarize the performance of a method
by averaging these metrics across all test examples (i.e. a
macro average). Further, we also report IOUk, which is
defined as the percent of test examples for which the IOU score
is greater than or equal to k.
        </p>
        <p>
          Abstract Scene Dataset. For the abstract scene dataset,
following previous work
          <xref ref-type="bibr" rid="ref35">(Wu, Tenenbaum, and Kohli 2017)</xref>
          ,
we report specification inference error and image
reconstruction error based on a micro average across all test
examples. As described in Sec. 4.1 and Sec. 4.1, inference
error is based on the percentage of incorrectly inferred values
(i.e., how many properties of objects do not match with the
ground-truth) for the specification, and image reconstruction
error is based on percentage of incorrect pixel prediction.
During these evaluations, all the continuous variables (pixel
values, and x and y coordinates) are quantized into 20 bins.
Additionally, we report the macro average based IOU error
as described for the noisy shapes dataset.
5.3
        </p>
      </sec>
      <sec id="sec-5-3">
        <title>Training Details</title>
        <p>
          In all of our models, we encode the image information via
ResNet-18
          <xref ref-type="bibr" rid="ref15">(He et al. 2016)</xref>
          , where we take the penultimate
layer’s features as outputs from this image encoder. For
LSTM-RNN, we use a hidden state size of 128, input token
embedding size of 128, and a batch size of 64. For
Transformer networks, we use the same hidden and embedding
size, and use 4 layers at each time step. We use the Adam
optimizer
          <xref ref-type="bibr" rid="ref18 ref19 ref36 ref38">(Kingma and Ba 2015)</xref>
          with the default learning rate
of 0.001 for all the cross-entropy models, and a learning rate
of 0.0001 for all the reinforcement learning based models.
For the Noisy Shapes dataset, the maximum decoder length
is fixed to 80, and we use a vocabulary size of 27, which are
placeholders for object properties. For the Abstract Scene
dataset, the maximum decoder length is fixed to 100, and
we use a vocabulary size of 1078 which represents all the
object properties. For the joint reward optimization, we use
a mixing ratio of 1:1 for the Noisy Shapes dataset and 1:4
for the Abstract Scene dataset.
        </p>
        <p>6</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Results</title>
      <p>6.1</p>
      <sec id="sec-6-1">
        <title>Results on the Noisy Shapes Dataset</title>
        <p>We first compare the performance of the LSTM-RNN model
(Image2LSTM+atten) to the Transformer-based model,
when both are trained with cross-entropy loss. We see in
PREVIOUS WORK</p>
        <sec id="sec-6-1-1">
          <title>CROSS-ENTROPY LOSS</title>
          <p>IMAGE2TRANSFORMER WITH REINFORCE LOSS</p>
          <p>Recons. Avg.</p>
          <p>Error Error
CNN+LSTM (2017)
NSD (full) (2017)</p>
          <p>Table 1 that the Transformer model dominates on all
measures. In particular, we highlight IOU1.0, which measures
the percent of examples on which the predicted
specification exactly matches the ground-truth specification. While
the LSTM-RNN model achieves a 90:7% IOU1.0, the
Transformer model achieves 94:1%, which is an impressive
36:5% reduction in the number of errors. We have similar
performance improvements for the other metrics. We now
compare the Transformer model trained with reinforcement
learning, using various reward functions, to training using
cross-entropy loss. Table 1 shows that, although all three
reward variations have roughly the same performance, they
all show significant improvement over cross-entropy
training, on all measures.4 For example, the model trained with
IOU reward achieved a 95:0% IOU1.0 measure, which is an
impressive 15:3% reduction in the number of errors
compared to the same model trained with cross-entropy loss, and
a 46:2% reduction compared to the original LSTM-RNN
model. Performance improvement in the other measures is
at least as good.
6.2</p>
        </sec>
      </sec>
      <sec id="sec-6-2">
        <title>Results on Abstract Scene Dataset</title>
        <p>In Table 2, we see the performance of various models on
the Abstract Scene dataset, for the metrics described in
Sec. 5.2. We first note that even our baseline LSTM-RNN
model (Image2LSTM+atten) shows a very large error
reduction compared to the results presented in Wu, Tenenbaum,
and Kohli (2017) (first 4 rows of the table). This highlights
the importance of an attention mechanism in these tasks.
For the models trained with cross-entropy, the Transformer
model shows an additional remarkable improvement over
the LSTM-RNN model, across all measures.</p>
        <p>
          For reinforcement learning with the Transformer model,
4The improvement of our Transformer models trained with
reinforcement learning over the corresponding cross-entropy models
is statistically significant with p &lt; 0:01, based on the bootstrap
test
          <xref ref-type="bibr" rid="ref11 ref24">(Noreen 1989; Efron and Tibshirani 1994)</xref>
          .
we tried three different reward functions, corresponding to
three of our performance metrics: inference error,
reconstruction error, and IOU. All the Transformer models trained
with REINFORCE out-performed the model trained with
cross-entropy loss for each of the error measures.5 For
inference error, the model trained with the inference reward
did the best, as one might hope and expect. Compared to
the cross-entropy trained Transformer, the inference error
measure was reduced by 11:0%. For reconstruction error
(image-based), the best performing model was the model
trained with the reconstruction reward, which reduced the
reconstruction error by 8:5% compared to the cross-entropy
trained version. When evaluating performance using the
average of the inference and reconstruction error, one of our
joint-reward models performed best, though interestingly,
not the one that uses the corresponding inference and
reconstruction rewards. The best performing model for this
performance measure used IOU and reconstruction rewards,
suggesting that IOU reward has more information that is
complementary to the reconstruction error than does the
inference reward. For IOU performance measure, the model
trained with IOU reward did well, but when trained jointly
with IOU and reconstruction reward, it performed the best.
This suggests that using image-based feedback during
training (recons. error) can be beneficial even when the ultimate
goal (IOU) depends only on the specification output.
7
        </p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>Analysis</title>
      <p>7.1</p>
      <sec id="sec-7-1">
        <title>LSTM vs. Transformer Networks</title>
        <p>As noted above, for the Abstract Scene and the Noisy Shapes
datasets that we consider, the order of the objects in the
specification does not affect the final image. Nevertheless,
for training both the LSTM-RNN and the Transformer
models, one must choose an ordering. We ran an experiment
using the Noisy Shapes dataset, in which we tried ordering
the objects by shape size, shape type, and by shape
position in the rendered image. We found that ordering by shape
type worked best across our models, so that’s what we used
for our main results in Table 1. We also wanted to
investigate how important it is to have the objects in some sensible
order, compared to a random ordering. Table 3 shows the
results of our two models when trained with cross-entropy
on specification sequences where the objects are put in
random order. We find that the LSTM-RNN model
performance drops dramatically (e.g. IOU1.0 drops from 90:7% to
72:0%), while the drop with Transformer networks is quite
small (e.g. IOU1.0 drops from 94:1% to 93:2%.6 This is
addi5For the IOU and inference reward models, this
improvement is statistically significant for all metrics except
reconstruction error. For the reconstruction reward model, the improvement
is significant for all but the inference error metric. For the dual
(IOU+Recons.) reward model, the difference is significant for all
metrics (p &lt; 0:01 for each test).</p>
        <p>6Note that the number of model parameters is approximately
the same (11.8M for Transformer model and 11.5M for LSTM
model). Further, Transformer models are 2.5x faster to train in
comparison to the LSTM models. During inference, both models
take approximately the same time.
tional evidence for Transformers being the preferred model
for tasks of this type.
We conduct an experiment where we vary the percentage of
Noisy Shapes data used during our models’ training from
10% to 100% by steps of 20%. We observe that with less
data (10%-40%), the RL-based model is approximately 2
points better (on the IOU1.0 metric) than its corresponding
cross-entropy baseline. As we use more data (&gt;60%), the
gap decreases to 1 point between RL and cross-entropy
models. This suggests that RL, which has the advantage of
exploration, is more powerful when the data is less.
Fig. 4 presents the output rendered images of the
predicted specifications from Image2Transformer
crossentropy model and the corresponding RL-based model with
IOU+Image-distance as reward for noisy shapes dataset and
IOU+Recons. as reward for abstract scene dataset. In the
first example (top row in Fig. 4), the cross-entropy model
predicts an extra ‘line shape’ which is not present in the
ground-truth. Our RL model correctly predicts the exact
same shapes present in the ground-truth. However, neither
models getting the type of ‘line shape’ correct in couple of
instances. In the second example (second row in Fig. 4),
the cross-entropy model predicts an extra object (glasses),
which is not present in the ground-truth image, and is also
missing the cap on the snake. The RL model improves on the
cross-entropy model by not having any extra objects, but it is
also missing the cap. In the third example, both the rendered
images look very similar to the ground-truth, but the
crossentropy model predicts one of the objects (glasses) slightly
off in position. Our RL model was able to accurately
position the glasses (bottom row in Fig. 4). The better
performance of RL model may be due to the image space
component of the error signal, which is more sensitive to position
errors, while the cross-entropy loss gives the same penalty
to all incorrect positions regardless of the error size.
8</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>Conclusion</title>
      <p>We present various neural de-rendering models based on
LSTMs with attention mechanism and Transformer
networks. Further, we introduce complimentary dual rewards
(one in specification space and another in image space) and
optimize them via reinforcement learning, and achieve
stateof-the-art results. Further, our results and analyses suggest
Ground-truth Images</p>
      <p>Transformer Baseline Rendered Images Transformer RL Rendered Images
that Transformers are a better choice than LSTMs for
unordered sequence prediction tasks.</p>
    </sec>
    <sec id="sec-9">
      <title>Acknowledgments</title>
      <p>We thank the reviewers for their helpful comments. This
work was partially supported by NSF-CAREER Award
1846185, ARO-YIP Award W911NF-18-1-0336, and a
Microsoft PhD Fellowship. The views contained in this article
are those of the authors and not of the funding agency.</p>
      <sec id="sec-9-1">
        <title>Reinforce</title>
        <p>arXiv preprint</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Bengio</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Vinyals</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Jaitly</surname>
          </string-name>
          , N.; and
          <string-name>
            <surname>Shazeer</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <article-title>Scheduled sampling for sequence prediction with recurrent neural networks</article-title>
          .
          <source>In Proceedings of the 28th International Conference on Neural Information Processing Systems - Volume</source>
          <volume>1</volume>
          , NeurIPS'
          <volume>15</volume>
          ,
          <fpage>1171</fpage>
          -
          <lpage>1179</lpage>
          . Cambridge, MA, USA: MIT Press.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Bluche</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Louradour</surname>
            , J.; and Messina,
            <given-names>R. O.</given-names>
          </string-name>
          <year>2016</year>
          .
          <article-title>Scan, attend and read: End-to-end handwritten paragraph recognition with MDLSTM attention</article-title>
          .
          <source>CoRR abs/1604</source>
          .03286.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Bunel</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ; Hausknecht,
          <string-name>
            <given-names>M.</given-names>
            ;
            <surname>Devlin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ;
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <surname>R.</surname>
          </string-name>
          ; and Kohli,
          <string-name>
            <surname>P.</surname>
          </string-name>
          <year>2018</year>
          .
          <article-title>Leveraging grammar and reinforcement learning for neural program synthesis</article-title>
          .
          <source>In ICLR. OpenReview.net.</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Fang</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Lin</surname>
          </string-name>
          , T.-Y.;
          <string-name>
            <surname>Vedantam</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ; Gupta,
          <string-name>
            <given-names>S.</given-names>
            ; Dolla´r, P.; and
            <surname>Zitnick</surname>
          </string-name>
          ,
          <string-name>
            <surname>C. L.</surname>
          </string-name>
          <year>2015</year>
          .
          <article-title>Microsoft COCO captions: Data collection and evaluation server</article-title>
          .
          <source>CoRR abs/1504</source>
          .00325.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Cliche</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Rosenberg</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Madeka</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ; and
          <string-name>
            <surname>Yee</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <source>In Joint European Conference on Machine Learning and Knowledge Discovery in Databases</source>
          ,
          <volume>135</volume>
          -
          <fpage>150</fpage>
          . Springer.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Daume</surname>
          </string-name>
          ´, H.;
          <string-name>
            <surname>Langford</surname>
          </string-name>
          , J.; and
          <string-name>
            <surname>Marcu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <year>2009</year>
          .
          <article-title>Search-based structured prediction</article-title>
          .
          <source>Machine Learning</source>
          <volume>75</volume>
          (
          <issue>3</issue>
          ):
          <fpage>297</fpage>
          -
          <lpage>325</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Deng</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Kanervisto</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Ling</surname>
          </string-name>
          , J.; and
          <string-name>
            <surname>Rush</surname>
            ,
            <given-names>A. M.</given-names>
          </string-name>
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <source>In Proceedings of the 34th International Conference on Machine Learning - Volume 70</source>
          , ICML'
          <volume>17</volume>
          ,
          <fpage>980</fpage>
          -
          <lpage>989</lpage>
          . JMLR.org.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Efron</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Tibshirani</surname>
            ,
            <given-names>R. J.</given-names>
          </string-name>
          <year>1994</year>
          .
          <article-title>An introduction to the bootstrap</article-title>
          .
          <source>Number 57 in Monographs on Statistics and Applied Probability. Boca Raton</source>
          , Florida, USA: Chapman &amp; Hall/CRC.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <surname>Ellis</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Ritchie</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Solar-Lezama</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ; and
          <string-name>
            <surname>Tenenbaum</surname>
            ,
            <given-names>J. B.</given-names>
          </string-name>
          <year>2018</year>
          .
          <article-title>Learning to infer graphics programs from hand-drawn images</article-title>
          .
          <source>In Proceedings of the 32nd International Conference on Neural Information Processing Systems</source>
          , NeurIPS'
          <volume>18</volume>
          ,
          <fpage>6062</fpage>
          -
          <lpage>6071</lpage>
          . Red Hook,
          <string-name>
            <surname>NY</surname>
          </string-name>
          , USA: Curran Associates Inc.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <string-name>
            <surname>Ganin</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Kulkarni</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Babuschkin</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ; Eslami,
          <string-name>
            <given-names>S. M. A.</given-names>
            ; and
            <surname>Vinyals</surname>
          </string-name>
          ,
          <string-name>
            <surname>O.</surname>
          </string-name>
          <year>2018</year>
          .
          <article-title>Synthesizing programs for images using reinforced adversarial learning</article-title>
          .
          <source>In Proceedings of the 35th International Conference on Machine Learning.</source>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <string-name>
            <surname>Ha</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Eck</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <year>2018</year>
          .
          <article-title>A neural representation of sketch drawings</article-title>
          .
          <source>In 6th International Conference on Learning Representations, ICLR</source>
          <year>2018</year>
          , Vancouver, BC, Canada, April 30 - May 3,
          <year>2018</year>
          , Conference Track Proceedings. OpenReview.net.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <string-name>
            <surname>He</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Ren</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ; and
          <string-name>
            <surname>Sun</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <year>2016</year>
          .
          <article-title>Deep residual learning for image recognition</article-title>
          .
          <source>In CVPR</source>
          ,
          <fpage>770</fpage>
          -
          <lpage>778</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          <string-name>
            <surname>Huang</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Kalogerakis</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Yumer</surname>
            , E.; and Mech,
            <given-names>R.</given-names>
          </string-name>
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          <article-title>Shape synthesis from sketches via procedural models and convolutional networks</article-title>
          .
          <source>IEEE Transactions on Visualization and Computer Graphics</source>
          <volume>2</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          <string-name>
            <surname>Karpathy</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Fei-Fei</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <year>2015</year>
          .
          <article-title>Deep visual-semantic alignments for generating image descriptions</article-title>
          .
          <source>In Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          ,
          <fpage>3128</fpage>
          -
          <lpage>3137</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          <string-name>
            <surname>Kingma</surname>
            ,
            <given-names>D. P.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Ba</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <year>2015</year>
          .
          <article-title>Adam: A method for stochastic optimization</article-title>
          . In Bengio, Y., and LeCun, Y., eds.,
          <source>3rd International Conference on Learning Representations, ICLR</source>
          <year>2015</year>
          , San Diego, CA, USA, May 7-
          <issue>9</issue>
          ,
          <year>2015</year>
          , Conference Track Proceedings.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Maire</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Belongie</surname>
            ,
            <given-names>S. J.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Bourdev</surname>
            ,
            <given-names>L. D.</given-names>
          </string-name>
          ; Girshick,
          <string-name>
            <given-names>R. B.</given-names>
            ;
            <surname>Hays</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.</surname>
          </string-name>
          ; Perona,
          <string-name>
            <given-names>P.</given-names>
            ;
            <surname>Ramanan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ; Dolla´r, P.; and
            <surname>Zitnick</surname>
          </string-name>
          ,
          <string-name>
            <surname>C. L.</surname>
          </string-name>
          <year>2014</year>
          .
          <article-title>Microsoft COCO: common objects in context</article-title>
          .
          <source>CoRR abs/1405</source>
          .0312.
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Ritchie</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Freeman</surname>
          </string-name>
          , W. T.;
          <string-name>
            <surname>Tenenbaum</surname>
            ,
            <given-names>J. B.</given-names>
          </string-name>
          ; and
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <year>2019</year>
          .
          <article-title>Learning to describe scenes with programs</article-title>
          .
          <source>In ICLR.</source>
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          <string-name>
            <surname>Mishchenko</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Vassilieva</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          <year>2011</year>
          .
          <article-title>Chart image understanding and numerical data extraction</article-title>
          .
          <source>In 2011 Sixth International Conference on Digital Information Management</source>
          ,
          <fpage>115</fpage>
          -
          <lpage>120</lpage>
          . IEEE.
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          <string-name>
            <surname>Nishida</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ;
          <article-title>Garcia-Dorado, I.;</article-title>
          <string-name>
            <surname>Aliaga</surname>
            ,
            <given-names>D. G.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Benes</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ; and
          <string-name>
            <surname>Bousseau</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <year>2016</year>
          .
          <article-title>Interactive sketching of urban procedural models</article-title>
          .
          <source>ACM Transactions on Graphics (TOG) 35</source>
          (
          <issue>4</issue>
          ):
          <fpage>130</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          <string-name>
            <surname>Noreen</surname>
            ,
            <given-names>E. W.</given-names>
          </string-name>
          <year>1989</year>
          .
          <article-title>Computer-intensive methods for testing hypotheses</article-title>
          . Wiley New York.
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          <string-name>
            <surname>Pasunuru</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Bansal</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <year>2018</year>
          .
          <article-title>Multi-reward reinforced summarization with saliency and entailment</article-title>
          .
          <source>In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies</source>
          , Volume
          <volume>2</volume>
          (
          <issue>Short Papers)</issue>
          ,
          <fpage>646</fpage>
          -
          <lpage>653</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          <string-name>
            <surname>Paulus</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ; Xiong,
          <string-name>
            <surname>C.</surname>
          </string-name>
          ; and Socher,
          <string-name>
            <surname>R.</surname>
          </string-name>
          <year>2018</year>
          .
          <article-title>A deep reinforced model for abstractive summarization</article-title>
          .
          <source>In 6th International Conference on Learning Representations, ICLR</source>
          <year>2018</year>
          , Vancouver, BC, Canada, April 30 - May 3,
          <year>2018</year>
          , Conference Track Proceedings. OpenReview.net.
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          <string-name>
            <surname>Ranzato</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Chopra</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ; Auli,
          <string-name>
            <given-names>M.</given-names>
            ; and
            <surname>Zaremba</surname>
          </string-name>
          ,
          <string-name>
            <surname>W.</surname>
          </string-name>
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          <string-name>
            <surname>Rennie</surname>
            ,
            <given-names>S. J.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Marcheret</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Mroueh</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Ross</surname>
          </string-name>
          , J.; and
          <string-name>
            <surname>Goel</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <year>2017</year>
          .
          <article-title>Self-critical sequence training for image captioning</article-title>
          .
          <source>In IEEE Conference on Computer Vision and Pattern Recognition</source>
          ,
          <fpage>1179</fpage>
          -
          <lpage>1195</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          <string-name>
            <surname>Sharma</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Ding</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Goodman</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ; and Soricut,
          <string-name>
            <surname>R.</surname>
          </string-name>
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          <article-title>Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning</article-title>
          .
          <source>In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)</source>
          ,
          <fpage>2556</fpage>
          -
          <lpage>2565</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          2018.
          <article-title>Neural program synthesis from diverse demonstration videos</article-title>
          .
          <source>In International Conference on Machine Learning</source>
          ,
          <fpage>4797</fpage>
          -
          <lpage>4806</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          <string-name>
            <surname>Vaswani</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Shazeer</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Parmar</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Uszkoreit</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Jones</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Gomez</surname>
            ,
            <given-names>A. N.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Kaiser</surname>
          </string-name>
          , Ł.; and
          <string-name>
            <surname>Polosukhin</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          <year>2017</year>
          .
          <article-title>Attention is all you need</article-title>
          .
          <source>In NeurIPS</source>
          ,
          <fpage>5998</fpage>
          -
          <lpage>6008</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          <string-name>
            <surname>Vinyals</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Bengio</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ; and Kudlur,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <year>2015</year>
          .
          <article-title>Order matters: Sequence to sequence for sets</article-title>
          .
          <source>In ICLR.</source>
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          <string-name>
            <surname>Williams</surname>
            ,
            <given-names>R. J.</given-names>
          </string-name>
          <year>1992</year>
          .
          <article-title>Simple statistical gradient-following algorithms for connectionist reinforcement learning</article-title>
          .
          <source>Machine learning 8(3-4)</source>
          :
          <fpage>229</fpage>
          -
          <lpage>256</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Tenenbaum</surname>
            ,
            <given-names>J. B.</given-names>
          </string-name>
          ; and Kohli,
          <string-name>
            <surname>P.</surname>
          </string-name>
          <year>2017</year>
          .
          <article-title>Neural scene de-rendering</article-title>
          .
          <source>In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition</source>
          ,
          <fpage>699</fpage>
          -
          <lpage>707</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Ba</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ; Kiros,
          <string-name>
            <surname>R.</surname>
          </string-name>
          ; Cho,
          <string-name>
            <given-names>K.</given-names>
            ;
            <surname>Courville</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ;
            <surname>Salakhudinov</surname>
          </string-name>
          ,
          <string-name>
            <surname>R.</surname>
          </string-name>
          ; Zemel, R.; and Bengio,
          <string-name>
            <surname>Y.</surname>
          </string-name>
          <year>2015</year>
          .
          <article-title>Show, attend and tell: Neural image caption generation with visual attention.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref37">
        <mixed-citation>
          <string-name>
            <surname>In</surname>
            <given-names>ICML</given-names>
          </string-name>
          ,
          <year>2048</year>
          -
          <fpage>2057</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref38">
        <mixed-citation>
          <string-name>
            <surname>Zaremba</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Sutskever</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref39">
        <mixed-citation>
          <source>arXiv:1505</source>
          .
          <fpage>00521</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref40">
        <mixed-citation>
          <string-name>
            <surname>Zhou</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Zhou</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Corso</surname>
            ,
            <given-names>J. J.</given-names>
          </string-name>
          ; Socher, R.; and
          <string-name>
            <surname>Xiong</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <year>2018</year>
          .
          <article-title>End-to-end dense video captioning with masked transformer</article-title>
          .
          <source>In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition</source>
          ,
          <fpage>8739</fpage>
          -
          <lpage>8748</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref41">
        <mixed-citation>
          <string-name>
            <surname>Zitnick</surname>
            ,
            <given-names>C. L.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Parikh</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <year>2013</year>
          .
          <article-title>Bringing semantics into focus using visual abstraction</article-title>
          .
          <source>In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition</source>
          ,
          <fpage>3009</fpage>
          -
          <lpage>3016</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>