[Paper Review] Spherical Latent Spaces for Stable Variational Autoencoders
This paper proposes using von Mises-Fisher (vMF) distributions instead of multivariate Gaussians for the latent space in variational autoencoders (VAEs) for text, enabling fixed KL divergence via a concentration parameter 𝜅. This structural change prevents KL collapse, improves likelihood performance, and yields more effective, structured latent representations across both RNN language modeling and bag-of-words document modeling tasks.
A hallmark of variational autoencoders (VAEs) for text processing is their combination of powerful encoder-decoder models, such as LSTMs, with simple latent distributions, typically multivariate Gaussians. These models pose a difficult optimization problem: there is an especially bad local optimum where the variational posterior always equals the prior and the model does not use the latent variable at all, a kind of "collapse" which is encouraged by the KL divergence term of the objective. In this work, we experiment with another choice of latent distribution, namely the von Mises-Fisher (vMF) distribution, which places mass on the surface of the unit hypersphere. With this choice of prior and posterior, the KL divergence term now only depends on the variance of the vMF distribution, giving us the ability to treat it as a fixed hyperparameter. We show that doing so not only averts the KL collapse, but consistently gives better likelihoods than Gaussians across a range of modeling conditions, including recurrent language modeling and bag-of-words document modeling. An analysis of the properties of our vMF representations shows that they learn richer and more nuanced structures in their latent representations than their Gaussian counterparts.
Motivation & Objective
- Address the persistent KL collapse problem in text VAEs, where the posterior collapses to the prior and the latent variable becomes unused.
- Overcome the brittleness of standard VAE optimization by structuring the KL divergence as a fixed hyperparameter via a vMF prior.
- Improve generative modeling performance on text by enabling more effective use of the latent code while maintaining stable training.
- Investigate whether vMF-based latent spaces capture richer structural information—especially word order—than Gaussian counterparts.
- Demonstrate that fixed 𝜅 values lead to more robust and transferable performance across diverse NLP modeling settings.
Proposed method
- Replace the standard multivariate Gaussian prior with a von Mises-Fisher (vMF) distribution on the unit hypersphere, parameterized by mean direction 𝝁 and concentration 𝜅.
- Fix the concentration parameter 𝜅 as a hyperparameter, making the KL divergence between posterior and prior independent of the encoder’s output and thus structurally immune to collapse.
- Use a recognition model (encoder) to infer the posterior qϕ(z|x) as a vMF distribution with learned mean direction and fixed 𝜅.
- Train the model end-to-end using the standard VAE objective (ELBO), with differentiable gradients through the vMF KL divergence via modified Bessel functions.
- Apply the vMF VAE to two tasks: RNN-based language modeling and bag-of-words document modeling, using both standard and inputless architectures.
- Evaluate performance using held-out log likelihood and perplexity, and analyze latent representations for structural sensitivity (e.g., to word order).
Experimental results
Research questions
- RQ1Can fixing the concentration parameter 𝜅 in a vMF prior prevent KL collapse in text VAEs, where the latent variable is otherwise unused?
- RQ2Does using a vMF prior lead to consistently better likelihoods than Gaussian VAEs across diverse text modeling tasks and architectures?
- RQ3How do vMF-based latent representations compare to Gaussian ones in capturing nuanced linguistic structure, such as word order?
- RQ4Is the performance of the vMF VAE robust to hyperparameter choices of 𝜅, and do optimal values transfer across different modeling settings?
- RQ5Does learning 𝜅 end-to-end reintroduce the KL collapse problem, or does fixing it remain the superior optimization strategy?
Key findings
- Fixing the concentration parameter 𝜅 in the vMF prior prevents KL collapse entirely, as the KL divergence becomes a fixed hyperparameter independent of the encoder.
- The vMF VAE achieves significantly better held-out log likelihood and lower perplexity than Gaussian VAEs across both RNN language modeling and bag-of-words document modeling tasks.
- The model with fixed 𝜅 achieves higher likelihoods even with higher KL divergence values, indicating more effective utilization of the latent code.
- A wide range of fixed 𝜅 values (e.g., 10 to 100) yield strong performance, and optimal values transfer across comparable tasks (e.g., Standard vs. Inputless settings).
- Learning 𝜅 end-to-end reintroduces KL collapse, as the objective encourages minimal 𝜅 values; clipping is required, and performance degrades compared to fixed 𝜅.
- Analysis shows that vMF representations are more sensitive to word order and capture richer structural information than Gaussian counterparts, suggesting better inductive bias for sequential data.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.