Variational autoencoder [1]} is a widely used generative model developed from the standard autoencoder.
It typically encodes the input data \(x\)  into a latent space \(z\)  with Gaussian distributions, and then samples data points from the latent space to construct the input data via a decoder.
Due to the nature of generative models, variational autoencoders can be used for semi-supervised learning, which was first proposed in [2]} (named Semi-VAE).
In this model, both the input data \(x\)  and its label \(y\)  are used for learning the latent variable \(z\)  via an encoder \(q_\phi (z|x,y)\) , where \(\phi \)  denotes its parameters.
The decoder then constructs input data using a distribution \(p_\theta (x|y,z)\) , where \(\theta \)  is the decoder parameters.
The task label predictor distribution is denoted as \(q_\phi (y|x)\) .
The distribution of the latent variable \(z\)  is derived as follows:
\(z\sim q_\phi (z|x,y)=\mathcal {N}(\mu (\mathbf {x},y), diag(\sigma ^{2}(\mathbf {x},y))),\) 
