Learning Vector Quantization (LVQ)

Similar documents
Learning Vector Quantization

Learning with Momentum, Conjugate Gradient Learning

Introduction to Natural Computation. Lecture 9. Multilayer Perceptrons and Backpropagation. Peter Lewis

Artificial Neural Networks Examination, June 2005

Artificial Neural Networks Examination, March 2004

Artificial Neural Networks. Edward Gatt

Sample Exam COMP 9444 NEURAL NETWORKS Solutions

ARTIFICIAL NEURAL NETWORKS گروه مطالعاتي 17 بهار 92

Classic K -means clustering. Classic K -means example (K = 2) Finding the optimal w k. Finding the optimal s n J =

Multilayer Perceptrons and Backpropagation

ECE 521. Lecture 11 (not on midterm material) 13 February K-means clustering, Dimensionality reduction

9 Competitive Neural Networks

Artificial Neural Networks Examination, June 2004

Cheng Soon Ong & Christian Walder. Canberra February June 2018

Lecture 4: Perceptrons and Multilayer Perceptrons

Neural Networks Lecture 4: Radial Bases Function Networks

4. Multilayer Perceptrons

The perceptron learning algorithm is one of the first procedures proposed for learning in neural network models and is mostly credited to Rosenblatt.

(Feed-Forward) Neural Networks Dr. Hajira Jabeen, Prof. Jens Lehmann

Chapter 2 Single Layer Feedforward Networks

Classification with Perceptrons. Reading:

Multilayer Neural Networks. (sometimes called Multilayer Perceptrons or MLPs)

y(x n, w) t n 2. (1)

Classification goals: Make 1 guess about the label (Top-1 error) Make 5 guesses about the label (Top-5 error) No Bounding Box

MIDTERM: CS 6375 INSTRUCTOR: VIBHAV GOGATE October,

Instruction Sheet for SOFT COMPUTING LABORATORY (EE 753/1)

Introduction to Neural Networks

Multilayer Neural Networks

Scuola di Calcolo Scientifico con MATLAB (SCSM) 2017 Palermo 31 Luglio - 4 Agosto 2017

Lecture 20: Quantization and Rate-Distortion

Artificial Neural Network : Training

Radial-Basis Function Networks

Radial-Basis Function Networks

Radial Basis Function Networks: Algorithms

Using a Hopfield Network: A Nuts and Bolts Approach

Artificial Neural Networks" and Nonparametric Methods" CMPSCI 383 Nov 17, 2011!

Unit III. A Survey of Neural Network Model

Artificial Neural Networks. MGS Lecture 2

Neural Networks biological neuron artificial neuron 1

Radial Basis Function Networks. Ravi Kaushik Project 1 CSC Neural Networks and Pattern Recognition

What Do Neural Networks Do? MLP Lecture 3 Multi-layer networks 1

Need for Deep Networks Perceptron. Can only model linear functions. Kernel Machines. Non-linearity provided by kernels

Lecture 5: Logistic Regression. Neural Networks

Simple Neural Nets For Pattern Classification

Machine learning comes from Bayesian decision theory in statistics. There we want to minimize the expected value of the loss function.

18.6 Regression and Classification with Linear Models

Multilayer Neural Networks. (sometimes called Multilayer Perceptrons or MLPs)

BACKPROPAGATION. Neural network training optimization problem. Deriving backpropagation

Cheng Soon Ong & Christian Walder. Canberra February June 2018

Convolutional Neural Networks

Unsupervised Classifiers, Mutual Information and 'Phantom Targets'

Supervised Learning in Neural Networks

In the Name of God. Lectures 15&16: Radial Basis Function Networks

Parametric Models. Dr. Shuang LIANG. School of Software Engineering TongJi University Fall, 2012

Neural Network Training

RegML 2018 Class 8 Deep learning

Quantization. Introduction. Roadmap. Optimal Quantizer Uniform Quantizer Non Uniform Quantizer Rate Distorsion Theory. Source coding.

<Special Topics in VLSI> Learning for Deep Neural Networks (Back-propagation)

CSC242: Intro to AI. Lecture 21

Vorlesung Neuronale Netze - Radiale-Basisfunktionen (RBF)-Netze -

