mbaddar1 / wias_uq_rl

This project is part of Research Project : Uncertainty Quantification for Reinforcement Learning, as a part of PhD research in WIAS
2 stars 1 forks source link

TODO: Improve VAE #7

Open mbaddar1 opened 3 years ago

mbaddar1 commented 3 years ago

TODO

  1. Isolate out the effect of conv. layer, use dense (DONE)
  2. Quick way to approximate latent distributions, via boostraping to sample different Z-latent values and approximate the distribution to validate the assumption of whether more complex distributions are needed apply boostrapping on cluster of close images (i.e. classes) , for ex. in MNIST, same number, CIFAR, same class. Use boostrapping to approximate GM - diag, Gaussian Diag and Tri (Tri is not very practical but for completeness)

Expected to see z-dist of each class, for ex. a Normal with mean and cov. (DONE)

  1. Use more complex posteriors -

Based on experiments and findings so far (see this notebook), use CVAE with GM posterior over CIFAR : 3.0 Create CAE and apply on CIFAR10 / CIFAR 100 datasets. separate boostrapped Z-values to train/test the train set is used to build GM / G-diag model the test set is used to calculate the likelihood 3.1 use CVAE with diag gaussian on binarized CIFAR10 images and record performance (ELBO, image quality) 3.2 used GM to binarized CVAE(based in dense ae boostrapping analysis) 3.2.1 change reparam and logprob methods 3.3 make image continous from 0 to 1 then x|z to be as cont RV , p(x|z) to be changed and compute loss / elbo function 3.3.1 change compute loss as p(x|z) to be changed from bernoulli to Gaussian)

  1. Use informative prior
  2. understand internal in the light of high dim analysis book
  3. experiment with different methods (GAN, NF, MPS) on different data sets (MNIST, CIFAR, ImageNet)
  4. improve deeper understanding of 5 in the light of 4
  5. develop approximation and Generalized error framework and validate by datasets (MNIST )
mbaddar1 commented 3 years ago

Notes

  1. Full Cov model sometimes fails practically due to multicollinearity. Alleviated by reducing latent dim but this limits model expressive power
  2. Also when reducing latent dim , this makes the model less powerful than diag Gaussian TODO
  3. Boostrapping using diag gaussian and finite mixture (k=2,3,...)
  4. Experiment Dense VAE using diag gaussian, tri gaussian and Gaussian Mixture 3.evaluate gen models https://deepgenerativemodels.github.io/assets/slides/cs236_lecture13.pdf
mbaddar1 commented 3 years ago

Results of bootstrapped posterior estimation of Z over CIFAR10 classes

  1. Tried to use multivariate Tri Gaussian, the problem is with high latent-dim, we face the problem of multicolinearity between latents which makes the covariance matrix not positive definite and cause problems in Cholesky decomposition used in the logprob method
  2. Applied simple Gaussian Mixture (K=4) which results in improvement over simple diag Gaussian model. Details and results are in this notebook , and this commit
mbaddar1 commented 3 years ago

Experiment of Dense VAE over CIFAR Notebook Sample Run

  1. Arch, dense encoder / decoder for each image channel
  2. Results not visually good at all
  3. Hypotheses: 3.1 no convolution layer (no proper preprocessing) - despite the fact that when used dense AE it worked visually good, see this notebook 3.2 bad prior, makes the posterior stuck at a bad estimation => use informative prior

For TODO based on these findings, see first comment in this issue's thread