The fundamental insight of modern information theory is that prediction and compression are two sides of the same coin. If you can perfectly predict the next character in a string, you don't need to store it at all. If you can predict it with 50% certainty, you only need one bit.
Recent research has demonstrated that Large Language Models (LLMs), which are trained primarily to predict the next token in a sequence, are actually world-class, general-purpose compression engines. By pairing the predictive power of Transformers with classical algorithms like arithmetic coding, researchers are achieving compression ratios that far surpass traditional tools like Gzip, PNG, and FLAC.
The Probability Engine
At its core, a compressor's job is to assign short codes to frequent patterns and long codes to rare ones. Traditional compressors like Gzip use simple dictionary-based lookups to find repeating strings. In contrast, an LLM uses its vast internal parameters to build a sophisticated probability distribution of what comes next.
As Grégoire Delétang and colleagues show in Language Modeling Is Compression, this capability isn't limited to text. By treating any data—be it an image, a song, or a DNA sequence—as a stream of bytes, a sufficiently large model like Chinchilla 70B can outperform specialized codecs. The model provides the "likelihood" of the next byte, and an arithmetic coder translates that likelihood into a compact binary stream.
Fighting Fire with Fire
The rise of AI-generated content presents a unique storage challenge. Standard tools struggle with the "unstructured" but highly patterned nature of LLM outputs. Chun Jason Xue and Yu Mao 0001 propose a "fight fire with fire" approach in Lossless Compression of Large Language Model-Generated Text via Next-Token Prediction. By using the same model that generated the text to compress it, they achieved a 20x reduction in size—outperforming industry standards by a factor of seven. Because the compressor and decompressor share the same "world knowledge" (the model weights), they only need to transmit the minimal information necessary to navigate the model's probability tree.
Beyond Text: Multimodal and Domain-Specific Compression
The "LLM as compressor" philosophy is rapidly expanding into specialized fields:
- Genomics: Zhanbei Cui and Tongda Xu developed GeneFormer, which adapts the Transformer-XL architecture to DNA data. By modeling long-range dependencies in genetic sequences, it achieves state-of-the-art compression ratios that traditional algorithms cannot match.
- 3D Data: For massive point clouds used in autonomous driving, Guangchi Fang and Yulan Guo introduced 3DAC, which uses a deep entropy model to shrink the footprint of color and reflectance attributes.
- Visual Media: In LFIC-DRASC, Shiyu Feng and Yun Zhang 0002 demonstrate how disentangled representations can capture the unique geometry of light-field images more efficiently than standard codecs.
The Latency Bottleneck
If neural compression is so effective, why hasn't it replaced Gzip? The primary hurdle is computational overhead. Traditional algorithms are "lightweight" and run on almost any CPU. Neural models, however, require significant GPU resources and suffer from high inference latency.
As noted by Yucheng Li in Evaluating Large Language Models for Generalization and Robustness via Data Compression, the sequential nature of arithmetic coding—where each step depends on the previous one—makes it difficult to parallelize. This creates a "speed vs. density" trade-off. While models can shrink data to a fraction of its original size, the time required to "decompress" it token-by-token remains orders of magnitude slower than hand-crafted codecs.
Compression as an Evaluation Metric
Beyond storage, this research direction offers a new way to measure AI itself. David Heurtel-Depeiges and Anian Ruoss suggest in Compression via Pre-trained Transformers that a model's compression ratio on a dataset is a "contamination-proof" metric of its true understanding. If a model can compress a new piece of information effectively, it has successfully generalized its training to understand the underlying patterns of that data, rather than just memorizing strings.
In this view, the quest for better compression is identical to the quest for more intelligent models. As Jun Chen summarizes in his survey of the field, we are moving toward an era where information theory and deep learning are no longer separate disciplines, but a unified framework for modeling the world.