Skip to main content
QUICK REVIEW

[Paper Review] GroupReduce: Block-Wise Low-Rank Approximation for Neural Language Model Shrinking

Patrick H. Chen, Si Si|arXiv (Cornell University)|Jun 18, 2018
Topic ModelingComputer Science16 citations
TL;DR

GroupReduce proposes a block-wise, frequency-aware low-rank approximation method for compressing neural language model embedding and softmax matrices by grouping high-frequency words into clusters and applying weighted low-rank approximation per block. It achieves up to 26× compression on embedding and softmax matrices when combined with quantization, reducing model size by 12.8× overall with minimal perplexity degradation on the One-Billion-Word benchmark.

ABSTRACT

Model compression is essential for serving large deep neural nets on devices with limited resources or applications that require real-time responses. As a case study, a state-of-the-art neural language model usually consists of one or more recurrent layers sandwiched between an embedding layer used for representing input tokens and a softmax layer for generating output tokens. For problems with a very large vocabulary size, the embedding and the softmax matrices can account for more than half of the model size. For instance, the bigLSTM model achieves state-of- the-art performance on the One-Billion-Word (OBW) dataset with around 800k vocabulary, and its word embedding and softmax matrices use more than 6GBytes space, and are responsible for over 90% of the model parameters. In this paper, we propose GroupReduce, a novel compression method for neural language models, based on vocabulary-partition (block) based low-rank matrix approximation and the inherent frequency distribution of tokens (the power-law distribution of words). The experimental results show our method can significantly outperform traditional compression methods such as low-rank approximation and pruning. On the OBW dataset, our method achieved 6.6 times compression rate for the embedding and softmax matrices, and when combined with quantization, our method can achieve 26 times compression rate, which translates to a factor of 12.8 times compression for the entire model with very little degradation in perplexity.

Motivation & Objective

  • To address the high memory footprint of large vocabulary embedding and softmax matrices in neural language models, which can exceed 90% of total parameters.
  • To improve upon standard compression techniques like low-rank approximation and pruning, which underperform on word embedding matrices due to their unique statistical structure.
  • To exploit the power-law frequency distribution of words (Zipf’s law) to design a more effective compression strategy tailored to language model layers.
  • To achieve high compression rates on both input embedding and output softmax matrices simultaneously, enabling efficient deployment on memory-constrained devices.
  • To demonstrate that block-wise, weighted low-rank approximation significantly outperforms existing methods in compression efficiency and accuracy retention.

Proposed method

  • Group words into frequency-based blocks using their occurrence counts in the training data, leveraging the power-law distribution of word frequencies.
  • Apply weighted low-rank approximation to each block, where the weighting emphasizes high-frequency words to preserve their representation quality.
  • Iteratively refine cluster assignments and low-rank approximations to improve subspace projection quality for each block.
  • Use the resulting low-rank matrices as compressed replacements for the original embedding and softmax matrices in the model.
  • Combine the GroupReduce compression with post-training quantization to further reduce memory usage.
  • Retrain the model with the compressed layers fixed initially, then fine-tune all parameters to recover performance.

Experimental results

Research questions

  • RQ1Can block-wise, frequency-aware low-rank approximation significantly improve compression efficiency for neural language model embedding and softmax matrices compared to standard low-rank methods?
  • RQ2Does exploiting the power-law distribution of word frequencies enhance compression quality and maintain model performance?
  • RQ3How does GroupReduce compare to state-of-the-art compression techniques like pruning and quantization in terms of compression rate and perplexity degradation?
  • RQ4Can GroupReduce achieve high compression on both input and output matrices simultaneously, leading to substantial overall model size reduction?
  • RQ5What is the optimal number of clusters for block-wise approximation, and how sensitive is performance to this hyperparameter?

Key findings

  • On the One-Billion-Word (OBW) dataset, GroupReduce achieved 6.6× compression on the embedding and softmax matrices with minimal perplexity increase (from 31.04 to 33.61).
  • When combined with quantization, GroupReduce achieved 26× compression on the embedding and softmax matrices, reducing memory usage by over 5GB.
  • The overall model compression rate reached 12.8× on the OBW-bigLSTM model, with only a slight increase in perplexity from 31.04 to 33.61.
  • On the DE-EN neural machine translation task, GroupReduce achieved 24× compression on embedding and softmax matrices, with BLEU score dropping only from 30.33 to 29.68 after retraining.
  • GroupReduce outperformed deep compositional coding by a factor of two in compression rate on the input embedding layer, and could compress both input and output matrices, unlike that method.
  • The method was robust to the number of clusters, with minimal performance variation across 5 to 30 clusters, and performed best with 20 clusters on the large OBW vocabulary.

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.