Professional Documents
Culture Documents
Vincent Cheung
Kevin Cannons
Signal & Data Compression Laboratory
Electrical & Computer Engineering
University of Manitoba
Winnipeg, Manitoba, Canada
Advisor: Dr. W. Kinsner
Outline
● Fundamentals
● Classes
● Design and Verification
● Results and Discussion
● Conclusion
Cheung/Cannons 1
Fundamentals Neural Networks
Inputs Outputs
Results
Inputs NN Outputs
Cheung/Cannons 2
Fundamentals Neural Networks
Cheung/Cannons 3
Fundamentals Neural Networks
● Classification
Classes
● Noise Reduction
► Recognize patterns in the inputs and produce
Design
noiseless outputs
● Prediction
► Extrapolation based on historical data
Results
Cheung/Cannons 4
Fundamentals Neural Networks
● Ability to learn
Classes
● Ability to generalize
i.e. produce reasonable outputs for inputs it has not been
Design
►
taught how to deal with
Results
Cheung/Cannons 5
Fundamentals Neural Networks
i3
bias
Results
Cheung/Cannons 6
Fundamentals Neural Networks
Activation Functions
Cheung/Cannons 7
Fundamentals Neural Networks
Activation Functions
logistic function
► f(x) = 1/(1 + e-x)
► The calculation of derivatives are important for neural
networks and the logistic function has a very nice
Design
derivative
■ f’(x) = f(x)(1 - f(x))
►
► arctangent
Cheung/Cannons 8
Fundamentals Neural Networks
outputs
■ Response of the network to the inputs is measured
The weights are modified to reduce the difference between
the actual and desired outputs
Cheung/Cannons 9
Fundamentals Neural Networks
► Unsupervised Training
Classes
● Epoch
■ One iteration through the process of providing the network
with an input and updating the network's weights
■ Typically many epochs are required to train the neural
Results
network
Cheung/Cannons 10
Fundamentals Neural Networks
Perceptrons
.2
.8
Cheung/Cannons 11
Fundamentals Neural Networks
1 0.5
0.2
0 1
1 0.8
Results
Cheung/Cannons 12
Fundamentals Neural Networks
Cheung/Cannons 13
Fundamentals Neural Networks
XOR Example
Classes
Inputs
Output
Design
Inputs: 0, 1
Results
H1: Net = 0(4.83) + 1(-4.83) – 2.82 = -7.65 H2: Net = 0(-4.63) + 1(4.6) – 2.74 = 1.86
Output = 1 / (1 + e7.65) = 4.758 x 10-4 Output = 1 / (1 + e-1.86) = 0.8652
Cheung/Cannons 14
Fundamentals Neural Networks
Backpropagation
Cheung/Cannons 15
Fundamentals Neural Networks
Backpropagation
square error:
E = (target – output)2
► Output Neurons:
let: δj = f’(netj) (targetj – outputj) j = output neuron
∂E/∂wji = -outputi δj i = neuron in last hidden
Results
► Hidden Neurons:
j = hidden neuron
let: δj = f’(netj) Σ(δkwkj)
i = neuron in previous layer
∂E/∂wji = -outputi δj k = neuron in next layer
Cheung/Cannons 16
Fundamentals Neural Networks
Backpropagation
Cheung/Cannons 17
Fundamentals Neural Networks
Backpropagation
► Too small
■ Convergence extremely slow
► Too large
■ May not converge
Design
● Momentum
► Tends to aid convergence
► Applies smoothed averaging to the change in weights:
Results
Cheung/Cannons 18
Fundamentals Neural Networks
Local Minima
error function
► Key problem is avoiding local minima
► Traditional techniques for avoiding local minima:
■ Simulated annealing
Design
Cheung/Cannons 19
Fundamentals Neural Networks
► Input
► Kohonen
► Grossberg (Output)
Results
Cheung/Cannons 20
Fundamentals Neural Networks
● Kohonen Layer:
Classes
● Grossberg Layer:
► Each Grossberg neuron merely outputs the weight of the
connection between itself and the one active Kohonen
neuron
Results
Cheung/Cannons 21
Fundamentals Neural Networks
networks
● Each layer has its own distinct purpose:
► Kohonen layer separates inputs into separate classes
■ Inputs in the same class will turn on the same Kohonen
Design
neuron
► Grossberg layer adjusts weights to obtain acceptable
outputs for each class
Results
Cheung/Cannons 22
Fundamentals Neural Networks
Training a CP Network
Cheung/Cannons 23
Fundamentals Neural Networks
Training a CP Network
Cheung/Cannons 24
Fundamentals Neural Networks
► Too few
■ Underfit the data – NN can’t learn the details
► Too many
■ Overfit the data – NN learns the insignificant details
Results
Cheung/Cannons 25
Fundamentals Neural Networks
Overfitting
Classes
Design
Training
Test
W ell fit
Overfit
Results
Cheung/Cannons 26
Fundamentals Neural Networks
not chosen
● What constitutes a “good” training set?
► Samples must represent the general population
Samples must contain members of each class
Design
►
► Samples in each class must contain a wide range of
variations or noise effect
Results
Cheung/Cannons 27
Fundamentals Neural Networks
can come up with a specific solution, but you can’t find the
general solution with the given information
Cheung/Cannons 28
Fundamentals Neural Networks
Known Samples
Training Testing
Set Set
Cheung/Cannons 29
Fundamentals Neural Networks
Verification
network
● Common error is to “test” the neural network using
the same samples that were used to train the
neural network
Design
set
Cheung/Cannons 30
Fundamentals Neural Networks
Verification
Cheung/Cannons 31
Fundamentals Neural Networks
Cheung/Cannons 32
Fundamentals Neural Networks
output
Design
Cheung/Cannons 34
Fundamentals Neural Networks
► Inverter (continued)
Classes
Cheung/Cannons 35
Fundamentals Neural Networks
► AND gate
Classes
► 3-to-8 decoder
■ 3 inputs, 3 hidden neurons, 8 outputs
■ About 5,000 epochs were required when using momentum
Results
Cheung/Cannons 36
Fundamentals Neural Networks
Cheung/Cannons 37
Fundamentals Neural Networks
2
► Gaussian function approximator (e-x )
Classes
Cheung/Cannons 38
Fundamentals Neural Networks
► Primality tester
Classes
Cheung/Cannons 39
Fundamentals Neural Networks
Cheung/Cannons 40
Neural Networks
Conclusion
Cheung/Cannons 41
Neural Networks
Cheung/Cannons 42
Neural Networks
Acknowledgements
● University of Manitoba
Cheung/Cannons 43
Neural Networks
References
[AbDo99] H. Abdi, D. Valentin, B. Edelman, Neural Networks, Thousand Oaks, CA: SAGE Publication
Inc., 1999.
[Hayk94] S. Haykin, Neural Networks, New York, NY: Nacmillan College Publishing Company, Inc., 1994.
[Mast93] T. Masters, Practial Neural Network Recipes in C++, Toronto, ON: Academic Press, Inc., 1993.
[Scha97] R. Schalkoff, Artificial Neural Networks, Toronto, ON: the McGraw-Hill Companies, Inc., 1997.
[WeKu91] S. M. Weiss and C. A. Kulikowski, Computer Systems That Learn, San Mateo, CA: Morgan
Kaufmann Publishers, Inc., 1991.
[Wass89] P. D. Wasserman, Neural Computing: Theory and Practice, New York, NY: Van Nostrand
Reinhold, 1989.
Cheung/Cannons 44