← Articles
hazylab

CRIBL — Text Compression via Controlled Degradation, with Emergent Encryption

2026-03-25 12:44:11 · 01960e00-0001-7000-8000-000000000001

The problem

Text compression has been stuck in the same paradigm for decades: find redundancy, encode it more efficiently, reconstruct losslessly. Gzip, zstd, brotli — they all play the same game. The compression ratios are good. The conceptual framework hasn't moved.

Meanwhile, language models have become extraordinarily good at one specific thing: predicting what comes next given what came before. A sufficiently capable model doesn't need to see every word — it can reconstruct meaning from a degraded signal, the same way a human reads "pls snd th rprt" and understands "please send the report."

CRIBL is a patent built on that observation. The core idea: what if compression wasn't about encoding redundancy, but about deliberately destroying information and relying on a language model to reconstruct it?

How it works

The system has three stages.

Stage 1: Deterministic degradation. A multi-layer pipeline degrades the source text. Each layer is a pure function — same input, same output, no randomness. The layers include: stopword removal, diacritics stripping, partial vowel reduction, internal character permutation (keeping first and last letter), consonant mapping to phonetic categories. The layers are composable and ordered. An exception map handles ambiguous tokens.

The result is a degraded text that retains enough semantic signal for reconstruction, but is significantly shorter.

Stage 2: Arithmetic coding of the residual. The degraded text is then arithmetic-coded using the probability distributions from a neural language model. For each token, the model provides a conditional probability distribution. High-probability tokens consume fewer bits; low-probability tokens consume more. The output is a compact bitstream — the arithmetic residual.

This is where the compression actually happens. The language model's predictive power directly determines the compression ratio: the better the model predicts the degraded text, the smaller the residual.

Stage 3: Reconstruction. On the receiving end, the residual is arithmetic-decoded back into the degraded text. Then a reconstruction model — a sequence-to-sequence transformer trained on (source, degraded) pairs — recovers the original text.

The reconstruction model is trained on a domain-specific corpus. A model trained on legal documents compresses legal text better. A model trained on medical records compresses medical text better. The degradation pipeline is the same; the reconstruction capability is specialized.

The emergent encryption property

This is where it gets interesting.

The arithmetic coding step depends entirely on the probability distributions produced by the language model. Two models with different weights produce different distributions. An arithmetic residual encoded with model A cannot be decoded with model B — the bitstream is gibberish without the matching model.

CRIBL exploits this directly: train two models with identical architectures and identical training data, but different weight initialization seeds. The seed is kept secret. The resulting models produce incompatible probability distributions. A residual encoded with seed-42 can only be decoded by a receiver who has a model trained with seed-42.

This is functionally equivalent to symmetric encryption — shared secret (the seed), incompatible encoding/decoding without it — but without any cryptographic primitive. No AES, no RSA, no key exchange protocol. The encryption emerges from the stochastic nature of neural network training.

The robustness claim: the cross-reconstruction rate between mismatched models should be near zero. If model A encodes and model B tries to decode, the recovered degraded text is noise, and the reconstruction model produces garbage. This is validated empirically, not proven cryptographically — which is an honest limitation, and an open research question.

What this is not

It's not a replacement for established encryption. The security properties haven't been formally analyzed in the way AES has been. It's not clear what an adversary with access to the training data (but not the seed) could achieve. The compression ratios depend on model quality, which means they degrade on out-of-domain text.

What it is: a novel primitive that unifies compression and encryption in a single pipeline, with domain-specific adaptation and no external cryptographic dependency. It's a new tool, not a replacement for existing ones.

Why it matters

Three reasons.

First, compression-by-degradation inverts the usual approach. Instead of finding and encoding redundancy (lossless), you destroy information and reconstruct it (lossy-then-reconstructed). The language model is the reconstruction engine. This opens a design space that doesn't exist in traditional compression.

Second, the emergent encryption property is genuinely novel. Encryption as a side effect of different training seeds, with no cryptographic primitive involved, is not something that existed before. Whether it's useful encryption depends on the security analysis, but the mechanism itself is new.

Third, the domain specialization is a practical advantage. A general-purpose compressor treats all text the same. CRIBL compresses legal text better with a legal model, medical text better with a medical model. The compression ratio is a function of the model's domain knowledge.

Deployment

The patent specifies an ONNX export path: models quantized to integer precision, integrated into a standalone binary with no external software dependency. This is designed for embedded deployment — a single binary that compresses, encrypts (via seed), and decompresses, without a Python runtime or a GPU.

Status

Patent filed. The implementation is part of the HOROS ecosystem. The research is public; the patent protects the specific pipeline architecture.


hazyhaar — open research, sovereign infrastructure github.com/hazyhaar · hazyhaar.fr

criblcompressionencryptionnlp