Why Order Can Matter for Compressibility
Two messages with the same marginal frequencies can have different predictable structure across positions.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace two sequences
ABABAB and AAABBB contain three of each letter. Their runs differ, while an alternating-pattern model captures the first especially well. See run-length encoding.
Use context as a model input
The next symbol can be predictable from the preceding one even when each has the same overall frequency. Conditional counts supply the probability interpretation.[1][2]
Compare identical symbol counts with different predictable structure
Strings ABABAB and AABABB both contain three As and three Bs. Under a model that already knows the first string alternates, each later symbol is predictable from its predecessor. Marginal symbol probabilities alone ignore the ordering information. See conditional probability.
Both marginal histograms: A=3, B=3
ABABAB: observed transitions are only A→B and B→A
AABABB also contains A→A and B→B
Include context cost when encoding
A model can use recent symbols to predict the next, but storing or learning that model can have overhead. Compare complete encode sizes and test records whose start resets context.