Abstract
Variational autoencoders (VAEs) are a popular class of deep generative models with many variants and a wide range of applications. Improvements upon the standard VAE mostly focus on the modelling of the posterior distribution over the latent space and the properties of the neural network decoder. In contrast, improving the model for the observational distribution is rarely considered and typically defaults to a pixel-wise independent categorical or normal distribution. In image synthesis, sampling from such distributions produces spatially-incoherent results with uncorrelated pixel noise, resulting in only the sample mean being somewhat useful as an output prediction. In this paper, we aim to stay true to VAE theory by improving the samples from the observational distribution. We propose SOS-VAE, an alternative model for the observation space, encoding spatial dependencies via a low-rank parameterisation. We demonstrate that this new observational distribution has the ability to capture relevant covariance between pixels, resulting in spatially-coherent samples. In contrast to pixel-wise independent distributions, our samples seem to contain semantically-meaningful variations from the mean allowing the prediction of multiple plausible outputs with a single forward pass.
Introduction
Variational Autoencoders (VAEs) are a cornerstone of generative modeling, yet they suffer from a well-known limitation: generated samples often exhibit significant "salt and pepper" noise. This graininess arises because standard VAEs assume that pixels in the observation space are independent. To avoid this artifact, researchers typically rely on the distribution's mean for visualization. However, the mean is often overly smooth and fails to capture the diverse, plausible variations that a true generative model should provide.
The authors of this paper argue for a return to VAE theory by improving the observational distribution itself. By modeling spatial dependencies, they aim to produce samples that are both sharp and spatially coherent.
Methodology: The SOS-VAE
The proposed Structured Observation Space VAE (SOS-VAE) replaces the standard diagonal covariance matrix with a low-rank multivariate normal distribution.
Low-Rank Parameterization
The covariance matrix $\Sigma$ is defined as $\Sigma = PP^T + D$, where $P$ is a low-rank factor matrix and $D$ is a diagonal matrix. This parameterization allows the model to capture global dependencies (e.g., consistent hair color or skin texture across a region) without the computational burden of a full-rank matrix. By utilizing the Woodbury matrix identity and the matrix determinant lemma, the authors ensure that the likelihood remains computationally efficient, scaling linearly with the number of pixels.
Stability via Entropy Constraints
Training networks to predict variance can be unstable. SOS-VAE addresses this by introducing an entropy penalty using a Lagrangian formulation. This constraint prevents the model from simply increasing variance to minimize loss, forcing it to learn meaningful spatial structures instead.
Experiments and Results
The model was evaluated on the CELEBA face dataset and UK Biobank (UKBB) brain MRI scans.
- Quantitative Gains: SOS-VAE achieved significantly lower Fréchet Inception Distance (FID) scores. On CELEBA, SOS-VAE samples reached an FID of 104.62, compared to 196.40 for standard $\beta$-VAEs.
- Visual Quality: Qualitatively, SOS-VAE samples are smooth and structurally sound. The variations from the mean are semantically meaningful—representing changes in lighting or features—rather than random noise.
- Interactive Editing: Because the model understands pixel correlations, it supports conditional sampling. Changing a few pixels (e.g., painting a patch of hair) allows the model to analytically update the rest of the image to match, without a new forward pass.
Discussion and Future Work
While SOS-VAE represents a significant step forward, challenges remain. The model is sensitive to the hyperparameters of the Lagrangian multipliers, and there is an ongoing theoretical question regarding the optimal balance of information between the latent and observation spaces. Future research will explore integrating structured observation spaces into more advanced hierarchical VAE architectures.
Summary updated