Introduction
For over eight decades, data compression has been governed by the Shannon paradigm, which identifies patterns based on computable frequency distributions. While highly efficient, these methods are approaching their theoretical limits. As global data scales expand and 6G communication nears, a paradigm shift is required.
This paper introduces LMCompress, a framework that leverages Large Language Models (LLMs) to achieve state-of-the-art lossless compression across text, images, audio, and video. The authors argue that the next frontier of compression lies in "understanding"—approximating Kolmogorov complexity, the shortest possible program to generate a piece of data. By treating intelligence as a form of pattern recognition, LMCompress demonstrates that models which "understand" data can store it far more efficiently than those that merely count occurrences.
The LMCompress Framework
LMCompress replaces traditional statistical models with generative AI in a three-step pipeline:
- Tokenization: Raw data (pixels, audio bytes, or text) is converted into a sequence of discrete tokens.
- Prediction: A generative model (e.g., iGPT for images, LLaMA for text) predicts the probability distribution for the next token based on the preceding sequence.
- Arithmetic Coding: This component uses the model's predicted probabilities to encode the data. Higher prediction accuracy—a proxy for better "understanding"—results in fewer bits required for storage.
Domain-Specific Adaptations
- Images and Video: The system utilizes iGPT, an autoregressive vision model, to process pixels sequentially.
- Audio: To achieve lossless signal-level compression, the authors mapped raw signal bytes to ASCII characters, enabling the fine-tuning of LLaMA3-8B using Low-Rank Adaptation (LoRA).
- Text: Fine-tuning on specialized domains (e.g., legal or medical) significantly enhances compression ratios compared to general-purpose models.
Key Insights: Understanding as Prediction
The central thesis of this work is that compression performance serves as a direct metric for a model's intelligence. As a model's "understanding" of a domain improves, its ability to predict subsequent data points increases, thereby lowering the bits-per-character (or pixel) required.
Furthermore, the results indicate a "better model dividend": larger and more sophisticated models (e.g., scaling from Chinchilla 7B to 70B) consistently yield superior compression ratios. By moving toward the Kolmogorov paradigm, LMCompress bypasses the local, computable feature limits of traditional codecs.
Experimental Results
LMCompress was evaluated against industry-standard benchmarks, including CLIC2019 (images), Xiph.org (video), and specialized text corpora like the Pile of Law.
Image and Video Performance
In image compression, LMCompress achieved a ratio of 6.32 on the CLIC2019 dataset, more than doubling the performance of JPEG-XL (2.93) and WebP (2.75).
In video tasks, the framework doubled the lossless compression performance of H.264. For lossy video, it more than doubled the compression ratio of DCVC while maintaining superior visual quality (PSNR) and lower perceptual error (FID) by using diffusion models to "generate" missing details during reconstruction.
Audio and Text Performance
- Audio: LMCompress outperformed FLAC by 25% to 94% across various datasets.
- Text: On specialized datasets like the medical-focused MeDAL, the framework nearly tripled the compression ratio of traditional tools like bz2.
Challenges and Future Directions
Despite its performance, LMCompress faces several hurdles:
- Computational Cost: LLM-based compression is significantly slower and more resource-intensive than traditional algorithms like ZIP.
- Context Constraints: Limited context windows mean long files must be processed in chunks, potentially missing long-range dependencies.
- Symmetry Requirements: Both the sender and receiver must possess identical model weights to ensure successful decompression, presenting a challenge for cross-platform standardization.
Future work will focus on incorporating inter-frame temporal information for video and expanding context windows to capture broader data patterns.
Summary updated