This document introduces neural networks and deep learning. It discusses perceptrons, multilayer perceptrons for recognizing handwritten digits, and the backpropagation algorithm for training neural networks. It also describes deep convolutional neural networks, including local receptive fields, shared weights, and pooling layers. As an example, it discusses AlphaGo and how it uses a convolutional neural network along with Monte Carlo tree search to master the game of Go.
2. 1. Perceptron
2. Multilayer Perceptron(MLP)
3. Algorithm of Neural Networks
4. Deep Networks
5. AlphaGo
Contents
3. Structure of perceptron (Developed in 1950s)
A simple model to emulate a single neuron
A perceptron takes binary inputs (𝒙 𝟏, 𝒙 𝟐, 𝒙 𝟑 … )
and produce a single binary output (0, 1)
Perceptron
=
𝟎 𝒊𝒇
𝒋
𝝎𝒋 𝒙𝒋 ≤ 𝑻
𝟏 𝒊𝒇
𝒋
𝝎𝒋 𝒙𝒋 > 𝑻
𝝎 𝟏
𝝎 𝟐
𝝎 𝟑
𝒋
𝝎𝒋 𝒙𝒋Binary Inputs
Threshold T
4. Realistic example
Suppose the week end is coming up
There is a cheese festival in your city
And you like cheese
→ Decide to go or not to go ?
1. Is the weather good? (i.e., 𝒙 𝟏 = 𝟏 𝒐𝒓 𝟎)
2. Does your girlfriend want to accompany you? (𝒙 𝟐 = 𝟏 𝒐𝒓 𝟎)
3. Is the festival near public transit? (𝒙 𝟑 = 𝟏 𝒐𝒓 𝟎)
The decision is depend on the output value
Perceptron
𝒐𝒖𝒕𝒑𝒖𝒕 =
𝟎 (𝒅𝒐𝒏𝒕′
𝒈𝒐) 𝒊𝒇
𝒋
𝝎𝒋 𝒙𝒋 ≤ 𝒕𝒉𝒓𝒆𝒔𝒉𝒐𝒍𝒅
𝟏 (𝒈𝒐) 𝒊𝒇
𝒋
𝝎𝒋 𝒙𝒋 > 𝒕𝒉𝒓𝒆𝒔𝒉𝒐𝒍𝒅
5. Affecting factors (input)
1. Weather (𝒙 𝟏 = 𝟏 𝒐𝒓 𝟎)
2. Girlfriend (𝒙 𝟐 = 𝟏 𝒐𝒓 𝟎)
3. Public transit (𝒙 𝟑 = 𝟏 𝒐𝒓 𝟎)
Weight, Threshold and Output (Decision)
If 𝜔1 = 6, 𝜔2 = 2 and 𝜔3 = 2
→ Threshold = 5, Depends on only the weather
→ Threshold = 3, More willing to go to the festival
Perceptron
Go (1): 𝒋 𝝎𝒋 𝒙𝒋 > 𝒕𝒉𝒓𝒆𝒔𝒉𝒐𝒍𝒅
6. Recognizing handwritten digits
Handwritten digits
Rule-based approach
“9” has a loop at the top, and a vertical stroke in the
bottom right
Rules are complicated; exceptions
5 0 4 1 9 2
7. Neural Networks approach
Use large training samples
(handwritten digits data)
Develop a system able to
learn from those examples
- Automatically infer rules
for recognizing digits
Recognizing handwritten digits
8. Four-layer net (with two hidden layers)
Multilayer Perceptron (MLP)
Input: intensities of pixels
(e.g., 4096 input neurons
for 64-by-64 grayscale
image “9”)
output:
< 0.5 for “not 9”;
> 0.5 for “ 9 “
Not Efficient
Binary Input
(Intensity of a pixel)
9. Three-layer net to recognize each digit
Multilayer Perceptron (MLP)
Desired output for “5”
𝒚(𝒙) = 𝟎, 𝟎, 𝟎, 𝟎, 𝟏, 𝟎, 𝟎, 𝟎, 𝟎 𝑻
Handwritten digit with
28 by 28 pixel image
Binary Input
(Intensity of a pixel)
16. Deep Networks
To learn deep architecture network
Convolutional Neural Network (CNN)
Deep belief Net (DBN)
Stacked Auto Encoder (SAE)
Recurrent Neural Network (RNN)
17. Convolutional Neural Networks
3 Characteristics of CNN
Local receptive field (connectivity)
- Reduce connections between neurons
Shared weights
- Reduce total number of weights and bias
Pooling layer
- Simplify (condense) information
18. Convolutional Neural Networks
Local receptive field (connectivity)
28 by 28 23 by 23
5 by 5
Kernel
(window)
2D Convolution
1. Detect local information
(features)
(e.g., Edge, Shape)
2. Reduce connections
between layers
• Fully connected network
→ 𝟐𝟖 ∗ 𝟐𝟖 ∗ 𝟐𝟑 ∗ 𝟐3 connections
• Local connected network
→ 𝟓 ∗ 𝟓 ∗ 𝟐𝟑 ∗ 𝟐𝟑 connections
𝑤11 𝑤12
𝑤55
19. Convolutional Neural Networks
Shared weights
1. Detect same feature
in other positions
2. Reduce total number of
weights and bias
3. Construct multiple feature
maps (kernels)
𝒐𝒖𝒕𝒑𝒖𝒕 = 𝝈(𝒃 +
𝒍=𝟎
𝟒
𝒎=𝟎
𝟒
𝝎𝒍,𝒎 𝒂𝒋+𝒍,𝒌+𝒎)
20. Convolutional Neural Networks
Pooling layer
1. Simplify (condense)
information in the feature
map
2. Reduce connections
(weights and biases)
Max-pooling:
Output only maximum activation
Conv. Pooling
21. Deep Networks Application
AlphaGo
Game of Go (바둑) Artificial Intelligence algorithm
Google Deepmind
Convolutional Neural Network (CNN)
Monte Carlo Tree Search (MTCS)
Achieved 99.8 % winning rate against other Go
program
Defeated Human European Go champion by 5:0
Silver, David, et al. "Mastering the game of Go with deep neural
networks and tree search." Nature 529.7587 (2016): 484-489.
22. Alphago
Convolutional Neural Network in Alphago
The board position as the input with 19 by 19 image
Policy Network
Decide where to place stone by calculating the probability
Value Network
Evaluate current state of board positions (winning probability)
Supervised learning(SL)
Learn from human expert moves (30 million board states)
Reinforcement learning(RL)
Self-learning to reinforce policy network
23. Alphago
Convolutional Neural Network in Alphago
Policy
Network
Value
Network
13 Convolutional Layers
Computation
Implementation
CPU 1202
GPU 176
Threads 64
30 billion computation
19 by 19
Board Status
Input
PD for next move
Output
Value of
game state
29. 𝑪 𝝎, 𝒃
=
𝟏
𝟐𝒏
𝒙
| 𝒚 𝒙 − 𝒂 𝑳
(𝒙) | 𝟐
• Cost function
𝑪 =
𝟏
𝟐
| 𝒚 − 𝒂 𝑳
| 𝟐
=
𝟏
𝟐
𝒋
(𝒚𝒋 − 𝒂𝒋
𝑳
) 𝟐
• Cost function
for single training example
Backpropagation algorithm
Appendix
Editor's Notes
이러한 네트워크를 어떻게 학습시킬 수 있을지
앞서 말한 것과 동일한 구조의 네트워크
초기에 네트워크의 weight와 bias는 무작위로 초기화
이때 하나의 Training Data가 입력된다면, 이때 우리가 원하는 출력은 위(Target Vector)와 같음
하지만 현재 상태는 무작위로 초기화 되어있기 때문에 이러한 결과값을 가지지 않을 가능성이 매우 높음
따라서 현재 상태의 출력은 어떠한 임의의 벡터 값이 나올 것
이때 이 네트워크에 대한 Cost Function을 다음과 같이 정의
모든 Training Data에 대하여, Output Vector와 Target Vector의 차이의 평균
앞서 Target와 Output의 차이를 최소화 하는 것이 목표라 했기에,
따라서 이 네트워크를 학습시킨다는 것은 Cost Function을 최소화 하는 문제로 생각
13층의 컨볼루션 신경망의 값을 산출하기 위해선 약 300억 번의 연산수 필요
Selection 현재 상태로부터 특정 경로에 대하여 앞으로의 수를 탐색(정해진 값, 몇수 후까지)
Expansion 현재 상태에서 탐색한 수 중에서 가장 좋은 수의 마지막 노드를 확장
Evaluation 확장된 수로부터 최종적으로(경기 종료) 나오는 결과를 예측(Fast rollout: 전체 바둑판의 상황이 아닌, 국소부위(3 by 3)에 대해서만 판단)
Backup 현재 상태로부터 확장된 노드까지의 경로의 Weights 갱신