Skip to main content
QUICK REVIEW

[Paper Review] Progress and Tradeoffs in Neural Language Models

Raphael Tang, Jimmy Lin|arXiv (Cornell University)|Nov 2, 2018
Topic ModelingComputer Science21 references5 citations
TL;DR

This paper investigates the quality–performance tradeoff in neural language models (NLMs) versus traditional Kneser-Ney (KN-5) language models, demonstrating that state-of-the-art NLMs like AWD-LSTM and QRNN achieve 2.5× lower perplexity but incur 49× higher inference latency and 32× greater energy consumption on mobile devices like the Raspberry Pi, highlighting a critical performance cost for significant accuracy gains.

ABSTRACT

In recent years, we have witnessed a dramatic shift towards techniques driven by neural networks for a variety of NLP tasks. Undoubtedly, neural language models (NLMs) have reduced perplexity by impressive amounts. This progress, however, comes at a substantial cost in performance, in terms of inference latency and energy consumption, which is particularly of concern in deployments on mobile devices. This paper, which examines the quality-performance tradeoff of various language modeling techniques, represents to our knowledge the first to make this observation. We compare state-of-the-art NLMs with "classic" Kneser-Ney (KN) LMs in terms of energy usage, latency, perplexity, and prediction accuracy using two standard benchmarks. On a Raspberry Pi, we find that orders of increase in latency and energy usage correspond to less change in perplexity, while the difference is much less pronounced on a desktop.

Motivation & Objective

  • To quantify the performance tradeoffs between neural language models (NLMs) and non-neural Kneser-Ney (KN-5) language models in real-world deployment scenarios.
  • To evaluate the impact of model complexity on inference latency and energy consumption, particularly on mobile platforms such as the Raspberry Pi.
  • To assess whether the gains in perplexity and next-word prediction accuracy from NLMs justify their substantial computational costs in mobile applications.
  • To compare the performance of AWD-LSTM and QRNN models against KN-5 across multiple benchmarks, including Penn Treebank and WikiText-103.
  • To provide empirical evidence of the quality–performance tradeoff in language modeling, emphasizing the need for system-aware model selection in resource-constrained environments.

Proposed method

  • Compared Kneser-Ney 5-gram (KN-5) with state-of-the-art NLMs: AWD-LSTM and QRNN, using standard benchmarks (Penn Treebank and WikiText-103).
  • Measured inference latency and energy consumption per query on a Raspberry Pi (ARM-based, representative of mobile devices) and a desktop CPU/GPU setup.
  • Used perplexity and R@3 (Recall at 3) as primary quality metrics, with R@3 serving as a proxy for next-word prediction accuracy in keyboard applications.
  • Collected performance data across multiple model variants, including KN-5, AWD-LSTM, and QRNN, on both validation and test sets.
  • Analyzed the log perplexity–R@3 relationship to assess whether perplexity serves as a reliable proxy for practical prediction quality.
  • Reported results in terms of latency (ms/query), energy usage (mJ/query), perplexity, and R@3 to enable direct comparison of quality and performance tradeoffs.

Experimental results

Research questions

  • RQ1How do the inference latency and energy consumption of state-of-the-art NLMs compare to those of the non-neural KN-5 model on mobile hardware?
  • RQ2To what extent do improvements in perplexity from NLMs translate into measurable gains in next-word prediction accuracy (R@3) on real-world benchmarks?
  • RQ3What is the magnitude of the quality–performance tradeoff when deploying NLMs on mobile devices versus desktop systems?
  • RQ4Does the relationship between perplexity and R@3 remain linear or predictable across different language models and datasets?
  • RQ5Can the performance cost of NLMs be mitigated through hardware acceleration, and how does this affect the tradeoff on desktop versus mobile platforms?

Key findings

  • On the Raspberry Pi, a 2.5× reduction in perplexity from KN-5 to QRNN resulted in a 49× increase in inference latency (from 7 ms to 348 ms per query) and a 32× increase in energy consumption (from 6 mJ to 192 mJ per query).
  • The AWD-LSTM model achieved a 2.5× perplexity reduction over KN-5 on the Penn Treebank, but required 223 ms/query and 295 mJ/query on the Raspberry Pi, making it 32× slower and 50× more energy-intensive.
  • On the desktop, NLMs were only 9× slower than KN-5 on CPU and 2× slower on GPU, indicating that performance degradation is most acute on mobile platforms.
  • The wt103-qrnn model on the Raspberry Pi required over 1.2 seconds per prediction, rendering it unusable for real-time applications like predictive text input.
  • Despite significant improvements in perplexity, the gains in R@3 were modest: 22–34% improvement across datasets, suggesting limited practical benefit for keyboard applications.
  • The log perplexity–R@3 relationship was strongly linear (r² = 0.88 on PTB, r² = 0.93 on WT103), indicating that log perplexity is a reliable proxy for next-word prediction quality.

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.