Deep
Learning
Ian
Go
o
dfello
w
Y
osh
ua
Bengio
Aaron
Courville
Con
ten
ts
W
ebsite
vii
A
c
kno
wledgmen
ts
viii
Notation
xi
1
In
tro
duction
1
1.1
Who
Should
Read
This
Bo
ok?
. . . . . .
. . . . . . . . .
. . . . .
8
1.2
Historical
T
rends
in
Deep
Learning
. . . . . . . . .
. . . . . . . .
11
I
Applied
Math
and
Mac
hine
Learning
Basics
29
2
Linear
Algebra
31
2.1
Scalars,
V
ectors,
Matrices
and
T
ensors
. . . . . . . . .
. . . . . .
31
2.2
Multiplying
Matrices
and
V
ectors
. . . . . . . . .
. . . . . . . .
.
34
2.3
Iden
tit
y
and
In
verse
Matrices
. . . . . . . . .
. . . . . . . .
. . .
36
2.4
Linear
Dep
endence
and
Span
. . . . . . . . .
. . . . . . . .
. . .
37
2.5
Norms
. . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
39
2.6
Sp
ecial
Kinds
of
Matrices
and
V
ectors
. . . . . . . . . . . . . . .
40
2.7
Eigendecomp
osition
. . . . . . . . . .
. . . . . . . .
. . . . . . . .
42
2.8
Singular
V
alue
Decomp
osition
. . . . . . . .
. . . . . . . .
. . . .
44
2.9
The
Mo
ore-P
enrose
Pseudoinv
erse
. . . . . . . . .
. . . . . . . .
.
45
2.10
The
T
race
Op
erator
. . . . . . . . .
. . . . . . . .
. . . . . . . .
46
2.11
The
Determinan
t
. .
. . . . . . . .
. . . . . . . .
. . . . . . . . .
47
2.12
Example:
Principal
Comp
onents
Analysis
. . . . . . . . .
. . . .
48
3
Probabilit
y
and
Information
Theory
53
3.1
Wh
y
Probabilit
y?
. . . . .
. . . . . . . . .
. . . . . . . .
. . . . .
54
i
CONTENTS
3.2
Random
V
ariables
. . . . .
. . . . . . . .
. . . . . . . . .
. . . .
56
3.3
Probabilit
y
Distributions
. . . . . . . . .
. . . . . . . .
. . . . . .
56
3.4
Marginal
Probabilit
y
. . . . . . . . .
. . . . . . . . .
. . . . . . .
58
3.5
Conditional
Probabilit
y
. .
. . . . . . . .
. . . . . . . .
. . . . .
59
3.6
The
Chain
Rule
of
Conditional
Probabilities
. . . . . . . . .
. . .
59
3.7
Indep
endence
and
Conditional
Indep
endence
. . . . . . . . .
. . .
60
3.8
Exp
ectation,
V
ariance
and
Co
v
ariance
. . . . . . . . . .
. . . . .
60
3.9
Common
Probabilit
y
Distributions
. . . . . . . . . . . . . . .
. .
62
3.10
Useful
Prop
erties
of
Common
F
unctions
. . .
. . . . . . . . .
. .
67
3.11
Ba
y
es’
Rule
. . . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . .
70
3.12
T
echnical
Details
of
Con
tin
uous
V
ariables
. . . . . .
. . . . . . .
71
3.13
Information
Theory
. . . . . . . . . .
. . . . . . . .
. . . . . . . .
73
3.14
Structured
Probabilistic
Mo
dels
. . . .
. . . . . . . .
. . . . . . .
75
4
Numerical
Computation
80
4.1
Ov
erflo
w
and
Underflo
w
. . . . . . . . .
. . . . . . . .
. . . . . .
80
4.2
P
o
or
Conditioning
. . . . . . . . .
. . . . . . . .
. . . . . . . . .
82
4.3
Gradien
t-Based
Optimization
. . . . . . .
. . . . . . . .
. . . . .
82
4.4
Constrained
Optimization
. . . . . . . . . . . . .
. . . . . . . .
.
93
4.5
Example:
Linear
Least
Squares
. . . . . . .
. . . . . . . . .
. . .
96
5
Mac
hine
Learning
Basics
98
5.1
Learning
Algorithms
. . . . . . . . . . .
. . . . . . . .
. . . . . .
99
5.2
Capacit
y
,
Overfitting
and
Underfitting
. .
. . . . . . . .
. . . . .
110
5.3
Hyp
erparameters
and
V
alidation
Sets
.
. . . . . . . .
. . . . . . .
120
5.4
Estimators,
Bias
and
V
ariance
. . . . . .
. . . . . . . .
. . . . . .
122
5.5
Maxim
um
Lik
eliho
o
d
Estimation
. . . . . .
. . . . . . . . .
. . .
131
5.6
Ba
y
esian
Statistics
. . . . . . . . . . .
. . . . . . . .
. . . . . . .
135
5.7
Sup
ervised
Learning
Algorithms
. . .
. . . . . . . .
. . . . . . . .
140
5.8
Unsup
ervised
Learning
Algorithms
. . . . . . . . . . . . . . .
. .
146
5.9
Sto
c
hastic
Gradien
t
Descen
t
. . . .
. . . . . . . . .
. . . . . . . .
151
5.10
Building
a
Machine
Learning
Algorithm
. . . . . . . . . . . . .
.
153
5.11
Challenges
Motiv
ating
Deep
Learning
. . . . .
. . . . . . . . .
. .
155
I
I
Deep
Net
w
orks:
Mo
dern
Practices
166
6
Deep
F
eedforw
ard
Netw
orks
168
6.1
Example:
Learning
XOR
.
. . . . . . . . .
. . . . . . . .
. . . . .
171
6.2
Gradien
t-Based
Learning
.
. . . . . . . .
. . . . . . . .
. . . . . .
177
ii
CONTENTS
6.3
Hidden
Units
. . . . . .
. . . . . . . .
. . . . . . . . .
. . . . . .
191
6.4
Arc
hitecture
Design
. . . . . . . . .
. . . . . . . .
. . . . . . . .
.
197
6.5
Bac
k-Propagation
and
Other
Differen
tiation
Algorithms
. . . . .
204
6.6
Historical
Notes
. . . . . . .
. . . . . . . .
. . . . . . . . .
. . . .
224
7
Regularization
for
Deep
Learning
228
7.1
P
arameter
Norm
P
enalties
. . . . .
. . . . . . . . .
. . . . . . . .
230
7.2
Norm
P
enalties
as
Constrained
Optimization
. . . . . . . .
. . . .
237
7.3
Regularization
and
Under-Constrained
Problems
. .
. . . . . . .
239
7.4
Dataset
Augmen
tation
. . . . . . . . . .
. . . . . . . . .
. . . . .
240
7.5
Noise
Robustness
. . . . . . . . .
. . . . . . . .
. . . . . . . .
. .
242
7.6
Semi-Sup
ervised
Learning
. . . . . . . . . . . . . . . .
. . . . . .
243
7.7
Multi-T
ask
Learning
. . . . . . . . . . . . . .
. . . . . . . . .
. .
244
7.8
Early
Stopping
. . . . . . . . .
. . . . . . . .
. . . . . . . .
. . .
246
7.9
P
arameter
T
ying
and
P
arameter
Sharing
. . . . . . . . . . . . . .
253
7.10
Sparse
Represen
tations
. . . . . . . . .
. . . . . . . .
. . . . . . .
254
7.11
Bagging
and
Other
Ensemble
Metho
ds
.
. . . . . . . . .
. . . . .
256
7.12
Drop
out
. . . . . . . .
. . . . . . . . .
. . . . . . . .
. . . . . . .
258
7.13
A
dv
ersarial
T
raining
. . . . . . . .
. . . . . . . . .
. . . . . . . .
268
7.14
T
angent
Distance,
T
angent
Prop,
and
Manifold
T
angent
Classifier
270
8
Optimization
for
T
raining
Deep
Mo
dels
274
8.1
Ho
w
Learning
Differs
from
P
ure
Optimization
. . . . . . . . . . .
275
8.2
Challenges
in
Neural
Netw
ork
Optimization
. . . . .
. . . . . . .
282
8.3
Basic
Algorithms
. . . . . . . . . . . . .
. . . . . . . .
. . . . . .
294
8.4
P
arameter
Initialization
Strategies
.
. . . . . . . . .
. . . . . . .
301
8.5
Algorithms
with
Adaptiv
e
Learning
Rates
. . . . . . .
. . . . . .
306
8.6
Appro
ximate
Second-Order
Metho
ds
. . . .
. . . . . . . . .
. . .
310
8.7
Optimization
Strategies
and
Meta-Algorithms
. . . . .
. . . . . .
317
9
Con
v
olutional
Netw
orks
330
9.1
The
Con
v
olution
Op
eration
. . . . . . . . . . . . . . . .
. . . . .
331
9.2
Motiv
ation
. .
. . . . . . . .
. . . . . . . . .
. . . . . . . .
. . . .
335
9.3
P
o
oling
. . . . . . . . . . . . .
. . . . . . . .
. . . . . . . . .
. . .
339
9.4
Con
v
olution
and
P
o
oling
as
an
Infinitely
Strong
Prior
. .
. . . . .
345
9.5
V
ariants
of
the
Basic
Con
v
olution
F
unction
. . . . . . . . . . . .
347
9.6
Structured
Outputs
.
. . . . . . . .
. . . . . . . . .
. . . . . . . .
358
9.7
Data
T
yp
es
. . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
360
9.8
Efficien
t
Con
v
olution
Algorithms
. . . . . . . .
. . . . . . . .
. .
362
9.9
Random
or
Unsup
ervised
F
eatures
. . . . . . . .
. . . . . . . .
.
363
iii