Questions tagged [variational-autoencoder]

For questions related to variational auto-encoders (VAEs). The first VAE was proposed in "Auto-Encoding Variational Bayes" (2013) by Diederik P. Kingma and Max Welling. There are several other VAEs, for example, the conditional VAE.

Filter by
Sorted by
Tagged with
2 votes
1 answer
90 views

What is the meaning of log p(x) in VAE math and why is it constant

I was reading the article on medium, where the author cites this equation for Variational Inference: \begin{align*} \text{KL}(q(z|x^{(i)})||p(z|x^{(i)})) &= \int_z q(z|x^{(i)})\text{log}\frac{q(z|...
0 votes
0 answers
30 views

VAE ( variational autoencoder) for timeseries anomaly detection ,

I am implementing VAE based anomaly detection for multivariate timeseries using keras, I have ELBO (Evidence lower bound) which is combination of $$-\ D_{KL}\left({\ q}_\varphi\left(z\middle| x^i\...
1 vote
1 answer
67 views

How does using the ELBO in VAEs make the problem tractable?

I'm studying Variational Autoencoders and a lot of the literature says that the posterior is intractable because the marginal distribution p(x) is intractable since the space of z is so large we ...
0 votes
1 answer
76 views

Are there cases where Variational Auto-Encoders (VAE's) are preferred to other techniques?

The best reason I have seen for using variational autoencoders is when dealing with sparse data. The Gaussian noise "splats" out the input distribution (see this StackExchange answer). ...
0 votes
0 answers
40 views

What best practices for VAE do you know?

The data is binary voxel data of shape (60, 36, 60). I want to compress such data into ...
0 votes
1 answer
105 views

Why does the latent space in Stable Diffusion have a shape of 64x64x3?

Since the encoding is performed by a Variational Autoencoder, the VAE encoder must output some mean and log variance that we can ...
0 votes
0 answers
28 views

Which main steps should I consider in order to successfully use a VAE for Anomaly Detection?

I am thinking about using the variational autoencoder model for anomaly detection . I have an Android Logs dataset. As the logs generated are a representative of time series type of data I thought ...
0 votes
0 answers
7 views

How to apply Latent Diffusion for 3D Binary Voxel Data?

Suppose we have a voxel of shape (60, 36, 60) with values 0 or 1 (1-occupied, 0-empty). What is the possible architecture of latent diffusion?
9 votes
4 answers
12k views

Why is the variational auto-encoder's output blurred, while GANs output is crisp and has sharp edges?

I observed in several papers that the variational autoencoder's output is blurred, while GANs output is crisp and has sharp edges. Can someone please give some intuition why that is the case? I did ...
1 vote
1 answer
73 views

Why do we use $q_{\phi}(z \mid x^{(i)})$ in the objective function of amortized variational inference, while sometimes we use $q(z)$?

In page 21 here, it states: General Idea of Amortization: if same inference problem needs to be solved many times, can we parameterize a neural network to solve it? Our case: for all $x^{(i)}$ we ...
1 vote
0 answers
35 views

Why doesn't diffusion models suffer posterior collapse?

In VAEs, posterior collapse occurs when the approximated posterior $q_\theta(z|x)$ becomes the standard Gaussian prior after training. The forward process of diffusion models transforms the data $x$ ...
0 votes
1 answer
92 views

Confusion over taking gradients in Variational Autoencoders (VAE)

I am confused as to when to hold certain parameters constant in a VAE. I will explain with a concrete example. We can write $\operatorname{ELBO}(\phi, \theta) = \mathbb{E}_{q_{\phi}(z)}\left[\log \...
1 vote
1 answer
75 views

Variational Lower Bound in VAE for Gaussian latent prior

From Bishop's recent book on Deep Learning, it says the ELBO for Gaussian latent prior can be approximated by $\frac{1}{L}\sum_{l=1}^L \ln p(x_n|z_n^l,w) + KL(q(z_n|x_n,\phi)||p(z_n))$ where $n$ are ...
1 vote
1 answer
92 views

What is an information bottleneck in the context of ELBO and Hierarchical VAEs?

These slides (slide number 26) mention that the ELBO enforces an information bottleneck at the latent variables z which make it prone to bad local minima. Can you please explain what they mean by that?...
1 vote
1 answer
95 views

Datasets input at model.fit produce unexpected results of training loss vs validation loss

Im trying to train a neural network (VAE) using tensorflow and Im getting different results based on the type of input in the model.fit. When I input arrays I get normal difference between the ...
0 votes
0 answers
16 views

Should the encoder be trained for more steps in VAEs?

This is based on my interpretation of how the ELBO loss works. The log likelihood of the data is equal to the ELBO + KL Divergence term. $$\operatorname{log} p_{\theta}(x) = \underbrace{\mathbb {E}_{...
2 votes
1 answer
725 views

VAE giving near zero output when latent space dimension is large

I'm training a VAE to reconstruct some input (channels picked up by some MIMO BS for context) and I ran an experiment on the training set to see how the performance improves with the latent space ...
5 votes
1 answer
2k views

Why would a VAE train much better with batch sizes closer to 1 over batch size of 100+?

I've been training a VAE to reconstruct human names and when I train it on a batch size of 100+ after about 5 hours of training it tends to just output the same thing regardless of the input and I'm ...
2 votes
1 answer
1k views

Could it make any sense to choose a larger dimension for the latent space of the VAE with respect to the original input?

Could it make any sense to choose a larger dimension for the latent space of the VAE with respect to the original input? For example, we may want to learn how to reconstruct a relatively low-...
0 votes
0 answers
53 views

Example VQ-VAE code for audio in paper "Neural Discrete Representation Learning"

I want to replicate the paper "Neural Discrete Representation Learning" by van der Oord et al (2018). DeepMind provides an example for CIFAR images on GitHub. It seems that the model for ...
1 vote
3 answers
90 views

What is the difference between q and p in Statistical Notation(used in VAE)?

I'm looking at general visuals of Variational Autoencoders and I'm seeing that the encoder is typically expressed as q(z|x) with phi as a subscript while the decoder is p(x|z) with theta as a ...
1 vote
1 answer
45 views

Is there a way to reward my Variational-Auto encoder for using less colors while still letting it make creative decisions?

So recently I have been trying to program a Tensorflow and Keras based model that can animate pixel art characters. I use a Variation Auto Encoder with Convolutions, Dense Layers and Upsampling 2d ...
0 votes
1 answer
749 views

Is there a performace benefits using VAE-GAN instead of just GAN?

I have read that when using VAE-GANs, first what happens is the VAE's encoder encodes some image to another encoded image, which from GAN's point of view is considered a noise, and then the GAN part ...
0 votes
0 answers
32 views

Multi-Task VAE, Decoder Activation Functions?

I'm working on a Multi-Task VAE with one Encoder and two Decoders. The input consists of a vector with parameters which describe a design of a fluid system. The goal is to reconstruct the parameters ...
12 votes
1 answer
13k views

What are the fundamental differences between VAE and GAN for image generation?

Starting from my own understanding, and scoped to the purpose of image generation, I'm well aware of the major architectural differences: A GAN's generator samples from a relatively low dimensional ...
0 votes
0 answers
21 views

Variational Autoencoders - Can We Learn Directly From Marginal With a Pretrained Decoder?

So, with VAE we use ELBO instead of directly maximizing the marginal likelihood, because the marginal likelihood is intractable. As far as I understand it, this is the case for two reasons: $$p(x) = \...
1 vote
0 answers
73 views

Pointers to (deep) latent variable models that admit analytical approximations

I am aware that there is a plethora of deep generative models out there (e.g. variational autoencoders (VAE), GANs) that can model high-dimensional data as the images of latent variables under a non-...
0 votes
0 answers
41 views

VAE for Motion Sequence Generation - Convergence Issue with Scheduled Sampling

I have implemented a Variational Autoencoder (VAE) in PyTorch for motion sequence generation using human pose data (joint angles and angular velocities in radians) from the CMU dataset. The VAE ...
1 vote
1 answer
138 views

Variational Autoencoder (VAE) Multiclass Interpolation

I'm working on a variational autoencoder (VAE) with 20 different classes in my training data. I've successfully trained the VAE and can sample from the latent space to generate data points. However, I ...
1 vote
0 answers
24 views

Toy dataset: Radial VAE

I'm evaluating disentanglement in toy datasets seeing as we have such little understanding of the phenomena. I'm using various tools from differential geometry. Now I want to train a VAE on the ...
0 votes
0 answers
9 views

What is the detailed experimental setup for class-incremental continual image generation?

Do you condition the generative model (let's say, VAE) on the task identity or the class label or both? If I condition the VAE on both task identity and class label, then I have to provide both the ...
0 votes
1 answer
257 views

What exactly is meant by variational distribution?

What specifically does the term "variational distribution" refer to? The encoder of Variational autoencoder? Forward process of denoising diffusion probabilistic models? Images or latent ...
2 votes
1 answer
93 views

Why can Variational Autoencoders (VAEs) approximate arbitrary distributions?

I am trying to reason to myself why is it that VAEs can approximate arbitrary probability distributions even though 𝑞𝜙(𝑧|𝑥) and 𝑝𝜃(𝑥|𝑧) are Gaussian. I understand that the parameters are ...
0 votes
0 answers
162 views

What is the motivation of VQ-VAE?

I don't understand the motivation because I read that the motivation for VAE was that: 'it could be shown that it is not meaningful to interpolate the latent space of regular auto-encoders' (my own ...
0 votes
2 answers
110 views

How to expand reconstruction error to mean squared error in Variational AutoEncoder? [closed]

How to expand reconstruction error to mean squared error when it is $\mathbb{E}_{z\sim q_{\phi}(z|x)}[\log p_\theta(x|z)]$? [reconstruction error] $\mathbb{E}_{z\sim q_{\phi}(z|x)}[\log p_\theta(x|z)]$...
1 vote
1 answer
62 views

Comparison of the two alternative forms for the KL divergence [closed]

On page 468 of 'Pattern Recognition and Machine Learning', what does 'the same variables given by the product of two independent univariate Gaussian distributions' mean? The PDF says, The green ...
0 votes
0 answers
32 views

KL divergence and sign [duplicate]

In the Auto-Encoding Variational Bayes paper, the formula for KL divergence is $$ \frac{1}{2} \sum \bigl (1 + \log(σ^2) - μ^2 - σ^2 \bigr) \space\space\space\space...(10)$$ , but the equation is $$- ...
1 vote
0 answers
309 views

variational auto encoder loss goes down but does not reconstruct input. out of debugging ideas

My variational autoencoder seems to work for MNIST, but fails on slightly "harder" data. By "fails" I mean there are at least two apparent problems: Very poor reconstruction, for ...
2 votes
0 answers
96 views

Why is $p(x)=\int p(x,z) dz$ intractable for continuous $z$ in VAE?

In VAE we use the importance sampling trick to use $q_\phi(z|x)$ to help maximize $\log p_\theta(x)=\log \int p_\theta(x,z)dz\ge \int q_\phi(z|x)\log \frac{p_\theta(x,z)}{q_\phi(z|x)} dz$. Meanwhile, ...
0 votes
0 answers
50 views

Is this a valid application of Autoencodeers/VAE?

I am trying to predict a spectrum (1D vector) from various scalar inputs which are known to be correlated. As the spectrum vector is very long (4000 points) it was suggested that I use dimensionality ...
1 vote
2 answers
57 views

How to apply backpropagation when one layer of the network is a call-only function (no gradient)?

I worked with Feed Forward Neural Network and VAE and understood backpropagation algorithm. Now I build a VAE network, one layer of it is a very complex vector-to-vector function $f(x)$ (a general '...
0 votes
1 answer
67 views

Any suggestion on what I should try to get this cVAE model working for random generation of new molecules?

I am using a cVAE model to generate new structures of molecules. After successfully training the VAE model I am able to get proper reconstructions of the training set. While I am also able to generate ...
0 votes
0 answers
50 views

Layer Questions regarding Bidirectional VAE (D3VAE)

I am currently trying to figure out how D3VAE are working, but I can't seem to understand the network architecture given. The paper can be found here: https://openreview.net/pdf?id=rG0jm74xtx The ...
0 votes
0 answers
50 views

Can I use this method to improve the VAE model?

My VAE model is not learning well. The model's learning history shows that the reconstruction loss is as large as approximately 8000 or more, and the KL-Divergence loss is diverging, starting with an ...
0 votes
1 answer
31 views

How to convert my test data in the same dimensionality as my train data

I have trained a VAE with jpg images. My latent space dimension has 768 features and when plotting the latent space it looks like this: However, when I use the scikit learn tool LDA (Linear ...
1 vote
2 answers
198 views

Why optimise log p(x) rather than log p(x|z) in a Variational AutoEncoder?

Background The loss function in a Variational AutoEncoder is the Evidence Lower Bound (ELBO): $\mathbb{E}_q[log$ $p(x|z)] - KL[q(z)||p(z)]$ And has this inequality: $log$ $p(x) \ge \mathbb{E}_q[log$ $...
0 votes
0 answers
38 views

Must dataset strictly come from marginal distribution in VAE?

My question is what if the population of the dataset is another marginal distribution, but whose support covers the original marginal distribution $p(\mathbf{x})$, can we use VAE to infer this target ...
0 votes
1 answer
51 views

Why is the variational lower bound is easier to compute than the original marginal distribution?

Why is the ELBO of $p(x)=\int p(x|z)p(z)\mathrm{d}z$ easier to compute/estimate than the expression itself? Can we compute this quantity itself through sampling in the same way? I understanding that ...
0 votes
0 answers
91 views

Why most of VAE implementations for image reconstruction use a deterministic decoder?

The decoder of VAE is a parameterized distribution $p_{\theta}(\mathbb{x} | \mathbb{z})$ by definition, from which we can sample an output $\hat{\mathbb{x}}$ with an input $\mathbb{x}$ and a sampled ...
3 votes
1 answer
119 views

Why do we use the same parameters for the joint, marginal and conditional distributions in VAEs?

I've noticed in several resources on variational autoencoders (for example the wikipedia article), we use the same parameters theta for the prior, likelihood, posterior, etc distributions. For example ...