[Paper Review] Variational Smoothing in Recurrent Neural Network Language Models
This paper reframes data noising in RNN language models as variational inference in Bayesian RNNs, proposing variational smoothing that uses the mean of the variational distribution at test time for improved generalization. It introduces tied embedding smoothing and element-wise smoothing, achieving state-of-the-art results on Penn Treebank and Wikitext-2 by outperforming standard data noising and dropout.
We present a new theoretical perspective of data noising in recurrent neural network language models (Xie et al., 2017). We show that each variant of data noising is an instance of Bayesian recurrent neural networks with a particular variational distribution (i.e., a mixture of Gaussians whose weights depend on statistics derived from the corpus such as the unigram distribution). We use this insight to propose a more principled method to apply at prediction time and propose natural extensions to data noising under the variational framework. In particular, we propose variational smoothing with tied input and output embedding matrices and an element-wise variational smoothing method. We empirically verify our analysis on two benchmark language modeling datasets and demonstrate performance improvements over existing data noising methods.
Motivation & Objective
- To provide a theoretical foundation for data noising in RNN language models by linking it to Bayesian inference and variational inference.
- To improve prediction in RNN language models by using the mean of the variational distribution instead of the mode, as a more principled approach.
- To extend data noising with principled variants such as tied input-output embedding smoothing and element-wise variational smoothing.
- To empirically validate that the proposed variational smoothing methods improve perplexity on standard language modeling benchmarks.
Proposed method
- Reformulates data noising as a Bayesian RNN with a variational distribution composed of mixtures of Gaussians, where mixture weights are derived from corpus statistics like unigram or Kneser-Ney continuation counts.
- Proposes using the expected (mean) output of the variational distribution at test time instead of the mode, leading to more robust predictions.
- Introduces variational smoothing with tied input and output embedding matrices, allowing noise to be applied consistently across input and output spaces.
- Develops element-wise variational smoothing, where each embedding dimension is independently sampled from a variational distribution, enabling fine-grained regularization.
- Derives a data-dependent ℓ₂ regularization coefficient from the KL divergence term in the variational objective, which penalizes frequently sampled parameters more heavily.
- Employs variational dropout in conjunction with the proposed smoothing methods to further improve generalization.
Experimental results
Research questions
- RQ1Can data noising in RNN language models be formally interpreted as a form of Bayesian inference with a specific variational distribution?
- RQ2Does using the mean of the variational distribution at test time yield better performance than using the mode, as in standard data noising?
- RQ3How do tied input-output embedding matrices affect the behavior and performance of variational smoothing in RNN language models?
- RQ4Can element-wise smoothing, where each embedding dimension is independently perturbed, lead to further performance gains despite increased computational cost?
- RQ5How does the choice of proposal distribution (e.g., unigram vs. Kneser-Ney) affect the performance of variational smoothing across different language modeling tasks?
Key findings
- Variational smoothing with mean prediction at test time consistently outperforms standard data noising and dropout on both Penn Treebank and Wikitext-2 datasets.
- On the Penn Treebank, element-wise variational smoothing achieved the best results across all model sizes, with a validation perplexity of 74.5 for the 512-dimensional model.
- For the 1024-dimensional model on Penn Treebank, variational smoothing reduced perplexity to 70.8, outperforming the baseline data noising method.
- The Kneser-Ney variant of variational smoothing outperformed linear interpolation on Penn Treebank, while linear interpolation slightly outperformed Kneser-Ney on Wikitext-2.
- Sampling at test time (instead of using the mean) led to a significant increase in perplexity, confirming that test-time noise is detrimental for RNN language models.
- The method is computationally expensive—training the small model with element-wise smoothing took about one day versus a few hours without it—limiting scalability to larger datasets like Wikitext-2.
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.