Title: TRAINING GENERATIVE ADVERSARIAL NETWORKS FROM INCOMPLETE OBSERVATIONS USING FACTORISED DISCRIMINATORS

Abstract: Generative adversarial networks (GANs) have shown great success in applications such as image generation and inpainting. However, they typically require large datasets, which are often not available, especially in the context of prediction tasks such as image segmentation that require labels. Therefore, methods such as the CycleGAN use more easily available unlabelled data, but do not offer a way to leverage additional labelled data for improved performance. To address this shortcoming, we show how to factorise the joint data distribution into a set of lower-dimensional distributions along with their dependencies. This allows splitting the discriminator in a GAN into multiple "sub-discriminators" that can be independently trained from incomplete observations. Their outputs can be combined to estimate the density ratio between the joint real and the generator distribution, which enables training generators as in the original GAN framework. We apply our method to image generation, image segmentation and audio source separation, and obtain improved performance over a standard GAN when additional incomplete training examples are available. For the Cityscapes segmentation task in particular, our method also improves accuracy by an absolute 14.9% over CycleGAN while using only 25 additional paired examples.

1. INTRODUCTION:

In generative adversarial networks (GANs) (Goodfellow et al., 2014) a generator network is trained to produce samples from a given target distribution. To achieve this, a discriminator network is employed to distinguish between "real" samples from the dataset and "fake" samples from the generator network. The discriminator's feedback is used by the generator to improve its output. While GANs have become highly effective at synthesising realistic examples even for complex data such as natural images (Radford et al., 2015; Karras et al., 2018) , they typically rely on large training datasets. These are not available in many cases, especially for prediction tasks such as audio source separation (Stoller et al., 2018) or image-to-image translation (Zhu et al., 2017) . Instead, one often encounters many incomplete observations, such as unpaired images in image-to-image translation, or isolated source recordings in source separation. However, standard GANs cannot be trained with these observations. Recent approaches that work with unpaired data can not make use of additional paired data (Zhu et al., 2017) or lead to computational overhead due to additional generators and discriminators that model the inverse of the mapping of interest (Almahairi et al., 2018; Gan et al., 2017) . For training the generator, multiple losses are combined whose interactions are not clear and that do not guarantee that the generator converges to the desired distribution.

In this paper, we adapt the standard GAN framework to enable training predictive models with both paired and unpaired data as well as generative models with incomplete observations. To achieve this, we split the discriminator into multiple "marginal" discriminators, each modelling a separate set of dimensions of the input. As this modification on its own would ignore any dependencies between these parts, we incorporate two additional "dependency discriminators", each focusing only on inter-part relationships. We show how the outputs from these marginal and dependency discriminators can be recombined and used to estimate the same density ratios as in the original GAN framework -which enables training any generator network in an unmodified form. In contrast to previous GANs, our approach only requires full observations to train the smaller dependency discriminator and can leverage much bigger, simpler datasets to train the marginal discriminators, which enables the generator to model the marginal distributions more accurately. Additionally, prior knowledge about the marginals and dependencies can be incorporated into the architecture of each discriminator. Deriving from first principles, we obtain a consistent adversarial learning framework without the need for extra losses that rely on more assumptions or conflict with the GAN objective.

In our experiments, we apply our approach ("FactorGAN")1 to two image generation tasks (Sections 4.1 and 4.2), image segmentation (Section 4.3) and audio source separation (Section 4.4), and observe improved performance in missing data scenarios compared to a GAN. For image segmentation, we also compare to the CycleGAN (Zhu et al., 2017) , which does not require images to be paired with their segmentation maps. By leveraging both paired and unpaired examples with a unified adversarial objective, we achieve a substantially higher segmentation accuracy even with only 25 paired samples than GAN and CycleGAN models.

2. METHOD:

After a brief summary of GANs in Section 2.1, we introduce our method from a missing data perspective in Section 2.2, before extending it to conditional generation (Section 2.3) and the case of independent outputs (Section 2.4).

2.1. GENERATIVE ADVERSARIAL NETWORKS:

To model a probability distribution p x over x ∈ R d , we follow the standard GAN framework and introduce a generator model G φ : R n → R d that maps an n-dimensional input z ∼ p z to a d-dimensional sample G φ (z), resulting in the generator distribution q x . To train G φ such that q x approximates the real data density p x , a discriminator D θ : R d → (0, 1) is trained to estimate whether a given sample is real or generated:

