OmniZip: Learning a Unified and Lightweight Lossless Compressor for Multi-Modal Data

Yan Zhao, Zhengxue Cheng, Junxuan Zhang, Dajiang Zhou, Qunshan Gu, Qi Wang, Li Song · OpenReview

TL;DR

This paper introduces OmniZip, a novel, lightweight, and unified lossless compressor capable of handling diverse data types like images, text, speech, and more. By employing a modality-unified tokenizer and a unique modality-routing mechanism within a compact RWKV backbone, OmniZip achieves state-of-the-art compression efficiency across multiple modalities while remaining efficient enough for edge devices.

What Problem Does This Paper Address?

The current landscape of lossless compression is fragmented. While learning-based compressors have shown impressive results, they are typically designed for a single data modality (e.g., only images or only text). This necessitates deploying multiple specialized compressors in multi-modal systems, leading to increased complexity and resource overhead. Existing attempts at multi-modal compression often convert all data to a common format like text, which compromises efficiency. Furthermore, many advanced learning-based compressors are computationally intensive, making them impractical for deployment on resource-constrained devices. OmniZip aims to bridge this gap by providing a single, efficient, and high-performing compressor for a wide array of data types.

Methods

OmniZip's core innovation lies in its ability to unify and efficiently process diverse data. Key techniques include:

  • Modality-Unified Tokenizer: This component reversibly transforms various data types (images, text, speech, etc.) into a common, unified token space. For images, it uses patch-based processing and sub-pixel expansion. Text is tokenized using SentencePiece BPE, with domain-specific symbols added for gene sequences and databases. Speech is handled by treating each byte as a token. Crucially, modality-specific prefixes are added to each token sequence to help the model distinguish data types, and modality masking is applied during inference to focus on relevant probabilities.
  • Modality-Routing Context Learning: Built upon a lightweight RWKV backbone, this mechanism enhances contextual understanding. It integrates a Mixture-of-Experts (MoE) approach, specifically applying it to the "Value" (V) projection layer within the Time Mixing module. A learnable router assigns tokens to specialized "experts," allowing for flexible, modality-aware context modeling. This routing is "top-k sparse," meaning only a few experts are activated per token, maintaining efficiency.
  • Modality-Routing Feedforward: The standard feedforward MLP in the RWKV block is replaced with an MoE-based module. Similar to the context learning, this allows for modality-specific nonlinear representations, improving the model's ability to capture diverse data characteristics without significantly increasing computational cost.
  • Reparameterization Training Strategy: To boost model capacity without impacting inference speed, a reparameterization technique is employed during training. Auxiliary branches are added to the R, K, and V projection layers, which are then merged back into the main path during inference. This allows for increased representational power during training while maintaining a compact model for deployment.

Datasets

OmniZip was evaluated on a comprehensive set of 16 datasets spanning seven modalities:

  • Image-like: Kodak, CLIC-P, CLIC-M, DIV2K (natural images); MRNet Axial, Coronal, Sagittal (medical images); TouchandGo, ObjectFolder (tactile signals).
  • Text-like: enwik8, enwik9, Gutenberg eBooks (natural language); GenoSeq, DNACorpus (gene sequences); Spider, WikiSQL (databases).
  • Speech: LibriSpeech.

The paper emphasizes balanced training across modalities by normalizing training set sizes to approximately 1GB and using a balanced batch sampler.

Key Insights and Ideas

  • Unified Tokenization is Key: The ability to map diverse data into a single, reversible token space is fundamental to building a unified compressor. This avoids the efficiency loss of converting everything to text.
  • Modality-Routing for Adaptability: The core insight is that different data types have distinct statistical properties and require specialized processing. The modality-routing mechanism (both in context learning and feedforward) allows the model to dynamically adapt its processing based on the input modality, leading to better compression.
  • Lightweight Backbone Matters for Usability: Choosing a lightweight architecture like RWKV is crucial for achieving practical deployment, especially on edge devices. The proposed techniques enhance this lightweight backbone without making it prohibitively complex.
  • MoE for Sparse, Efficient Specialization: The Mixture-of-Experts approach, particularly when applied sparsely (top-k), offers a powerful way to achieve modality-specific processing without the full computational cost of dense models.
  • Training Strategies for Capacity: The reparameterization training strategy is a clever way to increase the model's learning capacity during training without incurring any inference overhead, a critical factor for compression performance.

Key Results

OmniZip demonstrates strong performance across various modalities:

  • Compression Efficiency: OmniZip outperforms or matches state-of-the-art compressors. For example, it achieves 42-62% higher compression efficiency than gzip on datasets like CLIC-M, TouchandGo, enwik9, LibriSpeech, and WikiSQL. The adjusted bits/Byte metric, which accounts for model size, also shows OmniZip-S outperforming larger, more complex models.
  • Speed and Efficiency: OmniZip is remarkably efficient, supporting near real-time inference on resource-constrained edge devices. It reaches speeds of approximately 1MB/s on MacBook CPUs and iPhone NPUs. Even on a high-end NVIDIA A100 GPU, OmniZip-S achieves speeds of up to 4MB/s.
  • Parameter Efficiency: The models are significantly smaller than many contemporary learning-based compressors, with OmniZip-S having only 4.8M parameters.

Limitations and Future Work

  • Modality-Specific Optimizations: While OmniZip is unified, the paper notes that further modality-specific optimizations within the routing mechanisms could potentially yield even better results.
  • Computational Cost of Training: While inference is efficient, training these models, especially with the MoE components, can still be computationally intensive.
  • Future Work: The authors suggest exploring more advanced routing strategies and further optimizing the model for specific hardware platforms. The success of OmniZip opens avenues for developing more general-purpose, efficient, and adaptable compression solutions for the ever-growing multimodal data landscape.

Summary updated

Abstract

Lossless compression is essential for efficient data storage and transmission. Although learning-based lossless compressors achieve strong results, most of them are designed for a single modality, leading to redundant compressor deployments in multi-modal settings. Designing a unified multi-modal compressor is critical yet challenging, as different data types vary largely in format, dimension, and statistics. Multi-modal large language models offer a promising resolution but remain too complex for practical use. Thus, we propose \textbf{OmniZip}, \textbf{a unified and lightweight lossless compressor for multi-modal data (like image, text, speech, tactile, database, and gene sequence)}. Built on a lightweight backbone, OmniZip incorporates three key components to enable efficient multi-modal lossless compression: a modality-unified tokenizer that reversibly transforms diverse data into tokens, a modality-routing context learning mechanism that enables flexible multi-modal context modeling, and a modality-routing feedforward design that further enhances the model's nonlinear representation flexibility. A reparameterization training strategy is used to enhance model capacity. OmniZip outperforms or matches other state-of-the-art compressors on multiple modalities, achieving 42\%, 57\%, 62\% and 42\%, 53\% higher compression efficiency than gzip on CLIC-M, TouchandGo, enwik9, LibriSpeech, and WikiSQL datasets, respectively. It also supports near real-time inference on resource-constrained edge devices, reaching about 1MB/s on MacBook CPUs and iPhone NPUs. Our code is released at https://github.com/adminasmi/OmniZip-CVPR2026.
BibTeX
@inproceedings{zhao2026omnizip,
  author = {Yan Zhao and Zhengxue Cheng and Junxuan Zhang and Dajiang Zhou and Qunshan Gu and Qi Wang and Li Song},
  title = {{OmniZip: Learning a Unified and Lightweight Lossless Compressor for Multi-Modal Data}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=dtGMBbhvlf},
}
Figure