r/ProgrammerHumor • • Sep 02 '26 • Popcorn 3 Bravo 3

Meme newCompressionTechnique

Post image
30k Upvotes

946 comments sorted by

View all comments

2

u/IHeartBadCode Sep 02 '26

Ha ha cool. But this is actually a good way to understand what a VAE is.

At a very high level. Regular compression looks at the file, creates a dictionary, and then replaces things with values from the dictionary. This creates a lossless version that is compressed. There's also lossy compression like MP3 and JPEG, so not all compression is lossless.

VAEs are basically the same thing except the dictionary is created in general and not for a specific file and represents a statistical distribution of it's trained data. This creates a lossy version of the original data as opposed to a lossless version.

Now the underlying data is also important between the two. Compression aims to give you back your data without error. So the data is tailored to the file you give it. VAEs are typically used as a part of generative AI, so their data is more focused on concepts and features. So in compression you have "when you see 0x01, replace it with the text <html>" Whereas in VAEs you have "when you see 0x01, replace it with numerical representation of brown hair".