Natural Language Understanding
Lecture 2: Revision of neural networks and backpropagation
Adam Lopez Credits: Mirella Lapata and Frank Keller 19 January 2018
School of Informatics University of Edinburgh alopez@inf.ed.ac.uk 1
Natural Language Understanding Lecture 2: Revision of neural - - PowerPoint PPT Presentation
Natural Language Understanding Lecture 2: Revision of neural networks and backpropagation Adam Lopez Credits: Mirella Lapata and Frank Keller 19 January 2018 School of Informatics University of Edinburgh alopez@inf.ed.ac.uk 1 Biological
School of Informatics University of Edinburgh alopez@inf.ed.ac.uk 1
2
3
3
4
n
4
n
4
n
4
5
6
6
6
6
7
7
7
7
8
8
8
8
9
−1 w0 x1 w1 xn xn wn y x = n
i=0 wixi
1
10
12
12
12
http://www.youtube.com/watch?v=vGwemZhPlsA&feature=youtu.be 13
n
14
n
n
14
n
n
14
n
n
14
n
n
14
15
16
16
16
16
16
16
17
18
18
1:
2:
3:
4:
5:
6:
19
20
20
20
20
21
21
21
22
22
22
23
. . .
. . .
. . .
. . .
24
25
x1 w1 x2 w2 xn wn y Σ h 1 Step function x h y 1 Outputs 0 or 1. Sigmoid function x h y 1 Outputs a real value between 0 and 1. 26
27
28
28
28
28
28
28
28
29
N
30
continuous, non differentiable function non continuous function differentiable function (disrupted) (folded) (smooth) x y y y x x
31
dx indicates how much
32
∂x1 and ∂y ∂x2 .
ij = wij + ∆wij
∂wij . 33
34
34
34
34
34
35
ij = wij + ∆wij
∂wij
∂E ∂wij ? 36
wij
j
j i
N
37
wij
j
j i
i = f (ui) =
38
wij
j
j i
i − op i )f ′(ui)xij
dui is the derivative of f with respect to ui.
39
wij
j
j i
i − op i ) f ′(ui) xij
i xij
40
wij
j
j i
i − op i ) f ′(ui) xij
i xij
40
i xij
i = (tp i − op i )f ′(ui)
i is only good for the output neurons, it relies on target
k xik
k =
j wkj
41
42
42
42
42
42
42
42
42
42
∂E ∂wij ; repeat for all patterns and sum up. 42
1:
2:
3:
4:
5:
6:
7:
8:
43
∂wij
i xij.
i for output and hidden layers.
44