Top
Best
New

Posted by nikolay 17 hours ago

Compression is prediction(ngrok.com)
585 points | 236 commentspage 5
bob1029 14 hours ago|
How about dictionary based compression as a counter example? Or the zig zag encoding scheme used in JPEG? I find it difficult to cast some of the things that effectively compress data as prediction.
pornel 14 hours ago||
Dictionary-based compression is based on prediction that recently seen words will be used again. That happens to be generally true for lots of datasets, including human languages (zipf distribution).

JPEG's zig-zag is a primitive for quantization, throwing data away based on rough approximation of human perception and biology. That isn't compression itself. However, the rounded and zeroed-out data is then compressed using a combination of RLE and Huffman, set up to predict the data will have lots of zeroes and few other distinct values (which the earlier step forces to be true). Or if you think about the system as a whole, you could say that JPEG predicts images will be blocky low-frequency patterns of DCT.

sgsjchs 12 hours ago||
> dictionary based compression

That corresponds to PCFG models.

SpyCoder77 13 hours ago||
Something Ngrok is doing is working, because first they manage to get Sam Rose of samwho.com and now this? At this point I care more about their blog than their products
throw290483 14 hours ago||
I see it that prediction is a form of compression.

Say you have a computer file composed of two parts, the first represents the setup of an experiment, and the second is the data produced by the experiment.

If you have a good theory relating to this type of experiment, then you can predict much of the second part of the file. So you only need to store the first part and possibly some corrections to the least significant bits of some of the parts of the second part of the file.

Thus with good prediction, you can compress this type of file.

pornel 14 hours ago|
Another example is encrypted data. Statistically, encrypted data is indistinguishable from random. Truly random data is impossible to compress losslessly.

But if you had a predictor so smart that it could crack the encryption key, it could start predicting the rest of the encrypted stream, and therefore compress it.

Razengan 16 hours ago||
3Blue1Brown - "Compression is Intelligence": https://www.youtube.com/watch?v=l6DKRf-fAAM
harhargange 10 hours ago||
Physics laws are the ultimate form of compression because they are so universal and say so much about so many things in few words, or a formula. This is why Newton's laws were a big achievement. And they enabled predicting the behavior of machines and started the industrial revolution. We are at yet another inflection point.
japgolly 10 hours ago||
Awesome read and absolutely loved the interactivity. A lot of effort was put into this.
avyfain 11 hours ago||
Recently I wrote a blog post[0] expanding on a similar idea from the angle of ancient Greek philosophy, particularly Parmenides: to think is to compress.

[0]: https://faingezicht.com/articles/2026/05/28/shape-of-what-we...

andai 17 hours ago||
See also: Bellard's Lossless Data Compression With Neural Networks

https://news.ycombinator.com/item?id=19589848

https://news.ycombinator.com/item?id=27244004

adamgordonbell 16 hours ago|
And also the LLM version, and LLMZip

https://bellard.org/ts_zip/

https://arxiv.org/abs/2306.04050

speedgoose 2 hours ago||
I tried to reproduce those results, at least in terms of compression ratios, not speed.

However I would say that testing on alice29, enwiki8, text8 data is kinda cheating. Alice in Wonderland and Wikipedia are very likely part of the training data of the LLM models used there.

So I tried on HN comments from a few days ago, extracted from the text column of the public HN bigquery dataset.

Using RWKV v7 0.1B instead of RWKV v4, I get 0.962 bits per byte on alice29, and 1.156 bits per bytes on the HN comments. Still a lot better than 2.826 bits per bytes of xz level 9.

adamgordonbell 55 minutes ago||
Oh wow, so it worked pretty well on data it hasn't seen. That expected but cool to reproduce.

Have you seen this leaderboard of sorts[1], and this proposal to change hutter prize[2]?

I think it's a really clever idea that you could measure an LLM's prediction abilities and language understanding by some sort of held-out compression metric because file sizes are very concrete. They are already beating shannon's numbers using a human prediction for compression, from what i can see.

https://github.com/hkust-nlp/llm-compression-intelligence

https://gwern.net/hutter-prize

antonvs 2 hours ago|
I tried asking a zip file to write a program for me but it did nothing.

I’m starting to think that compression is not, in fact, prediction.

More comments...