NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Back-off language model compression

Boulos Harb, Ciprian Chelba, Jeffrey Dean, Sanjay GhemawatInterspeech 2009

Introduction

In Automatic Speech Recognition (ASR), the performance of a system is heavily dependent on the scale of its language models (LMs). As these models grow to encompass billions of n-grams, they frequently exceed the RAM capacity of standard production servers. Traditionally, this has been addressed through pruning—which can double perplexity and hurt accuracy—or lossy compression schemes like Bloom filters, which introduce potential errors. This paper presents a lossless compression method that represents the underlying trie structure of an LM as dense integer arrays, enabling massive models to fit into memory without sacrificing accuracy.

Methodology

The researchers propose a novel representation of the LM "skeleton" using two dense arrays of integers: rmw (rightmost word), which stores vocabulary indices, and acc (cumulative diversity), which maps n-grams to their children in the trie. By converting the graph-based trie into linear arrays, the problem becomes one of integer array compression. Three primary block-compression techniques were evaluated:

  1. GroupVar: A variable-length encoding that processes numbers in groups of four, using a single byte to tag the length of each entry for high-speed decoding.
  2. RandomAccess: Designed for monotonically increasing values, storing a base value and small offsets to maintain $O(1)$ access time.
  3. CompressedArray: An aggressive approach using Huffman coding to treat array values as a sequence of symbols, prioritizing space over speed.

Additionally, the "payload" (probabilities and back-off weights) was quantized from 4-byte floats to 1-byte integers, providing a significant baseline reduction in memory footprint.

Experimental Results

The techniques were tested on two Google datasets: Switchboard (SWB) and the larger Google Search by Voice (GSV) model. The results highlight a critical trade-off between the representation rate (bytes per n-gram) and lookup latency.

Trade-off between representation rate and lookup time for the Google Search by Voice (GSV) language model.

As shown in the performance curves, GroupVar and RandomAccess provide a "sweet spot" for production environments, reducing memory usage by approximately 70% while maintaining lookup speeds within a 3x factor of uncompressed models. In contrast, CompressedArray achieves the highest compression but at a significant cost to real-time performance.

Detailed performance metrics for various compression techniques and block lengths.

Key Insights and Conclusion

The regularity of sorted n-gram data—specifically the presence of many identical or slowly increasing values—is what allows these block-compression methods to be so effective. While standard uncompressed models require 14–16 bytes per n-gram, the proposed methods can reduce this to just 3–4 bytes. This makes billion-scale language models feasible on standard hardware with roughly 3–4 GB of RAM.

While the most aggressive compression methods (up to 56x slowdown) are currently unsuitable for high-throughput real-time systems, the more balanced approaches like GroupVar are viable for modern ASR decoders. Future work will explore optimizing decoders to share block-decoding work and combining these lossless methods with intelligent pruning strategies.

Summary updated

BibTeX
@inproceedings{harb2009back,
  author = {Boulos Harb and Ciprian Chelba and Jeffrey Dean and Sanjay Ghemawat},
  title = {{Back-off language model compression}},
  booktitle = {Interspeech},
  year = {2009},
  doi = {10.21437/interspeech.2009-113},
}
Figure