Fully Connected Neural Networks
Ahmad Kalhor-University of Tehran
1
Chapter 2
(Each neuron is connected to all neurons of the next layer)
1.1.1 Fully Connected layers� Ideal to make partitions, maps and encoded/decoded data from a set of distinct inputs.
Ahmad Kalhor-University of Tehran
One-Layer Neural Networks
Ahmad Kalhor-University of Tehran
3
Chapter 2 – part 1
One-layer NNs for classification
Ahmad Kalhor-University of Tehran
4
x1
xi
xn
h
w1
wi
wn
A simple one-layer network with a M&P neuron
One can replace the threshold of the M&P neuron with “0” by adding as an extra input (bias term) as follows:
x1
xi
xn
h
w1
wi
wn
1
Remark
Because of simple structure of one-layer NNs, Such networks only include partitioning layers .
Potential of one-layer NNs in classification
Each M&P neuron can partition the feature space into two regions through using an (n-1) dimensional hyper-plane in the input space.
Example: (n=2) net=w1x1+w2x2+b b<0,w1>0,w2>0
Ahmad Kalhor-University of Tehran
5
+
-
-
-
-
-
-
+
+
+
+
+
+
X1
X2
x1
w1
w2
1
b
h
x2
-
More simple Examples (feature points are separated by a line)
Ahmad Kalhor-University of Tehran
6
y | x2 | x1 |
1 | 1 | 1 |
-1 | -1 | 1 |
-1 | 1 | -1 |
-1 | -1 | -1 |
y | x2 | x1 |
1 | 1 | 1 |
1 | -1 | 1 |
1 | 1 | -1 |
-1 | -1 | -1 |
x1
x2
1
1
1
-1
h=sign(net)
x1
x2
1
1
1
1
1
1
-1
-1
1
1
-1
-1
AND Logic
OR logic
net=x1+x2-1
net=x1+x2+1
h=sign(net)
Using one-layer NNs to classify more than two classes
Ahmad Kalhor-University of Tehran
7
For classifying two different classes, which are linearly separable, one M&P neuron is enough.
Assuming m (m >2) classes can be separated linearly through a simple one-layer NN, we want to classify each class with other ones by an independent output(one-hot outputs):
1- Exactly, m M&P neurons are required for classification purpose.
2- Each M&P neuron will separate a certain class from other ones by forming a hyper-plane in feature space.
3- By using such hyper planes, a convex hyper-polygon is appeared .
x1
x2
1
h1
w11
w12
b1
Example:
w21
w22
b2
h2
h3
w31
w32
b3
net1=0
net2=0
net3=0
Linear Perceptron Network
Ahmad Kalhor-University of Tehran
8
Chapter 2 – part 1
Linear Perceptron Network (Rosenblatt,1958,59, 62)
Ahmad Kalhor-University of Tehran
9
x1
xi
xn
h
w1
wi
wn
1
b
1
1
-1
-1
Example
Learning rules for Perceptron Network
1- Updating rule for the weights:
where xi denotes ith input and t denotes the target value for output
2-Updating rule for the bias:
sign(wi+-wi-)=-sign(gradient of squared error with respect to w)
sign(b+-b-)=-sign(gradient of squared error with respect to b)
Ahmad Kalhor-University of Tehran
10
Learning Algorithm for Perceptron Network
Step 0- initialize the weights, the bias term, the learning rate and the threshold
Step 1- for each (input , target) training set, {(s,t)}, do steps 2, 3 and 4.
Step 2- Assign
Step 3- Compute the output vector, h, according to equation (#)
Step 4- if the error, (h-t), is not zero update the weights and the bias term according to equations (*),(**)
Step 5- if the computed error terms for all training pairs (s, t) are zero go to “End” else go to Step1.
Step 6- End.
Ahmad Kalhor-University of Tehran
11
Some examples
1- Classification of “And logic ” (with bipolar inputs and output) by Linear Perceptron Network
Ahmad Kalhor-University of Tehran
12
sample | s | 1 | t | |
x1 | x2 | |||
1 | 1 | 1 | 1 | 1 |
2 | 1 | -1 | 1 | -1 |
3 | -1 | 1 | 1 | -1 |
4 | -1 | -1 | 1 | -1 |
Sample 1 | w1 0 | w2 0 | b 0 | h 0 | error -1 | Line |
2 | 1 | 1 | 1 | 1 | 2 | A |
3 | 0 | 2 | 0 | 1 | 2 | B |
4 | 1 | 1 | -1 | -1 | 0 | C |
1 | 1 | 1 | -1 | -1 | 0 | C |
2 | 1 | 1 | -1 | 1 | 0 | C |
3 | 1 | 1 | -1 | -1 | 0 | C |
1
x1
x2
w1
w2
b
h
1
1
-1
-1
A
B
C
x1
x2
n=2
2- Classification of “And logic” (with binary inputs and bipolar output) by Linear Perceptron Network
Ahmad Kalhor-University of Tehran
13
sample | s | 1 | t | |
x1 | x2 | |||
1 | 1 | 1 | 1 | 1 |
2 | 1 | 0 | 1 | -1 |
3 | 0 | 1 | 1 | -1 |
4 | 0 | 0 | 1 | -1 |
1
x1
x2
w1
w2
b
h
1
1
-1
-1
A
C
x2
Sample 1 | w1 0 | w2 0 | b 0 | h 0 | error -1 | Line |
2 | 1 | 1 | 1 | 1 | 2 | A |
…….(after 10 epoch)……. | ||||||
1 | 2 | 3 | -4 | 1 | 0 | C |
2 | 2 | 3 | -4 | -1 | 0 | C |
3 | 2 | 3 | -4 | -1 | 0 | C |
4 | 2 | 3 | -4 | -1 | 0 | C |
x1
n=2
3- Parity bit
Ahmad Kalhor-University of Tehran
14
sample | s | 1 | t | ||
x1 | x2 | x3 | |||
1 | 1 | 1 | 1 | 1 | 1 |
2 | 1 | 1 | 0 | 1 | -1 |
3 | 1 | 0 | 1 | 1 | -1 |
4 | 0 | 1 | 1 | 1 | -1 |
1
x1
x2
w1
w2
b
h
Sample 1 | w1 0 | w2 0 | w3 0 | b 0 | error -1 |
2 | 1 | 1 | 1 | 1 | 2 |
------ after 26 epochs----- | |||||
1 | 2 | 3 | 4 | -8 | 0 |
2 | 2 | 3 | 4 | -8 | 0 |
3 | 2 | 3 | 4 | -8 | 0 |
4 | 2 | 3 | 4 | -8 | 0 |
w3
x3
If all bits are “1” then t=1 else t=-1
n=3
4- Classifying letters A,B,C,D,E,J and K
- Each Letter has three different fonts and totally 21 patterns are defined.�it is desired that each letter with its three patterns being classified.
Each letter is shown through a 9*7 dimensional dot matrix.
Example: Letter B
Ahmad Kalhor-University of Tehran
15
0 | # | # | # | # | # | # |
# | 0 | 0 | 0 | 0 | 0 | # |
# | 0 | 0 | 0 | 0 | 0 | # |
# | 0 | 0 | 0 | 0 | 0 | # |
# | # | # | # | # | # | # |
# | 0 | 0 | 0 | 0 | 0 | # |
# | 0 | 0 | 0 | 0 | 0 | # |
# | 0 | 0 | 0 | 0 | 0 | # |
0 | # | # | # | # | # | # |
# is represented by 1
0 is represented by -1
9 rows (each one includes 7 pixels) make a vector with 63 elements
SB=[1 1 1 1 1 1 0,………, 1 1 1 1 1 1 0]
n=63
Ahmad Kalhor-University of Tehran
16
Ahmad Kalhor-University of Tehran
17
1
A
B
C
D
E
J
x1
x2
x63
K
After training phase, each output neuron separates patterns of a certain class with patterns of other classes.
Ahmad Kalhor-University of Tehran
18
Suppose that all 21 patterns become disturbed with noise: some of pixels #(0) are randomly replaced with 0(#) or become off (up to 30%).
The former trained perceptron Network is applied to classify such disturbed letters. The following table presents the results:
| | | | | | | | |
K | J | E | D | C | B | A | Disturbed | Font1 |
K | J | E | D | C,E,K | B | A | Output ANN | |
K | J | E | D | C | B | A | Disturbed | Font2 |
K | J | E | D | C | B | K | Determined | |
K | J | E | D | C | B | A | Disturbed | Font3 |
K | J | , K E | D | C | B | A | Output ANN |
As it is understood the disturbed patterns of different classes can not be separated linearly.
Perceptron Learning Rule Convergence Theorem
Ahmad Kalhor-University of Tehran
19
Theorem:
If there is a weight vector W* such that f(x(p).W*)=t(p) for all P. then for any starting vector w, the perceptron learning rule will converge to a weight vector (not necessarily unique and not necessarily w*) that gives the correct response for all training patterns, and it will do so in a finite number of steps.
Problem
The perceptron learning rule is as follows:
Given a finite set of P input training vectors
x(p) p=1,…,P
Each with an associated target value
t(p), p=1,…..,P
Which is either +1 or -1, and an activation function h=f(net), where
The weights are updated as follows
If (h-t) is not zero then
w(new)=w(old)+tx
Else
No change in the weights
Proof is given in the book�
Ahmad Kalhor-University of Tehran
20
An upper bound for number of iterations in convergence is resulted as follows:
Considering some assumptions it can be concluded that:
1- M addresses a variant of within distance among patterns of each class(WD).
2- m addresses a variant between distance among patterns of two classes(BD)
if in an distribution, all patterns of a class make small WD and patterns of two classes make big BD, the upper bound will be decreased and the convergence may be occurred through less iterations.
Example
Ahmad Kalhor-University of Tehran
21
m=Min(W*x)
M=Max(||x||2)
||W*||=1
~M0.5
m1
W*x=0
Since m1<<m2
it is expected that K1>>k2
~ M0.5
W*x=0
m2
K1 : An upper bound for the number of updating rules required to find the separation line
K2 : An upper bound for the number of updating rules required to find the separation line
Adaptive Linear Unit (AdaLine)
Ahmad Kalhor-University of Tehran
22
Chapter 2 – part 1
Ahmad Kalhor-University of Tehran
23
x1
xi
xn
h
w1
wi
wn
1
b
AdaLine is a type of one-layer network
The architecture of AdaLine and Perceptron networks are similar but they use different learning rules for the weights and the bias.
(1)
Adaptive Linear Unit (AdaLine) (widrow & Hoff 1960)
Learning rules in Adaline
For each training data set (s,t), the updating rules for weights and bias are defined as follows:
Delta’s leaning rules are defined based on LMS (Least Mean Squares).
error=t-net
Ahmad Kalhor-University of Tehran
24
(2)
Delta is the name of learning rules utilized in AdaLine
Learning Algorithm for AdaLine
Step 0- initialize the weights, the bias term (small random values) and choose a small value for learning rate.
Step 1- for each (input , target) training set, {(s,t)} ,do steps 2, 3 and 4
Step 2- Assign
Step 3- Compute sum of weighted inputs “net” according to equation (1)
Step 4- Update the weights and the bias term according to equations (2).
Step 5- if the computed cost function for all training pairs (s,t) becomes less than a threshold go to “End” and else go to Step1.
Step 6- End
Ahmad Kalhor-University of Tehran
25
Example
1- Classification of “And logic ” (with bipolar input and output) by AdaLin.
Ahmad Kalhor-University of Tehran
26
sample | s | 1 | t | |
x1 | x2 | |||
1 | 1 | 1 | 1 | 1 |
2 | 1 | -1 | 1 | -1 |
3 | -1 | 1 | 1 | -1 |
4 | -1 | -1 | 1 | -1 |
1
x1
x2
w1
w2
b
h
1
1
-1
-1
x1
x2
n=2
Final optimized line: net= 2/3 x1 + x2 - 4/3
Delta works based on the Gradient Descent method
Ahmad Kalhor-University of Tehran
27
Cost Function: Square Error between the target and net
Delta updates the weights and the bias of the AdaLine based on the (first order) Gradient Descent method.
Gradient Descent method (First order Gradient)
Ahmad Kalhor-University of Tehran
28
As a result, while first order gradient is not zero, the loss function will be decreased.
Repeating the above rule, the loss function decreasing is continued until p converges to a local optimal point like p1 . if p1 is equal to p* (the absolute optimal point) the loss function has met his absolute minimum point otherwise a sub-optimal answer in minimizing the function has been resulted.
Ahmad Kalhor-University of Tehran
29
Local Optimal
P*(optimal point)
P0 (initial point)
P1
J
A one dimensional illustrative example
Delta Convergence Property
Since the error is defined as difference of the target and net (not difference of target and output), the net (not necessarily the output of network) becomes near to the target.
If distribution of patterns in two classes is near together in shape and population, the “Delta” will learn a robust separation hyper-plane among patterns of two classes (Figure a), otherwise, there will no guarantee for true separation (Figure b).
Ahmad Kalhor-University of Tehran
30
(a)
(b)
A solution
Replace the “sign” function with a “soft sign” such as “tanh”. Unlike “sign”, “tanh” is smooth and one can compute the new updating rules by gradient descent.
�
if is chosen so big then “tanh” will be near to a “sign” function. Now, by decreasing the loss function, the output of network will converge to the target value (as it was done in perception network).
Ahmad Kalhor-University of Tehran
31
Using the aforementioned solution
Ahmad Kalhor-University of Tehran
32
Multi AdaLine (MAdaLine)
Ahmad Kalhor-University of Tehran
33
Chapter 2 – part 1
MAdaLine is made from some AdaLines which are combinated by an “OR” or “AND” M&P neuron.
MAdaLine has the required potential to separate a set of patterns (with a unique label) surrounded by a convex hyper-polygon
Ahmad Kalhor-University of Tehran
34
Multi AdaLine (MAdaLine)
AdaLines
1
AND
x1
x2
A
B
C
D
E
+ -
-
+
-
+
+ -
+ -
A
B
C
D
E
Example
Learning the required number of Adalines and their weights, to make an appropriate convex hyper polygon, is not straightforward
1
XOR Example (Widrow & Hoff 1960)
1- Classification of “Xor” logic by MAdaLine
Ahmad Kalhor-University of Tehran
35
sample | s | 1 | t | |
x1 | x2 | |||
1 | 1 | 1 | 1 | -1 |
2 | 1 | -1 | 1 | 1 |
3 | -1 | 1 | 1 | 1 |
4 | -1 | -1 | 1 | -1 |
x1
1
1
-1
-1
x2
n=2
x1
x2
A
B
1
OR
A
B
1
Two Algorithms:
MRI: The output neuron is adjusted as an “OR” logic and only the weights and biases of hidden neurons are trained.
MRII: All the weights and biases of hidden and output layers are trained.
Two above algorithms have been explained in the book.
0.5
0.5
0.5
-1
1
-1
-1
1
-1
x2-x1-1=0
x1-x2-1=0
MAdaLine can separate more that one set of patterns surrounded by convex-hyper polygons.
Ahmad Kalhor-University of Tehran
36
AdaLines
1
AND
2
x1
x2
1
2
3
4
5
Example
1
1
1
AND
6
7
2
2
2
2
2
1
1
1
1
2
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
An illustrative example
Some hidden neurons with near hyper-plans can be merged and the redundancy is decreased.
Disabilities of MAdaLine
-The patterns of a certain class are divided to more than one convex hyper-polygon shape cluster.
-The patterns of a certain class have a non-convex hyper-polygon shape cluster.
3. Redundancies including correlations and disturbances can not be removed/Filtered by MAdaLine networks.
Ahmad Kalhor-University of Tehran
37
Solutions for aforementioned problems
1- Using gradient search methods 🡪 Multi Layer Percepetron with one hidden layer
(1):Systematic optimization method /Convex shape partitioning/ Mapping
2-Considering two hidden layers in the network 🡪 Multi Layer Percepetron with two hidden layers
(1)+(2):Non-Convex shape partitioning/ Mapping
3-1. Using Encoding Part (auto-encoder/stacked RBMs) with two hidden layers 🡪 Multi Layer Neural Networks
(1)+(2)+(3):Dimensionality Reduction
3-2. Using some Filters and scaling layers 🡪 Convolutional Neural Network
(1)+(2)+(3)+(4):disturbance Filtering
Ahmad Kalhor-University of Tehran
38
Multi Layer Perceptron with one hidden layer (Rumelhart 1986)
Ahmad Kalhor-University of Tehran
39
Input-output
Equation:
Weight Matrices:
Bias Vectors:
Activation
Functions
1
f
f
f
g
g
1
Input layer
(n units)
Hidden layer
(m neurons)
Output layer
(r outputs)
x1
x2
xn
a2
h1
hr
W1,b1
W2,b2
z2
z3
x
Multi-Layer Perceptron (MLP)
with one hidden layer
Ahmad Kalhor-University of Tehran
40
Chapter 2 – part 1
Learning Process of MLP with one hidden layer�Error Back Propagation (BP)
Training Set:
(W, b) are tuned in order to
Loss Function(SSE):
Updating Rules for sample “q” and after “call” stage and assuming the output is scalar (from the “output-layer” in a back-ward manner to the “first-layer”):
Ahmad Kalhor-University of Tehran
41
2
Learning Algorithm for MLP
0- Scale every input between “0 up to 1” or “-1 up to 1” (to get better results in learning) .
1- Initialize the weights and biases as small random real values. Consider a small learning rate to guarantee a successful local search and then set epoch=0.
2- Apply input(s) of training set to the Network in one of following methods.
2-1 Batch based : All data pints are applied, simultaneously .
2-2 Stochastic based: Data are shuffled and then data points are applied one by one.
2-3 Stochastic mini batch based: training data set are randomly divided to a certain number of subsets (min-batches); then at each time a min-batch is chosen and applied.
3- According to the considered method(2-1, 2-2 or 2-3), compute the outputs of the network, the error and the loss function(Call stage)
4- According to the considered method(2-1, 2-2 or 2-3), use the updating rules for the weights and biases (ReCall stage)
5- If the method 2-2 or 2-3 has been chosen, repeat steps 3 and 4 until all training data points or min-batches are applied, completely.
6- if the loss function is decreased continually for both training and validation sets, let epoch:=epoch+1 and return to 2, else go to the next step.
7- The algorithm is terminated. To check the generalization of the network it is evaluated by the considered validation dataset.
Ahmad Kalhor-University of Tehran
42
Some Important Notes
Ahmad Kalhor-University of Tehran
43
Jtr
Jval
Epoch
k*
Loss Function for training set
Loss Function for validation set
Stop Condition
1. How many neurons should be defined in the hidden layer ?�It depends on the required complexity in partitioning (for classification) or mapping(for regression). It is suggested that the appropriate number of neurons optimized from low to up
2. To avoid diverging the weights to infinity, which is an invalid learning causing over-fitness, it is suggested to add a regularization term in loss function. (λ≥0 :regulation weight)
3. The stop condition become satisfied when the computed loss function of the validation set does not decrease any more.
Although decreasing rate of loss function for training set is important, to avoid over fitness, the decreasing rate of loss function for validation set should be considered for stop condition.
A Simple Example of Call and Recall in an MLP with one hidden layer
Ahmad Kalhor-University of Tehran
44
Call
ReCall
f
f
f
g
x1
x2
1
1
*Loss function is decreased
Derivative Chain Rule
Ahmad Kalhor-University of Tehran
45
Some notes
3. Since the derivative of sigmoid function is less than one, one can say the norm of gradients for first layers is reduced significantly (gradient vanishing).
illustrative Example1: Function Approximation
Function Sinc(x)=sin(x)/x
Ahmad Kalhor-University of Tehran
46
Illustrative Example2: Classification(Convex Shape)
Ahmad Kalhor-University of Tehran
47
N. of Neurons in Layer1=4
Learning rate=0.001
Learning Method: Batch-Based BP
N. of Training samples=100
N. of validation samples=400
Target Partitions
Trained Partitions
Training set
After Training
Illustrative Example3: Classification (Non-convex Shape)
Ahmad Kalhor-University of Tehran
48
Target Partitions(top view)
N. of Neurons in Layer1=10
Learning rate=0.005
N. of training set=100 samples
N. of validation set=400 samples
Learning set: Batch-Based BP
Training set
Trained Partitions(top view)
After Training
Potential of MLP with one hidden layer in Function Approximation
It was proved that: a MLP NN with one hidden layer containing a finite number of neurons can approximate any continuous functions on compact subsets of Rn, Cybenko, 1989. It does not touch upon the algorithmic learnability of those parameters.
2. Though it was mentioned that MAdaLine can not model the family of non-convex functions, due to using softness of tanh() and using not quantized weights in output layer, non-convex regions(maps) can be modeled by MLP with one hidden layer.
3. In such cases, the required redundancy in using hidden neurons is high and hence over fitness will be occurred and the generalization of the network particularly for uncompact subsets (unbounded maps or partitions) is not guaranteed.
Ahmad Kalhor-University of Tehran
49
Multi-Layer Perceptron (MLP)
with two hidden layers
Ahmad Kalhor-University of Tehran
50
Chapter 2 – part 1
Multi Layer Perceptron with two hidden layers
Ahmad Kalhor-University of Tehran
51
1
f
f
f
f
f
1
Input layer
(n units)
Hidden layers 1 and 2
(m1 and m2 neurons)
Output layer
(r outputs)
x1
x2
xn
a2
h1
hr
W1,b1
W2,b2
z2
z3 a3
x
f
1
f
f
W3,b3
z4
Learning Process of MLP with two hidden layers�Error Back Propagation (BP)
Training Set:
(W, b) is optimized in order to
Loss Function(SSE):
Using error back-propagation, all weight matrices as well as bias vectors should be updated.
Ahmad Kalhor-University of Tehran
52
Potential of the MLP with two hidden layers
1- Partitioning (Classification)
Reliable classification means:(1) the redundancy in number of the required neurons is low (2), the robustness against input uncertainties is high and (3) the generalization for un-compact subsets is high.
Ahmad Kalhor-University of Tehran
53
2
1
1
3
3
An Illustrative Example:
1
1
9
1
5
1
7
1
1
1
2
2
3
3
1
2
3
1
1
x1
x2
Potential of the MLP with two hidden layers
2- Mapping(Regression)
Ahmad Kalhor-University of Tehran
54
Illustrative Example1: Function Approximation
Function : Sinc(x)=sin(x)/x
Ahmad Kalhor-University of Tehran
55
Comparison with MLP including one hidden-layer
1. Less number of parameters 2.better accuracy 3.better validation
Illustrative Example2: Classification
Ahmad Kalhor-University of Tehran
56
Target Partitions(top view)
Trained Partitions(top view)
After Training
N. of Neurons in Layer1=2
N. of Neurons in Layer2=2
Learning rate=0.005
N. of training set=100 samples
N. of validation set=400 samples
Learning set: Batch-Based BP
Multi Layer Neural Networks (MLNNs)
Ahmad Kalhor-University of Tehran
57
Chapter 2 – part 1
Multi Layer Neural Networks (MLNNs) �(http://ufldl.stanford.edu/tutorial/supervised/MultiLayerNeuralNetworks/)
Ahmad Kalhor-University of Tehran
58
1
x1
Xs1
1
1
)}
)}
A Simple Example (to introduce the notation)
Ahmad Kalhor-University of Tehran
59
MLNN Learning Algorithm
Ahmad Kalhor-University of Tehran
60
Back propagation Algorithm in Detail
Ahmad Kalhor-University of Tehran
61
The BP algorithm by matrix-vector notation
Ahmad Kalhor-University of Tehran
62
”∙*∙” to denote the element-wise product operator
For sigmoid function:
Full Gradient Descent Algorithm
Ahmad Kalhor-University of Tehran
63
*Former Introduced MLP with one or two hidden layers can be considered as MLNN with three or four layers.
Dimensionality Reduction in MLNNs
Ahmad Kalhor-University of Tehran
64
Chapter 2 – part 1
Dimensionality Reduction in MLNNs
Ahmad Kalhor-University of Tehran
65
Important Notes
Ahmad Kalhor-University of Tehran
66
Illustrative Examples
Ahmad Kalhor-University of Tehran
67
x
z
Linear Correlation
Nonlinear Correlation
Maximum Variance
x
Dimension
Reduction
Dimension
Reduction
Dimension
Reduction
m=1
m=2
m=1
n=3
n=3
n=2
n=3
n=2
n=3
Removing Linear Correlations by PCA
Assume x denotes an n-dimensional point of the input space: xT=[1,x1,x2,..,xn] (bias has been augmented)
There will be a linear correlation among different input dimensions, if for all samples of x there is a non-zero real scalars(the normal vector), aT=[a0,a1,..,an] , in order that:
One can show for r independent linear correlations, “r” Eigen values of the “Auto Correlation Matrix” (R) are zero and their corresponding Eigen vectors reveal “r” independent linear correlations.
Ahmad Kalhor-University of Tehran
68
Dimensionality Reduction and Data Retrieving for Linear Correlations
Ahmad Kalhor-University of Tehran
69
Nullity part which will be removed.
Informative part which forms the new space
Nonlinear Correlation Removing
Ahmad Kalhor-University of Tehran
70
Locally Linear PCA
V(x)=[V1(x),V2(x)]
Input space including input patterns
Two Valuable Notes
Ahmad Kalhor-University of Tehran
71
Patch with limited size
Locally Linear PCA
V(x)=[V1(x),V2(x)]
r=dim(V1(x))
Auto-Encoders
Ahmad Kalhor-University of Tehran
72
Chapter 2 – part 1
Auto-Encoders (Liou and Huang 2008)
Ahmad Kalhor-University of Tehran
73
Dimensional Reduction
Data
Retrieving
Encoding
Decoding
1
1
1
1
Using ANN to Dimension Reduction
Auto-Encoder
An Auto-encoder
Some important notes about Auto-Encoders
Ahmad Kalhor-University of Tehran
74
Restricted Boltzmann Machine (RBM)
Ahmad Kalhor-University of Tehran
75
Chapter 2 – part 1
Restricted Boltzmann Machine(RBM) Paul Smolensky in 1986
Ahmad Kalhor-University of Tehran
76
RBM versus Auto-Encoders
Ahmad Kalhor-University of Tehran
77
RBM as an Auto-encoder
Training of an RBM
Ahmad Kalhor-University of Tehran
78
Optimization Problem:
2. Learning by Gibbs Sampling�
Ahmad Kalhor-University of Tehran
79
1. Learning by Gradient Search
Cascaded RBMs
Ahmad Kalhor-University of Tehran
80
Method
RBM(1)
RBM(2)
RBM(3)
RBM(J)_
Visible input
H1
H2
H3
HJ
H1
HJ
H2
H3
Using Auto-Encoders (or Cascaded RBMs) in Classification and Regression� Deep Belief Network (DBN)
Ahmad Kalhor-University of Tehran
81
1
1
1
1
1
Encoding
Partitioning (or Mapping)
From Auto-Encoders
(or Cascaded RBMs)
Regular Fully
Connected Layers
Some Important Notes about Deep Belief Network (DBN)
Ahmad Kalhor-University of Tehran
82
How many hidden layers are required in DBN (at least)?
Ahmad Kalhor-University of Tehran
83
Transformation map
Partitioning/Mapping
An illustrative Example
Ahmad Kalhor-University of Tehran
84
Mapping
Encoding
h
z1
z2
x1
x2
x3
z1
z2
h(z1,z2)
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
End of Chapter2
Thank you
Ahmad Kalhor- University of Tehran
85