# stat946w18/AmbientGAN: Generative Models from Lossy Measurements

## Contents

# Introduction

Generative Adversarial Networks operate by simulating complex distributions but training them requires access to large amounts of high quality data. Often times we only have access to noisy or partial observations, from here on referred to as measurements of the true data. If know the measurement function and we would like to train a generative model for the true data there are several ways to continue with varying degrees of success. We will use noisy MNIST data as an illustrative example. Suppose we only see MNIST data that have been run through a Gaussian kernel (blurred) with some noise from a [math]N(0, 0.5^2)[/math] distribution added to each pixel:

### Ignore the problem

Train a generative model directly on the measured data. This will obviously be unable to generate the true distribution before measurement has occurred.

### Try to recover the information lost

Works better than ignoring the problem but depends on how easily the measurement function can be inversed.

### AmbientGAN

Ashish Bora, Eric Price and Alexandros G. Dimakis propose AmbientGAN as a way to recover the true underlying distribution from measurements of the true data.

AmbientGAN works by training a generator which attempts to have the measruements of the output it generates fool the discriminator. The discriminator must distinguish between real and generated measurements.

# Model

For the following variables superscript [math]r[/math] represents the true distributions while superscript [math]g[/math] represents the generated distributions. Let [math]x[/math], represent the underlying space and [math]y[/math] for the measurement.

Thus [math]p_x^r[/math] is the real underlying distribution over [math]\mathbb{R}^n[/math] that we are interested in. However if we assume our (known) measurement functions, [math]f_\theta: \mathbb{R}^n \to \mathbb{R}^m[/math] are parameterized by [math]\theta \sim p_\theta[/math], we can only observe [math]y = f_\theta(x)[/math].

Mirroring the standard GAN setup we let [math]Z \in \mathbb{R}^k, Z \sim p_z[/math] and [math]\Theta \sim p_\theta[/math] be random variables coming from a distribution that is easy to sample.

If we have a generator [math]G: \mathbb{R}^k \to \mathbb{R}^n[/math] then we can generate [math]X^g = G(Z)[/math] which has distribution [math]p_x^g[/math] a measurement [math]Y^g = f_\Theta(G(Z))[/math] which has distribution [math]p_y^g[/math].

Unfortunately we do not observe any [math]X^g \sim p_x[/math] so we can use the discriminator directly on [math]G(Z)[/math] to train the generator. Instead we will use the discriminator to distinguish between the [math]Y^g - f_\Theta(G(Z))[/math] and [math]Y^r[/math]. That is we train the discriminator, [math]D: \mathbb{R}^m \to \mathbb{R}[/math] to detect if a measurement came from [math]p_y^r[/math] or [math]p_y^g[/math].

AmbientGAN has the objective function:

[math]\min_G \max_D \mathbb{E}_{Y^r \sim p_y^r}[q(D(Y^r))] + \mathbb{E}_{Z \sim p_z, \Theta \sim p_\theta}[q(1 - D(f_\Theta(G(Z))))] [/math]

where [math]q(.)[/math] is the quality function; for the standard GAN [math]q(x) = log(x)[/math] and for Wasserstein GAN [math]q(x) = x[/math].

As a technical limitation we require [math]f_\theta[/math] to be differentiable with the respect each input for all values of [math]\theta[/math].

With this set up we sample [math]Z \sim p_z[/math], [math]\Theta \sim p_\theta[/math], and [math]Y^r \sim U\{y_1, \cdots, y_s\}[/math] each iteration and use them to compute the stochastic gradients of the objective function. We alternate between updating [math]G[/math] and updating [math]D[/math].

# Empirical Results

The paper continues to present results of AmbientGAN under various measurement functions when compared to baseline models. We have already seen one example in the introduction: a comparison of AmbientGAN in the Convolve + Noise Measurement case compared to the ignore-baseline, and the unmeasure-baseline.

### Block-Pixels

With the block-pixels measurement function each pixel is independently set to 0 with probability [math]p[/math].

Measurements from the celebA dataset with [math]p=0.95[/math] (left). Images generated from GAN trained on unmeasured (via blurring) data (middle). Results generated from AmbientGAN (right).

### Block-Patch

A random 14x14 patch is set to zero (left). Unmeasured using-navier-stoke inpainting (middle). AmbientGAN (right).

### Pad-Rotate-Project-[math]\theta[/math]

Results generated by AmbientGAN where the measurement function 0 pads the images, rotates it by [math]\theta[/math], and projects it on to the x axis. For each measurement the value of [math]\theta[/math] is known.

The generated images only have the basic features of a face and is referred to as a failure case in the paper. However the measurement function performs relatively well given how lossy the measurement function is.

### MNIST Inception

AmbientGAN is more robust than all other baseline models. Further AmbientGAN retains high inception scores as measurements become more and more lossy.

### CIFAR-10 Inception

AmbientGAN is faster to train and more robust even on more complex distributions such as CIFAR-10.

# Theoretical Results

The theoretical results in the paper prove the true underlying distribution of [math]p_x^r[/math] can be recovered when we have data that comes from the Gaussian-Projection measurement, Fourier transform measurement and the block-pixels measurement. The do this by showing the distribution of the measurements [math]p_y^r[/math] corresponds to a unique distribution [math]p_x^r[/math]. Thus even when the measurement itself is non-invertible the effect of the measurement on the distribution [math]p_x^r[/math] is invertible. Lemma 5.1 ensures this is sufficient to provide the AmbientGAN training process with a consistency guarantee. For full proofs of the results please see appendix A.

### Lemma 5.1

Let [math]p_x^r[/math] be the true data distribution, and [math]p_\theta[/math] be the distributions over the parameters of the measurement function. Let [math]p_y^r[/math] be the induced measurement distribution.

Assume for [math]p_\theta[/math] there is a unique probability distribution [math]p_x^r[/math] that induces [math]p_y^r[/math].

Then for the standard GAN model if the Discriminator is optimal, then a generator [math]G[/math] is optimal if and only if [math]p_x^g = p_x^r[/math].

### Theorems 5.2-5.4

When the measurement is a Gaussian-Projection ([math]f_\Theta(x) = \langle \Theta, \langle \Theta, x \rangle \rangle [/math]), the Convolution + Noise measurement, or the block-pixels measurement then there is a unique underlying distribution that induces the observed measurement distribution.

# Future Research

One critical weakness of AmbientGAN is the assumption that the measurement model is known. It would be nice to be able to train an AmbientGAN model when we have an unknown measurement model but also a small sample of unmeasured data.