1 / 41

Connectionist Models: Backprop

Connectionist Models: Backprop. Jerome Feldman CS182/CogSci110/Ling109 Spring 2008. Hebb’s rule is not sufficient. What happens if the neural circuit fires perfectly, but the result is very bad for the animal, like eating something sickening?

nhi
Download Presentation

Connectionist Models: Backprop

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Connectionist Models: Backprop Jerome Feldman CS182/CogSci110/Ling109 Spring 2008

  2. Hebb’s rule is not sufficient • What happens if the neural circuit fires perfectly, but the result is very bad for the animal, like eating something sickening? • A pure invocation of Hebb’s rule would strengthen all participating connections, which can’t be good. • On the other hand, it isn’t right to weaken all the active connections involved; much of the activity was just recognizing the situation – we would like to change only those connections that led to the wrong decision. • No one knows how to specify a learning rule that will change exactly the offending connections when an error occurs. • Computer systems, and presumably nature as well, rely upon statistical learning rules that tend to make the right changes over time. More in later lectures.

  3. tastebud tastes rotten eats food gets sick drinks water Hebb’s rule is insufficient • should you “punish” all the connections?

  4. Models of Learning • Hebbian – coincidence • Supervised – correction (backprop) • Recruitment – one-trial • Reinforcement Learning- delayed reward • Unsupervised – similarity

  5. o u t p u t y { 1 if net > 0 0 otherwise w0 i0=1 w1 w2 wn . . . i1 i2 in i n p u t i Abbstract Neuron Threshold Activation Function

  6. XOR 0.5 1 -1 OR AND 0.5 1.5 1 1 1 1 Boolean XOR o h1 h2 x1 x2

  7. Supervised Learning - Backprop • How do we train the weights of the network • Basic Concepts • Use a continuous, differentiable activation function (Sigmoid) • Use the idea of gradient descent on the error surface • Extend to multiple layers

  8. Backprop • To learn on data which is not linearly separable: • Build multiple layer networks (hidden layer) • Use a sigmoid squashing function instead of a step function.

  9. Tasks Unconstrained pattern classification Credit assessment Digit Classification Speech Recognition Function approximation Learning control Stock prediction

  10. Sigmoid Squashing Function o u t p u t w0 y0=1 w1 w2 wn . . . y1 y2 yn i n p u t

  11. The Sigmoid Function y=a x=net

  12. The Sigmoid Function Output=1 y=a Output=0 x=neti

  13. The Sigmoid Function Output=1 Sensitivity to input y=a Output=0 x=net

  14. Gradient Descent

  15. Gradient Descent on an error

  16. O = output layer Learning Rule – Gradient Descent on an Root Mean Square (RMS) • Learn wi’s that minimize squared error

  17. Gradient: Training rule: Gradient Descent

  18. i2 i1 Gradient Descent global mimimum: this is your goal it should be 4-D (3 weights) but you get the idea

  19. Backpropagation Algorithm • Generalization to multiple layers and multiple output units

  20. Backprop Details Here we go…

  21. wjk wij yi ti: target learning rate k j i E = Error = ½ ∑i (ti – yi)2 The output layer The derivative of the sigmoid is just

  22. Nice Property of Sigmoids

  23. wjk wij yi ti: target k j i E = Error = ½ ∑i (ti – yi)2 The hidden layer

  24. i1 w01 w02 i2 y0 0.4268 b=1 w0b x0 f 0 0 suppose  = 0.5 learning rate Let’s just do an example 0 0.8 1/(1+e^-0.5) 0 0.6 0.5 0.6224 E = Error = ½ ∑i (ti – yi)2 E = ½ (t0 – y0)2 0.5 E = ½ (0 – 0.6224)2 = 0.1937

  25. For each pattern in the training set: Compute the error at the output nodes Compute Dw for each wt in 2nd layer Compute delta (generalized error expression) for hidden units Compute Dw for each wt in 1st layer An informal account of BackProp After amassing Dw for all weights and, change each wt a little bit, as determined by the learning rate

  26. Backpropagation Algorithm • Initialize all weights to small random numbers • For each training example do • For each hidden unit h: • For each output unit k: • For each output unit k: • For each hidden unit h: • Update each network weight wij: with

  27. “activations” “errors” Backpropagation Algorithm

  28. Momentum term • The speed of learning is governed by the learning rate. • If the rate is low, convergence is slow • If the rate is too high, error oscillates without reaching minimum. • Momentum tends to smooth small weight error fluctuations. the momentum accelerates the descent in steady downhill directions. the momentum has a stabilizing effect in directions that oscillate in time.

  29. Convergence • May get stuck in local minima • Weights may diverge …but often works well in practice • Representation power: • 2 layer networks : any continuous function • 3 layer networks : any function

  30. Pattern Separation and NN architecture

  31. Overfitting and generalization TOO MANY HIDDEN NODES TENDS TO OVERFIT

  32. Stopping criteria • Sensible stopping criteria: • total mean squared error change: Back-prop is considered to have converged when the absolute rate of change in the average squared error per epoch is sufficiently small (in the range [0.01, 0.1]). • generalization based criterion: After each epoch the NN is tested for generalization. If the generalization performance is adequate then stop. If this stopping criterion is used then the part of the training set used for testing the network generalization will not be used for updating the weights.

  33. Overfitting in ANNs

  34. Summary • Multiple layer feed-forward networks • Replace Step with Sigmoid (differentiable) function • Learn weights by gradient descent on error function • Backpropagation algorithm for learning • Avoid overfitting by early stopping

  35. ALVINN drives 70mph on highways

  36. Use MLP Neural Networks when … • (vectored) Real inputs, (vectored) real outputs • You’re not interested in understanding how it works • Long training times acceptable • Short execution (prediction) times required • Robust to noise in the dataset

  37. Applications of FFNN Classification, pattern recognition: • FFNN can be applied to tackle non-linearly separable learning problems. • Recognizing printed or handwritten characters, • Face recognition • Classification of loan applications into credit-worthy and non-credit-worthy groups • Analysis of sonar radar to determine the nature of the source of a signal Regression and forecasting: • FFNN can be applied to learn non-linear functions (regression) and in particular functions whose inputs is a sequence of measurements over time (time series).

  38. Extensions of Backprop Nets • Recurrent Architectures • Backprop through time

  39. Output Output 1 Hidden Hidden 1 Context Input Context Input Elman Nets & Jordan Nets Updating the context as we receive input • In Jordan nets we model “forgetting” as well • The recurrent connections have fixed weights • You can train these networks using good ol’ backprop α

  40. Recurrent Backprop a b c • we’ll pretend to step through the network one iteration at a time • backprop as usual, but average equivalent weights (e.g. all 3 highlighted edges on the right are equivalent) a b c w2 w4 unrolling 3 iterations a b c a b c w1 w3 w1 w2 w3 w4 a b c

More Related