Test-Time Steering for Lossless Text Compression via Weighted Product of Experts
Qihang Zhang, Muchen Li, Ziao Wang, Renjie Liao, Lele Wang
TL;DR
The paper tackles lossless text compression under distribution shift by introducing test-time steering via Weighted Product of Experts (wPoE), which blends a training-free universal compressor with a pretrained autoregressive language model. It provides a theoretical guarantee that the wPoE can match or outperform the best individual expert and demonstrates empirically that this approach improves compression on diverse datasets without any fine-tuning. The method efficiently learns a single optimal weight from minimal data and extends naturally to multiple experts, offering practical gains in compute and memory usage. Overall, wPoE offers a robust, scalable way to generalize neural text compression to unseen distributions while preserving the simplicity of training-free adaptation.
Abstract
Lossless compression techniques are crucial in an era of rapidly growing data. Traditional universal compressors like gzip offer low computational overhead, high speed, and broad applicability across data distributions. However, they often lead to worse compression rates than modern neural compressors, which leverage large-scale training data to model data distributions more effectively. Despite their advantages, neural compressors struggle to generalize to unseen data. To address this limitation, we propose a novel framework that performs Test-Time Steering via a Weighted Product of Experts (wPoE). At inference, our method adaptively combines a universal compression model with a pretrained neural language model, ensuring the compression rate is at least as good as that of the best individual model. Extensive experiments demonstrate that our approach improves the performance of text compression without requiring fine-tuning. Furthermore, it seamlessly integrates with any autoregressive language model, providing a practical solution for enhancing text compression across diverse data distributions.