arg max θ E x∼px log D θ (x) + E x∼qx log(1 -D θ (x)).

(1)

In the non-parametric limit (Goodfellow et al., 2014) , D θ (x) approaches D(x) := px(x) px(x)+qx(x) at every point x. The generator is updated based on the discriminator's estimate of D(x). In this paper, we use the alternative loss function for G φ as proposed by Goodfellow et al. (2014) :

arg max θ E z∼pz log D θ (G φ (z)).

(2)

2.2. ADAPTATION TO MISSING DATA:

In the following we consider the case that incomplete observations are available in addition to our regular dataset (i.e. simpler yet larger datasets). In particular, we partition the set of

d input dimensions of x into K (2 ≤ K ≤ d) non-overlapping subsets D 1 , . . . , D K .

For each i ∈ {1, . . . , K}, an incomplete ("marginal") observation x i can be drawn from p i x , which is obtained from p x after marginalising out all dimensions not in D i . Analogously, q i

x denotes the i-th marginal distribution of the generator G φ . Next, we extend the existing GAN framework such we can employ the additional incomplete observations. In this context, a main hurdle is that a standard GAN discriminator is trained with samples from the full joint p x . To eliminate this restriction, we note that D(x) can be mapped to a "joint density ratio" px(x) qx(x) by applying the bijective function h : [0, 1) → R + , h(a) = -a a-1 . For our approach, we exploit that this joint density ratio can be factorised into a product of density ratios:

EQUATION

Each "marginal density ratio"

p i x (x i ) q i

x (x i ) captures the generator's output quality for one marginal variable x i , while the c P and c Q terms describe the dependency structure between marginal variables in the real and generated distribution, respectively. Note that our theoretical considerations assume that the densities p x and q x are non-zero everywhere. While this might not be fulfilled in practice, our implementation does not directly compute density ratios and instead relies on the same assumptions as Goodfellow et al. (2014) . We can estimate each density ratio independently by training a "sub-discriminator" network, and combine their outputs to estimate D(x), as shown below.

Estimating the marginal density ratios: To estimate

p i x (x i ) q i

x (x i ) for each i ∈ {1, . . . , K}, we train a "marginal discriminator network" D θi : R |Di| → (0, 1) with parameters θ i to determine whether a marginal sample x i is real or generated following the GAN discriminator loss in Equation ( 1)2 . This allows making use of the additional incomplete observations. In the non-parametric limit, D θi (x i ) will approach Di (x i ) :=

p i x (x i ) p i x (x i )+q i x (x i )

, so that we can use h(D θi (x i )) as an estimate of

p i x (x i ) q i x (x i ) .

Estimation of c P (x) and c Q (x): Note that c P and c Q are also density ratios, this time containing a distribution over x in both the numerator and denominator -the main difference being that in the latter the individual parts x i are independent from each other. To approximate the ratio c P , we can apply the same principles as above and train a "p-dependency discriminator" D P θ P : R d → (0, 1) to distinguish samples from the two distributions, i.e. to discriminate real joint samples from samples where the individual parts are real but were drawn independently of each other (i.e. the individual parts might not originate from the same real joint sample). Again, in the non-parametric limit, its response approaches DP (x) := px(x) px(x)+ K i=1 p i

x (x i ) and thus c P can be approximated via h • D P θ P . Analogously, the c Q term is estimated with a "q-dependency discriminator" D Q θ Q -here, we compare joint generator samples with samples where the individual parts were shuffled across several generated samples (to implement the independence assumption).

Joint discriminator sample complexity: In contrast to c Q , where the generator provides an infinite number of samples, estimating c P without overfitting to the limited number of joint training samples can be challenging. While standard GANs suffer from the same difficulty, our factorisation into specialised sub-units allows for additional opportunities to improve the sample complexity. In particular, we can design the architecture of the p-dependency discriminator to incorporate prior knowledge about the dependency structure3 .

Combining the discriminators: As the marginal and the p-and q-dependency sub-discriminators provide estimates of their respective density ratios, we can multiply them and apply h -1 to obtain the desired ratio D(x), following Equation (3). This can be implemented in a simple and stable fashion using a linear combination of pre-activation sub-discriminator outputs followed by a sigmoid (see Section A.4 for details and proof). The time for a generator update step grows linearly with the number of marginals K, assuming the time to update each of the K marginal discriminators remains constant.

