Compression is prediction(ngrok.com)
659 points by nikolay 10 days ago | 288 comments
tl;dr: Compression and language modeling are fundamentally the same problem: both rely on predicting symbol probabilities, where better predictions yield fewer bits per symbol (Shannon entropy). Entropy coders like arithmetic coding already hit near-optimal compression given a probability distribution, so gains now come from better models—and LLMs happen to be state-of-the-art predictors, trained to minimize cross-entropy (the same math). LLMs can compress dramatically better than gzip (e.g., GPT-2 hitting 10% vs. 24% on sample text), but their multi-gigabyte size and compute cost make them impractical for everyday use like HTTP responses.
HN Discussion:
  • The compression-prediction equivalence is a well-established idea with existing academic foundations and related work
  • Compression fundamentally equals understanding/intelligence because finding patterns is what both do
  • The article conflates probability with proportion and oversimplifies the mathematical equivalence
  • The equivalence breaks down when generalization to different distributions matters, not just fitting known data
  • ~Prediction implies compression but compression can exceed prediction by using global transformations beyond sequential prediction