tolstikhin / wae

Wasserstein Auto-Encoders
BSD 3-Clause "New" or "Revised" License
505 stars 90 forks source link

Discriminating Q(z|x) and P(z) versus Q(z) and P(z) #5

Open j-min opened 6 years ago

j-min commented 6 years ago

Hi,

I am little bit confused after reading your paper. Please correct me if I misunderstood. In your paper, you show difference between VAE and WAE in terms of distribution matching objective

However, I wonder why you implemented WAE that matches Q(z|x) to P(z) with GAN and MMD. (ex. Discriminator still discriminates z tilda from Q(z|x) and z from P(z) image

In order to match Q(z) to P(z), don't you have to calculate distance between Q(z) and P(z), in which Q(z) is obtained by marginalizing Q(z|x) with P(x)? But you are averaging distance between Q(z|x) and P(z) with multiple x.

tolstikhin commented 6 years ago

Hey,

thanks for the question. When you sample $X_1, ..., X_n$ from the data distribution $P$ and then for every $i=1,...,n$ sample $Z_i$ from $Q(Z|X_i)$ then the resulting $Z_1,\dots,Z_n$ is a sample of independent points each one distributed according to the aggregate posterior $Q_Z$. Thus we are matching $Q_Z$ to $P_Z$ based on two samples: one from $Q_Z$ and one from $P_Z$.

I hope this helps.

Best wishes, Ilya