딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016Taehoon Kim
발표 영상 : https://goo.gl/jrKrvf
데모 영상 : https://youtu.be/exXD6wJLJ6s
Deep Q-Network, Double Q-learning, Dueling Network 등의 기술을 소개하며, hyperparameter, debugging, ensemble 등의 엔지니어링으로 성능을 끌어 올린 과정을 공유합니다.
The guided policy search(GPS) is the branch of reinforcement learning developed for real-world robotics, and its utility is substantiated along many research. This slide show contains the comprehensive concept of GPS, and the detail way to implement, so it would be helpful for anyone who want to study this field.
Siamese neural networks for one shot image recognition paper explainedtaeseon ryu
소개드릴 논문은 오래전에 나왔고, 노드의 구조 또한 단순 하지만, 거리 학습 기반의 One Shot 러닝을 고안하는데 크게 기여하였고, 이전엔 사람이 직접 설계한 특징으로
거리학습을 진행하였지만, 처음으로 Siamese Network를 통하여 DNN을 활용했다는 점에서 의미가 큽니다. 현업에서도 클래스는 많고, 이미지는 적은경우에 대해 유사도를 판단해야 하는 경우 자주 쓰이는 기법이 될 수 있습니다.
오늘 논문 리뷰를 위하여 이미지처리팀 '이예은'님이 자세한 리뷰 도와주셨습니다.
Coursera Machine Learning (by Andrew Ng)_강의정리SANG WON PARK
단순히 공식으로 설명하지 않고, 실제 코드 및 샘플데이터를 이용하여 수식의 결과가 어떻게 적용되는지 자세하게 설명하고 있다.
처음 week1 ~ week4 까지는 김성훈 교수님의 "모두를 위한 딥러닝"에서 한번 이해했던 내용이라 좀 쉽게 진행했고, 나머지는 기초가 부족한 상황이라 다른 자료를 꽤 많이 참고하면서 학습해야 했다.
여러 도서나 강의를 이용하여 머신러닝을 학습하려고 했었는데, 이 강의만큼 나에게 맞는것은 없었던거 같다. 특히 Octave code를 이용한 실습자료는 나중에도 언제든 활용가능할 것 같다.
Week1
Linear Regression with One Variable
Linear Algebra - review
Week2
Linear Regression with Multiple Variables
Octave[incomplete]
Week3
Logistic Regression
Regularization
Week4
Neural Networks - Representation
Week5
Neural Networks - Learning
Week6
Advice for applying machine learning techniques
Machine Learning System Design
Week7
Support Vector Machines
Week8
Unsupervised Learning(Clustering)
Dimensionality Reduction
Week9
Anomaly Detection
Recommender Systems
Week10
Large Scale Machine Learning
Week11
Application Example - Photo OCR
안녕하세요.
이번에 '1st 함께하는 딥러닝 컨퍼런스'에서 "안.전.제.일. 강화학습"이란 주제로 발표한 이동민이라고 합니다.
컨퍼런스 관련 링크는 다음과 같습니다.
https://tykimos.github.io/2018/06/28/ISS_1st_Deep_Learning_Conference_All_Together/
그리고 대략적인 개요는 다음과 같습니다.
1. What is Artificial Intelligence?
2. What is Reinforcement Learning?
3. What is Artificial General Intelligence?
4. Planning and Learning
5. Safe Reinforcement Learning
또한 이 자료에는 "Imagination-Augmented Agents for Deep Reinforcement Learning"이라는 논문을 자세히 설명하였습니다.
많은 분들이 보시고 도움이 되셨으면 좋겠습니다~!
Intriguing properties of contrastive lossestaeseon ryu
소개드릴 논문은 과거 리뷰를 진행한 Contrastive learning에 이어 꽤나 높은 성능을 가져오고 Contrastive loss로 학습시켰을때 나타나는 특성들이 어떻게 나타나는지 실험을 통해 설명을 하는대요, Contrastive loss를 일반화 한 후 그로부터 나오는 여러 종류의 Contrastive loss의 성능, 또 다양한 객체가 이미지에 있을때 Contrastvie Learning은 Representation을 얼마나 잘 학습하는지, Contrastive learning에서 Augmentation이 얼마나 중요한지에 대한 부분입니다. 오늘 논문 리뷰를 위해 펀디멘탈팀의 이재윤님이 Contrastive learning부터 , 논문에 대한 자세한 리뷰까지 도와주셨습니다.
[한국어] Neural Architecture Search with Reinforcement LearningKiho Suh
모두의연구소에서 발표했던 “Neural Architecture Search with Reinforcement Learning”이라는 논문발표 자료를 공유합니다. 머신러닝 개발 업무중 일부를 자동화하는 구글의 AutoML이 뭘하려는지 이 논문을 통해 잘 보여줍니다.
이 논문에서는 딥러닝 구조를 만드는 딥러닝 구조에 대해서 설명합니다. 800개의 GPU를 혹은 400개의 CPU를 썼고 State of Art 혹은 State of Art 바로 아래이지만 더 빠르고 더 작은 네트워크를 이것을 통해 만들었습니다. 이제 Feature Engineering에서 Neural Network Engineering으로 페러다임이 변했는데 이것의 첫 시도 한 논문입니다.
[paper review] 손규빈 - Eye in the sky & 3D human pose estimation in video with ...Gyubin Son
1. Eye in the Sky: Real-time Drone Surveillance System (DSS) for Violent Individuals Identification using ScatterNet Hybrid Deep Learning Network
https://arxiv.org/abs/1806.00746
2. 3D human pose estimation in video with temporal convolutions and semi-supervised training
https://arxiv.org/abs/1811.11742
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016Taehoon Kim
발표 영상 : https://goo.gl/jrKrvf
데모 영상 : https://youtu.be/exXD6wJLJ6s
Deep Q-Network, Double Q-learning, Dueling Network 등의 기술을 소개하며, hyperparameter, debugging, ensemble 등의 엔지니어링으로 성능을 끌어 올린 과정을 공유합니다.
The guided policy search(GPS) is the branch of reinforcement learning developed for real-world robotics, and its utility is substantiated along many research. This slide show contains the comprehensive concept of GPS, and the detail way to implement, so it would be helpful for anyone who want to study this field.
Siamese neural networks for one shot image recognition paper explainedtaeseon ryu
소개드릴 논문은 오래전에 나왔고, 노드의 구조 또한 단순 하지만, 거리 학습 기반의 One Shot 러닝을 고안하는데 크게 기여하였고, 이전엔 사람이 직접 설계한 특징으로
거리학습을 진행하였지만, 처음으로 Siamese Network를 통하여 DNN을 활용했다는 점에서 의미가 큽니다. 현업에서도 클래스는 많고, 이미지는 적은경우에 대해 유사도를 판단해야 하는 경우 자주 쓰이는 기법이 될 수 있습니다.
오늘 논문 리뷰를 위하여 이미지처리팀 '이예은'님이 자세한 리뷰 도와주셨습니다.
Coursera Machine Learning (by Andrew Ng)_강의정리SANG WON PARK
단순히 공식으로 설명하지 않고, 실제 코드 및 샘플데이터를 이용하여 수식의 결과가 어떻게 적용되는지 자세하게 설명하고 있다.
처음 week1 ~ week4 까지는 김성훈 교수님의 "모두를 위한 딥러닝"에서 한번 이해했던 내용이라 좀 쉽게 진행했고, 나머지는 기초가 부족한 상황이라 다른 자료를 꽤 많이 참고하면서 학습해야 했다.
여러 도서나 강의를 이용하여 머신러닝을 학습하려고 했었는데, 이 강의만큼 나에게 맞는것은 없었던거 같다. 특히 Octave code를 이용한 실습자료는 나중에도 언제든 활용가능할 것 같다.
Week1
Linear Regression with One Variable
Linear Algebra - review
Week2
Linear Regression with Multiple Variables
Octave[incomplete]
Week3
Logistic Regression
Regularization
Week4
Neural Networks - Representation
Week5
Neural Networks - Learning
Week6
Advice for applying machine learning techniques
Machine Learning System Design
Week7
Support Vector Machines
Week8
Unsupervised Learning(Clustering)
Dimensionality Reduction
Week9
Anomaly Detection
Recommender Systems
Week10
Large Scale Machine Learning
Week11
Application Example - Photo OCR
안녕하세요.
이번에 '1st 함께하는 딥러닝 컨퍼런스'에서 "안.전.제.일. 강화학습"이란 주제로 발표한 이동민이라고 합니다.
컨퍼런스 관련 링크는 다음과 같습니다.
https://tykimos.github.io/2018/06/28/ISS_1st_Deep_Learning_Conference_All_Together/
그리고 대략적인 개요는 다음과 같습니다.
1. What is Artificial Intelligence?
2. What is Reinforcement Learning?
3. What is Artificial General Intelligence?
4. Planning and Learning
5. Safe Reinforcement Learning
또한 이 자료에는 "Imagination-Augmented Agents for Deep Reinforcement Learning"이라는 논문을 자세히 설명하였습니다.
많은 분들이 보시고 도움이 되셨으면 좋겠습니다~!
Intriguing properties of contrastive lossestaeseon ryu
소개드릴 논문은 과거 리뷰를 진행한 Contrastive learning에 이어 꽤나 높은 성능을 가져오고 Contrastive loss로 학습시켰을때 나타나는 특성들이 어떻게 나타나는지 실험을 통해 설명을 하는대요, Contrastive loss를 일반화 한 후 그로부터 나오는 여러 종류의 Contrastive loss의 성능, 또 다양한 객체가 이미지에 있을때 Contrastvie Learning은 Representation을 얼마나 잘 학습하는지, Contrastive learning에서 Augmentation이 얼마나 중요한지에 대한 부분입니다. 오늘 논문 리뷰를 위해 펀디멘탈팀의 이재윤님이 Contrastive learning부터 , 논문에 대한 자세한 리뷰까지 도와주셨습니다.
[한국어] Neural Architecture Search with Reinforcement LearningKiho Suh
모두의연구소에서 발표했던 “Neural Architecture Search with Reinforcement Learning”이라는 논문발표 자료를 공유합니다. 머신러닝 개발 업무중 일부를 자동화하는 구글의 AutoML이 뭘하려는지 이 논문을 통해 잘 보여줍니다.
이 논문에서는 딥러닝 구조를 만드는 딥러닝 구조에 대해서 설명합니다. 800개의 GPU를 혹은 400개의 CPU를 썼고 State of Art 혹은 State of Art 바로 아래이지만 더 빠르고 더 작은 네트워크를 이것을 통해 만들었습니다. 이제 Feature Engineering에서 Neural Network Engineering으로 페러다임이 변했는데 이것의 첫 시도 한 논문입니다.
[paper review] 손규빈 - Eye in the sky & 3D human pose estimation in video with ...Gyubin Son
1. Eye in the Sky: Real-time Drone Surveillance System (DSS) for Violent Individuals Identification using ScatterNet Hybrid Deep Learning Network
https://arxiv.org/abs/1806.00746
2. 3D human pose estimation in video with temporal convolutions and semi-supervised training
https://arxiv.org/abs/1811.11742
Imagination-Augmented Agents for Deep Reinforcement Learning성재 최
I will introduce a paper about I2A architecture made by deepmind. That is about Imagination-Augmented Agents for Deep Reinforcement Learning
This slide were presented at Deep Learning Study group in DAVIAN LAB.
Paper link: https://arxiv.org/abs/1707.06203
모두를 위한 Deep Reinforcement Learning 강의를 요약정리
http://hunkim.github.io/ml/
실습에 사용된 코드
https://github.com/freepsw/tensorflow_examples/tree/master/20.RL_by_SungKim
Progressive Growing of GANs for Improved Quality, Stability, and Variation Re...태엽 김
Progressive Growing of GANs for Improved Quality, Stability, and Variation
Karras, Tero
Aila, Timo
Laine, Samuli
Lehtinen, Jaakko
모두의 연구소 GAN찮아 논문 리뷰 발표 자료
5. •Reinforcement learning agents가 실제 세계의 복잡도를 가
진 문제에서 잘 작동하기 위해서는:
- 상당한 고차원의 sensory inputs으로부터 representation
을 잘 얻어낼 수 있어야 한다.
- 얻어낸 representation으로 과거의 경험을 일반화하여 새로
운 상황에서도 잘 적용할 수 있어야한다.
➡ RL의 유용성은 아주 제한적인 도메인(e.g. 저차원의
state-space를 가진 도메인)에 머물러 있다.
Existing problem
5
6. •Deep Convolutional Neural Network가 non-linear
function approximator로써 이례적인 성능을 보이고 있다.
•CNN 구조를 이용하여 raw sensory data를 입력으로하는
action-value function의 근사함수를 만들어보면 어떨까?
Objective
6 이미지 출처: [6]
8. Architecture
8
•Input: 84x84x4 (by preprocessing map ϕ)
•32 convolutional filters of 8x8 with stride 4 followed by a rectifier non-linearity
•64 convolutional filters of 4x4 with stride 2 followed by a rectifier non-linearity
•64 convolutional filters of 3x3 with stride 1 followed by a rectifier non-linearity
•Fully connected layer with 512 nodes + a rectifier non-linearity
•Fully connected linear layer with a single output for each valid action
9. •강화학습에서 action-value(Q) function을 나타내기 위해
non-linear function approximator를 사용하였을 경우 수렴
이 보장되지 않는 것으로 알려져 있다.
Challenges
9 이미지 출처: [6]
10. •강화학습에서 action-value(Q) function을 나타내기 위해
non-linear function approximator를 사용하였을 경우 수렴
이 보장되지 않는 것으로 알려져 있다.
•다음과 같은 이유들 때문이다[7].
- Correlation between samples
- Non-stationary targets
Challenges
10
11. •강화학습에서 action-value(Q) function을 나타내기 위해
non-linear function approximator를 사용하였을 경우 수렴
이 보장되지 않는 것으로 알려져 있다.
•다음과 같은 이유들 때문이다[7].
- Correlation between samples
- Non-stationary targets
Challenges
11
12. •Correlation between samples
강화학습에서의 학습데이터는 시간의 흐름에 따라 순차적으로 수집되고,
이 순차적인 데이터는 근접한 것들끼리 높은 correlation을 띄게된다.
만약에 이 순차적인 데이터를 그대로 입력으로 활용하게 되면 입력이미지
들 간의 높은 correlation에 의해 학습이 불안정해질 것이다.
Challenges
12
13. •Correlation between samples (Neural Network perspective)
네트워크의 마지막 hidden layer를 통해 입력 s에 대한 representation
vector 를 얻을 수 있다고 할때, 여기에 어떤 action 에 대한 weight
를 내적하여 를 얻을 수 있다.
이때, objective function(loss function)은 parameter 에 대해 다음과
같은 quadratic form으로 표현된다.
Challenges
13
x(s) a
wa Q(s, a)
Q(s, a; θ) = x(s)T
wa
wa
L(wa) =
1
2
(Q*(s, a) − Q(s, a; θ))2
=
1
2
(Q*(s, a) − x(s)T
wa)2
14. •Correlation between samples (Neural Network perspective)
에 대한 stochastic gradient descent update는 다음과 같다.
만약 입력되는 state가 비슷하다면(highly correlated) 그에 대한
representation인 또한 비슷할 것이고, 에 대한 업데이트가 다소
편향될 것이다.
Challenges
14
L(wa) =
1
2
(Q*(s, a) − Q(s, a; θ))2
=
1
2
(Q*(s, a) − x(s)T
wa)2
wa
∇waQ(s, a; θ) = x(s) .
Δwa = α(Q*(s, a) − Q(s, a; θ))x(s) .
where α ∈ (0,1) is a step-size parameter.
x(s) wa
15. •강화학습에서 action-value(Q) function을 나타내기 위해
non-linear function approximator를 사용하였을 경우 수렴
이 보장되지 않는 것으로 알려져 있다.
•다음과 같은 이유들 때문이다[7].
- Correlation between samples
- Non-stationary targets
Challenges
15
16. •Non-stationary targets
MSE(Mean Squared Error)를 이용하여 optimal action-value function
을 근사하기 위한 loss function을 다음과 같이 표현할 수 있다.
이는 Q-learning target
를 근사하는
를 구하려
는 것과 같다. 문제는
가 Q함수에 대해 의존성을 갖고 있으므로
Q함수를 업데이트하게 되면 target
또한 움직이게 된다는 것이다. 이 현
상으로 인한 학습의 불안정해진다.
Challenges
16
Li(θi) =
𝔼
s,a,r,s′