2.3. ADAPTATION TO CONDITIONAL GENERATION:

Conditional generation, such as image segmentation or inpainting, can be performed with GANs by using a generator G φ that maps a conditional input x 1 and noise to an output x 2 , resulting in an output probability q φ (x 2 |x 1 ).

When viewing x 1 and x 2 as parts of a joint variable x := (x 1 , x 2 ) with distribution p x , we can also frame the above task as matching p x to the joint generator distribution q x (x) := p 1

x (x 1 )q φ (x 2 |x 1 ). In a standard conditional GAN, the discriminator is asked to distinguish between joint samples from p x and q x , which requires paired samples from p x and is inefficient as the inputs x 1 are the same in both p x and q x . In contrast, applying our factorisation principle from Equation (3) to x 1 and x 2 (for the special case K = 2) yields

EQUATION

suggesting the use of a p-and a q-dependency discriminator to model the input-output relationship, and a marginal discriminator over x 2 that matches aggregate generator predictions from q 2 x to real output examples from p 2

x . Note that we do not need a marginal discriminator for x 1 , which increases computational efficiency. This adaptation can also involve additionally partitioning x 2 into multiple partial observations as shown in Equation 3.

2.4. ADAPTION TO INDEPENDENT MARGINALS:

In case the marginals can be assumed to be completely independent, one can remove the p-dependency discriminator from our framework, since c P (x) = 1 for all inputs x. This approach can be useful in the conditional setting, when each output is related to the input but their marginals are independent from each other. In this setting, our method is related to adversarial ICA (Brakel & Bengio, 2017) . Note that the q-dependency discriminator still needs to be trained on the full generator outputs if the generator should not introduce unwanted dependencies between the marginals.

2.5. FURTHER EXTENSIONS:

There are many more ways of partitioning the joint distribution into marginals. We discuss two additional variants (Hierarchical and auto-regressive FactorGANs) of our approach in Section A.3.

3. RELATED WORK:

For conditional generation, "CycleGAN" (Zhu et al., 2017) exploits unpaired samples by assuming a one-to-one mapping between the domains and using bidirectional generators (along with Gan et al. (2017) ), while FactorGAN makes no such assumptions and instead uses paired examples to learn the dependency structure. Almahairi et al. (2018) and Tripathy et al. (2018) learn from paired examples with an additional reconstruction-based loss, but use a sum of many different loss terms which have to be balanced by additional hyper-parameters. Additionally, it can not be applied to generation tasks with missing data or prediction tasks with multiple outputs. Brakel & Bengio (2017) perform independent component analysis in an adversarial fashion using a discriminator to identify correlations. Similarly to our q-dependency discriminator, the separator outputs are enforced to be independent, but our method is fully adversarial and can model arbitrary dependencies with the p-dependency discriminator. GANs were also used for source separation, but dependencies were either ignored (Zhang et al., 2017) or modelled with an additional L2 loss (Stoller et al., 2018) that supports only deterministic separators. Pu et al. (2018) use GANs for joint distribution modelling by training a generator for each possible factorisation of the joint distribution, but this requires K! generators for K marginals, whereas we assume either all parts or exactly one part of the variable of interest is observed to avoid functional redundancies between the different networks. Karaletsos (2016) propose adversarial inference on local factors of a high-dimensional joint distribution and factorise both generator and discriminator based on independence assumptions given by a Bayesian network, whereas we keep a joint sample generator and model all dependencies. Finally, Yoon et al. (2018) randomly mask the inputs to a GAN generator so it learns to impute missing values, whereas our generator aims to learn a transformation where inputs are fully observed.

4. EXPERIMENTS:

To validate our method, we compare our FactorGAN with the regular GAN approach, both for unsupervised generation as well as supervised prediction tasks. For the latter, we also compare to the CycleGAN (Zhu et al., 2017) as an unsupervised baseline. To investigate whether FactorGAN makes efficient use of all observations, we vary the proportion of the training samples available for joint sampling (paired), while using the rest to sample from the marginals (unpaired). We train all models using a single NVIDIA GTX 1080 GPU.

Training procedure For stable training, we employ spectral normalisation (Miyato et al., 2018) on each discriminator network to ensure they satisfy a Lipschitz condition. Since the overall output used for training the generator is simply a linear combination of the individual discriminators (see Section A.4), the generator gradients are also constrained in magnitude accordingly. Unless otherwise noted, we use an Adam optimiser with learning rate 10 -4 and a batch size of 25 for training all models. We perform two discriminator updates after each generator update.

