Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
0 votes
0 answers
11 views

In VAE, why not maximize D[q(z)||p(z|x)] instead?

In VAE, the goal is to maximize $\log p(x)$, where $x$ is the data and $p(\cdot)$ is a parameterized distribution. For any distribution $q(z)$, the following identity holds, $$ \log p(x)=D[q(z)||p(z|x)...
John Ao's user avatar
0 votes
1 answer
39 views

Why do we add noise when training VAEs, instead of just insisting each training batch is Normally distributed at hidden layer?

I had come to think of VAEs as having 2 loss terms - A reconstruction loss that tries to ensure that the input matches the output (just as a regular Auto Encoder), and a KL-Divergence Loss term that ...
Steven's user avatar
  • 1
1 vote
1 answer
142 views

Trying to understand some derivation in the paper: Deep Unsupervised Learning using Nonequilibrium Thermodynamics

I have recently been learning about diffusion models and trying to derive all the results in the paper by Sohl-Dickstein, et. al, "Deep Unsupervised Learning using Nonequilibrium Thermodynamics&...
ahxmeds's user avatar
  • 11
0 votes
1 answer
46 views

How to remove random noise from an image (denoising)?

When adding noise to an image, for instance, is the noise added evenly random (equally likely values within some range), or random but following some distribution (like the normal distribution)? Then,...
James's user avatar
  • 145
3 votes
1 answer
163 views

How to perform latent space Interpolation between two images?

I have a variational convolutional autoencoder that has trained on 2 images and outputs a linear interpolation (inserted at the bottleneck stage) between those 2 input images. However, the result ...
James's user avatar
  • 145
3 votes
0 answers
51 views

How random should an untrained generative AI output really be?

I am developing a particular implementation of VAE, and, how usually one does while implementing any architecture, I passed a random input to the model to test if everything worked fine (e.g. check ...
GPU'njoyer's user avatar
4 votes
3 answers
163 views

In the VAE, why is $z \sim \mathcal{N}(\mu, \sigma^2)$ equivalent to $z = \mu + \sigma \odot \epsilon$?

In the reparameterization trick of a Variational Autoencoder (VAE), instead of sampling noise $z$ from $z \sim \mathcal{N}(\mu, \sigma^2)$, we can use a different method: $z = \mu + \sigma \odot \...
user avatar
0 votes
0 answers
12 views

Is there a way to mix the Importance weighted VAE with the Beta-VAE?

Is there a way to mix the Importance weighted VAE with the Beta-VAE? It seems that we cannot separate out the KL-term from the IWAE-ELBO, hence we cannot multiply it with Beta. On the other hand, it ...
Clara's user avatar
  • 11
2 votes
2 answers
150 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|...
Kiran Manicka's user avatar
1 vote
1 answer
107 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 ...
Kiran Manicka's user avatar
0 votes
1 answer
91 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). ...
programjames's user avatar
0 votes
0 answers
46 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 ...
Renat Abdrakhmanov's user avatar
0 votes
1 answer
302 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 ...
Renat Abdrakhmanov's user avatar
0 votes
0 answers
11 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?
Renat Abdrakhmanov's user avatar
0 votes
0 answers
29 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 ...
MLenthusiast's user avatar
0 votes
0 answers
46 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\...
mmv_87's user avatar
  • 1
1 vote
1 answer
78 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 ...
piero's user avatar
  • 123
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}_{...
ketan dhanuka's user avatar
1 vote
1 answer
113 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?...
ketan dhanuka's user avatar
0 votes
0 answers
99 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 ...
emonigma's user avatar
1 vote
3 answers
117 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 ...
Kiran Manicka's user avatar
1 vote
1 answer
50 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 ...
Max's user avatar
  • 13
0 votes
0 answers
33 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 ...
tekay's user avatar
  • 1
0 votes
0 answers
31 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) = \...
BurgerMan's user avatar
1 vote
0 answers
77 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-...
ngiann's user avatar
  • 111
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 ...
RTn's user avatar
  • 1
1 vote
0 answers
27 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 ...
John Miller's user avatar
1 vote
1 answer
304 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 ...
charactercapital's user avatar
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 ...
Homie98's user avatar
1 vote
1 answer
480 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 ...
diffusion stable's user avatar
0 votes
1 answer
104 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 \...
Joel's user avatar
  • 33
0 votes
0 answers
188 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 ...
profPlum's user avatar
  • 424
2 votes
1 answer
106 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 ...
Joel's user avatar
  • 33
0 votes
2 answers
126 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)]$...
diffusion stable's user avatar
1 vote
1 answer
83 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 ...
diffusion stable's user avatar
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 $$- ...
diffusion stable's user avatar
2 votes
0 answers
132 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, ...
hjenryin's user avatar
0 votes
0 answers
55 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 ...
Christopher McQueen's user avatar
1 vote
2 answers
58 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 '...
whitegreen's user avatar
0 votes
1 answer
102 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 ...
Formal_this's user avatar
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 ...
Dude Rar's user avatar
1 vote
2 answers
318 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$ $...
Titus Buckworth's user avatar
0 votes
1 answer
53 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 ...
Hanhan Li's user avatar
  • 101
0 votes
0 answers
162 views

Using a VQ-VAE encoder's output to condition another model

I've trained a VQ-VAE on images that I want to use to condition another model (latent diffusion). The shape of my encoder's output is (4, 256, 56, 56) and I'm getting it using: ...
jbm's user avatar
  • 101
-1 votes
1 answer
149 views

Combination of VAE with GAN

I am going to implement a lecture which it aims to generate new images. It uses a variational autoencoder to produce latent vector and then feed it to a gan network as input. My question is, in ...
Pedram Yazdipoor's user avatar
0 votes
1 answer
335 views

How to generate new data using VAE?

I have built the following function which takes as input some data and runs a VAE on them: ...
quant's user avatar
  • 101
1 vote
0 answers
82 views

Is VAE the same as the E-step of the EM algorithm?

EM(Expectation Maximum) Target: maximize $p_\theta(x)$ $ p_\theta(x)=\frac{p_\theta(x, z)}{p_\theta(z \mid x)} \\\\$ Take log on both sides: $ \log p_\theta(x)=\log p_\theta(x, z)-\log p_\theta(z \...
Garfield's user avatar
0 votes
0 answers
289 views

How to optimize ELBO(VAE's loss function)?

Suppose we've got the following formula: $\log p(x;\theta)=\mathbb{E}_{q(z|x;\phi)}[\log p(x,z;\theta)-\log q(z|x;\phi)]+KL(q(z|x;\phi)||p(z|x;\theta))\\ \geq \mathbb{E}_{q(z|x;\phi)}[\log p(x,z;\...
Garfield's user avatar
2 votes
0 answers
174 views

Why use z_mean to plot the latent space learned by a Variational Autoencoder?

In the Keras website, there is an example code of a Variational Autoencoder. At the end of such a page, there is an example code that plots the latent space learned from MNIST. The code is as follows: ...
AlexSC's user avatar
  • 149
1 vote
1 answer
33 views

What models/algorithms besides variational autoencoders can I use to transform a discrete input into a differentiable latent space?

Let's say I have a discrete input and want to transform it into a differentiable latent space. What models/algorithms besides variational autoencoders can I use?
postnubilaphoebus's user avatar