# 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, which will from here on be referred to as measurements of the true data. If we know the measurement function and would like to train a generative model for the true data, there are several ways to continue which have varying degrees of success. We will use noisy MNIST data as an illustrative example. Suppose we only see MNIST data that has been run through a Gaussian kernel (blurred) with some noise from a $N(0, 0.5^2)$ 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 inverted.

### 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 measurements of the output it generates fool the discriminator. The discriminator must distinguish between real and generated measurements.

# Model

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

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

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

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

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

AmbientGAN has the objective function:

$\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))))]$

where $q(.)$ is the quality function; for the standard GAN $q(x) = log(x)$ and for Wasserstein GAN $q(x) = x$.

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

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

# 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 $p$.

Measurements from the celebA dataset with $p=0.95$ (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-$\theta$

Results generated by AmbientGAN where the measurement function 0 pads the images, rotates it by $\theta$, and projects it on to the x axis. For each measurement the value of $\theta$ 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 was compared with baselines through training several models with different probability $p$ of blocking pixels. The plot on the left shows that the inception scores change as the block probability $p$ changes. All four models are similar when no pixels are blocked $(p=0)$. By the increase of the blocking probability, AmbientGAN models present a relatively stable performance and perform better than the baseline models. Therefore, AmbientGAN is more robust than all other baseline models.

The plot on the right reveals the changes in inception scores while the standard deviation of the additive Gaussian noise increased. Baselines perform better when the noise is small. By the increase of the variance, AmbientGAN models present a much better performance compare to the 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 $p_x^r$ 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 $p_y^r$ corresponds to a unique distribution $p_x^r$. Thus even when the measurement itself is non-invertible the effect of the measurement on the distribution $p_x^r$ 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 $p_x^r$ be the true data distribution, and $p_\theta$ be the distributions over the parameters of the measurement function. Let $p_y^r$ be the induced measurement distribution.

Assume for $p_\theta$ there is a unique probability distribution $p_x^r$ that induces $p_y^r$.

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

### Theorems 5.2

For the Gussian-Projection measurement model, there is a unique underlying distribution $p_x^{r}$ that can induce the observed measurement distribution $p_y^{r}$.

### Theorems 5.3

Let $\mathcal{F} (\cdot)$ denote the Fourier transform and let $supp (\cdot)$ be the support of a function. Consider the Convolve+Noise measurement model with the convolution kernel $k$and additive noise distribution $p_\theta$. If $supp( \mathcal{F} (k))^{c}=\phi$ and $supp( \mathcal{F} (p_\theta))^{c}=\phi$, then there is a unique distribution $p_x^{r}$ that can induce the measurement distribution $p_y^{r}$.

### Theorems 5.4

Assume that each image pixel takes values in a finite set P. Thus $x \in P^n \subset \mathbb{R}^{n}$. Assume $0 \in P$, and consider the Block-Pixels measurement model with $p$ being the probability of blocking a pixel. If $p \lt 1$, then there is a unique distribution $p_x^{r}$ that can induce the measurement distribution $p_y^{r}$. Further, for any $\epsilon \gt 0, \delta \in (0, 1]$, given a dataset of $$s=\Omega \left( \frac{|P|^{2n}}{(1-p)^{2n} \epsilon^{2}} log \left( \frac{|P|^{n}}{\delta} \right) \right)$$ IID measurement samples from pry , if the discriminator D is optimal, then with probability $\geq 1 - \delta$ over the dataset, any optimal generator G must satisfy $d_{TV} \left( p^g_x , p^r_x \right) \leq \epsilon$, where $d_{TV} \left( \cdot, \cdot \right)$ is the total variation distance.

# 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.