Lab 5: 16 th April Exercises on Neural Networks

Multi-layer Neural Networks

Machine Learning. Neural Networks

Machine Learning Lecture 5

CSE 352 (AI) LECTURE NOTES Professor Anita Wasilewska. NEURAL NETWORKS Learning

Lecture XI Learning with Distal Teachers (Forward and Inverse Models)

Machine Learning for Data Science (CS4786) Lecture 8

CSE 417T: Introduction to Machine Learning. Final Review. Henry Chai 12/4/18

CS 6501: Deep Learning for Computer Graphics. Basics of Neural Networks. Connelly Barnes

Notes on Back Propagation in 4 Lines

Neural Nets Supervised learning

Latent Variable Models and Expectation Maximization

Data Mining Part 5. Prediction

Neural Networks Introduction

9 Classification. 9.1 Linear Classifiers

UNSUPERVISED LEARNING

CHALMERS, GÖTEBORGS UNIVERSITET. EXAM for ARTIFICIAL NEURAL NETWORKS. COURSE CODES: FFR 135, FIM 720 GU, PhD

Neural Networks. Nethra Sambamoorthi, Ph.D. Jan CRMportals Inc., Nethra Sambamoorthi, Ph.D. Phone:

Introduction to Neural Networks

Deep Neural Networks (1) Hidden layers; Back-propagation

Least Mean Squares Regression

Multimedia Communications. Scalar Quantization

CSC321 Lecture 4: Learning a Classifier

Expectation Maximization

Clustering. Professor Ameet Talwalkar. Professor Ameet Talwalkar CS260 Machine Learning Algorithms March 8, / 26

CSC Neural Networks. Perceptron Learning Rule

Unit 8: Introduction to neural networks. Perceptrons

Artificial Intelligence

Latent Variable Models and Expectation Maximization

Pattern Classification

Mark Gales October y (x) x 1. x 2 y (x) Inputs. Outputs. x d. y (x) Second Output layer layer. layer.

Numerical Learning Algorithms

Lecture 4: Feed Forward Neural Networks

Deep Feedforward Networks

Deep Feedforward Networks. Sargur N. Srihari

Linear discriminant functions

1 What a Neural Network Computes

Artificial Neural Networks 2

Chapter ML:VI. VI. Neural Networks. Perceptron Learning Gradient Descent Multilayer Perceptron Radial Basis Functions

Transcription:

Learning Vector Quantization (LVQ) Introduction to Neural Computation : Guest Lecture 2 John A. Bullinaria, 2007 1. The SOM Architecture and Algorithm 2. What is Vector Quantization? 3. The Encoder-Decoder Model 4. Relation between a SOM and Noisy Encoder-Decoder 5. Voronoi Tessellation 6. Learning Vector Quantization (LVQ)

The Architecture a Self Organizing Map We shall concentrate on the SOM system known as a Kohonen Network. This has a feed-forward structure with a single computational layer of neurons arranged in rows and columns. Each neuron is fully connected to all the source units in the input layer: Computational layer Input layer A one dimensional map will just have a single row or column in the computational layer. GL2-2

The SOM Algorithm The aim is to learn a feature map from the spatially continuous input space, in which our input vectors live, to the low dimensional spatially discrete output space, which is formed by arranging the computational neurons into a grid. The stages of the SOM algorithm that achieves this can be summarised as follows: 1. Initialization Choose random values for the initial weight vectors w j. 2. Sampling Draw a sample training input vector x from the input space. 3. Matching Find the winning neuron I(x) that has weight vector closest to the D input vector, i.e. the minimum value of d j (x) = (x i w ji ) 2. 4. Updating Apply the weight update equation Δw ji = η(t) T j,i(x) (t) ( x i w ji ) where T j,i(x) (t) is a Gaussian neighbourhood and η(t) is the learning rate. 5. Continuation keep returning to step 2 until the feature map stops changing. This leads to a feature map with numerous useful properties. i=1 GL2-3

Properties of the Feature Map Once the SOM algorithm has converged, the feature map displays important statistical characteristics of the input space. Given an input vector x, the feature map Φ provides a winning neuron I(x) in the output space, and the weight vector w I(x) provides the coordinates of the image of that neuron in the input space. Continuous Input Space Feature Map Φ I(x) x w I(x) Discrete Output Space Properties: Approximation, Topological ordering, Density matching, Feature selection. GL2-4

