A Model-Driven Lossless Compression Algorithm Resistant to Mismatch
Cordelia Hu, Jennifer Tang
TL;DR
This work tackles the problem of non-determinism in model-driven, lossless compression by introducing a mismatch-tolerant encoding scheme that does not rely on arithmetic coding. The proposed algorithm certifies robustness under a structured mismatch via a bound $| ln p(x) - \nln p'(x)| < \nln c$, and communicates tokens through a bucketed interval scheme with a short unique prefix, ensuring correct decoding under the bound. The authors provide a correctness proof, derive performance bounds under a power-law model for token distributions with $\alpha \approx 1.8$, and conduct experiments on real text data showing compression ratios well above gzip for several settings, while maintaining high decoding accuracy up to moderate mismatch levels. This demonstrates practical, mismatch-resilient compression that can be deployed with learned predictors, offering meaningful gains in robustness and efficiency for model-driven compression pipelines.
Abstract
Due to the fundamental connection between next-symbol prediction and compression, modern predictive models, such as large language models (LLMs), can be combined with entropy coding to achieve compression rates that surpass those of standard compression algorithms. However, this approach relies on the assumption that the predictive model produces identical output distributions at both the encoder and decoder, since even small mismatches can cause the decoding to fail. This assumption often fails with complex predictive models, particularly those based on neural networks, a phenomenon referred to as non-determinism. In this work, we propose a new compression algorithm based on next-token prediction that is robust to arbitrarily large, but structured, prediction mismatches. We prove the correctness of the proposed scheme under a formal mismatch certification, characterize its theoretical performance, and validate it experimentally on real datasets. Our results demonstrate reliable operation within the certified mismatch regime while achieving compression ratios that exceed those of commonly used compression methods.
