StateSMix: Online Lossless Compression via Mamba State Space Models and Sparse N-gram Context Mixing
On the map: State-space sequence models (S4, Mamba) → Core SSM architectures for language
Abstract (arXiv)
We present StateSMix, a fully self-contained lossless compressor that couples an online-trained Mamba-style State Space Model (SSM) with sparse n-gram context mixing and arithmetic coding. The model is initialised from scratch and trained token-by-token on the file being compressed, requiring no pre-trained weights, no GPU, and no external dependencies. The SSM (DM=32, NL=2, approximately 120K active parameters per file) provides a continuously-updated probability estimate over BPE tokens, while nine sparse n-gram hash tables (bigram through 32-gram, 16M slots each) add exact local and long-range pattern memorisation via a softmax-invariant logit-bias mechanism that updates only non-zero-count tokens. An entropy-adaptive scaling mechanism modulates the n-gram contribution based on the SSM's predictive confidence, preventing over-correction when the neural model is already well-calibrated. On the standard enwik8 benchmark, StateSMix achieves 2.123 bpb on 1 MB, 2.149 bpb on 3 MB, and 2.162 bpb on 10 MB, beating xz -9e (LZMA2) by 8.7%, 5.4%, and 0.7% respectively. Ablation experiments establish the SSM as the dominant compression engine: it alone accounts for a 46.6% size reduction over a frequency-count baseline and beats xz without any n-gram component, while n-gram tables provide a complementary 4.1% gain through exact context memorisation. OpenMP parallelisation of the training loop yields 1.9x speedup on 4 cores. The system is implemented in pure C with AVX2 SIMD and processes approximately 2,000 tokens per second on commodity x86-64 hardware.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Core SSM architectures for language, one of 10 directions in State-space sequence models (S4, Mamba). Builds on 8 of its 21 references that are in the map. First posted on arXiv 5 Apr 2026.
Builds on
8 of 21 references.
Closest ancestors · 3
Same direction, newest first
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality31 May
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spaces1 Dec
- 2021Efficiently Modeling Long Sequences with Structured State Spaces31 Oct
Other references · 5
- 2023Language Modeling Is Compressioncited by 225
- 2023LLMZip: Lossless Text Compression using Large Language Modelscited by 44
- 2018DeepZip: Lossless Data Compression using Recurrent Neural Networkscited by 33
- 2024FineZip : Pushing the Limits of Large Language Models for Practical Lossless Text Compressioncited by 18
- 2026Nacrith: Neural Lossless Compression via Ensemble Context Modeling and High-Precision CDF Codingcited by 4
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Diffuse to Compress: Leveraging Diffusion LMs for Lossless Compression
- 2025MambaIC: State Space Models for High-Performance Learned Image Compression
- 2023Compressing LLMs: The Truth is Rarely Pure and Never Simple
- 2026FlexComp: One Model for Every Ratio in Context Compression
- 2025Compactor: Calibrated Query-Agnostic KV Cache Compression with Approximate Leverage Scores
- 2025Huff-LLM: End-to-End Lossless Compression for Efficient LLM Inference
- 2026Lossless Prompt Compression via Dictionary-Encoding and In-Context Learning: Enabling Cost-Effective LLM Analysis of Repetitive Data
- 2026ZipServ: Fast and Memory-Efficient LLM Inference with Hardware-Aware Lossless Compression