ChatPaper.aiChatPaper

StateSMix: Mamba 상태 공간 모델과 희소 N-그램 문맥 혼합을 통한 온라인 무손실 압축

StateSMix: Online Lossless Compression via Mamba State Space Models and Sparse N-gram Context Mixing

April 5, 2026
저자: Roberto Tacconelli
cs.AI

초록

우리는 온라인 학습된 Mamba 스타일 상태 공간 모델(SSM)과 희소 n-그램 컨텍스트 혼합 및 산술 코딩을 결합한 완전 독립형 무손실 압축기인 StateSMix를 제안합니다. 이 모델은 사전 학습된 가중치, GPU, 외부 종속성 없이 압축 대상 파일에서 처음부터 초기화되어 토큰 단위로 학습됩니다. SSM(DM=32, NL=2, 파일당 약 120K 활성 매개변수)은 BPE 토큰에 대한 지속적으로 업데이트되는 확률 추정치를 제공하는 반면, 9개의 희소 n-그램 해시 테이블(바이그램부터 32-그램까지, 각 16M 슬롯)은 0이 아닌 카운트 토큰만 업데이트하는 소프트맥스 불변 로짓 편향 메커니즘을 통해 정확한 지역 및 장거리 패턴 기억을 추가합니다. 엔트로피 적응형 스케일링 메커니즘은 SSM의 예측 신뢰도에 기반하여 n-그램 기여도를 조절하여 신경망 모델이 이미 잘 보정된 경우 과도한 보정을 방지합니다. 표준 enwik8 벤치마크에서 StateSMix는 1MB에서 2.123 bpb, 3MB에서 2.149 bpb, 10MB에서 2.162 bpb를 달성하며, xz -9e(LZMA2)를 각각 8.7%, 5.4%, 0.7% 앞섭니다. 제거 실험을 통해 SSM이 주요 압축 엔진임을 확인했습니다: SSM 단독으로 빈도 수 기반 기준보다 46.6%의 크기 감소를 달성하며 n-그램 구성 요소 없이도 xz를 능가하는 반면, n-그램 테이블은 정확한 컨텍스트 기억을 통해 보완적인 4.1% 이득을 제공합니다. 학습 루프의 OpenMP 병렬화는 4코어에서 1.9배의 속도 향상을 제공합니다. 이 시스템은 순수 C와 AVX2 SIMD로 구현되었으며 일반 x86-64 하드웨어에서 초당 약 2,000 토큰을 처리합니다.
English
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.
PDF32May 7, 2026