NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Efficient Language Modeling with Automatic Relevance Determination in Recurrent Neural Networks

Maxim Kodryan, Artem M. Grachev, Dmitry I. Ignatov, Dmitry P. Vetrov

Introduction

In word-level language modeling, the memory footprint of Recurrent Neural Networks (RNNs) is dominated by "vocabulary-facing" layers: the input embedding and the output softmax layers. As vocabularies grow to tens of thousands of unique words, these layers often account for more than a third of the total model size. While many weights in these matrices are redundant, naive pruning often degrades performance. This paper introduces a principled Bayesian approach using Automatic Relevance Determination (ARD) to identify and remove unnecessary weights during training, achieving massive compression with minimal impact on accuracy.

Methodology

The authors leverage a Bayesian framework to drive sparsity in a mathematically rigorous way.

Automatic Relevance Determination (ARD)

ARD places a Gaussian prior on every weight, where the variance is a tunable hyperparameter. During optimization, if the data indicates a weight is not useful, its variance is driven toward zero, effectively pruning it from the network.

Adapting DSVI for Sequential Data

A key technical contribution is the adaptation of Doubly Stochastic Variational Inference (DSVI) for non-iid sequential data. In standard classification, weights might be sampled for every object. For language modeling, the authors propose sampling weights once per mini-batch to maintain consistency across dependent word sequences. To prevent premature pruning, they utilize KL Cost Annealing, gradually increasing the influence of the sparsity-inducing loss term over several epochs.

Sparsity and cross-entropy as a function of weight thresholding, alongside the log-density distribution of relevance parameters (log λ).

As shown in the distribution of relevance parameters, the model naturally pushes a vast majority of weights toward high negative log-relevance values (effectively zero), allowing for high sparsity with a negligible increase in cross-entropy until a critical threshold is reached.

Experimental Results

The method was evaluated on the Penn Treebank (PTB) and Wikitext-2 benchmarks. The results demonstrate that ARD can remove over 90% of parameters in the largest layers while preserving model quality.

Key Findings

  • Extreme Sparsity: In standard LSTM models, the authors removed between 97.8% and 98.0% of the weights in the softmax layer.
  • Synergy with Weight Tying: Combining ARD with weight-tying (sharing matrices between input and output layers) significantly improved the quality of compressed models compared to untied versions.
  • Total Model Reduction: For tied-weight models on Wikitext-2, the total parameter count was reduced by 69.3% (from 28.4M to 8.7M) with minimal loss in perplexity.
Performance comparison of DSVI-ARD against original models on PTB and Wikitext-2 datasets, highlighting significant parameter reduction.

Conclusion

This work demonstrates that ARD provides a theoretically sound alternative to heuristic pruning and Variational Dropout. By accounting for the sequential nature of language data, the authors show that RNNs are inherently redundant and can be compressed by nearly an order of magnitude in their largest layers. Future work includes scaling these Bayesian techniques to Transformer architectures like GPT and BERT, which face even greater memory challenges.

Summary updated

BibTeX
@inproceedings{kodryan2019efficient,
  author = {Maxim Kodryan and Artem M. Grachev and Dmitry I. Ignatov and Dmitry P. Vetrov},
  title = {{Efficient Language Modeling with Automatic Relevance Determination in Recurrent Neural Networks}},
  booktitle = {RepL4NLP @ ACL},
  year = {2019},
  doi = {10.18653/v1/w19-4306},
}
Figure