Reported experiment
PPM-C compression experiments and a Lean roundtrip
What does a roundtrip prove?
Suppose a decoder returns every byte you give its encoder. How many bytes must the encoder have saved?
Try the copy encoder
This encoder copies the UTF-8 bytes of the input. Its decoder reads the copy back as text.
Exact recovery. 0 bytes saved. 8 bits per input byte.
Even a thousand copies of the same letter take up the original space here. A roundtrip tells us the input can be recovered. To establish a compression rate, we also need the length of the emitted bitstream.
The experiments report 2.16 bits per byte on a one-million-byte enwik8 prefix and 1.964 on 100 million bytes. The Lean roundtrip concerns a different encoding. In Proof/Kolmogorov/Bound.lean, payloadCode uses Encodable.encode on the byte list, and the decoder recovers that number from an interval width. compressedBits can be supplied independently of the roundtrip. Its example value is the code number itself. The file explicitly leaves the cross-entropy and Kolmogorov inequalities open.
The original engineering question was which changes to a count-based byte predictor help at more than one scale. Five interventions that helped separately at 500,000 bytes performed 0.036 bpb worse together than skip-gram alone at one million. The version history and ablations below are reported experiment results. A size certificate for these rates would require the actual emitted bitstream, its length, a decoder that recovers the named corpus, and an accounting of the decoder and side information.
Reported version history
| Version | Change | Delta (bpb) | Cumulative (bpb) | Reduction |
|---|---|---|---|---|
| v1 | Baseline (parent+delta) | — | 3.68 | — |
| v2 | + exclusion | −0.36 | 3.32 | −10% |
| v3 | + PPM-C escape | −0.27 | 3.05 | −17% |
| v4 | + online trie update | −0.48 | 2.57 | −30% |
| v5 | Combined + tuned | −0.31 | 2.26 | −39% |
| v6 | + skip-gram (1M) | −0.10 | 2.16 | −41% |
Twenty single-variable experiments
| # | Experiment | Round | Delta (bpb) | Result |
|---|---|---|---|---|
| 1 | Bayesian escape | 1 | +0.730 | FAIL |
| 2 | CDF 12-bit quantization | 1 | −0.044 | PASS |
| 3 | KT estimator | 1 | +2.170 | FAIL |
| 4 | MDL context pruning | 1 | −0.058 | PASS |
| 5 | Exclusion order reversal | 1 | — | BUGGY |
| 6 | Exact rational arithmetic | 1 | 0.000 | NEUTRAL |
| 7 | c-theorem prior on depth | 1 | +0.045 | FAIL |
| 8 | Forward filter (γ=0.99) | 1 | −0.024 | PASS |
| 9 | Lookahead coding | 1 | 0.000 | NEUTRAL |
| 10 | Entry count pruning | 1 | +0.075 | FAIL |
| 11 | Context inheritance | 2 | +0.031 | FAIL |
| 12 | Count aging (halflife) | 2 | +1.050 | FAIL |
| 13 | Skip-gram (α=0.2) | 2 | −0.089 | PASS |
| 14 | Dual-parent (α=0.1) | 2 | −0.028 | PASS |
| 15 | Local alphabet restriction | 2 | 0.000 | NEUTRAL |
| 16 | Bigram trie | 2 | +0.034 | FAIL |
| 17 | Elimination coding | 2 | — | BUGGY |
| 18 | Second-order escape | 2 | −0.006 | PASS |
| 19 | Sliding window (64k) | 2 | +0.669 | FAIL |
| 20 | Depth ensemble | 2 | 0.000 | NEUTRAL |
Interactions across sample sizes
| Component | Delta at 500k | Delta at 1M |
|---|---|---|
| Skip-gram | −0.089 | −0.030 |
| MDL pruning | −0.058 | −0.010 |
| Dual-parent | −0.028 | −0.013 |
| CDF 12-bit | −0.044 | −0.008 |
| Forward filter | −0.024 | −0.005 |
April manuscript with correction (HTML) · Annotated manuscript (PDF)
Cite this page
Richard Hoekstra. PPM-C compression experiments and a Lean roundtrip. https://richardhoekstra.nl/papers/byte-compression.html