What is a Vector Quantization? We have already noted that one aim of using a Self Organizing Map (SOM) is to encode a large set of input vectors {x} by finding a smaller set of representatives or prototypes or code-book vectors {w I(x) } that provide a good approximation to the original input space. This is the basic idea of vector quantization theory, the motivation of which is dimensionality reduction or data compression. In effect, the error of the vector quantization approximation is the total squared distance D = x x w I (x) 2 between the input vectors {x} and their representatives {w I(x) }, and we clearly wish to minimize this. We shall see that performing a gradient descent style minimization of D does lead to the SOM weight update algorithm, which confirms that it is generating the best possible discrete low dimensional approximation to the input space (at least assuming it does not get trapped in a local minimum of the error function). GL2-5

The Encoder Decoder Model Probably the best way to think about vector quantization is in terms of general encoders and decoders. Suppose c(x) acts as an encoder of the input vector x, and x (c) acts as a decoder of c(x), then we can attempt to get back to x with minimal loss of information: Input Vector x Encoder c(x) Code c(x) Decoder x (c) Reconstructed Vector x (c) Generally, the input vector x will be selected at random according to some probability function p(x). Then the optimum encoding-decoding scheme is determined by varying the functions c(x) and x (c) to minimize the expected distortion defined by D = x x (c(x)) x 2 2 = dxp(x) x x (c(x)) GL2-6

The Generalized Lloyd Algorithm The necessary conditions for minimizing the expected distortion D in general situations are embodied in the two conditions of the generalized Lloyd algorithm: Condition 1. Given the input vector x, choose the code c = c(x) to minimize the squared error distortion x x (c) 2. Condition 2. Given the code c, compute the reconstruction vector x (c) as the centroid of those input vectors x that satisfy condition 1. To implement vector quantization, the algorithm works in batch mode by alternately optimizing the encoder c(x) in accordance with condition 1, and then optimizing the decoder in accordance with condition 2, until D reaches a minimum. To overcome the problem of local minima, it may be necessary to run the algorithm several times with different initial code vectors. GL2-7

The Noisy Encoder Decoder Model In real applications the encoder-decoder system will also have to cope with noise in the communication channel. We can treat the noise as an additive random variable ν with probability density function π(ν), so the model becomes Noise ν Input Vector x Encoder c(x) Σ Decoder x (c) Reconstructed Vector x (c) It is not difficult to see that the expected distortion is now given by D ν = x x (c(x) + ν) x ν 2 = dxp(x) d νπ(ν) x x 2 (c(x) + ν) GL2-8

The Generalized Lloyd Algorithm with Noise To minimize the modified expected distortion D ν we can compute the relevant partial derivatives and use the modified generalized Lloyd algorithm: Condition 1. Given the input vector x, choose the code c = c(x) to minimize the distortion measure d νπ(ν) x x (c(x)+ ν) 2. Condition 2. Given the code c, compute the reconstruction vector x (c) to satisfy x (c) = dxp(x)π(c c(x))x dxp(x)π(c c(x)). If we set the noise density function π(ν) to be the Dirac delta function δ(ν), that is zero everywhere except at ν = 0, these conditions reduce to the conditions we had before in the no noise case. We can usually approximate Condition 1 by a simple nearest neighbour approach, and then we can determine that the appropriate iterative updates of the reconstruction vector x (c) for condition 2 are Δ x (c) ~ π(c c(x))(x x (c)). GL2-9

Relation between a SOM and Noisy Encoder Decoder We can now see that there is a direct correspondence between the SOM algorithm and the noisy encoder-decoder model: Noisy Encoder-Decoder Model Encoder c(x) Reconstruction vector x (c) Probability density function π(c c(x)) SOM Algorithm Best matching neuron I(x) Connection weight vector w j Neighbourhood function T j,i(x) This provides us with a proof that the SOM algorithm is a vector quantization algorithm which provides a good approximation to the input space. Note that the topological neighbourhood function T j,i(x) in the SOM algorithm has the form of a probability density function. GL2-10

