Jump to content

Prediction by partial matching

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 67.65.29.66 (talk) at 05:00, 15 March 2004 (PPM (Prediction by Partial Matching) is an adaptive statistical data compression technique based on context modeling and prediction.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

PPM is an adaptive statistical data compression technique based on context modeling and prediction. The name stands for Prediction by Partial Matching. PPM models use a set of previous symbols in the uncompressed symbol stream to predict the frequency of the next symbol in the stream.

Predictions are usually reduced to symbol rankings. The number of previous symbols, n, determines the order of the PPM model which is denoted as PPM(n). Unbounded variants where the context has no length limitations also exist and are denoted as PPM*. If no prediction can be made based on all n context symbols a prediction is attempted with just n-1 symbols. This process is repeated until a match is found or no more symbols remain in context. At that point a fixed prediction is made. This process is the inverse of that followed by DMC compression algorithms which build up from a zero-order model.

Much of the work in optimizing a PPM model is handling inputs that have not already occurred in the input stream. The obvious way to handle them is to create a "not in this table" symbol which triggers the escape. But what probability should be assigned to a symbol that has never been seen? This is called the zero-frequency problem. One variant assigns a pseudo-hit count of one. A variant called PPM-D assigns it the probability of the number of unique symbols by the total number of symbols observed.

PPM compression implementations vary greatly in other details. The actual symbol selection is usually recorded using arithmetic encoding, though it is also possible to use Huffman encoding or even some type of dictionary technique. The underlying model used in most PPM algorithms can also be extended to predict multiple symbols. It is also possible to use non-Markov modeling to either replace or supplement Markov modeling. The symbol size is usually static, typically a single byte, which makes generic handling of any file format easy. Some PPM algorithms have the useful property of being able to interpret any collection of bytes as valid compressed input. An algorithm with this property is said to be bijective. Bijectiveness has positive implications for compression efficiency and security because there is no way to distinguish random data from valid output.

Published research on this family of algorithms can be found as far back as the mid 1980's. Software implementations were not popular until the early 1990's because PPM algorithms require a significant amount of RAM. Recent PPM implementation are among the best-performing lossless compression programs for English text.


References and Resources

T. Bell, J. Cleary, and I. Witten (1984) "Data compression using adaptive coding and partial string matching". IEEE Transactions on Communications, Vol. 32(4), p. 396-402.

A. Moffat (1990) "Implementing the PPM data compression scheme". IEEE Transactions on Communications, Vol. 38(11), p. 1917-1921.

J. Cleary, W. Teahan, and I. Witten (1995) "Unbounded length contexts for PPM". In J.A. Storer and M. Cohn, editors, Proceedings DCC-95. IEEE Computer Society Press.

C. Bloom (unknown) "Solving the problems of context modeling". http://www.cbloom.com/papers/ppmz.zip .

M. Nelson (1991) "Arithmetic Coding + Statistical Modeling = Data Compression", Dr. Dobb's Journal. http://cotty.16x16.com/compress/nelson1.htm.

W. Teahan (unknown) "Probability estimation for PPM". http://cotty.16x16.com/compress/peppm.htm (previously http://www.cs.waikato.ac.nz/papers/pe_for_ppm).


PPM and other compression Links http://datacompression.info/PPM.shtml


Higher order compressor discussion http://groups.google.com/groups?q=PPM+group:*compression*&start=25&hl=en&lr=&ie=UTF-8&selm=3g1e25%2462i%40metlab2.my&rnum=27

PAQ4 PPM compression source http://cs.fit.edu/~mmahoney/compression/paq4.cpp

Source for a PPM model with Huffman encoding (rather than patented arithmetic encoding) http://groups.google.com/groups?q=alt.sources+ppm&hl=en&lr=&ie=UTF-8&selm=CM9vFA.J0t%40world.std.com&rnum=1

BIjective COMpressor source http://www3.sympatico.ca/mt0000/bicom/bicom.html