4.1. PAIRED MNIST:

Our first experiment will involve "Paired MNIST", a synthetic dataset of low complexity whose dependencies between marginals can be easily controlled. More precisely, we generate a paired version of the original MNIST dataset 4 by creating samples that contain a pair of vertically stacked digit images. With a probability of λ, the lower digit chosen during random generation is the same as the upper one, and different otherwise. For FactorGAN, we model the distributions of upper and lower digits as individual marginal distributions (K = 2).

Experimental setup We compare the normal GAN with our FactorGAN, also including a variant without p-dependency discriminator that assumes marginals to be independent ("FactorGAN-no-cp"). We conduct the experiment with λ = 0.1 and λ = 0.9 and also vary the amount of training samples available in paired form, while keeping the others as marginal samples only usable by FactorGAN. For both generators and discriminators, we used simple multi-layer perceptrons (Tables 1 and 2 ).

To evaluate the quality of generated digits, we adopt the "Frecht Inception Distance" (FID) as metric (Heusel et al., 2017) . It is based on estimating the distance between the distributions of hidden layer activations of a pre-trained Imagenet object detection model for real and fake examples. To adapt the metric to MNIST data, we pre-train a classifier to predict MNIST digits (see Table 3 ) on the training set for 20 epochs, obtaining a test accuracy of 98%. We input the top and bottom digits in each sample separately to the classifier and collect the activations from the last hidden layer (FC1) to compute FIDs for the top and bottom digits, respectively. We use the average of both FIDs to measure the overall output quality of the marginals (lower value is better).

Since the only dependencies in the data are digit correlations controlled by λ, we can evaluate how well FactorGAN models these dependencies. We compute p D (D t , D b ) as the probability for a real sample to have digit D t ∈ {0, . . . , 9} at the top and digit D b ∈ {0, . . . , 9} at the bottom, along with marginal probabilities p t D (D t ) and p b D (D b ) (and analogously q D (D t , D b ) for generated data). Since we do not have ground truth digit labels for the generated samples, we instead use the class predicted by the pre-trained classifier. We encode the dependency as a ratio between a joint and the product of its marginals, where the ratios for real and generated data are ideally the same. Therefore, we take their absolute difference for all digit combinations as evaluation metric (lower is better):

d dep = 1 100 9 Dt=0 9 D b =0 p D (D t , D b ) p t D (D t )p b D (D b ) - q D (D t , D b ) q t D (D t )q b D (D b )

.

(5)

Note that the metric computes how well dependencies in the real data are modelled by a generator, but not whether it introduces any additional unwanted dependencies such as top and bottom digits sharing stroke thickness, and thus presents only a necessary condition for a good generator.

Results:

The results of our experiment are shown in Figure 1 . Since FactorGAN-no-cp trains on all samples independently of the number of paired observations, both FID and d dep are constant. As expected, FactorGAN-no-cp delivers good digit quality, and performs well for λ = 0.1 (as it assumes independence) and badly for λ = 0.9 with regards to dependency modelling.

FactorGAN outperforms GAN with small numbers of paired samples in terms of FID by exploiting the additional unpaired samples, although this gap closes as both models eventually have access to the same amount of data. FactorGAN also consistently improves in modelling the digit dependencies with an increasing number of paired observations. For λ = 0.1, this also applies to the normal GAN, although its performance is much worse for small sample sizes as it introduces unwanted digit dependencies. Additionally, its performance appears unstable for λ = 0.9, where it achieves the best results for a small number of paired examples. Further improvements in this setting could be gained by incorporating prior knowledge about the nature of these dependencies into the p-dependency discriminator to increase its sample efficiency, but this is left for future work.

4.2. IMAGE PAIR GENERATION:

In this section, we use GAN and FactorGAN for generating pairs of images in an unsupervised way to evaluate how well FactorGAN models more complex data distributions.

Datasets We use the "Cityscapes" dataset (Cordts et al., 2016) and the "Edges2Shoes" dataset (Isola et al., 2016) . To keep the outputs in a continuous domain, we treat the segmentation maps in the Cityscapes dataset as RGB images, instead of a set of discrete categorical labels. Each input and output image is downsampled to 64 × 64 pixels as a preprocessing step to reduce computational complexity and to ensure stable GAN training.

