Isn’t the idea of AI precisely to find universal compression from arbitrary input data, at least with LLMs?
Data Compression Explained (2012)
11–20 of 38 posts
Re: Data Compression Explained (2012)
#12Isn’t the idea of AI precisely to find universal compression from arbitrary input data, at least with LLMs?
I think so, specifically lossy compression though. A modern version of the book would include an extra section in the 'Lossy compression' chapter - 'Text' (alongside Images/Video/Audio) that would discuss LLM's.
An LLM can give you a probability distribution for the next token. You can pair that with arithmetic coding to get a lossless compression/decompression algorithm. See https://en.wikipedia.org/wiki/Arithmetic_coding
Re: Data Compression Explained (2012)
#13does anyone have any sources to read about ai-based compression? I remember hearing a lot about "compression is a lot about prediction", but I don't remember reading any practical result
It can and has been done just not very practical. Having a dozen GB language model just to squeeze out few more percent on plaintext compression which already compresses well and is tiny in comparison of images or video is not worth it outside benchmarks. Even superior traditional conpression algorithms are often not used due to insufficient software support. Multigabyte decompressor as big as rest of your OS install…
> But for long term archival fragile formats which depend on huge arbitrary extra knowledge isnt a good idea.
This doesn't need to be a problem: you can and should layer an error correcting code on top.
Re: Data Compression Explained (2012)
#14Isn’t the idea of AI precisely to find universal compression from arbitrary input data, at least with LLMs?
No, LLMs only do this for language. They don't try to do this for arbitrary data.
[1]: https://arxiv.org/abs/2105.13626
Re: Data Compression Explained (2012)
#15The leader boards are from the pre Fabrice Bellard days, btw. Neural network modeling helped finding better patterns in text. Also, you could say the same for the related data search problem. How to prepare data, so that it can most efficiently searched. Smallest encoding vs fastest search. Databases are mostly very, very stupid compared to more data-specific tuned algorithms. Like factor 1000 slower and bigger.
Re: Data Compression Explained (2012)
#16Isn’t the idea of AI precisely to find universal compression from arbitrary input data, at least with LLMs?
However, I believe that is less useful to think that AI "finds an universal compression", than to think that the training of an AI model has the purpose to find a specific lossy data compression method, which is close to optimal for the input data that constitutes the training data set.
One could consider the training algorithm as a universal lossy data compression method, but this view is not useful in practice, because unlike a traditional lossy data compression algorithm, used e.g. for movie or picture compression, which you can use every day to compress many data sets, even in real time on an incoming data stream, the training of an AI model is a very long and expensive operation, which can be done only infrequently and which makes sense only for special important datasets, from which data will be frequently extracted by querying (i.e. AI inference) for a long time, to make worthwhile the compression, i.e. training, cost.
Moreover, for the best compression results the training of a new improved AI model does not consist only in determining the values of parameters (weights) of a fixed inference algorithm, but the structure of the inference algorithms is also tweaked for each new generation of models.
This is an additional reason that makes impractical to think about training as a universal compression algorithm (instead of a method for searching specific compression algorithms, which work for a given training set), because it is not a fixed algorithm, but a family of algorithms that evolves continuously, at least for now.
Re: Data Compression Explained (2012)
#17Earlier quoted context omitted.
I think so, specifically lossy compression though. A modern version of the book would include an extra section in the 'Lossy compression' chapter - 'Text' (alongside Images/Video/Audio) that would discuss LLM's.
No, it's not for lossy compression only. An LLM can give you a probability distribution for the next token. You can pair that with arithmetic coding to get a lossless compression/decompression algorithm. See https://en.wikipedia.org/wiki/Arithmetic_coding
In the latter applications, you do queries which aim to extract information from the training data set, but which may return hallucinated content instead of correct content.
If you use an LLM just to provide an estimation for the frequencies of tokens in an input data stream, and then you use the estimated frequencies to encode the input data, then you do not care about which were the tokens predicted by the LLM, because they are not used. The worst effect of any wrong predictions by the LLM is a slightly worse data compression ratio than the optimum.
When it is said that LLMs do a lossy data compression, that refers to the compression from the training data set to sequences of output tokens.
Re: Data Compression Explained (2012)
#18Isn’t the idea of AI precisely to find universal compression from arbitrary input data, at least with LLMs?
No, LLMs only do this for language. They don't try to do this for arbitrary data.
Re: Data Compression Explained (2012)
#19Isn’t the idea of AI precisely to find universal compression from arbitrary input data, at least with LLMs?
It's true that LLMs do something that looks very compression like in their weights, but it is lossy, and it has to be--if you're not lossy, you've overfitted the corpus, and that's bad. Post-training takes this even further, because you're not doing anything that looks like training on a specific corpus, you're exploring in a wider space of text. That text doesn't even concretely exist until you start exploring it.
I'm sure there must be a serious attempt to pursue this analogy that isn't just handwaving, but I haven't seen it.
Re: Data Compression Explained (2012)
#20Isn’t the idea of AI precisely to find universal compression from arbitrary input data, at least with LLMs?
I think this is an analogy that's been taken far too far. The output of intelligence just isn't compression, that's memorization. The role of intelligence is to generate novelty. It's true that LLMs do something that looks very compression like in their weights, but it is lossy, and it has to be--if you're not lossy, you've overfitted the corpus, and that's bad. Post-training takes this even further, because you're n…
You can use the fact that LLMs predict P(next token | existing tokens) to losslessly and efficiently compress arbitrary token sequences. This idea is closely related to arithmetic coding.