Skip to main content
QUICK REVIEW

[Paper Review] Adaptive Pruning of Neural Language Models for Mobile Devices

Raphael Tang, Jimmy Lin|arXiv (Cornell University)|Sep 27, 2018
Advanced Neural Network ApplicationsComputer Science19 references4 citations
TL;DR

This paper proposes adaptive pruning of quasi-recurrent neural networks (QRNNs) for mobile language modeling, enabling runtime tuning of accuracy-efficiency tradeoffs via inference-time pruning techniques. It demonstrates that $L_0$ regularization pruning achieves the best perplexity-accuracy balance, reducing energy use by 40% with only a 17% relative perplexity increase compared to state-of-the-art models on a Raspberry Pi.

ABSTRACT

Neural language models (NLMs) exist in an accuracy-efficiency tradeoff space where better perplexity typically comes at the cost of greater computation complexity. In a software keyboard application on mobile devices, this translates into higher power consumption and shorter battery life. This paper represents the first attempt, to our knowledge, in exploring accuracy-efficiency tradeoffs for NLMs. Building on quasi-recurrent neural networks (QRNNs), we apply pruning techniques to provide a "knob" to select different operating points. In addition, we propose a simple technique to recover some perplexity using a negligible amount of memory. Our empirical evaluations consider both perplexity as well as energy consumption on a Raspberry Pi, where we demonstrate which methods provide the best perplexity-power consumption operating point. At one operating point, one of the techniques is able to provide energy savings of 40% over the state of the art with only a 17% relative increase in perplexity.

Motivation & Objective

  • To explore the accuracy–efficiency tradeoff space in neural language models (NLMs) for mobile devices, where higher accuracy typically increases power consumption.
  • To enable runtime, adaptive control of model efficiency and accuracy using pruning techniques that can be tuned per inference request.
  • To evaluate energy consumption and latency on real mobile hardware (Raspberry Pi) rather than relying on theoretical FLOP estimates.
  • To propose a lightweight method to recover some perplexity loss using minimal additional memory via single-rank weight updates.
  • To benchmark and compare multiple pruning strategies (e.g., random, filter norm, mean activation, $L_0$) in terms of both perplexity and energy efficiency.

Proposed method

  • Applies inference-time pruning to pre-trained QRNNs, allowing dynamic adjustment of model complexity during deployment.
  • Uses four pruning strategies: random filter pruning, filter norm pruning, mean activation pruning, and $L_0$ regularization.
  • Employs a single-rank weight update technique to recover lost performance with minimal memory overhead (less than 120 KB for WT103 model).
  • Measures energy consumption and latency on a Raspberry Pi to evaluate real-world efficiency, correlating FLOPs with power and latency.
  • Ties input and output layer weights in QRNNs to reduce parameter count and memory footprint, enhancing efficiency.
  • Evaluates pruning across multiple operating points by adjusting the percentage of FLOPs relative to the unpruned model (e.g., 100%, 80%, 70%, 60%, 50%).

Experimental results

Research questions

  • RQ1Can inference-time pruning provide a tunable accuracy–efficiency knob for neural language models on mobile devices?
  • RQ2Which pruning strategy—random, filter norm, mean activation, or $L_0$ regularization—yields the best tradeoff between perplexity and energy efficiency?
  • RQ3To what extent can a single-rank weight update recover performance loss from pruning with negligible memory cost?
  • RQ4Is there a strong linear relationship between FLOPs, latency, and energy consumption on mobile hardware?
  • RQ5Can real-world energy and latency measurements on a Raspberry Pi accurately reflect the efficiency of NLMs in mobile deployment?

Key findings

  • The $L_0$ regularization pruning method achieves the best perplexity-accuracy tradeoff, outperforming random, filter norm, and mean activation pruning across both Penn Treebank and WikiText-103 datasets.
  • Random pruning performs surprisingly well, outperforming filter norm and mean activation pruning, and regains perplexity more effectively with a single-rank update.
  • Filter norm pruning performs worse than random pruning in all evaluated cases, suggesting it offers no practical benefit over random pruning.
  • A strong linear relationship exists between FLOPs and both latency and energy consumption, with Pearson’s $r^2 = 0.98$ on the Raspberry Pi.
  • The single-rank update technique recovers performance with less than 120 KB additional memory, making it viable for mobile deployment.
  • At one operating point, the method achieves 40% energy savings over the state of the art with only a 17% relative increase in perplexity.

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.