Experimental setup We define the distributions of input as well as output images as marginal distributions. Therefore, FactorGAN uses two marginal discriminators and a p-and q-dependency discriminator. All discriminators employ a convolutional architecture shown in Table 5 with W = 6 and H = 6. To control for the impact of discriminator size, we also train a GAN with twice the number of filters in each discriminator layer to match its size with the combined size of the FactorGAN discriminators. The same convolutional generator shown in Table 4 is used for GAN and FactorGAN. Each image pair is concatenated along the channel dimension to form one sample, so that C = 6 for the Cityscapes and C = 4 for the Edges2Shoes dataset (since edge maps are greyscale). We make either 100, 1000, or all training samples available in paired form, to investigate whether FactorGAN can improve upon GAN by exploiting the remaining unpaired samples or match its quality if there are none.

For evaluation, we randomly assign 80% of validation data to a "test-train" and the rest to a "test-test" partition. We train an LSGAN discriminator (Mao et al., 2017) with the architecture shown in Table 5 (but half the filters in each layer) on the test-train partition for 40 epochs to distinguish real from generated samples, before measuring its loss on the test set. We continuously sample from the generator during training and testing instead of using a fixed set of samples to better approximate the true generator distribution. Results Our FactorGAN achieves better or similar output quality compared to the GAN baseline in all cases, as seen in Figure 2 . For the Edges2Shoes dataset, the performance gains are most pronounced for small numbers of paired samples. On the more complex Cityscapes dataset, FactorGAN outperforms GAN by a large margin independent of training set size, even when the discriminators are closely matched in size. This suggests that FactorGAN converges with fewer training iterations for G φ , although the exact cause is unclear and should be investigated in future work.

We show some generated examples in Figure 3 . Due to the small number of available paired samples, we observe a strong mode collapse of the GAN in Figure 3a , while FactorGAN provides high-fidelity, diverse outputs, as shown in Figure 3b . Similar observations can be made for the Cityscapes dataset when using 100 paired samples (see Section A.5.2).

4.3. IMAGE SEGMENTATION:

Our approach extends to the case of conditional generation (see Section 2.3), so we tackle a complex and important image segmentation task on the Cityscapes dataset, where we ask the generator to predict a segmentation map for a city scene (instead of generating both from scratch as in Section 4.2).

Experimental setup We downsample the scenes and segmentation maps to 128 × 128 pixels and use a U-Net architecture (Ronneberger et al., 2015) (shown in Table 6 with W = 7 and C = 3) as segmentation model. For FactorGAN, we use one marginal discriminator to match the distribution of real and fake segmentation maps to ensure realistic predictions, which enables training with isolated city scenes and segmentation maps. To ensure the correct predictions for each city scene, a p-and a q-dependency discriminator learns the input-output relationship using joint samples, both employing a convolutional architecture shown in Table 5 . Note that as in Section 4.2, we output segmentation maps in the RGB space instead of performing classification. In addition to the MSE in the RGB space, we compute the widely used pixel-wise classification accuracy (Cordts et al., 2016) by assigning each output pixel to the class whose colour has the lowest Euclidean distance in RGB space.

Using the same experimental setup (including network architectures), we also implement the Cycle-GAN (Zhu et al., 2017) as an unsupervised baseline. For the CycleGAN objective, the same GAN losses as shown in ( 1) and ( 2) are used5 .

The results in Figure 4 demonstrate that our approach can exploit additional unpaired samples to deliver better MSE and accuracy than a GAN and less noisy outputs as seen in Figure 5 .

Published as a conference paper at ICLR 2020 When using only 25 paired samples, FactorGAN reaches 71.6% accuracy, outperforming both GAN and CycleGAN by an absolute 17.7% and 14.9%, respectively. CycleGAN performs better than GAN only in this setting, and increasingly falls behind both GAN and FactorGAN with a growing number of paired samples, likely since GAN and FactorGAN are able to improve their input-output mapping gradually while CycleGAN remains reliant on its cycle consistency assumption. These findings suggest that FactorGAN can efficiently learn the dependency structure from few paired samples with more accuracy than a CycleGAN that is limited by its simplistic cycle consistency assumption.

4.4. AUDIO SOURCE SEPARATION:

