900 likes | 1.09k Vues
Machine Learning. Neural Networks. Introduction. Artificial Neural Network is based on the biological nervous system as Brain It is composed of interconnected computing units called neurons ANN like human, learn by examples. Why Artificial Neural Networks?.
E N D
Machine Learning Neural Networks
Introduction • Artificial Neural Network is based on the biological nervous system as Brain • It is composed of interconnected computing units called neurons • ANN like human, learn by examples
Why Artificial Neural Networks? There are two basic reasons why we are interested in building artificial neural networks (ANNs): • Technical viewpoint: Some problems such as character recognition or the prediction of future states of a system require massively parallel and adaptive processing. • Biological viewpoint: ANNs can be used to replicate and simulate components of the human (or animal) brain, thereby giving us insight into natural information processing.
Science: Model how biological neural systems, like human brain, work? • How do we see? • How is information stored in/retrieved from memory? • How do you learn to not to touch fire? • How do your eyes adapt to the amount of light in the environment? • Related fields: Neuroscience, Computational Neuroscience, Psychology, Psychophysiology, Cognitive Science, Medicine, Math, Physics.
Brief History Old Ages: • Association (William James; 1890) • McCulloch-Pitts Neuron (1943,1947) • Perceptrons (Rosenblatt; 1958,1962) • Adaline/LMS (Widrow and Hoff; 1960) • Perceptrons book (Minsky and Papert; 1969) Dark Ages: • Self-organization in visual cortex (von der Malsburg; 1973) • Backpropagation (Werbos, 1974) • Foundations of Adaptive Resonance Theory (Grossberg; 1976) • Neural Theory of Association (Amari; 1977)
History Modern Ages: • Adaptive Resonance Theory (Grossberg; 1980) • Hopfield model (Hopfield; 1982, 1984) • Self-organizing maps (Kohonen; 1982) • Reinforcement learning (Sutton and Barto; 1983) • Simulated Annealing (Kirkpatrick et al.; 1983) • Boltzmann machines (Ackley, Hinton, Terrence; 1985) • Backpropagation (Rumelhart, Hinton, Williams; 1986) • ART-networks (Carpenter, Grossberg; 1992) • Support Vector Machines
Hebb’s Learning Law • In 1949, Donald Hebb formulated William James’ principle of association into a mathematical form. • If the activation of the neurons, y1 and y2 , are both on (+1) then the weight between the two neurons grow. (Off: 0) • Else the weight between remains the same. • However, when bipolar activation {-1,+1} scheme is used, then the weights can also decrease when the activation of two neurons does not match.
Real Neural Learning • Synapses change size and strength with experience. • Hebbian learning: When two connected neurons are firing at the same time, the strength of the synapse between them increases. • “Neurons that fire together, wire together.”
Biological Neurons • Human brain = tens of thousands of neurons • Each neuron is connected to thousands other neurons • A neuron is made of: • The soma: body of the neuron • Dendrites: filaments that provide input to the neuron • The axon: sends an output signal • Synapses: connection with other neurons – releases certain quantities of chemicals called neurotransmitters to other neurons
The biological neuron • The pulses generated by the neuron travels along the axon as an electrical wave. • Once these pulses reach the synapses at the end of the axon open up chemical vesicles exciting the other neuron.
How do NNs and ANNs work? • Information is transmitted as a series of electric impulses, so-called spikes. • The frequency and phase of these spikes encodes the information. • In biological systems, one neuron can be connected to as many as 10,000 other neurons. • Usually, a neuron receives its information from other neurons in a confined area
Navigation of a car • Done by Pomerlau. The network takes inputs from a34X36videoimage and a7X36range finder. Output units represent “drive straight”, “turn left” or “turn right”. After training about 40 times on 1200 road images,the car drove around CMU campus at 5 km/h (using a small workstation on the car). This was almost twice the speed of any other non-NN algorithm atthe time.
Automated driving at 70 mph on a public highway Camera image 30 outputs for steering 30x32 weights into one out of four hidden unit 4 hidden units 30x32 pixels as inputs
Computers vs. Neural Networks “Standard” Computers Neural Networks one CPU highly parallel processing fast processing units slow processing units reliable units unreliable units static infrastructure dynamic infrastructure
Neural Network Application • Pattern recognition can be implemented using NN • The figure can be T or H character, the network should identify each class of T or H.
Simple Neuron X1 Inputs X2 Output Xn b
An Artificial Neuron synapses neuron i x1 x2 Wi,1 Wi,2 … xi … Wi,n xn net input signal output
Neural Network Input Layer Hidden 1 Hidden 2 Output Layer
Network Layers The common type of ANN consists of three layers of neurons: a layer of input neurons connected to the layer of hidden neuron which is connected to a layer of output neurons.
Architecture of ANN • Feed-Forward networks Allow the signals to travel one way from input to output • Feed-Back Networks The signals travel as loops in the network, the output is connected to the input of the network
How do NNs and ANNs Learn? • NNs are able to learn by adapting their connectivity patterns so that the organism improves its behavior in terms of reaching certain (evolutionary) goals. • The NN achieves learning by appropriately adapting the states of its synapses.
Learning Rule • The learning rule modifies the weights of the connections. • The learning process is divided into Supervised and Unsupervised learning
Supervised Network • Which means there exists an external teacher. The target is to minimization of the error between the desired and computed output
Unsupervised Network Uses no external teacher and is based upon only local information.
X1 W1 f Inputs X2 W2 Output Wn Xn Perceptron • It is a network of one neuron and hard limit transfer function
Perceptron • The perceptron is given first a randomly weights vectors • Perceptron is given chosen data pairs (input and desired output) • Preceptron learning rule changes the weights according to the error in output
Perceptron Learning Rule W new = W old + (t-a) X Where W new is the new weight W old is the old value of weight X is the input value t is the desired value of output a is the actual value of output
Example • Let • X1 = [0 0] and t =0 • X2 = [0 1] and t=0 • X3 = [1 0] and t=0 • X4 = [1 1] and t=1 • W = [2 2] and b = -3
AND Network • This example means we construct a network for AND operation. The network draw a line to separate the classes which is called Classification
Perceptron Geometric View The equation below describes a (hyper-)plane in the input space consisting of real valued m-dimensional vectors. The plane splits the input space into two regions, each of them describing one class. decision region for C1 x2 w1x1 + w2x2 + w0 >= 0 decision boundary C1 x1 C2 w1x1 + w2x2 + w0 = 0
Problems • Four one-dimensional data belonging to two classes are X = [1 -0.5 3 -2] T = [1 -1 1 -1] W = [-2.5 1.75]
Boolean Functions • Take in two inputs (-1 or +1) • Produce one output (-1 or +1) • In other contexts, use 0 and 1 • Example: AND function • Produces +1 only if both inputs are +1 • Example: OR function • Produces +1 if either inputs are +1 • Related to the logical connectives from F.O.L.
1 X1 X2 Y 1 AND Function The First Neural Neural Networks Threshold(Y) = 2
-1 W = 1.5 x t = 0.0 W = 1 y Simple Networks
Exercises • Design a neural network to recognize the problem of • X1=[2 2] , t1=0 • X=[1 -2], t2=1 • X3=[-2 2], t3=0 • X4=[-1 1], t4=1 Start with initial weights w=[0 0] and bias =0