# 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 $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 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 $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 [itex]D.