← Sat, Nov 28 digest

Language Modeling Is Compression [pdf]

read article ↗ hn thread ↗

Large language models can act as general-purpose lossless compressors via arithmetic coding, outperforming domain-specific formats like PNG and FLAC on images and audio when excluding parameter size.

read it The paper offers a rigorous exploration of the mathematical equivalence between prediction and compression, complete with empirical benchmarks across multiple modalities.

summary

This ICLR 2024 paper investigates the lossless compression capabilities of foundation models using arithmetic coding. The authors demonstrate that models like Chinchilla 70B, despite being trained primarily on text, achieve superior raw compression rates on ImageNet and LibriSpeech compared to domain-specific compressors like PNG and FLAC. However, when factoring in the model parameter size into the adjusted compression rate, the large parameter overhead negates these gains on a 1GB dataset. The study also revisits scaling laws through a compression lens, showing that dataset size imposes hard limits on optimal model sizing. Finally, the work explores how compressors can be turned into conditional generative models.

key points

  1. Chinchilla 70B compresses ImageNet patches to 43.4% and LibriSpeech to 16.4% of raw size, beating PNG (58.5%) and FLAC (30.3%) on raw metrics.
  2. When including model parameters in the compressed output size, the massive parameter overhead makes LLMs less efficient compressors than standard tools for a 1GB dataset.
  3. Viewing scaling laws through compression reveals that dataset size sets a hard limit on optimal model size, as over-scaling increases parameter penalty.

who should read it

Machine learning researchers and engineers interested in information theory, scaling laws, and the intersection of probabilistic modeling and compression.

discussion positive

consensus

Commenters enthusiastically link the paper's thesis to broader philosophical concepts, noting that intelligence is often viewed as data compression and discussing its relevance to frontier model scaling.

pushback

Some commenters point out a crucial catch: comparing LLMs to traditional compressors is misleading if you exclude the massive model weights, which count against the compressed size unless amortized.

best comment by za_creature ↗

Compression ratio is not usually measured including the decompressor code because the latter is usually a small constant. Otherwise it's trivially obvious to compress anything into "0 bytes" by including a giant blob that just so happens to contain the entire file and then some.

The claim that a 70B parameter model obtains a better lossless compression ratio than PNG / FLAC implies one of:

1. the residuals are stored within the model itself which, from a legal standpoint, would constitute derivative work

2. there exists a much better compression algorithm within the model; if this is the …

It highlights the core practical critique regarding whether excluding model parameter size invalidates claims that LLMs beat traditional compressors.

Generated by an LLM from the article and thread. Check the sources before relying on it.