Sparse Sequential Dirichlet Coding

Joel Veness, Marcus HutterarXiv 2012

Abstract

This paper introduces Sparse Sequential Dirichlet (SSD) Coding, a lightweight compression technique designed for multi-alphabet memoryless sources where only a small, unknown subset of the potential alphabet symbols appears in any given sequence. SSD provides a computationally efficient alternative to complex Bayesian models, achieving $O(1)$ time complexity per symbol. Theoretical and empirical analyses demonstrate that SSD performs competitively with the Sequential Sub-Alphabet (SSA) estimator in sparse scenarios while requiring significantly fewer computational resources.

Introduction: The Large Alphabet Problem

In data compression, the Sequential Dirichlet Estimator is a standard tool for predicting symbol probabilities. However, its performance degrades in "large alphabet" scenarios—situations where the potential alphabet size ($|X|$) is vast, but the actual number of unique symbols ($|A|$) in a specific sequence is small. For example, when compressing network logs where the alphabet consists of all $2^{32}$ possible IP addresses, a standard estimator wastes significant "probability mass" on billions of addresses that never appear, leading to high redundancy.

While the Sequential Sub-Alphabet (SSA) estimator addresses this by weighting all possible subsets of the alphabet, it is computationally expensive, with time and memory requirements proportional to the total alphabet size $|X|$. SSD was developed to provide the benefits of sub-alphabet estimation with the efficiency of simple $O(1)$ estimators.

Methodology: Sparse Sequential Dirichlet (SSD)

The core innovation of SSD is its distinct treatment of symbol "discovery" versus "re-occurrence."

  1. Discovery: When a symbol is encountered for the first time, the SSD estimator assigns a probability based on the remaining unseen symbols in the total potential alphabet.
  2. Re-occurrence: For symbols already seen, the estimator uses a standard Dirichlet-style update, but restricts its focus to the active subset of symbols ($|A|$).

This approach ensures that the "penalty" for a large alphabet is paid primarily when new symbols are discovered, rather than at every step. Computationally, SSD only needs to store counts for symbols that have actually appeared, resulting in $O(1)$ time complexity per symbol and $O(|A|)$ space complexity.

Empirical Evaluation

The authors evaluated SSD using synthetic data generated from Symmetric Dirichlet Distributions across various sparsity levels. The results compare SSD against an "Oracle" (which knows the active alphabet in advance), the standard Sequential Dirichlet Coder (SDC), and the computationally intensive SSA.

Performance in Sparse Scenarios

In extremely sparse scenarios (e.g., $|A|=10$ active symbols out of $|X|=256$ possible), SSD demonstrated a clear advantage over the standard SDC. As shown in the results, SSD significantly reduced the average bits required for encoding.

Performance comparison in an extremely sparse scenario ($|A|=10, |X|=256$).

In this test, SSD achieved a mean performance of approximately 349 bits, compared to 492 bits for the standard SDC($\mathcal{X}$). Notably, SSD also slightly outperformed the more complex SSA method in this context, despite its significantly lower computational overhead.

The "Sparsity Tax"

SSD is a specialized tool. When the data is not sparse (e.g., $|A|=18$ out of $|X|=26$), the overhead of the discovery mechanism becomes a liability.

Performance comparison in a non-sparse scenario ($|A|=18, |X|=26$).

In non-sparse settings, SSD performs worse than both the standard SDC and the SSA estimator. This confirms that SSD is most effective when the active alphabet is a small fraction of the total possible space.

Conclusion and Future Work

Sparse Sequential Dirichlet Coding offers a pragmatic solution for high-dimensional, sparse data compression. By shifting the redundancy penalty from the potential alphabet size to the actual number of unique symbols seen, it enables efficient processing of large-scale data. Future work involves integrating SSD into context-modeling techniques like Prediction by Partial Matching (PPM) or Context Tree Weighting (CTW), where sparse transitions are common across thousands of individual contexts.

Summary updated

BibTeX
@misc{veness2012sparse,
  author = {Joel Veness and Marcus Hutter},
  title = {{Sparse Sequential Dirichlet Coding}},
  year = {2012},
  eprint = {1206.3618},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1206.3618},
}
Figure