@raymaccarthy @omixann
By definition, lossy compression is imperfect but there’s a long history of combining lossy compression with a correction dictionary to turn it into lossless compression. Some of the oldest examples of this involve machine learning.
One of my favourite examples is the hyphenation dictionary in LaTeX. This takes a large number of examples of words with correct hyphenation and builds short Markov chains that predict when words should be hyphenated. The second stage in the process then runs the predictor over every word in the input set and records the ones that are incorrectly predicted as a dictionary of special cases.
When you do hyphenation it first looks at the special cases and, if not present there, it tries the ML model. This combination precisely compresses everything in the dictionary. The thousands of entries in the dictionary are compressed to a small ML model and around 70 outliers.
If you feed it a word that wasn’t in the training set, it will usually get the hyphenation right. You can even run the model in reverse to generate plausible hyphenated words and many of them will be real words with correct hyphenation.
The line between lossless compression, lossy compression, and generative machine-learning model is blurry.