We apply our method to audio source separation as another conditional generation task to investigate whether it transfers across domains. Specifically, we separate music signals into singing voice and accompaniment, as detailed in Section A.2. As in Section 4.3, we find that FactorGAN provides better separtion than GAN, suggesting that our factorisation is useful across problem domains.

5. DISCUSSION:

We find that FactorGAN outperforms GAN across all experiments when additional incomplete samples are available, especially when they are abundant in comparison to the number of joint samples. When using only joint observations, FactorGAN should be expected to match the GAN in quality, and it does so quite closely in most of our experiments. Surprisingly, it outperforms GAN in some scenarios such as image segmentation even with matched discriminator sizes -a phenomenon we do not fully understand yet and should be investigated in the future. For image segmentation, FactorGAN substantially improves segmentation accuracy compared to the fully unsupervised CycleGAN model even when only using 25 paired examples, indicating that it can efficiently exploit the pairing information.

Since the p-dependency discriminator does not rely on generator samples that change during training, it could be pre-trained to reduce computation time, but this led to sudden training instabilities in our experiments. We suspect that this is due to a mismatch between training and testing conditions for the p-dependency discriminator since it is trained on real but evaluated on fake data, and neural networks can yield overly confident predictions outside the support of the training set (Gal & Ghahramani, 2016) . Therefore, we expect classifiers with better uncertainty calibration to alleviate this issue.

6. CONCLUSION:

In this paper, we demonstrated how a joint distribution can be factorised into a set of marginals and dependencies, giving rise to the FactorGAN -a GAN in which the discriminator is split into parts that can be independently trained with incomplete observations. For both generation and conditional prediction tasks in multiple domains, we find that FactorGAN outperforms the standard GAN when additional incomplete observations are available. For Cityscapes scene segmentation in particular, FactorGAN achieves a much higher accuracy than the supervised GAN as well as the unsupervised CycleGAN, while requiring only 25 of all examples to be annotated.

Factorising discriminators enables incorporating more prior knowledge into the design of neural architectures in GANs, which could improve empirical results in applied domains. The presented factorisation is generally applicable independent of model choice, so it can be readily integrated into many existing GAN-based approaches. Since the joint density can be factorised in different ways, multiple extensions are conceivable depending on the particular application (as shown in Section A.3). This paper derives FactorGAN from the original GAN proposed by Goodfellow et al. (2014) by exploiting the probabilistic view of the optimal discriminator. Adapting the FactorGAN to alternative GAN objectives (such as the Wasserstein GAN (Arjovsky et al., 2017) ) might be possible as well.

Instead of relying on additional techniques such as spectral normalisation to ensure training stability, which our theory does not explicitly incorporate, this would enable the use of an inherently more stable GAN variant with the same theoretical guarantees. For our audio source separation experiment, our generator G φ takes a music spectrogram m along with noise z and maps it to an estimate of the accompaniment and vocal spectra a and v, implicitly defining an output probability q φ (a, v|m). We define the joint real and generated distributions that should be matched as p(m, a, v) and q(m, a, v) = q φ (a, v|m)p(m). Since the source signals in our dataset are simply added in the time-domain to produce the mixture, this approximately applies to the spectrogram as well, so we assume that p(m|a, v) = δ(m -av). We can constrain our generator G φ to make predictions that always satisfy this condition, thereby taking care of the input-output relationship manually, similarly to Sønderby et al. (2017) . Instead of predicting the sources directly, a mask b with values in the range [0, 1] is computed, and the accompaniment and vocals are estimated as b m and (b -1) m, respectively. As a result, q(m|a, v) = p(m|a, v), so we can simplify the joint density ratio to

EQUATION

meaning that the discriminator(s) in the GAN and the FactorGAN only require (a, v) pairs, but not the mixture m as additional input, as the correct input-output relationship is already incorporated into the generator. Furthermore, the last equality suggests a FactorGAN application with one marginal discriminator for each source along with dependency discriminators to model source dependencies.

Dataset We use MUSDB (Rafii et al., 2017) as multi-track dataset for our experiment, featuring 100 songs for training and 50 songs for testing. Each song is downsampled to 22.05 KHz before spectrogram magnitudes are computed, using an STFT with a 512-sample window and a 256-sample hop6 . Snippets with 128 timeframes each are created by cropping each song's full spectrogram at regular intervals of 64 timeframes. Thus, the generator only separates snippets m ∈ R 256×128 ≥0 and outputs predictions of the same shape, however this does not change the derivation presented in Equation ( 6), and longer inputs at test time can be processed by partitioning them into snippets and concatenating the model predictions.

