about
Language Modeling Is Compression (arxiv.org)
3 points by nathandaly on Sep 30, 2023 | hide | past | pdf | 1 comment on HN

In plain words: A language model that guesses what comes next in text well can double as a compressor, since each correct guess lets it store data in fewer bits. Tested on images, a big text model squeezed them to 43.4% of raw size, beating PNG's 58.5%.

Abstract

It has long been established that predictive models can be transformed into lossless compressors and vice versa. Incidentally, in recent years, the machine learning community has focused on training increasingly large and powerful self-supervised (language) models. Since these large language models exhibit impressive predictive capabilities, they are well-positioned to be strong compressors. In this work, we advocate for viewing the prediction problem through the lens of compression and evaluate the compression capabilities of large (foundation) models. We show that large language models are powerful general-purpose predictors and that the compression viewpoint provides novel insights into scaling laws, tokenization, and in-context learning. For example, Chinchilla 70B, while trained primarily on text, compresses ImageNet patches to 43.4% and LibriSpeech samples to 16.4% of their raw size, beating domain-specific compressors like PNG (58.5%) or FLAC (30.3%), respectively. Finally, we show that the prediction-compression equivalence allows us to use any compressor (like gzip) to build a conditional generative model.

Grégoire Delétang, Anian Ruoss, Paul-Ambroise Duquenne, Elliot Catt, Tim Genewein, Christopher Mattern, Jordi Grau-Moya, Li Kevin Wenliang, Matthew Aitchison, Laurent Orseau, Marcus Hutter, Joel Veness
arXiv:2309.10668 · cs.LG, cs.AI, cs.CL, cs.IT · submitted Sep 19, 2023 · updated Mar 18, 2024
abstract · pdf · html

add comment on HN
Also discussed: Sep 2023 (5 points, 0 comments)

Isn't that what we already knew? Language models "predict", and prediction is compression.