Artificial IntelligenceImage Compression

Regressive JPEGs: Why Machine Learning Now Wants to Recompress an Image Twice

A single image file can already be smaller than the pixels that make it up. Researchers are now asking the next, slightly stranger question: can a neural network take an image that is already compressed and squeeze it down even further — by learning to undo and redo the original encoding?

What "regressive JPEG" actually means

JPEG, invented in the late 1980s, remains the most widely used image format on Earth. Almost every photo on the web, on cloud storage, and on network file systems lives inside a JPEG file. The algorithm works by breaking an image into color channels, converting pixel values into frequency components, and then discarding the high-frequency details the human eye is less sensitive to. The result is lossy but very small.

"Regressive JPEGs" flips the usual order. Instead of starting from an uncompressed original, a machine-learning system starts from the JPEG file itself, reconstructs a full image from it, and then re-encodes that reconstruction back into a JPEG. The clever trick is that the network learns to do this round-trip more efficiently than the original encoder did. Hence the name "regressive": the model regresses, or back-computes, from the encoded form toward a smaller encoded form.

Why learn to recompress instead of just compressing once

Two reasons drive the research. First, scale. Trillions of JPEGs already exist across storage systems and archives. Rewriting them all from a clean original is often impossible because the original no longer exists; only the JPEG survives. A model that takes any existing JPEG and makes it smaller can trim storage and bandwidth across the whole internet without needing the source files.

Second, JPEG's own structure makes the task interesting. A JPEG file is made of multiple "scans," each prefixed with a marker that lets a partially downloaded image display at low resolution rather than appearing cut off. Because the compressed data is already organized in chunks, a neural network can be trained to predict more compact scan contents from earlier scans — exploiting redundancy that the original 1990s-era encoder could not see.

Lossy versus lossless

There are two versions of the idea. Lossy recompression accepts that some quality is traded for size, which is acceptable for web delivery and streaming. Lossless recompression is the harder challenge: the model must produce a JPEG that, when decoded, matches the original JPEG exactly, bit for bit, while still being smaller. Recent work has produced end-to-end models that achieve this by predicting entropy (the statistical distribution of codes) more accurately than the original encoder's built-in tables.

Where it matters

Why this is a quiet milestone

The idea may sound like a small optimization. But it represents a shift in how compression research is done. For decades, image compression was a fixed mathematical recipe — the discrete cosine transform, quantization tables, and Huffman coding, finalized long before deep learning existed. "Regressive JPEGs" is one of the first areas where a neural network is not replacing JPEG, but learning to speak JPEG better than JPEG's own designers did.

If the technique matures, the most compressed JPEG on your phone might have been encoded by no human algorithm at all — but by a model trained to find the last few percent of room inside a format that is now nearly forty years old.