Skip to main content
QUICK REVIEW

[Paper Review] Compressing Neural Language Models by Sparse Word Representations

Yunchuan Chen, Lili Mou|arXiv (Cornell University)|Oct 13, 2016
Topic ModelingComputer Science28 references11 citations
TL;DR

This paper proposes a compressed neural language model that represents rare words via sparse linear combinations of frequent word embeddings, drastically reducing parameter growth with vocabulary size. By leveraging sparse codes and a novel ZRegression module for stable NCE training, the model achieves lower perplexity and up to 80% memory reduction compared to standard LMs, even outperforming the uncompressed baseline.

ABSTRACT

Neural networks are among the state-of-the-art techniques for language modeling. Existing neural language models typically map discrete words to distributed, dense vector representations. After information processing of the preceding context words by hidden layers, an output layer estimates the probability of the next word. Such approaches are time- and memory-intensive because of the large numbers of parameters for word embeddings and the output layer. In this paper, we propose to compress neural language models by sparse word representations. In the experiments, the number of parameters in our model increases very slowly with the growth of the vocabulary size, which is almost imperceptible. Moreover, our approach not only reduces the parameter space to a large extent, but also improves the performance in terms of the perplexity measure.

Motivation & Objective

  • To address the high memory and parameter requirements of standard neural language models, especially in resource-constrained environments.
  • To improve parameter efficiency by reducing the growth of model parameters with increasing vocabulary size.
  • To enhance representation learning for rare words, which are poorly tuned in standard models due to infrequent gradient updates.
  • To stabilize the training of noise-contrastive estimation (NCE) via a novel ZRegression mechanism for better convergence and performance.
  • To enable efficient deployment of neural language models on mobile and embedded systems through parameter compression.

Proposed method

  • Represents rare word embeddings as sparse linear combinations (4–8 non-zero coefficients) of frequent word embeddings, reducing parameter growth with vocabulary size.
  • Uses a pre-computed sparse coding scheme to map rare words to weighted sums of common word vectors, preserving semantic meaning through sparsity.
  • Applies the same sparse coding strategy to the output layer weights, compressing the prediction subnet similarly to word embeddings.
  • Introduces ZRegression—a regression head predicting the normalization factor $ Z_h $ in NCE—to stabilize training and improve convergence.
  • Employs noise-contrastive estimation (NCE) with ZRegression for end-to-end training of the compressed model on large-scale corpora.
  • Trains the model using an LSTM-based recurrent encoder to capture long-range context, with all embeddings and output weights compressed via sparse codes.

Experimental results

Research questions

  • RQ1Can rare word representations be effectively compressed using sparse linear combinations of frequent word embeddings without significant performance loss?
  • RQ2Does parameter compression via sparse coding lead to reduced memory consumption that grows sublinearly with vocabulary size?
  • RQ3Can the proposed ZRegression mechanism stabilize NCE training and improve model performance compared to standard NCE?
  • RQ4Does the compressed model achieve better perplexity than the uncompressed baseline, especially on rare words?
  • RQ5To what extent can the compressed model be scaled to large vocabularies while maintaining or improving performance?

Key findings

  • The compressed model reduces memory consumption by up to 80% compared to the uncompressed LSTM-z model, with minimal growth in parameter count as vocabulary size increases.
  • LSTM-z,w and LSTM-z,wb models outperform the baseline LSTM-z across all vocabulary sizes, with LSTM-z,w achieving a 79.75 perplexity on a 50k-vocabulary test set.
  • The model achieves lower perplexity than the baseline even with significantly fewer parameters, indicating improved generalization and better rare word modeling.
  • ZRegression stabilizes the NCE training process, preventing divergence and reducing loss oscillations, especially in later training stages.
  • The sparse codes (4–8 non-zero values per word) capture meaningful semantics, as evidenced by improved performance and stable training.
  • The method enables deployment of large-scale language models on memory-constrained devices due to near-constant parameter growth with vocabulary size.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.