[(r + γmaxa′

Q(s′

, a′

; θi) − Q(s, a; θi))
2
],
where θi are the parameters of the Q-network at iteration i .
yi = r + γmaxa′

Q(s′

, a′

; θi)
Q(s, a; θi)
yi
17. •강화학습에서 action-value(Q) function을 나타내기 위해
non-linear function approximator를 사용하였을 경우 수렴
이 보장되지 않는 것으로 알려져 있다.
•다음과 같은 이유들 때문이다[7].
- Correlation between samples
- Non-stationary targets
Challenges
17
experience replay
(replay memory)
fixed Q-targets
Solutions!
18. 1.Agent의 경험(experience)
를 time-step 단위
로 data set
에 저장해 둔다.
2.저장된 data set으로부터 uniform random sampling을 통해
minibatch를 구성하여 학습을 진행한
다
.
- Minibatch가 순차적인 데이터로 구성되지 않으므로 입력 데이터 사이의
correlation을 상당히 줄일 수 있다.
- 과거의 경험에 대해 반복적인 학습을 가능하게 한다[6].
- 논문의 실험에서는 replay memory size를 1,000,000으로 설정한다.
Replay Memory
18
et = (st, at, rt, st+1)
Dt = {e1, …, et}
((s, a, r, s′

) ∼ U(D))
19. •
와 같은 네트워크 구조이지만 다른 파라미터를 가진(독
립적인) target network
를 만들고 이를 Q-learning
target
에 이용한다.
- Target network parameters
는 매 C step마다 Q-network
parameters(
)로 업데이트된다. 즉, C번의 iteration동안에는 Q-learning
update시 target이 움직이는 현상을 방지할 수 있다.
- 논문의 실험에서는 C값을 10,000으로 설정한다.
Fixed Q-targets
Q(s, a; θ)
̂
Q(s, a; θ−
)
yi = r + γmaxa′

