[Paper Review] Slim Embedding Layers for Recurrent Neural Language Models
This paper proposes a simple, trainable parameter-sharing method that compresses both input and output embedding layers in recurrent neural language models by randomly sharing structured sub-vectors, reducing model size by up to 90% while maintaining comparable perplexity and BLEU scores. The method enables compact, efficient models without significant performance loss.
Recurrent neural language models are the state-of-the-art models for language modeling. When the vocabulary size is large, the space taken to store the model parameters becomes the bottleneck for the use of recurrent neural language models. In this paper, we introduce a simple space compression method that randomly shares the structured parameters at both the input and output embedding layers of the recurrent neural language models to significantly reduce the size of model parameters, but still compactly represent the original input and output embedding layers. The method is easy to implement and tune. Experiments on several data sets show that the new method can get similar perplexity and BLEU score results while only using a very tiny fraction of parameters.
Motivation & Objective
- To address the high memory cost of large vocabulary sizes in recurrent neural language models.
- To reduce model parameter size in input and output embedding layers without sacrificing performance.
- To develop a simple, trainable compression technique that is easy to implement and tune.
- To explore whether random parameter sharing in embeddings acts as a regularizer, improving generalization.
- To enable deployment of compact language models on memory-constrained devices and distributed systems.
Proposed method
- The method uses random, fixed assignment of sub-vectors to words in both input and output embedding layers.
- Each word’s embedding is formed by concatenating multiple shared sub-vectors, reducing the total number of learnable parameters.
- The sub-vector assignments are randomly initialized and fixed during training, while the sub-vector weights are learned end-to-end.
- The approach is applied independently to input and output embedding layers, enabling significant compression.
- The method leverages dynamic programming to efficiently compute dot products during inference, improving computational efficiency.
- The technique is compatible with existing training objectives and can be used with noise contrastive estimation (NCE) for training.
Experimental results
Research questions
- RQ1Can random, structured parameter sharing in embedding layers significantly reduce model size with minimal performance degradation?
- RQ2Does the proposed compression method maintain competitive perplexity and BLEU scores compared to full-sized models?
- RQ3Can the method serve as a regularizer, improving generalization in low-resource or overfitting-prone scenarios?
- RQ4How does the computational efficiency of the compressed model compare to baseline and HashNet under CPU and GPU workloads?
- RQ5Can the method be effectively applied to real-world tasks like machine translation reranking?
Key findings
- The proposed method reduced model parameters by up to 90% while maintaining perplexity within 1-2 points of the full-sized model on the Penn Treebank dataset.
- On the WMT12 translation task, the compressed model achieved a BLEU score of 26.25, only slightly lower than the full model’s 26.11, demonstrating strong transferability.
- The SE model achieved inference time of 0.7 seconds on CPU and 25 milliseconds on GPU, outperforming HashNet (80.6s CPU) and approaching the uncompressed model (2.7s CPU).
- The compressed model used significantly less memory during inference due to its compact form, enabling deployment on memory-constrained devices.
- The method showed improved generalization in some settings, suggesting it acts as a form of regularization.
- The approach was effective even when compressing input and output layers to 1/8 and 1/4 of original size, respectively, with minimal loss in performance.
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.