Recognition network

ID: recognition-network

A recognition network is a learned mapping from observed data to parameters of an approximate posterior distribution over latent variables. In a variational autoencoder, it specifies , while the generative decoder specifies the opposite conditional direction . The recognition network supports amortized inference; it need not coincide with the exact posterior of the learned generative model.[ref]
For a scalar Gaussian recognition law, the neural network can output a mean and log variance . Then
where is parameter-independent noise. Exponentiating the log variance ensures a positive variance, and the factor converts it to the standard deviation used in Gaussian reparameterization.[ref]
For an original calculation, suppose one input gives and . The recognition variance is4 and its standard deviation is2. A noise draw gives , while the posterior mean supplied by the same network remains1. Confusing log variance with log standard deviation would instead produce the wrong scale.
A deterministic network evaluation and a random latent sample are distinct steps. Re-evaluating the same fixed network on the same input returns the same distribution parameters; new noise draws can still yield different values. Returning only the mean omits the uncertainty represented by that distribution. Its adequacy must be assessed against the intended inference problem, not inferred merely from the fact that it outputs a positive variance.

New to topics? Read the docs here!