Experimental setup For our generator, we use the U-Net architecture detailed in Table 6 with W = 8 and C = 1. We use the convolutional discriminator described in Table 5 with W = 8, H = 7 and C = 1. The source dependency discriminators take two sources as input via concatenation along the channel dimension, so they use C = 2.

In each experiment, we vary the number of training songs whose snippets are available for paired training between 10, 20 and 50 and compare between GAN and FactorGAN. The spectrograms predicted on the test set are converted to audio with the inverse STFT by reusing the phase from the mixture, and then evaluated using the signal-to-distortion ratio (SDR), a well-established evaluation metric for source separation (Vincent et al., 2006) .

Results Figure 6 shows our separation results. Compared to a GAN, the separation performance is significantly higher using FactorGAN. As expected, FactorGAN improves slightly with more paired examples, which is not the case for the GAN -here we find that the vocal output becomes too quiet when increasing the number of songs for training, possibly a sign of mode collapse. Similarly to the results seen in the image pair generation experiments, we suspect that the FactorGAN discriminator might approximate the joint density D(x) more closely than the GAN discriminator due to its use of multiple discriminators, although the reasons for this are not yet understood.

A.3 POSSIBLE EXTENSIONS:

We can decompose the joint density ratio px(x) qx(x) in other ways than shown in Equation 3 in the paper. In the following, we discuss two additional possibilities.

A.3.1 HIERARCHICAL FACTORGAN:

The decomposition of the joint density ratio could be applied recursively, splitting the obtained marginals further into "sub-marginals" and their dependencies, which could be repeated multiple times. In addition to training with incomplete observations where only a single part is given, this also allows making use of samples where only sub-parts of these parts are given and is thus more flexible than a single factorisation as used in the standard FactorGAN.

As a demonstration, we split each marginal x i further into a group of J i marginals, J i ≤ |D i |, and their dependencies, without further recursion for simplicity:

p x (x) q x (x) = c P (x) c Q (x) K i=1 p i x (x i ) q i x (x i ) = c P (x) c Q (x) K i=1 c i P (x i ) c i Q (x i ) J j=1 p i,j

x (x i,j ) q i,j x (x i,j ) .

c i P and c i Q are dependency terms analogously to c P and c Q , but only defined on marginal variable x i , whose J "sub-marginals" are denoted by x i,1 , . . . , x i,J . Such a hierarchical decomposition might also be beneficial if the data is known to be generated from a hierarchical process. We leave the empirical exploration of this concept to future work.

A.3.2 AUTOREGRESSIVE FACTORGAN:

For a multi-dimensional variable x = [x 1 , x 2 , . . . , x T ] composed of T elements arranged in a sequence, such as time series data, the joint density ratio can also be decomposed in a causal, auto-regressive fashion:

EQUATION

Note that c P is defined here as p(x) p(x 1 ,...,x i-1 )p(x i ) (c Q analogously using q x ). Equation ( 8) suggests an auto-regressive version of FactorGAN in which the generator output quality at each time-step i is evaluated using a marginal discriminator that estimates px(x i ) qx(x i ) combined with dependency discriminators that model the dependency between the current and all past time-steps.

The final product formulation in Equation ( 9) reveals a close similarity to auto-regressive models and suggests a modification of the normal GAN with an auto-regressive discriminator that rates an input at each time-step given the previous ones. Using a derivation analogous to the one shown in Section A.4, this implies taking the unnormalised discriminator outputs at each time-step, summing them, and applying a sigmoid non-linearity to obtain the overall estimate of the probability D(x). A similar implementation was used before in Mogren (2016), attempting to stabilise GAN training with recurrent neural networks as discriminators, but for the first time, we provide a rigorous theoretical justification for this practice here. Proof. Proof of Theorem 1 using Definitions A.1 and A.2:

D C (x) = σ d P θ P (x) -d Q θ Q (x) + K i=1 d θi (x i ) = 1 + e -d P θ P (x) e d Q θ Q (x) K i=1

e -d θ i (x i )

-1

= 1 + 1 -D P θ P (x) D P θ P (x)

