C OMPOSITION AND D ECOMPOSITION OF GAN S
Anonymous authors
Paper under double-blind review
A BSTRACT
In this work, we propose a composition/decomposition framework for adversarially training generative models on composed data - data where each sample can be thought of as being constructed from a ﬁxed number of components.
In our framework, samples are generated by sampling components from component generators and feeding these components to a composition function which combines them into a “composed sample” .
This compositional training approach improves the modularity, extensibility and interpretability of Generative Adversarial Networks (GANs) - providing a principled way to incrementally construct complex models out of simpler component models, and allowing for explicit “division of responsibility” between these components.
Using this framework, we deﬁne a family of learning tasks and evaluate their feasibility on two datasets in two different data modalities (image and text).
Lastly, we derive sufﬁcient conditions such that these compositional generative models are identiﬁable.
Our work provides a principled approach to building on pre-trained generative models or for exploiting the compositional nature of data distributions to train extensible and interpretable models.
I NTRODUCTION
Generative Adversarial Networks (GANs) have proven to be a powerful framework for training generative models that are able to produce realistic samples across a variety of domains, most notably when applied to natural images.
However, existing approaches largely attempt to model a data distribution directly and fail to exploit the compositional nature inherent in many data distributions of interest.
In this work, we propose a method for training compositional generative models using adversarial training, identify several key beneﬁts of compositional training and derive sufﬁcient conditions under which compositional training is identiﬁable.
This work is motivated by the observation that many data distributions, such as natural images, are compositional in nature - that is, they consist of different components that are combined through some composition process.
For example, natural scenes often consist of different objects, composed via some combination of scaling, rotation, occlusion etc.
Exploiting this compositional nature of complex data distributions, we demonstrate that one can both incrementally construct models for composed data from component models and learn component models from composed data directly.
In our framework, we are interested in modeling composed data distributions - distributions where each sample is constructed from a ﬁxed number of simpler sets of objects.
We will refer to these sets of objects as components .
For example, consider a simpliﬁed class of natural images consisting of a foreground object superimposed on a background, the two components in this case would be a set of foreground objects and a set of backgrounds.
We explicitly deﬁne two functions: composition and decomposition , as well as a set of component generators .
Each component generator is responsible for modeling the marginal distribution of a component while the composition function takes a set of component samples and produce a composed sample (see ﬁgure 1).
We additionally assume that the decomposition function is the inverse operation of the composition function.
We are motivated by the following desiderata of modeling compositional data:
• Modularity: Compositional training should provide a principled way to reuse off-the-shelf or pre-trained component models across different tasks, allowing us to build increasingly complex generative models from simpler ones.
• Interpretability: Models should allow us to explicitly incorporate prior knowledge about the compositional structure of data, allowing for clear “division of responsibility” between different components.
• Extensibility: Once we have learned to decompose data, we should be able to learn component models for previously unseen components directly from composed data.
• Identiﬁability: We should be able to specify sufﬁcient conditions for composition under which composition/decomposition and component models can be learned from composed data.
Within this framework, we ﬁrst consider four learning tasks (of increasing difﬁculty) which range from learning only composition or decomposition (assuming the component models are pre-trained) to learning composition, decomposition and all component models jointly.
To illustrate these tasks, we show empirical results on two simple datasets: MNIST digits superimposed on a uniform background and the Yelp Open Dataset (a dataset of Yelp reviews).
We show examples of when some of these tasks are ill-posed and derive sufﬁcient conditions under which tasks 1 and 3 are identiﬁable.
Lastly, we demonstrate the concept of modularity and extensibility by showing that component generators can be used to inductively learn other new components in a chain-learning example in section 3.4.
The main contributions of this work are:
We deﬁne a framework for training compositional generative models adversarially.
Using this framework, we deﬁne different tasks corresponding to varying levels of prior knowledge and pre-training.
We show results for these tasks on two different datasets from two different data modalities, demonstrating the lack of identiﬁability for some tasks and feasibility for others.
We derive sufﬁcient conditions under which our compositional models are identiﬁable.
1. R ELATED WORK
Our work is related to the task of disentangling representations of data and the discovery of independent factors of variations (Bengio et al.
Examples of such work include: 1) methods for evaluation of the level of disentaglement (Eastwood & Williams (2018)), 2) new losses that promote disentaglement (Ridgeway & Mozer), 3) extensions of architectures that ensure disentanglement (Kim & Mnih (2018)).
Such approaches are complementary to our work but differ in that we explicitly decompose the structure of the generative network into independent building blocks that can be split off and reused through composition.
We do not consider decomposition to be a good way to obtain disentangled representations, due to the complete decoupling of the generators.
Rather we believe that decomposition of complex generative model into component generators, provides a source of building blocks for model construction.
Component generators obtained by our method trained to have disentangled representations could yield interpretable and reusable components, however, we have not explored this avenue of research in this work.
Extracting GANs from corrupted measurements has been explored by Bora et al.
We note that the noise models described in that paper can be seen as generated by a component generator under our framework.
Consequently, our identiﬁability results generalize recovery results in that paper.
Recent work by Azadi et al.
(2018) is focused on image composition and ﬁts neatly in the framework presented here.
Along similar lines, work such as Johnson et al.
(2018), utilizes a monolithic architecture which translates text into objects composed into a scene.
In contrast, our work is aimed at deconstructing the monolithic architectures into component generators.
M ETHODS 2. D EFINITION OF FRAMEWORK
Our framework consists of three main moving pieces: [Table]
Component generators g i
( z i )
A component generator is a standard generative model.
In this paper, we adopt the convention that the component generators are functions that maps some noise vector z sampled from standard normal distribution to a component sample.
We assume there are m component generators, from g 1 to g m .
Let o i :=
g i
( z i ) be the output for component generator i .
Composition function ( c : ( R n ) m → R n ) Function which composes m inputs of dimension n to a single output (composed sample).
Decomposition function ( d : R n → ( R n ) m ) Function which decomposes one input of dimension n to m outputs (components).
We denote the i -th output of the decomposition function by d ( · ) i .
Without loss of generality we will assume that the composed sample has the same dimensions as each of its components.
Together, these pieces deﬁne a “composite generator” which generates a composed sample by two steps:
• Generating component samples o 1 , o 2 , ..., o m .
• Composing these component samples using c to form a composed sample.
The composition and/or decomposition function are parameterized as neural networks.
Below we describe two applications of this framework to the domain of images and text respectively.
2. E XAMPLE 1: I MAGE WITH FOREGROUND OBJECT ( S ) ON A BACKGROUND
In this setting, we assume that each image consists of one or more foreground object over a background.
In this case, m ≥ 2 , one component generator is responsible for generating the background, and other component generators generate individual foreground objects.
An example is shown in ﬁgure 1.
In this case the foreground object is a single MNIST digit and the composition function takes a uniform background and overlays the digit over the background.
The decomposition function takes a composed image and returns both the foreground digit and the background with the digit removed. [Figure]
2. E XAMPLE 2: C OHERENT SENTENCE PAIRS
In this setting, we consider the set of adjacent sentence pairs extracted from a larger text.
In this case, each component generator generates a sentence and the composition function combines two sentences and edits them to form a coherent pair.
The decomposition function splits a pair into individual sentences (see ﬁgure 2).
[Figure]
2. L OSS F UNCTION
In this section, we describe details of our training procedure.
For convenience of training, we implement a composition of Wasserstein GANs introduced in Arjovsky et al.
but all theoretical results also hold for standard adversarial training losses.
Notation We deﬁne the data terms used in the loss function.
Let x 1 be a component sample.
There are m such samples.
Let y be a composite sample be obtained by composition of components x 1 , x 2 , ..., x m .
For compactness, we use o i as an abbreviation for g i ( z i ) .
We denote vector Lnorm by (cid:107) a (cid:107) 1 ( (cid:107) a (cid:107)
= (cid:80) i | a i | ).
Finally, we use capital D to denote discriminators involved in different losses.
Component Generator Adversarial Loss ( l g i )
Given the component data, we can train component generator ( g i ) to match the component data distribution using loss
[Equation]
Composition Adversarial Loss ( l c ) Given the component generators and composite data, we can train a composition network such that generated composite samples match the composite data distribution using loss
[Equation]
Decomposition Adversarial Loss ( l d ) Given the component and composite distributions, we can train a decomposition function d such that distribution of decomposed of composite samples matches the component distributions using loss
[Equation]
Composition/Decomposition Cycle Losses ( l c − cyc , l d − cyc )
Additionally, we include a cyclic consistency loss (Zhu et al.
to encourage composition and decomposition functions to be inverses of each other.
[Equation]
Table 2 summarizes all the losses.
Training of discriminators ( D i , D c , D f ) is achieved by maximization of their respective losses.
2. P ROTOTYPICAL TASKS AND CORRESPONDING LOSSES
Under the composition/decomposition framework, we focus on a set of prototypical tasks which involve composite data.
[Table] Task
Given
Task
generators g
Task
Task
, m d
To train generator(s) in these tasks
[Table]
we minimize relevant losses:
[Equation]
where α ≥ 0 controls the importance of consistency.
While the loss function is the same for the tasks, the parameters to be optimized are different.
In each task, only the parameters of the trained networks are optimized
[Table]
To train discriminator(s), a regularization is applied.
For brevity, we do not show the regularization term (see Petzka et al.
(2017)) used in our experiments.
The tasks listed above increase in difﬁculty.
We will show the capacity of our framework as we progress through the tasks.
Theoretical results in Section 4 provide sufﬁcient conditions under which Task 1.
and Task 3. are tractable.
E XPERIMENTS 3. D ATASETS
We conduct experiments on three datasets:
MNIST-MB MNIST digits LeCun & Cortes (2010) are superimposed on a monochromic one-color-channel background (value ranged from 0-200) (ﬁgure 3).
The image size isx 28.
MNIST-BB MNIST digit are rotated and scaled to ﬁt a box of size 32 x 32 placed on a monochrome background of size 64 x 64.
The box is positioned in one of the four possible locations (top-right, top-left, bottom-right, bottom-left), with rotation between ( − π/ 6 , π/ 6 ) (ﬁgure 4).
Yelp-reveiws We derive data from Yelp Open Dataset Yelp Inc.
From each review, we take the ﬁrst two sentences of the review.
We ﬁltered out reviews containing sentences shorter than 5 and longer than 10 words.
By design, the sentence pairs have the same topic and sentiment.
We refer to this quality as coherence.
Incoherent sentences have either different topic or different sentiment.
3. N ETWORK ARCHITECTURES
MNIST-MB, MNIST-BB
The component generators are DCGAN (Radford et al.
models.
Decomposition is implemented as a U-net (Ronneberger et al.
(2015)) model.
The inputs to the composition network are concatenated channel-wise.
Similarly, when doing decomposition, the outputs of the decomposition network are concatenated channel-wise before they are fed to the discriminator.
Yelp-reviews The component (sentence) generator samples from a marginal distribution of Yelp review sentences.
Composition network is a one-layer Seq2Seq model with attention Luong et al.
Input to composition network is a concatenation of two sentences separated by a delimiter token.
Following the setting of Seq-GAN Yu et al.
(2017), the discriminator ( D c ) network is a convolutional network for sequence data.
3. E XPERIMENTS ON MNIST-MB
Throughout this section we assume that composition operation is known and given by
[Equation]
In tasks where one or more generators are given, the generators have been independently trained using corresponding adversarial loss l g i .
Task 1:
Given g i , i ∈ { 1 , 2 } and c , train d .
This is the simplest task in the framework.
The decomposition network learns to decompose the digits and backgrounds correctly (ﬁgure 5) given c and pre-trained generative models for both digits and background components.
Task 2:
Given g 1 and g 2 train d and c .
Here we learn composition and decomposition jointly 6.
We ﬁnd that the model learns to decompose digits accurately; interestingly however, we note that backgrounds from decomposition network are inverted in intensity ( t ( b ) = 255 − b ) and that the model learns to undo this inversion in the composition function ( t ( t ( b ))
=
b ) so that cyclic consistency ( d ( c ( o 1 , o 2 ))
≈
[ o 1 , o 2 )] and c ( d ( y ))
≈ y is satisﬁed.
We note that this is an interesting case where symmetries in component distributions results in the model learning component distributions only up to a phase ﬂip.
Task 3:
Given g 1 and c , train g 2 and d .
Given digit generator and composition network, we train decomposition network and background generator (ﬁgure 7).
We see that decomposition network learns to generate nearly uniform backgrounds, and the decomposition network learns to inpaint. [Figure] [Figure]
FID evaluation In Table 3 we illustrate performance of learned generators trained using the setting of Task 3, compared to baseline monolithic models which are not amenable to decomposition.
As a complement to digits we also show results on Fashion-MNIST overlaid on uniform backgrounds (Xiao et al., 2017)
(see appendix for examples of task 3 and chain learning on Fashion-MNIST)
Task 4:
Given c , train g 1 , g 2 and d .
Given just composition, learn components and decomposition.
We show that for a simple composition function, there are many ways to assign responsibilities to different components.
Some are trivial, for example the whole composite image is generated by a single component (see ﬁgure 11 in Appendix).
3. C HAIN L EARNING - E XPERIMENTS ON MNIST-BB
In task 3 above, we demonstrated on the MNIST-MB dataset that we can learn to model the background component and the decomposition function from composed data assuming we are given a model for the foreground component and a composition network.
This suggests the natural followup question: if we have a new dataset consisting of a previously unseen class of foreground objects on the same distribution of backgrounds, can we then use this background model we’ve learned to learn a new foreground model?
We call this concept “chain learning” , since training proceeds sequentially and relies on the model trained in the previous stage.
To make this concrete, consider this proof-of-concept chain (using the
MNIST-BB dataset):
[Figure]
+
Given foreground generator for digits and composition func- tion, we can learn background generator and decomposition
Similarly, given background generator and composition func [Figure] tion, we can learn foreground generator and decomposition + [Figure]
Composed Data Learns [Figure] Using the model for digit “ 1 ” from step 1 (and a composition network), learn the decomposition network and background generator from composed examples of “ 1 ”s.
Using the background model and decomposition network from step 2, learn a model for digit “ 2 ” from from composed examples of “ 2 ”s.
As shown in ﬁgure 8 we are able to learn both the background generator (in step 1) and the foreground generator for “2” (in step 2) correctly.
More generally, the ability to learn a component model from composed data (given models for all other components) allows one to incrementally learn new component models directly from composed data. [Figure] [Table] [Table]
Example of coherent sentence composition
[Table] spa [Table] amazing
[Table] the owner cut
[Table] amazing [Table]
the owner cut my hair
[Table] the spa was clean and professional and professional .
our server was friendly and helpful .
[Table] the spa itself is very beautiful .
the owner is very knowledgeable and patient
[Table]
10 was perfect .
the owner responded right away to our yelp inquiry
[Table] the food is amazing !
the owner is very friendly and helpful .
[Table]
enjoyed their meals
[Table] the best buffet in las vegas .
everyone really enjoyed the food and service are amazing . them coherent.
In the second case, the topic is changed to a common case and the second sentence is embellished.
3. E XPERIMENTS ON Y ELP DATA
For this dataset, we focus on a variant of task 1 : given d and g 1 , g 2 , train c .
In this task, the decomposition function is simple – it splits concatenated sentences without modiﬁcation.
Since we are not learning decomposition, l c − cyc is not applicable in this task.
In contrast to MNIST task, where composition is simple and decomposition non-trivial, in this setting, the situation is reversed.
Other parts of the optimization function are the same as section 2.4.
We follow the state-of-the-art approaches in training generative models for sequence data.
We brieﬂy outline relevant aspects of the training regime.
As in Seq-GAN, we also pre-train the composition networks.
The data for pre-training consist of two pairs of sentences.
The output pair is a coherent pair from a single Yelp review.
Each of the input sentences is independently sampled from a set of nearest neighbors of the corresponding output sentences.
Following Guu et al.
(2017) we use Jaccard distance to ﬁnd nearest neighbor sentences.
As we sample a pair independently, the input sentences are not generally coherent but the coherence can be achieved with a small number of changes.
Discrimination in Seq-GAN is performed on an embedding of a sentence.
For the purposes of training an embedding, we initialize with GloVe word embedding Pennington et al.
During adversarial training, we follow regime of Xu et al.
(2017) by freezing parameters of the encoder of the composition networks, the word projection layer (from hidden state to word distribution), and the word embedding matrix, and only update the decoder parameters.
To enable the gradient to back-propagate from the discriminator to the generator, we applied the
Gumbel-softmax straight-through estimator from Jang et al.
We exponentially decay the temperature with each iteration.
Figure 9 shows an example of coherent composition and two failure modes for the trained composition network.
I DENTIFIABILITY RESULTS
In the experimental section, we highlighted tasks which suffer from identiﬁability problems.
Here we state sufﬁcient conditions for identiﬁability of different parts of our framework.
Due to space constraints, we refer the reader to the appendix for the relevant proofs.
For simplicity, we consider the output of a generator network as a random variable and do away with explicit reference to generators.
Speciﬁcally, we use random variables X and Y to refer to component random variables, and Z to a composite random variable.
Let range ( · ) denote range of a random variable.
We deﬁne indicator function, 1 [ a ] is 1 if a is true and 0 otherwise.
Deﬁnition 1.
A resolving matrix , R , for a composition function c and random variable X , is a matrix of size | range ( Z ) | × | range ( Y ) | with entries R z,
y = (cid:80) x ∈ range ( X ) p ( X = x )
[ z = c ( x, y )] (see ﬁgure 10).
Deﬁnition 2.
A composition function c is bijective if it is surjective and there exists a decomposition function d such that
[Equation]
equivalently, c is bijective when c ( x, y )
=
c ( x (cid:48) , y (cid:48) )
iff x = x
cid:48) and y =
y (cid:48) .
We refer to decomposition function d as inverse of c .
In the following results, we use assumptions:
Assumption 1.
X, Y are ﬁnite discrete random variables.
Assumption 2.
For variables X and Y , and composition function c , let random variable Z be distributed according to
[Equation]
Theorem 1.
Let Assumptions 1 and 2 hold.
Further, assume that resolving matrix of X and c has full column-rank.
If optimum of
[Equation]
is achieved for some random variable Y (cid:48) , then Y and Y (cid:48) have the same distribution.
Theorem 2.
Let Assumptions 1 and 2 hold.
Further, assume that c is bijective.
If optimum of
[Equation]
is
and it is achieved for some d (cid:48) then d (cid:48) is equal to inverse of c .
C ONCLUSION
We introduce a framework of generative adversarial network composition and decomposition.
In this framework, GANs can be taken apart to extract component GANs and composed together to construct new composite data models.
This paradigm allowed us to separate concerns about training different component generators and even incrementally learn new object classes – a concept we deemed chain learning.
However, composition and decomposition are not always uniquely deﬁned and hence may not be identiﬁable from the data.
In our experiments we discover settings in which component generators may not be identiﬁable.
We provide theoretical results on sufﬁcient conditions for identiﬁability of GANs.
We hope that this work spurs interest in both practical and theoretical work in GAN decomposability.
I DENTIFIABILITY PROOFS
We prove several results on identiﬁability of part generators, composition and decomposition functions as deﬁned in the main text.
These results take form of assuming that all but one object of interest are given, and the missing object is obtained by optimizing losses speciﬁed in the main text.
Let X, Y and Z denote ﬁnite three discrete random variables.
Let range ( · ) denote range of a random variable.
We refer to c : range ( X ) × range ( Y )
→ range ( Z ) as composition function, and d : range ( Z ) → range ( X ) × range ( Y ) as decomposition function.
We deﬁne indicator function, 1 [ a ] is 1 if a is true and 0 otherwise.
Lemma 1.
The resolving matrix of any bijective composition c has full column rank.
Proof.
Let R · ,y denote a column of R .
Let d ( z ) x denote the x part of d ( z ) , and d ( z ) y analogously.
Assume that:
[Equation]
or equivalently, ∀ z ∈ range ( Z ) :
[Equation]
using the the deﬁnition of R in the ﬁrst equality, making the substitution 1 [ z = c ( x, y )]
= 1 [ x = d ( z ) x ] 1 [ y = d ( z ) y ] implied by the bijectivitiy of c in the second equality and rearranging / simplifying terms for the third.
Since P ( X = x ) > 0 for all x ∈ range ( X ) , α y = 0 for all y ∈ { y | y =
d ( z ) y } .
By the surjectivity of c , α y = 0 for all y ∈ range ( Y ) , and R has full column rank.
Theorem 3.
Let Assumptions 1 and 2 hold.
Further, assume that resolving matrix of X and c has full column-rank.
If optimum of
[Equation]
is achieved for some random variable Y (cid:48) , then Y and Y (cid:48) have the same distribution.
Proof.
Let Z (cid:48) be distributed according to
[Equation]
The objective in equation 6 can be rewritten as
[Equation]
where dependence of Z (cid:48) on Y (cid:48) is implicit.
Following Arjovsky et al.
(2017), we note that W ( Z, Z (cid:48) )
→ 0 implies that p ( Z ) D −→ p
( Z (cid:48) ) , hence the inﬁmum in equation 8 is achieved for Z distributed as Z (cid:48) .
Finally, we observe that Z (cid:48) and Z are identically distributed if Y (cid:48) and Y are.
Hence, distribution of Y if optimal for equation 6.
Next we show that there is a unique of distribution of Y (cid:48) for which Z (cid:48) and Z are identically distributed, by generalizing a proof by Bora et al.
For a random variable X we adopt notation p x denote a vector of probabilities p x,i = p ( X = i ) .
In this notation, equation 1 can be rewritten as
[Equation]
[Equation] Since R is of rank | range ( Y ) | then R T R is of size | range ( Y ) | × | range ( Y ) | and non-singular.
Consequently, ( R T R ) − 1 R T p
z is a unique solution of equation 9.
Hence, optimum of equation 6 is achieved only Y (cid:48) which are identically distributed as Y .
Corollary 1.
Let Assumptions 1 and 2 hold.
Further, assume that c is a bijective.
If, an optimum of equation 6 is achieved is achieved for some random variable Y (cid:48) , then Y and Y (cid:48) have the same distribution.
Proof.
Using Lemma 1 and Theorem 3.
Theorem 4.
Let Assumptions 1 and 2 hold.
Further, assume that c is bijective.
If optimum of inf
[Equation] [Equation]
(10) is
and it is achieved for some d (cid:48) then d (cid:48) is equal to inverse of c .
Proof.
We note that for a given distribution, expectation of a non-negative function – such as norm – can only be zero if the function is zero on the whole support of the distribution.
Assume that optimum of 0 is achieved but d (cid:48) is not equal to inverse of c , denoted as d ∗ .
Hence, there exists a z (cid:48) such ( x (cid:48) , y (cid:48) )
=
d (cid:48)
( z (cid:48) )
(cid:54) =
d ∗ ( z (cid:48) )
=
( x ∗ , y ∗ ) .
By optimality of d (cid:48) , c ( d (cid:48)
( z (cid:48) ))
=
z (cid:48) or the objective would be positive.
Hence, c ( x (cid:48) , y (cid:48) )
=
z (cid:48) .
By Deﬁnition 2, c ( d ∗ ( z (cid:48) ))
=
z (cid:48) , hence c ( x ∗ , y ∗ ) =
z (cid:48) .
However, d (cid:48) ( c ( x ∗ , y ∗ ))
(cid:54) =
( x ∗ , y ∗ ) and expectation in equation 10 over X or Y would be positive.
Consequently, the objective would be positive, violating assumption of optimum of 0.
Hence, inverse of c is the only function which achieves optimum 0 in equation 10.
I MPLEMENTATION D ETAILS 7. A RCHITECTURE FOR MNIST / F ASHION -MNIST
We use U-Net (Ronneberger et al., 2015) architecture for MNIST-BB for decomposition and composition networks.
The input into U-Net is of size 28 x 28 ( 28 x 28 x2) the outputs are of size 28 x 28 x ( 28 x 28 ) for decomposition (composition).
In these networks ﬁlters are of size 5x5 in the deconvolution and convolution layers.
The convolution layers are of size 32 , 64 , 128 , 256 and deconvolution layers are of size 256 , 128 , 64 , 32 .
We use leaky rectiﬁer linear units with alpha of 0 .
We use sigmoidal units in the ﬁnal output layer.
For MNIST-MB and Fashion-MNIST composition networks, we used 2 layer convolutional neural net with 3 x 3 ﬁlter.
For decomposition network on these datasets, we used fully-convolutional network (Long et al., 2015).
In this network ﬁlters are of size 5 x 5 in the deconvolution and convolution layers.
The convolution layers are of size 32 , 64 , 128 and deconvolution layers are 128 , 64 , 32 .
We use leaky rectiﬁer linear units with alpha of 0 .
We use sigmoidal units in the output layer.
The standard generator and discriminator architecture of DCGAN framework was used for images of 28 x 28 on MNIST-MB and Fashion-MNIST, and 64 x 64 on MNIST-MB dataset.
7. A RCHITECTURE FOR Y ELP -R EVIEWS
We ﬁrst tokenize the text using the nltk Python package.
We keep the 30,000 most frequently occuring tokens and represent the remainder as “unknown”.
We encode each token into adimensional word vector using the standard GloVe (Pennington et al., 2014) embedding model.
We use a standard sequence-to-sequence model for composition.
The composition network takes as input a pair of concatenated sentences and outputs a modiﬁed pair of sentences.
We used a encoderdecoder network where the encoder/decoder is a 1-layer gated recurrent unit (GRU) network with a hidden state of size 512 .
In addition, we implemented an attention mechanism as proposed in Luong et al.
(2015) in the decoder network.
We adopt the discriminator structure as described in SeqGAN (Yu et al., 2017).
We brieﬂy describe the structure at a high level here, please refer to the SeqGAN paper for additional details.
SeqGAN takes as input the pre-processed sequence of word embeddings.
The discriminator takes the embedded sequence and feeds it through a set of convolution layers of size (200, 400, 400, 400, 400, 200, 200, 200, 200, 200, 320, 320) and of ﬁlter size (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20).
These ﬁlters further go through a max pooling layer with an additional “highway network structure” on top of the feature maps to improve performance.
Finally the features are fed into a fully-connected layer and produce a real value.
7. T RAINING
We kept the training procedure consistent across all experiments.
During training, we initialized weights as described in He et al.
(2015), weights were updated using ADAM (Kingma & Ba, 2014) (with beta1=0.5, and beta2=0.9) with a ﬁxed learning rate of 1e-4 and a mini-batch size of 100.
We applied different learning rate for generators/discriminators according to TTUR (Heusel et al., 2017).
The learning rate for discriminators is 3 ∗ 10 − 4 while for generator is 10 − 4 .
We performdiscriminator update per generator update.
Results are reported after training for 100000 iterations.
A DDITIONAL E XAMPLES ON F ASHION -MNIST
In this section, we show some examples of learning task 3 (learning 1 component given the other component and composition) as well as an example of cross-domain chain learning (learning the background on MNIST-MB and using that to learn a foreground model for T-shirts from FashionMNIST).
As before, given 1 component and the composition operation, we can learn the other component.
[Figure]
As an example of reusing components, we show that a background generator learned from MNISTMB can be used to learn a foreground model for T-shirts on a similar dataset of Fashion-MNIST examples overlaid on uniform backgrounds.
[Figure]