Voronoi Tessellation A vector quantizer with minimum encoding distortion is called a Voronoi quantizer or nearest-neighbour quantizer. The input space is partitioned into a set of Voronoi or nearest neighbour cells each containing an associated Voronoi or reconstruction vector: The SOM algorithm provides a useful method for computing the Voronoi vectors (as weight vectors) in an unsupervised manner. One common application is to use it for finding good centres (input to hidden unit weights) in RBF networks. GL2-11

Learning Vector Quantization (LVQ) Learning Vector Quantization (LVQ) is a supervised version of vector quantization that can be used when we have labelled input data. This learning technique uses the class information to reposition the Voronoi vectors slightly, so as to improve the quality of the classifier decision regions. It is a two stage process a SOM followed by LVQ: Teacher Inputs SOM LVQ Class labels This is particularly useful for pattern classification problems. The first step is feature selection the unsupervised identification of a reasonably small set of features in which the essential information content of the input data is concentrated. The second step is the classification where the feature domains are assigned to individual classes. GL2-12

The LVQ Approach The basic LVQ approach is quite intuitive. It is based on a standard trained SOM with input vectors {x} and weights/voronoi vectors {w j }. The new factor is that the input data points have associated class information. This allows us to use the known classification labels of the inputs to find the best classification label for each w j, i.e. for each Voronoi cell. For example, by simply counting up the total number of instances of each class for the inputs within each cell. Then each new input without a class label can be assigned to the class of the Voronoi cell it falls within. The problem with this is that, in general, it is unlikely that the Voronoi cell boundaries will match up with the best possible classification boundaries, so the classification generalization performance will not be as good as possible. The obvious solution is to shift the Voronoi cell boundaries so they better match the classification boundaries. GL2-13

The LVQ Algorithm The basic LVQ algorithm is a straightforward method for shifting the Voronoi cell boundaries to result in better classification. It starts from the trained SOM with input vectors {x} and weights/voronoi vectors {w j }, and uses the classification labels of the inputs to find the best classification label for each w j. The LVQ algorithm then checks the input classes against the Voronoi cell classes and moves the w j appropriately: 1. If the input x and the associated Voronoi vector/weight w I(x) (i.e. the weight of the winning output node I(x)) have the same class label, then move them closer together by Δw I(x) (t) = β(t)(x w I (x) (t)) as in the SOM algorithm. 2. If the input x and associated Voronoi vector/weight w I(x) have the different class labels, then move them apart by Δw I(x) (t) = β(t)(x w I(x) (t)). 3. Voronoi vectors/weights w j corresponding to other input regions are left unchanged with Δw j (t) = 0. where β(t) is a learning rate that decreases with the number of iterations/epochs of training. In this way we get better classification than by the SOM alone. GL2-14

The LVQ2 Algorithm A second, improved, LVQ algorithm known as LVQ2 is sometimes preferred because it comes closer in effect to Bayesian decision theory. The same weight/vector update equations are used as in the standard LVQ, but they only get applied under certain conditions, namely when: 1. The input vector x is incorrectly classified by the associated Voronoi vector w I(x). 2. The next nearest Voronoi vector w S(x) does give the correct classification, and 3. The input vector x is sufficiently close to the decision boundary (perpendicular bisector plane) between w I(x) and w S(x). In this case, both vectors w I(x) and w S(x) are updated (using the incorrect and correct classification update equations respectively). Various other variations on this theme exist (LVQ3, etc.), and this is still a fruitful research area for building better classification systems. GL2-15

Overview and Reading 1. We began with an overview of SOMs and vector quantization. 2. We then looked at general encoder-decoder models and noisy encoderdecoder models, and the generalized Lloyd algorithm for optimizing them. This led to a clear relation between SOMs and vector quantization. 3. We ended by studying learning vector quantization (LVQ) from the point of view of Voronoi tessellation, and saw how the LVQ algorithm could optimize the class decision boundaries generated by a SOM. Reading 1. Haykin: Section 9.5, 9.7, 9.8, 9.10, 9.11 2. Beale & Jackson: Sections 5.6 3. Gurney: Section 8.3.6 4. Hertz, Krogh & Palmer: Sections 9.2 5. Ham & Kostanic: Section 4.1, 4.2, 4.3 GL2-16