Understanding Neural Networks and AI
Understanding Neural Networks and AI
14
Jean-Luc Parouty
Laboratoire SIMaP
[Link]
[ intelligence ]
« Ability to perceive or infer information,
and to retain it as knowledge to be appli
towards adaptive behaviors within an
environment or context »*
4
*
Wikipedia 86
[ Méthode scientifique ]
5
86
[ Méthode scientifique ]
6
1
Jim Gray, 2007 [GRAY] 86
[ *-learning ]
Deep
Artificial Learning (DL)
Intelligence (AI)
Machine
Decision,
Learning (ML)
Prediction,
Classification,
etc. 7
86
8
86
9
86
1/ From the linear regression
to the first neuron
4/ Conclusion
10
86
1/ From the linear regression
to the first neuron
12
86
Linear regression
13
86
Linear regression
complexity in n3
14
Notebook [LAB1] 86
Gradient descent
δ loss
Iterations
Loss
δΘ
loss(Θ)
Best Θ Θ
15
86
Gradient descent
16
Notebook [LAB2] 86
Polynomial regression
17
Notebook [LAB3] 86
Logistic regression
A logistic regression is intended to provide a probability of belonging to a class.
Dataset : X characteristics
y probability of belonging
19
Notebook [LAB12] 86
Logistic regression
A logistic regression is intended to provide a probability of belonging to a class.
20
Notebook [LAB12] 86
Logistic regression
80 % Determination of Θ
by a minimisation
Learning of the log loss J(Θ)
phase
Données
(X,y)
Evaluation
20 % phase
21
Notebook [LAB12] 86
Logistic regression
22
Notebook [LAB12] 86
Logistic regression
Determined by the minimisation
of a cost function J(Θ)
23
Notebook [LAB12] 86
Logistic regression
26
Notebook [LAB12] 86
Perceptron
Perceptron
Frank Rosenblatt
1958
28
F. Rosenblatt, 1958 [FROS] 86
Perceptron
Example
Iris plants dataset
Dataset from : Fisher, R.A. “The use of multiple measurements in
taxonomic problems” Annual Eugenics, 7, Part II, 179-188
(1936)
Length Width Iris Setosa (0/1)
x1 x2 y
1.4 1.4 1
1.6 1.6 1
1.4 1.4 1
1.5 1.5 1
1.4 1.4 1
4.7 4.7 0
4.5 4.5 0
4.9 4.9 0
4.0 4.0 0
4.6 4.6 0
(...)
29
Notebook [LAB13] 86
Perceptron
Linear classifier...
1969
Marvin Minsky, Seymour Papert
« Perceptrons : An Introduction to
Computational Geometry » 1
First AI winter…
(for neural networks)
30
1
Minsky, Marvin; Papert, Seymour, (1969) [MIPA] 86
2/ Neural networks at the
heart of a controversy
31
86
ro ig
rsy
nt e b
ve
Co Th
Connectionnism vs Symbolic
Modelling the brain Making a mind
Modéliser le cerveau Forger une opinion
32
1
D Cardon, JP Cointet, A Mazieres, 2018 [LRDN] 86
ro ig
rsy
nt e b
ve
Co Th
Connectionnism vs Symbolic
33
86
ro ig
rsy
nt e b
ve
Co Th
65 522 publications
106 278 publications
34
1
D Cardon, JP Cointet, A Mazieres, 2018 [LRDN] 86
ro ig
rsy
nt e b
ve
Co Th
First concept of
artificial neural
network
McCulloch, Pitts Perceptron
1943 ONR
Rosenblatt
1957
Macy
conferences
1941-1960
65 522 publications
106 278 publications
35
1
D Cardon, JP Cointet, A Mazieres, 2018 [LRDN] 86
ro ig
rsy
nt e b
ve
Co Th
Perceptrons
Minsky, Papert
1969
Artificial Intelligence
Darmouth workshop
McCarthy
1956
First AI Winter
Mansfield
amendment (1969)
65 522 publications
106 278 publications Lighthill
report (1973)
36
1
D Cardon, JP Cointet, A Mazieres, 2018 [LRDN] 86
ro ig
rsy
nt e b
ve
Co Th
Backprop. Convol. NN
Rumelhart LeCun
1986 1989
Extinction
First AI Winter of LISP
Mansfield Expert machines
65 522 publications
amendment (1969) systems
106 278 publications Lighthill
report (1973)
37
1
D Cardon, JP Cointet, A Mazieres, 2018 [LRDN] 86
Deep Neural Networks
39
86
Deep Neural Networks
Optimisations :
Activation,
Gradient descent,
Back-propagation Dropout,
Regularization,
Learning process Etc. 41
86
Deep Neural Networks
1958
42
86
ro ig
rsy
nt e b
ve
Co Th
Backprop. Convol. NN
Rumelhart LeCun
1986 1989
Extinction
of LISP
Expert machines
65 522 publications
systems
106 278 publications
43
1
D Cardon, JP Cointet, A Mazieres, 2018 [LRDN] 86
ro ig
rsy
nt e b
ve
Co Th
Support Vector
Machine (SVM)
Vapnik
1995
2nd Winter
(For DL)
65 522 publications
106 278 publications
44
1
D Cardon, JP Cointet, A Mazieres, 2018 [LRDN] 86
rtoro boig
y?
vev f
resres
notn nde
CoC ETh
ImageNet Reuters
10 000 000 SIFT10M
Open Images
COCO
PASCAL VOC
KDD
LabelMe
100 000
MNIST CIFAR-10
Caltech256
Letter Dataset
10 000 Caltech101
× 10 104
Mushroom
6 TIMIT
×
Flops datasets
1 000
1980 1985 1990 1995 2000 2005 2010 2015 2020
25 ans
Images classification
Publications SVM vs DNN1 Top 5 error at ILSVRC3,4
18 000 18
AlexNet
SVM 16
16 000
DNN 14
AlexNet2 Clarifai
14 000 12
A. Krizhevsky, 10
I. Sutskever,
12 000 DN 8
G. Hinton N
GoogLeNet
6
10 000 2012 ILSVRC
Publications
ResNet
4 Trimps-Soushen
SE-ResNet
Top5 error : 26 % 15 % HUMAN
8 000 2
0
6 000 2011 2013 2015 2017
2nd Winter
4 000
(For DL)
2 000
Without mathematical
guarantee, DNN have proven to
0 be more effective in the face of
1990 1995 2000 2005 2010 2015 2020
the complexity of the real
world !
1
Web of Science [WOS1][WOS2]
2
AlexNet [ALEX] 4
Similar evolution in Natural language processing, translation, board games, etc. 46
3
ImageNet Large Scale Visual Recognition [ILSVRC] See : [Link], AlphaGo, AlphaZero, ... 86
3/ Neurons & data
47
86
Generative
Adversarial Basic
Network Classification
GAN DNN
51
Notebook [LAB14.1] 86
Basic example
Handwritten Digits
Recognition
MNIST dataset
Tensorflow, Jupyter lab
52
86
Generative
Adversarial Basic
Network Classification
GAN DNN
24 M pixels 3 x 24 M neurons ?!
(r,v,b) 3x8 bits
2D convolution
55
86
Convolutional Neural Networks (CNN)
3D convolution
56
86
Convolutional Neural Networks (CNN)
57
86
Image classification
with MobileNet v1
Trained model
TensorflowJS, Javascript
58
86
Generative
Adversarial Basic
Network Classification
GAN DNN
Dictionary = 80 000
Sentence = 300 Vectors = 24 M
60
86
Word Embedding
« movie» CBOW
1 a word2vec 1
0
2 before 0 SG
3 fantastic 0 « movie» GloVe2
4 i’ve 0
5 is 0 -2,03
6 like 0 15,12 ...
7 movie 1 -13,08
8 never 0
9 seen 0 Short ProtVec3
10 this 0 dense vector
based on
context
2
Jeffrey Pennington & all, (2014), [GLOVE]
1
Tomas Mikolov & all, (2013), [W3VEC] Training is performed on aggregated global word-word
CBOW : Continuous Bag of Words - Embedding based co-occurrence statistics.
on the prediction of the word according to its context. 3
Ehsaneddin Asgari, Mohammad R.K. Mofrad (2016), [PROTV] 61
SG : Skip-gram - Embedding based on context prediction from the word. Biological Sequences Representation 86
IMDB film review
classification
Word Embedding
Keras, jupyter lab
87 % 62
86
Generative
Adversarial Basic
Network Classification
GAN DNN
...
64
86
Reccurent Neural Network (RNN)
65
86
Reccurent Neural Network (RNN)
Unfold
66
86
Reccurent Neural Network (RNN)
Long term
Short term
69
86
Reccurent Neural Network (RNN)
Time serie
prediction
RNN with LSTM cell
Tensorflow, jupyter lab
70
86
Generative
Adversarial Basic
Network Classification
GAN DNN
72
86
Reinforcement learning
Inverted pendulum
Objective :
Keep the pendulum in balance,
in the centre of the stage
Impulse to
the left (-1)
Actions :
Impulse to
the right (+1)
74
86
Reinforcement learning
Inverted pendulum
Observations :
x Cart position
vx Cart velocity
Θ Pole angle
ωΘ Pole angular velocity
Rewards :
Based on keeping the bar in
balance for as long as possible,
while remaining in the centre of
the stage
75
86
Reinforcement learning
76
86
Reinforcement learning
77
86
Reinforcement learning
Reinforcement
learning
OpenAI/Gym Cartpole
with gradient policy
78
86
Generative
Adversarial Basic
Network Classification
GAN DNN
Counterfeiter Expert
(Generator) (Discriminator)
80
1
Ian J. Goodfellow & all, (2014), « Generative Adversarial Networks » [GAN] 86
Generative Adversarial Network
81
86
Generative Adversarial Network
Generative
Adversarial
Network
Photorealistic generation
82
86
4/ Conclusion
83
86
Conclusion
Complex but
Great accessible tools Very significant
opportunities and techniques and rapid progress
Science
it works !
Open Data
Source
87
86
Notebooks Notebooks
[LAB1] 01 Regression Liné[Link] [LAB22.2] Word Embedding – Basic
[LAB2] 02 Descente de [Link] TripAdvisor CBOW Embedding with Gensim
[LAB12] 12 Regression [Link] [LAB22.3] Word Embedding – IMDB*
[LAB1] Regression linéaire IMDB film review classification with Keras
Exemple de régression linéaire avec résolution directe [LAB21.3] Time series prediction with RNN*
[LAB2] Gradient descent Prediction of a time serie with LSTM RNN using
Simple gradient descent example Tensofflow
[LAB12] Logistic Regression [LAB19.5] CartPole with Policy gradients*
Logistic Regression with Gradient Descent using CartPole game (from Gym) with gradient policy using
TensorFlow Tensorflow
[LAB12.1] Activation functions
Example of activation functions
[LAB13] Simple Perceptron
IRIS classification with a simple perceptron, using
Illustrations
sklearn
[LAB14.1] Deep Neural Network*
MNIST Example with Tensor Flow
[WEB1] Image classification with MobileNet v1* Illustrations from Wikimedia Commons, the free media repository.
Image classification with MobileNet using tensorflow js
"Morondava - 28" by Olivier Lejade is licensed under CC BY-SA 2.0
[WEB2] Object detection with coco-ssd*
Object detection with coco-ssd/mobilenet using "straight ahead" by HarisDrako is licensed under CC BY-NC-ND 3.0
tensorflow js
88
86
[Link]
binder
[Link]
90
86
91
86