Vector quantization
This article is incomplete.
(February 2009) 
Vector quantization (VQ) is a classical quantization technique from signal processing that allows the modeling of probability density functions by the distribution of prototype vectors. It was originally used for data compression. It works by dividing a large set of points (vectors) into groups having approximately the same number of points closest to them. Each group is represented by its centroid point, as in kmeans and some other clustering algorithms.
The density matching property of vector quantization is powerful, especially for identifying the density of large and highdimensioned data. Since data points are represented by the index of their closest centroid, commonly occurring data have low error, and rare data high error. This is why VQ is suitable for lossy data compression. It can also be used for lossy data correction and density estimation.
Vector quantization is based on the competitive learning paradigm, so it is closely related to the selforganizing map model and to sparse coding models used in deep learning algorithms such as autoencoder.
Contents
Training
A simple training algorithm for vector quantization is:
 Pick a sample point at random
 Move the nearest quantization vector centroid towards this sample point, by a small fraction of the distance
 Repeat
A more sophisticated algorithm reduces the bias in the density matching estimation, and ensures that all points are used, by including an extra sensitivity parameter:
 Increase each centroid's sensitivity by a small amount
 Pick a sample point at random
 Find the quantization vector centroid with the smallest <distancesensitivity>
 Move the chosen centroid toward the sample point by a small fraction of the distance
 Set the chosen centroid's sensitivity to zero
 Repeat
It is desirable to use a cooling schedule to produce convergence: see Simulated annealing. Another (simpler) method is LBG which is based on KMeans.
The algorithm can be iteratively updated with 'live' data, rather than by picking random points from a data set, but this will introduce some bias if the data are temporally correlated over many samples. A vector is represented either geometrically by an arrow whose length corresponds to its magnitude and points in an appropriate direction, or by two or three numbers representing the magnitude of its components.
Applications
Vector quantization is used for lossy data compression, lossy data correction, pattern recognition, density estimation and clustering.
Lossy data correction, or prediction, is used to recover data missing from some dimensions. It is done by finding the nearest group with the data dimensions available, then predicting the result based on the values for the missing dimensions, assuming that they will have the same value as the group's centroid.
For density estimation, the area/volume that is closer to a particular centroid than to any other is inversely proportional to the density (due to the density matching property of the algorithm).
Use in data compression
Vector quantization, also called "block quantization" or "pattern matching quantization" is often used in lossy data compression. It works by encoding values from a multidimensional vector space into a finite set of values from a discrete subspace of lower dimension. A lowerspace vector requires less storage space, so the data is compressed. Due to the density matching property of vector quantization, the compressed data has errors that are inversely proportional to density.
The transformation is usually done by projection or by using a codebook. In some cases, a codebook can be also used to entropy code the discrete value in the same step, by generating a prefix coded variablelength encoded value as its output.
The set of discrete amplitude levels is quantized jointly rather than each sample being quantized separately. Consider a kdimensional vector of amplitude levels. It is compressed by choosing the nearest matching vector from a set of ndimensional vectors , with n < k.
All possible combinations of the ndimensional vector form the vector space to which all the quantized vectors belong.
Only the index of the codeword in the codebook is sent instead of the quantized values. This conserves space and achieves more compression.
Twin vector quantization (VQF) is part of the MPEG4 standard dealing with time domain weighted interleaved vector quantization.
Video codecs based on vector quantization

This list is incomplete; you can help by expanding it.
 Bink video^{[1]}
 Cinepak
 Daala is transformbased but uses vector quantization on transformed coefficients^{[2]}
 Digital Video Interactive: ProductionLevel Video and RealTime Video
 Indeo
 Microsoft Video 1
 QuickTime: Apple Video (RPZA) and Graphics Codec (SMC)
 Sorenson SVQ1 and SVQ3
 Smacker video
 VQA format, used in many games
The usage of video codecs based on vector quantization has declined significantly in favor of those based on motion compensated prediction combined with transform coding, e.g. those defined in MPEG standards, as the low decoding complexity of vector quantization has become less relevant.
Audio codecs based on vector quantization

This list is incomplete; you can help by expanding it.
 AMRWB+
 CELP
 DTS
 G.729
 iLBC
 Ogg Vorbis ^{[3]}
 Opus is transformbased but uses vector quantization on transformed coefficients
 TwinVQ
Use in pattern recognition
VQ was also used in the eighties for speech^{[4]} and speaker recognition.^{[5]} Recently it has also been used for efficient nearest neighbor search ^{[6]} and online signature recognition.^{[7]} In pattern recognition applications, one codebook is constructed for each class (each class being a user in biometric applications) using acoustic vectors of this user. In the testing phase the quantization distortion of a testing signal is worked out with the whole set of codebooks obtained in the training phase. The codebook that provides the smallest vector quantization distortion indicates the identified user.
The main advantage of VQ in pattern recognition is its low computational burden when compared with other techniques such as dynamic time warping (DTW) and hidden Markov model (HMM). The main drawback when compared to DTW and HMM is that it does not take into account the temporal evolution of the signals (speech, signature, etc.) because all the vectors are mixed up. In order to overcome this problem a multisection codebook approach has been proposed.^{[8]} The multisection approach consists of modelling the signal with several sections (for instance, one codebook for the initial part, another one for the center and a last codebook for the ending part).
Use as clustering algorithm
As VQ is seeking for centroids as density points of nearby lying samples, it can be also directly used as a prototypebased clustering method: each centroid is then associated with one prototype. By aiming to minimize the expected squared quantization error^{[9]} and introducing a decreasing learning gain fulfilling the RobbinsMonro conditions, multiple iterations over the whole data set with a concrete but fixed number of prototypes converges to the solution of kmeans clustering algorithm in an incremental manner.
Use in data stream mining
Extending VQbased clustering to the data stream mining case, results in a singlepass algorithm which is able to evolve new prototypes on demand and onthefly based on concepts from adaptive resonance theory (ART), thus termed as eVQ.^{[10]} This ensures a kind of regularization property in terms that cluster prototypes are restricted to move in local regions only. An extension of eVQ has been proposed which recursively calculates not only the prototypes of clusters but also their ranges of influence in form of arbitrarily rotated ellipsoids (using inverse covariance matrix update schemes).^{[11]}
See also
 Speech coding
 Ogg Vorbis
 Voronoi diagram
 Ratedistortion function
 Data clustering
 Learning vector quantization
 Centroidal Voronoi tessellation
 Growing Neural Gas, a neural networklike system for vector quantization
 Image segmentation
 Lloyd's algorithm
 Linde,Buzo,Gray Algorithm (LBG)
 Kmeans clustering
 Autoencoder
 Deep Learning
Part of this article was originally based on material from the Free Online Dictionary of Computing and is used with permission under the GFDL.
References
 ↑ "Bink video". Book of Wisdom. 20091227. Retrieved 20130316.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 ↑ Valin, JM. (October 2012). Pyramid Vector Quantization for Video Coding. IETF. ID draftvalinvideocodecpvq00. http://tools.ietf.org/html/draftvalinvideocodecpvq00. Retrieved 20131217.
 ↑ "Vorbis I Specification". Xiph.org. 20070309. Retrieved 20070309.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 ↑ Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
 ↑ Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
 ↑ Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
 ↑ Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
 ↑ Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
 ↑ Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
 ↑ Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
 ↑ Lughofer, Edwin (2013). "eVQAM: An Extended Dynamic Version of Evolving Vector Quantization". Proceedings of the 2013 IEEE Conference on Evolving and Adaptive Intelligent Systems (EAIS): 40–47.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>