D Q θ Q (x) 1 -D Q θ Q (x) K i=1 1 -D θi (x i ) D θi (x i ) -1 = 1 + K i=1 p x (x i ) p x (x) q x (x) K i=1 q i x (x i ) K i=1 q i x (x i ) p x (x i ) -1 = 1 + q x (x) p x (x)

-1 = p x (x) p x (x) + q x (x) .

(10) 

:

Code available at https://github.com/f90/FactorGAN

Samples are drawn from p i x and q i x instead of px and qx, respectively.

If only certain features of a marginal variable influence the dependencies, we can limit the input to the p-dependency discriminator to these features instead of the full marginal sample to prevent overfitting.

http://yann.lecun.com/exdb/mnist/

Code to perform one training iteration and default loss weights taken from the official codebase at https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix

This results in 257 frequency bins but we discard the bin with the highest frequency to obtain a power of 2 and thus avoid padding issues in our network architectures.

Figures and Tables:

Figure 1: Performance with different numbers of paired training samples and settings for λ compared between GAN and FactorGAN with and without dependency modelling.

Figure 2: GAN and FactorGAN output quality estimated by the LS metric for different datasets and numbers of paired samples. Error bars show 95% confidence intervals.

Figure 3: Examples generated for the Edges2Shoes dataset using 100 paired samples

Figure 4: MSE (left) and accuracy (right) obtained on the Cityscapes dataset with different numbers of paired training samples for the GAN and FactorGAN

Figure 6: GAN and FactorGAN separation performance for different numbers of paired samples

A.4 DISCRIMINATOR COMBINATIONDefinition A.1. Sigmoid discriminator output. Let D θi (x i ) := σ(d θi (x i )), d θi : R |Di| → R for all i ∈ {1, . . . , K}, analogously define D P θ P (x) andD Q θ Q (x). Definition A.2. Combined discriminator. Let D C (x) := σ(d P θ P (x) -d Q θ Q (x) + K i=1 d θi (x i)) be the output of the combined discriminator that is used for training G φ using Equation2.Theorem 1. Combined discriminator approximates D(x). Under definitions A.1 and A.2 and assuming optimally trained sub-discriminators, D C (x) = D(x) = px(x) px(x)+qx(x) .

Figure 10: FactorGAN generating image pairs for the Cityscapes dataset using 100 paired samples.

Figure 11: GAN generating image pairs for the Cityscapes dataset using 1000 paired samples.

Figure 12: GAN (big) generating image pairs for the Cityscapes dataset using 1000 paired samples.

Figure 13: FactorGAN generating image pairs for the Cityscapes dataset using 1000 paired samples.

Figure 14: GAN generating image pairs using the full Cityscapes dataset.

Figure 15: GAN (big) generating image pairs using the full Cityscapes dataset.

Figure 16: FactorGAN generating image pairs using the full Cityscapes dataset.

Figure 17: Image pairs generated for the Edges2Shoes dataset using 100 paired samples.

Figure 18: Image pairs generated for the Edges2Shoes dataset using 1000 paired samples.

Figure 19: Image pairs generated for the Edges2Shoes dataset using all samples as paired.

Figure 20: Segmentation predictions made on the Cityscapes dataset for the same set of test inputs, compared between models, using 100 paired samples for training

Peer review (iclr2020):
The paper is tackling the problem of training generative adversarial networks with incomplete data points. The problem appears to be important for semi-supervised training of image to image translation models, where we may have a lot of observations in both domains, but a little annotated correspondences between the domains. The solution proposed by the authors involves an observation that discriminator in GANs is estimating the density ratio between real and fake distributions. This ratio can then be decomposed into a product of marginal density ratios, with two additional multipliers, corresponding to density ratios between a joint real/fake distribution and a product of its marginals. The authors then use discriminators to approximate all the ratios, which allows them to facilitate semi-supervised training. My decision is *weak accept*. It is not clear to me to what extent does the proposed model outperform the regular CycleGAN on a large amount of paired training samples due to architectural changes (including spectral normalization). Also, it would be nice if the comparison was carried out with a newer, possibly SotA models for unpaired image-to-image translation (MUNIT, FUNIT, BicycleGAN). Moreover, there are some simple modifications that can be made to a standard CycleGAN/Pix2pix training pipeline that would facilitate the small number of annotations (for example, see *Learning image-to-image translation using paired and unpaired training samples*). It is hard to evaluate the comparative performance of the method without the comparisons mentioned above.