̂
Q(s′

, a′

; θ−
i ) .
Li(θi) =
𝔼
(s,a,r,s′

)∼U(D)[(r + γmaxa′

̂
Q(s′

, a′

; θ−
i ) − Q(s, a; θi))
2
],
yi
in which γ is the discount factor determining the agent's horizon,
θi are the parameters of the Q-network at iteration i and
θ−
i are the network parameters used to compute the target
at iteration i .
θ−
i
θi
20. •Loss function:
•위 loss function에 대한 gradient의 절대값이 1보다 클때는
절대값이 1이 되도록 clipping해준다[5].
•Huber loss[10]와 기능적으로 동일하기 때문에 구현시에는
loss function을 Huber loss로 정의하기도 한다[11].
Gradient Clipping
20
(r + γmaxa′

Q(s′

, a′

; θ−
i − Q(s, a; θi))
2
21. •Atari 2600은 210x160 pixel의 colour image를 초당 60프
레임 정도로 화면에 출력한다. 출력된 화면에 대해 전처리 과정
을 거쳐 84x84xm의 입력데이터를 얻는다[9].
(논문에서는 m을 4로 설정)
<입력이미지>
Data Preprocessing
21 이미지 출처: [9]
22. 1. 이미지의 크기를 (210, 160)에서 (84, 84)로 변환
2. RGB 이미지를 grayscale로 변환
Data Preprocessing
22 이미지 출처: [9]
23. 3. 연속된 이미지들 중 매 k번째에 위치한 이미지들만 선택된다
(Skipped frame)*.
*모든 frame을 전부 입력으로 활용하는 것은 입력 데이터 간의 correlation
을 높이게 된다.
Data Preprocessing
23 이미지 출처: [9]
24. 4. 3에서 선택된 이미지와 그 앞에 연속한 이미지에 대해 pixel-
wise(component-wise) maximum을 취해준다*.
*Atari 2600은 화면에 한 번에 표시할 수 있는 sprites가 단 5개 뿐이어서
짝수 프레임, 홀수 프레임에 번갈아서 표시하는 것으로 여러개의 sprites를
화면에 보여줄 수 있었다. 연속된 두 이미지에 대해 component-wise
maximum을 취해줌으로써 이를 한 이미지에 모두 표시할 수 있다.
Data Preprocessing
24 이미지 출처: [9]
25. 5.1~4의 과정을 거친 이미지들을 m개 만큼 쌓으면 네트워크의
입력으로 사용될 수 있는 하나의 상태(state)가 된다*.
* 1~4의 과정들을 거쳐서 얻은 이미지가 라고 할때,
네트워크에 입력되는 상태는 다음과 같다.
,
즉, 연속으로 입력되는 상태들간에는 overlapping이 존재한다.
Data Preprocessing
25
x1, x2, …, x7
s1 = (x1, x2, x3, x4) s2 = (x2, x3, x4, x5), …, s4 = (x4, x5, x6, x7)
39. References
1.Mnih, V., Kavukcuoglu, K., Silver, D. et al. (2015). Human-level control through deep reinforcement
learning. Nature, 518 (7540), pp. 529-533.
2.Mnih, V., Kavukcuoglu, K., Silver, D. et al. (2015). Human-level control through deep reinforcement
learning. [Code]. Available at: https://sites.google.com/a/deepmind.com/dqn[Accessed 18 May. 2018]
3.Silver, D. (2015). Lecture 6: Value Function Approximation. [Video]. Available at: https://youtu.be/
UoPei5o4fps [Accessed 17 May. 2018].
4.Kim, S. (2017). Lecture 7: DQN. [Video]. Available at: https://youtu.be/S1Y9eys2bdg [Accessed 17 May.
2018].
5.Kim, S. (2017). PR-005: Playing Atari with Deep Reinforcement Learning (NIPS 2013 Deep Learning
Workshop). [Video]. Available at: https://youtu.be/V7_cNTfm2i8 [Accessed 17 May. 2018].
6.Seita, D. (2016). Frame Skipping and Pre-Processing for Deep Q-Networks on Atari 2600 Games. [Online].
Available at: https://danieltakeshi.github.io/2016/11/25/frame-skipping-and-preprocessing-for-deep-q-
networks-on-atari-2600-games [Accessed 18 May. 2018].
7.Boyd, S. and Vandenberghe, L. (2004). Convex Optimization. Cambridge University Press, p. 299.
8.Karpathy, A. et al. (2016). A bug in the implementation. [Online] Available at: https://github.com/
devsisters/DQN-tensorflow/issues/16 [Accessed 18 May. 2018].
39