발표자: 곽동현(서울대 박사과정, 현 NAVER Clova)
강화학습(Reinforcement learning)의 개요 및 최근 Deep learning 기반의 RL 트렌드를 소개합니다.
발표영상:
http://tv.naver.com/v/2024376
https://youtu.be/dw0sHzE1oAc
안녕하세요.
이번에 '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"이라는 논문을 자세히 설명하였습니다.
많은 분들이 보시고 도움이 되셨으면 좋겠습니다~!
Planning and Learning with Tabular MethodsDongmin Lee
1) The document discusses planning methods in reinforcement learning that use models of the environment to generate simulated experiences for training.
2) It introduces Dyna-Q, an algorithm that integrates planning, acting, model learning, and direct reinforcement learning by using a model to generate additional simulated experiences for training.
3) When the model is incorrect, planning may lead to suboptimal policies, but interaction with the real environment can sometimes discover and correct modeling errors; when changes make the environment better, planning may fail to find improved policies without encouraging exploration.
Continuous control with deep reinforcement learning (DDPG)Taehoon Kim
This document presents a model-free, off-policy actor-critic algorithm to learn policies in continuous action spaces using deep reinforcement learning. The algorithm is based on deterministic policy gradients and extends DQN to continuous action domains by using deep neural networks to approximate the actor and critic. Challenges addressed include ensuring samples are i.i.d. by using a replay buffer, stabilizing learning with a target network, normalizing observations with batch normalization, and exploring efficiently with an Ornstein-Uhlenbeck process. The algorithm is able to learn policies on high-dimensional continuous control tasks.
발표자: 곽동현(서울대 박사과정, 현 NAVER Clova)
강화학습(Reinforcement learning)의 개요 및 최근 Deep learning 기반의 RL 트렌드를 소개합니다.
발표영상:
http://tv.naver.com/v/2024376
https://youtu.be/dw0sHzE1oAc
안녕하세요.
이번에 '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"이라는 논문을 자세히 설명하였습니다.
많은 분들이 보시고 도움이 되셨으면 좋겠습니다~!
Planning and Learning with Tabular MethodsDongmin Lee
1) The document discusses planning methods in reinforcement learning that use models of the environment to generate simulated experiences for training.
2) It introduces Dyna-Q, an algorithm that integrates planning, acting, model learning, and direct reinforcement learning by using a model to generate additional simulated experiences for training.
3) When the model is incorrect, planning may lead to suboptimal policies, but interaction with the real environment can sometimes discover and correct modeling errors; when changes make the environment better, planning may fail to find improved policies without encouraging exploration.
Continuous control with deep reinforcement learning (DDPG)Taehoon Kim
This document presents a model-free, off-policy actor-critic algorithm to learn policies in continuous action spaces using deep reinforcement learning. The algorithm is based on deterministic policy gradients and extends DQN to continuous action domains by using deep neural networks to approximate the actor and critic. Challenges addressed include ensuring samples are i.i.d. by using a replay buffer, stabilizing learning with a target network, normalizing observations with batch normalization, and exploring efficiently with an Ornstein-Uhlenbeck process. The algorithm is able to learn policies on high-dimensional continuous control tasks.
This document provides an overview of deep deterministic policy gradient (DDPG), which combines aspects of DQN and policy gradient methods to enable deep reinforcement learning with continuous action spaces. It summarizes DQN and its limitations for continuous domains. It then explains policy gradient methods like REINFORCE, actor-critic, and deterministic policy gradient (DPG) that can handle continuous action spaces. DDPG adopts key elements of DQN like experience replay and target networks, and models the policy as a deterministic function like DPG, to apply deep reinforcement learning to complex continuous control tasks.
Continuous Control with Deep Reinforcement Learning, lillicrap et al, 2015Chris Ohk
The paper introduces Deep Deterministic Policy Gradient (DDPG), a model-free reinforcement learning algorithm for problems with continuous action spaces. DDPG combines actor-critic methods with experience replay and target networks similar to DQN. It uses a replay buffer to minimize correlations between samples and target networks to provide stable learning targets. The algorithm was able to solve challenging control problems with high-dimensional observation and action spaces, demonstrating the ability of deep reinforcement learning to handle complex, continuous control tasks.
Maximum Entropy Reinforcement Learning (Stochastic Control)Dongmin Lee
I reviewed the following papers.
- T. Haarnoja, et al., “Reinforcement Learning with Deep Energy-Based Policies", ICML 2017
- T. Haarnoja, et al., “Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor", ICML 2018
- T. Haarnoja, et al., “Soft Actor-Critic Algorithms and Applications", arXiv preprint 2018
Thank you.
The document summarizes the policy gradient theorem, which provides a way to perform policy improvement in reinforcement learning using gradient ascent on the expected returns with respect to the policy parameters. It begins by motivating policy gradients as a way to do policy improvement when the action space is large or continuous. It then defines the necessary notation, expected returns objective function, and discounted state visitation measure. The main part of the document proves the policy gradient theorem, which expresses the policy gradient as an expectation over the discounted state visitation measure and action-value function. It notes that in practice the action-value function must be estimated, and proves the compatible function approximation theorem, which ensures the policy gradient is computed correctly when using an estimated action-value
1. The document discusses hierarchical reinforcement learning (HRL) techniques to address the curse of dimensionality in reinforcement learning (RL). It summarizes prominent HRL methods like options, hierarchies of abstract machines (HAM), and MAXQ.
2. It compares the different HRL methods based on their state abstraction techniques, definitions of optimality, language expressiveness, knowledge requirements, and ability to model more complex domains.
3. The document concludes by discussing directions for future research in HRL like bidirectional state abstraction, hierarchies over other RL techniques, and applications to more complex real-world domains like robotics.
Reinforcement Learning with Deep Energy-Based PoliciesSangwoo Mo
This document discusses reinforcement learning with deep energy-based policies. It motivates using maximum entropy reinforcement learning to find policies that not only maximize reward but also explore possibilities. It presents an approach using energy-based models for the policy and soft Q-learning to find the optimal maximum entropy policy. The method uses neural networks to approximate the soft Q-function and a sampling network to draw samples from the policy. Experiments show maximum entropy policies provide better exploration, initialization, compositionality and robustness compared to deterministic policies.
오늘 소개할 논문은 'MOReL: Model-Based Offline Reinforcement Learning'입니다.
이 논문은 오프라인 강화 학습(Reinforcement Learning, RL)에 초점을 맞추고 있습니다. 오프라인 RL은 행동 정책을 개선하기 위해 사전에 수집된 데이터만을 사용하는 학습 방법입니다. 이 논문에서는 MOReL이라는 새로운 알고리즘 프레임워크를 제시하며, 이는 오프라인 RL을 위한 것입니다.
MOReL은 두 단계로 구성되어 있습니다: 첫째, 오프라인 데이터셋을 사용하여 비관적인 MDP(Model-based Decision Process)를 학습하고, 둘째, 이 P-MDP에서 거의 최적의 정책을 학습합니다. 학습된 P-MDP는 정책 평가와 학습에 대한 좋은 대리자 역할을 하며, 모델 기반 RL의 일반적인 함정인 모델 활용을 극복합니다.
이 논문에서는 MOReL이 오프라인 RL에 대해 최소최대 최적(minimax optimal)이며, 널리 연구된 벤치마크에서 최첨단 성능을 달성함을 보여줍니다. 또한, 이 논문은 오프라인 RL의 중요한 문제인 행동 정책의 안전성에 대한 중요한 통찰력을 제공합니다.
이 논문은 오프라인 강화 학습의 새로운 접근법을 제시하며, 이를 통해 더 효율적인 방식으로 다양한 강화 학습 작업에 대한 성능을 향상시킬 수 있음을 보여줍니다.
Deep reinforcement learning from scratchJie-Han Chen
1. The document provides an overview of deep reinforcement learning and the Deep Q-Network algorithm. It defines the key concepts of Markov Decision Processes including states, actions, rewards, and policies.
2. The Deep Q-Network uses a deep neural network as a function approximator to estimate the optimal action-value function. It employs experience replay and a separate target network to stabilize learning.
3. Experiments applying DQN to the Atari 2600 game Space Invaders are discussed, comparing different loss functions and optimizers. The standard DQN configuration with MSE loss and RMSProp performed best.
안녕하세요. 이동민입니다. :)
2018. 8. 9일에 한국항공우주연구원에서 발표한 "Safe Reinforcement Learning" 발표 자료입니다.
목차는 다음과 같습니다.
1. Reinforcement Learning
2. Safe Reinforcement Learning
3. Optimization Criterion
4. Exploration Process
강화학습 계속 공부하면서 실제로 많은 분들이 쓸 수 있게 하려면 더 안전하고 빨라야한다는 생각이 들었습니다. 그래서 이에 관련하여 논문과 각종 자료들로 공부하여 발표하였습니다.
많은 분들께 도움이 되었으면 좋겠습니다. 감사합니다!
Reinforcement Learning (RL) approaches to deal with finding an optimal reward based policy to act in an environment (Charla en Inglés)
However, what has led to their widespread use is its combination with deep neural networks (DNN) i.e., deep reinforcement learning (Deep RL). Recent successes on not only learning to play games but also superseding humans in it and academia-industry research collaborations like for manipulation of objects, locomotion skills, smart grids, etc. have surely demonstrated their case on a wide variety of challenging tasks.
With application spanning across games, robotics, dialogue, healthcare, marketing, energy and many more domains, Deep RL might just be the power that drives the next generation of Artificial Intelligence (AI) agents!
Reinforcement Learning 8: Planning and Learning with Tabular MethodsSeung Jae Lee
A summary of Chapter 8: Planning and Learning with Tabular Methods of the book 'Reinforcement Learning: An Introduction' by Sutton and Barto. You can find the full book in Professor Sutton's website: http://incompleteideas.net/book/the-book-2nd.html
Check my website for more slides of books and papers!
https://www.endtoend.ai
Lecture slides in DASI spring 2018, National Cheng Kung University, Taiwan. The content is about deep reinforcement learning: policy gradient including variance reduction and importance sampling
MIT 6.S091: Introduction to Deep Reinforcement Learning (Deep RL) by Lex FridmanPeerasak C.
MIT 6.S091: Introduction to Deep Reinforcement Learning (Deep RL) by Lex Fridman
Watch video: https://youtu.be/zR11FLZ-O9M
First lecture of MIT course 6.S091: Deep Reinforcement Learning, introducing the fascinating field of Deep RL. For more lecture videos on deep learning, reinforcement learning (RL), artificial intelligence (AI & AGI), and podcast conversations, visit our website or follow TensorFlow code tutorials on our GitHub repo.
INFO:
Website: https://deeplearning.mit.edu
CONNECT:
- If you enjoyed this video, please subscribe to this channel.
- Twitter: https://twitter.com/lexfridman
- LinkedIn: https://www.linkedin.com/in/lexfridman
- Facebook: https://www.facebook.com/lexfridman
- Instagram: https://www.instagram.com/lexfridman
Deep Reinforcement Learning: Q-LearningKai-Wen Zhao
This slide reviews deep reinforcement learning, specially Q-Learning and its variants. We introduce Bellman operator and approximate it with deep neural network. Last but not least, we review the classical paper: DeepMind Atari Game beats human performance. Also, some tips of stabilizing DQN are included.
This document provides an overview of deep deterministic policy gradient (DDPG), which combines aspects of DQN and policy gradient methods to enable deep reinforcement learning with continuous action spaces. It summarizes DQN and its limitations for continuous domains. It then explains policy gradient methods like REINFORCE, actor-critic, and deterministic policy gradient (DPG) that can handle continuous action spaces. DDPG adopts key elements of DQN like experience replay and target networks, and models the policy as a deterministic function like DPG, to apply deep reinforcement learning to complex continuous control tasks.
Continuous Control with Deep Reinforcement Learning, lillicrap et al, 2015Chris Ohk
The paper introduces Deep Deterministic Policy Gradient (DDPG), a model-free reinforcement learning algorithm for problems with continuous action spaces. DDPG combines actor-critic methods with experience replay and target networks similar to DQN. It uses a replay buffer to minimize correlations between samples and target networks to provide stable learning targets. The algorithm was able to solve challenging control problems with high-dimensional observation and action spaces, demonstrating the ability of deep reinforcement learning to handle complex, continuous control tasks.
Maximum Entropy Reinforcement Learning (Stochastic Control)Dongmin Lee
I reviewed the following papers.
- T. Haarnoja, et al., “Reinforcement Learning with Deep Energy-Based Policies", ICML 2017
- T. Haarnoja, et al., “Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor", ICML 2018
- T. Haarnoja, et al., “Soft Actor-Critic Algorithms and Applications", arXiv preprint 2018
Thank you.
The document summarizes the policy gradient theorem, which provides a way to perform policy improvement in reinforcement learning using gradient ascent on the expected returns with respect to the policy parameters. It begins by motivating policy gradients as a way to do policy improvement when the action space is large or continuous. It then defines the necessary notation, expected returns objective function, and discounted state visitation measure. The main part of the document proves the policy gradient theorem, which expresses the policy gradient as an expectation over the discounted state visitation measure and action-value function. It notes that in practice the action-value function must be estimated, and proves the compatible function approximation theorem, which ensures the policy gradient is computed correctly when using an estimated action-value
1. The document discusses hierarchical reinforcement learning (HRL) techniques to address the curse of dimensionality in reinforcement learning (RL). It summarizes prominent HRL methods like options, hierarchies of abstract machines (HAM), and MAXQ.
2. It compares the different HRL methods based on their state abstraction techniques, definitions of optimality, language expressiveness, knowledge requirements, and ability to model more complex domains.
3. The document concludes by discussing directions for future research in HRL like bidirectional state abstraction, hierarchies over other RL techniques, and applications to more complex real-world domains like robotics.
Reinforcement Learning with Deep Energy-Based PoliciesSangwoo Mo
This document discusses reinforcement learning with deep energy-based policies. It motivates using maximum entropy reinforcement learning to find policies that not only maximize reward but also explore possibilities. It presents an approach using energy-based models for the policy and soft Q-learning to find the optimal maximum entropy policy. The method uses neural networks to approximate the soft Q-function and a sampling network to draw samples from the policy. Experiments show maximum entropy policies provide better exploration, initialization, compositionality and robustness compared to deterministic policies.
오늘 소개할 논문은 'MOReL: Model-Based Offline Reinforcement Learning'입니다.
이 논문은 오프라인 강화 학습(Reinforcement Learning, RL)에 초점을 맞추고 있습니다. 오프라인 RL은 행동 정책을 개선하기 위해 사전에 수집된 데이터만을 사용하는 학습 방법입니다. 이 논문에서는 MOReL이라는 새로운 알고리즘 프레임워크를 제시하며, 이는 오프라인 RL을 위한 것입니다.
MOReL은 두 단계로 구성되어 있습니다: 첫째, 오프라인 데이터셋을 사용하여 비관적인 MDP(Model-based Decision Process)를 학습하고, 둘째, 이 P-MDP에서 거의 최적의 정책을 학습합니다. 학습된 P-MDP는 정책 평가와 학습에 대한 좋은 대리자 역할을 하며, 모델 기반 RL의 일반적인 함정인 모델 활용을 극복합니다.
이 논문에서는 MOReL이 오프라인 RL에 대해 최소최대 최적(minimax optimal)이며, 널리 연구된 벤치마크에서 최첨단 성능을 달성함을 보여줍니다. 또한, 이 논문은 오프라인 RL의 중요한 문제인 행동 정책의 안전성에 대한 중요한 통찰력을 제공합니다.
이 논문은 오프라인 강화 학습의 새로운 접근법을 제시하며, 이를 통해 더 효율적인 방식으로 다양한 강화 학습 작업에 대한 성능을 향상시킬 수 있음을 보여줍니다.
Deep reinforcement learning from scratchJie-Han Chen
1. The document provides an overview of deep reinforcement learning and the Deep Q-Network algorithm. It defines the key concepts of Markov Decision Processes including states, actions, rewards, and policies.
2. The Deep Q-Network uses a deep neural network as a function approximator to estimate the optimal action-value function. It employs experience replay and a separate target network to stabilize learning.
3. Experiments applying DQN to the Atari 2600 game Space Invaders are discussed, comparing different loss functions and optimizers. The standard DQN configuration with MSE loss and RMSProp performed best.
안녕하세요. 이동민입니다. :)
2018. 8. 9일에 한국항공우주연구원에서 발표한 "Safe Reinforcement Learning" 발표 자료입니다.
목차는 다음과 같습니다.
1. Reinforcement Learning
2. Safe Reinforcement Learning
3. Optimization Criterion
4. Exploration Process
강화학습 계속 공부하면서 실제로 많은 분들이 쓸 수 있게 하려면 더 안전하고 빨라야한다는 생각이 들었습니다. 그래서 이에 관련하여 논문과 각종 자료들로 공부하여 발표하였습니다.
많은 분들께 도움이 되었으면 좋겠습니다. 감사합니다!
Reinforcement Learning (RL) approaches to deal with finding an optimal reward based policy to act in an environment (Charla en Inglés)
However, what has led to their widespread use is its combination with deep neural networks (DNN) i.e., deep reinforcement learning (Deep RL). Recent successes on not only learning to play games but also superseding humans in it and academia-industry research collaborations like for manipulation of objects, locomotion skills, smart grids, etc. have surely demonstrated their case on a wide variety of challenging tasks.
With application spanning across games, robotics, dialogue, healthcare, marketing, energy and many more domains, Deep RL might just be the power that drives the next generation of Artificial Intelligence (AI) agents!
Reinforcement Learning 8: Planning and Learning with Tabular MethodsSeung Jae Lee
A summary of Chapter 8: Planning and Learning with Tabular Methods of the book 'Reinforcement Learning: An Introduction' by Sutton and Barto. You can find the full book in Professor Sutton's website: http://incompleteideas.net/book/the-book-2nd.html
Check my website for more slides of books and papers!
https://www.endtoend.ai
Lecture slides in DASI spring 2018, National Cheng Kung University, Taiwan. The content is about deep reinforcement learning: policy gradient including variance reduction and importance sampling
MIT 6.S091: Introduction to Deep Reinforcement Learning (Deep RL) by Lex FridmanPeerasak C.
MIT 6.S091: Introduction to Deep Reinforcement Learning (Deep RL) by Lex Fridman
Watch video: https://youtu.be/zR11FLZ-O9M
First lecture of MIT course 6.S091: Deep Reinforcement Learning, introducing the fascinating field of Deep RL. For more lecture videos on deep learning, reinforcement learning (RL), artificial intelligence (AI & AGI), and podcast conversations, visit our website or follow TensorFlow code tutorials on our GitHub repo.
INFO:
Website: https://deeplearning.mit.edu
CONNECT:
- If you enjoyed this video, please subscribe to this channel.
- Twitter: https://twitter.com/lexfridman
- LinkedIn: https://www.linkedin.com/in/lexfridman
- Facebook: https://www.facebook.com/lexfridman
- Instagram: https://www.instagram.com/lexfridman
Deep Reinforcement Learning: Q-LearningKai-Wen Zhao
This slide reviews deep reinforcement learning, specially Q-Learning and its variants. We introduce Bellman operator and approximate it with deep neural network. Last but not least, we review the classical paper: DeepMind Atari Game beats human performance. Also, some tips of stabilizing DQN are included.
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.
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
2. 그래프 모델과 강화학습
█ 강화학습은 상태, 행동, 그리고 다음 상태로의 전이라는
일련의 시퀀스로 표현할 수 있습니다
█ 따라서 강화학습을 다이나믹 프로그래밍의 관점이 아닌 확
률적 그래픽 모델 (Probabilistic graphical model)의 추론 문제
로 바라보면 어떨까요?
3. The Standard Reinforcement Learning Framework
█ 일반적인 강화학습 프레임워크에서는 Optimal 정책을 복구하는 것을 목
표로 합니다.
이 때 정책은 보통 𝜃로 매개화된 행동(𝑎)에 대해서 상태와 매개변수를 건
으로 가지는 조건부 분포로써 표현됩니다. → 𝝅(𝒂𝒕|𝒔𝒕, 𝜽)
█ 이러한 Optimal 정책을 찾는 문제는 아래와 같은 매개변수
를 찾는 것과 같습니다.
4. █ 이전 슬라이드에서 𝜃를 구하는 최적화 문제에서 기댓값은
정책에서 나온 trajectory 분포에 취해집니다. 즉,
█ 이제 우리가 해야 할 다음 질문은 다음과 같습니다.
“가장 가능성 높은 trajectory과 Optimal 정책으로부터 나온 trajectory가 같도록 하는
확률적 그래픽 추론 모델 (Probabilistic graphical model)을 어떻게 만들 수 있을까? “
The Standard Reinforcement Learning Framework
5. █ 먼저 Control Problem을 Graphical Model로 이식하기 위해, 상태 행동 그리고
다음 상태에 대한 관계를 아래와 같이 표현할 수 있습니다.
The Graphical Model
█ 그러나 위 모델로는 Control 문제를 풀기에 충분하지 않습니다.
이는 Reward에 대한 정보가 없기 때문입니다.
6. █ 따라서 리워드와 관련이 있고 𝒪𝑡로 표시되는 새로운 변수를 추가하겠습니다.
The Graphical Model
▸ 앞으로 𝒪𝑡를 ‘최적성 변수’라고 말하겠습니다.
▸ 𝒪𝑡 는 𝒪𝑡 = 1이면 step 𝑡에서 최적이고 𝒪𝑡 = 0 이면 최적이 아님을 나태내는
binary 변수 입니다.
█ 우리는 𝒪𝑡를 지수의 승수로 리워드 값을 가지는 분포로 표현하겠습니다. 즉,
aka. 1) Boltzmann distribution
2) Energy distribution
최적성을 soft하게 표현
7. █ 이 최적성 변수를 포함한 그래프 모델은 아래와 같습니다.
The Graphical Model
Note1: 우리가 아는 HMM 모델로서 표현이 되었습니다!
Note2: 위 그래프 모델에서 explicit하게 정책은 언급되지 않았습니다.
8. █ 이제 𝒪𝑡 = 1 for all 𝑡 ∈ {1, … , 𝑇} 일 때 (모든 상태에서 최적의 행동을 하였을 때)
trajectory의 분포 𝑝 𝜏 𝑜1:𝑇 를 구해봅시다.
The Graphical Model
█ 환경이 deterministic하다면, 위 결과는 굉장히 직관적입니다.
→즉, 보상의 합이 높은 trajectory일 수록 발생할 확률이 높습니다.
9. █ 우리의 목표는 앞서 살펴본 trajectory의 분포 𝑝 𝜏 𝑜1:𝑇 를 가지도록 trajectory를 만드
는 정책을 찾는 것입니다. (이 정책은 최적 정책이라고 할 수 있겠죠?)
The Graphical Model
█ 우리가 세운 확률적 그래프 모델에서 최적 정책은 아래와 같이 쓸 수 있습니다.
█ 이 정책은 앞에서 본 표준 강화학습에서의 최적 정책 으로 비유할 수 있겠습니다.
█ 그러나 이 두 정책은 다릅니다.
▸ 그래프 모델에서 추론하는 최적 정책은 매개변수 𝜃와 독립된 정책입니다.
▸ 나중에 알아보겠지만, 두 정책이 최적화하는 objective가 조금 다릅니다.
= 𝑝(𝑎𝑡|𝑠𝑡, 𝒪1:𝑇) by 마르코프 성질
10. █ HMM-style 그래프 모델에서의 추론을 어떻게 하면 좋을까요?
Policy Search as Probabilistic Inference
→전형적인 Forward-Backward 추론 알고리즘을 사용해봅시다!
█ 우리가 추론해야 할 최적 정책은 임을 기억합시다.
█ backward 𝑚𝑒𝑠𝑠𝑎𝑔𝑒 𝛽(𝑠𝑡, 𝑎𝑡)와 𝛽(𝑠𝑡)를 아래와 같이 정의하겠습니다.
현 상태-행동 쌍(𝑠𝑡, 𝑎𝑡)을 가질 때, 앞으로의 trajectory가 최적일 확률
현 상태(𝑠𝑡)일 때, 앞으로의 trajectory가 최적일 확률
을 추론하기 위해 먼저 backward message를 사용해봅시다.
이
Note: 본 ppt 자료에서는 forward message를 따로 계산하지는 않습니다.
그러나 forward message는 inverse RL의 핵심적인 내용을 담고 있습니다.
11. Policy Search as Probabilistic Inference
█ 𝛽𝑡(𝑠𝑡, 𝑎𝑡)와 𝛽𝑡(𝑠𝑡) 를 살펴보겠습니다.
= exp(𝑟(𝑠𝑡, 𝑎𝑡))
Dynamics
?
action prior
Without loss of generality, Action prior를 균등분포
(𝑝 𝑎𝑡 𝑠𝑡 =
1
|𝒜|
)라고 가정할 수 있습니다.
12. Policy Search as Probabilistic Inference
█ 이제 recursive 하게 backward message를 구할 수 있게 되었습니다!
단 Terminal 상태 T에 대해,
뒤에서부터(backward) 연쇄적으로 계산
13. Policy Search as Probabilistic Inference
█ 이제 우리의 목표인 최적 정책을 구해봅시다.
Bayes’ rule
Flipped by using Bayes’ rule
최적 제어의
potential 함수!
는 균등분포라고 가정했으므로, 상수 취급
14. Policy Search as Probabilistic Inference
█ backward message 𝛽가 가지는 의미를 좀 더 분명하게 파악하기 위해
로그 스케일을 활용하여 다음과 같이 Q와 V를 정의해봅시다.
그런데 이므로,
의 관계가 있음을 알 수 있습니다.
15. Policy Search as Probabilistic Inference
Dynamics이 deterministic 하다면,
를 만족합니다.
이제 Q와 V의 관계를 조금 더 들여다 봅시다.
이는 standard RL에서의 Bellman backup과 정확히 일치합니다!
입니다.
균등분포라고 가정
이므로,
16. Policy Search as Probabilistic Inference
█ Soft-max Operation
Soft-max op.
지수승에 대한 평균
을 다시 log
이런 분포에서 평
균한 것과 비슷한
효과를 보여줌!
17. Interim Check
█ 지금까지 정리
1) 강화학습을 확률적 그래픽 모델에서의 추론 문제로 변환
2) HMM 문제와 비슷하기 때문에, Forward-Backward 알고리즘으로 최
적 정책(𝑝(𝑎𝑡|𝑠𝑡, 𝒪𝑡:𝑇))추론.
그리고,
3) 최적 정책(𝑝(𝑎𝑡|𝑠𝑡, 𝒪𝑡:𝑇)) 도출.
18. Interim Check
4) Backward message(𝛽) 로그 스케일로 관찰
5) Deterministic한 환경과 Stochastic한 환경 비교
결정론적 환경:
확률론적 환경:
Optimistic transition
Standard RL에서의 Policy iteration과 유사하다.
Let’s do variational inference to fix it.
19. Policy Search as Probabilistic Inference
앞서 확률적 그래프 모델(PGM) 관점에서의 최적 정책을 추론해보았습니다.
그런데 이 최적 정책은 Standard RL에서의 최적 정책과 어떤 차이가 있을
까요?
𝑃 𝑎𝑡 𝑠𝑡, 𝒪𝑡:𝑇 =
𝛽𝑡(𝑠𝑡, 𝑎𝑡)
𝛽𝑡(𝑠𝑡)
= exp 𝑄 𝑠𝑡, 𝑎𝑡 − 𝑉 𝑠𝑡
VS.
𝜋 𝑎𝑡 𝑠𝑡𝜃∗ 𝑤ℎ𝑒𝑟𝑒,
PGM 관점에서의 최적 정책
Standard RL 프레임워크 에서
의 최적 정책
20. Which Objective does This Inference Procedure Optimize?
Recall;
먼저 결정론적 환경에서 생각해봅시다.
그렇다면 정책으로부터 나온 trajectory의 분포 𝑝(𝜏)는 다음과 같습니다.
근사: 𝑃 𝑎𝑡 𝑠𝑡, 𝒪𝑡:𝑇 ≈ 𝜋(𝑎𝑡|𝑠𝑡)
①
②
21. Which Objective does This Inference Procedure Optimize?
Exact Inference
𝑝 𝜏 와 𝑝(𝜏)를 같도록 만듭시다!
최적성변수가
모두 1일 때의
trajectory 확률
분포.
즉, 최적
trajectory의 확
률 분포.
정책 𝜋(𝑎𝑡|𝑠𝑡) (𝑝(𝑎𝑡|𝑠𝑡,𝒪𝑡:𝑇)의 근사)
로부터 나오는 trajectory의 확률 분포
How?
KL-divergence!
Policy에서
유도된
trajectory
𝑝 𝜏 𝒪1:𝑇
PGM을 바탕으로 유도
된 trajectory 분포
22. Which Objective does This Inference Procedure Optimize?
Entropy bonus!
Standard RL +
23. Which Objective does This Inference Procedure Optimize?
Stochastic한 환경에서는…?
이 결과는 deterministic 환경에서의 objective 처럼 단순히 리워드에 엔트로피를 더한 것이 아닙니다.
이는 계산하기 어려울 뿐더러, 사실 optimistic한 행동을 야기하게 됩니다.
Optimistic한 행동은 보통 매우 좋지 않은 결과를 낳게 됩니다.
이를 어떻게 해결해야 할까요?
→ Variational Inference!
위 objective를 직접적으로 최대화 하려고
하지 말고, 어떤 Lower bound를 찾아서 이
를 maximization 해보자.
24. Alternative Model Formulations
■ 생각해볼 수 있는 수정사항들
1) Discounted reward
→ 일반적인 RL 프레임워크에서 사용하는 할인된 리워드 전략을 사용하더라도 영향을
주지 않습니다.
2) 양수인 reward?
→ exp(𝑟(𝑠, 𝑎))는 potential function이므로 일반성을 잃지 않습니다.
exp(𝑟(𝑠, 𝑎) − 𝑟𝑚𝑎𝑥) = 𝑎 ⋅ exp(𝑟(𝑠, 𝑎))
3) Temperature 변수의 도입
마찬가지로 exp(𝑟(𝑠, 𝑎))는 potential function이므로
Φ 𝑠, 𝑎 = p 𝒪 = 1 𝑠, 𝑎 =
1
𝛼
exp(𝑟(𝑠, 𝑎))로 표현해도 일반성을 잃지 않습니다. 이 때의 objective는 리워
드와 엔트로피에 𝛼 값을 곱한 값의 총 합의 기댓값으로 표현됩니다. 𝜶가 0으로 가까워질수록 Standard
RL의 objective에 가까워집니다.
25. Alternative Model Formulations
4) Non-uniform action prior?
Action prior가 non-uniform 하더라도, action-prior에 대한 정보가 리워드 항에 포함될 수 있기 때문에, 어
떠한 action prior여도 상관이 없습니다. 즉 uniform distribution이라고 가정해도 상관이 없습니다.
→action prior를 고려한 최적 trajectory의 확률 분포 𝑝(𝜏)
출처:https://www.youtube.com/watch?v=cnXzQY5Ovlw&list=PLoZgVqqHOumTqxIhcdcpOAJOOimrRCGZn&index=20
[카네기 멜론 대학 PGM 오픈 강의 中 발췌]
참고: 사실 inverse RL 입장에서는 전문가 trajectory가 주어지
고, 이 리워드를 역으로 추론하고자 합니다.
CRF: 조건부 무작위장
(Conditional Random Field)
26. Interim Check
█ 지금까지의 결론
1) 강화학습을 확률적 그래픽 모델에서의 추론 문제로 변환.
2) HMM 문제와 비슷하기 때문에, Forward-Backward 알고리즘으로 최
적 정책(𝑝(𝑎𝑡|𝑠𝑡, 𝒪𝑡:𝑇))추론.
3) 결정론적 환경에서 이 최적정책이 최대화 하고 있는 값은?
4) 환경론적 환경에는…?
27. Inference in Stochastic Environments
█ Recall;
확률론적 환경:
Optimistic transition
Objective:
왜 optimistic한 행동을 하게 되는 걸까요?
그래프 모델의 관점에서 𝑝 𝑠𝑡+1 𝑠𝑡, 𝑎𝑡, 𝒪𝑡:𝑇 와 𝑝 𝑠𝑡+1 𝑠𝑡, 𝑎𝑡 이 다르기 때문.
28. Inference in Stochastic Environments
방법1: Fix the dynamics
PGM에서 posterior dynamics 분포와 참(true) dynamics 분포를 강제로 일치시키게 합니다. 즉,
이렇게 세팅하고 다시 objective를 구해보면, 결정론적인 환경일 때와 같은 결과가 도출됩니다.
29. Inference in Stochastic Environments
방법2: Variational Inference
사실 dynamics를 강제적으로 고정시키는 방법은 것은 뭔가 찝찝함이 있습니다.
따라서 좀 더 수학적인 접근을 생각해 볼 수 있습니다.
먼저 True Dynamics를 가지는 제안분포 𝑞를 정의합시다.
Only new thing
새로 제안된 정책
으로 사용됨.
Same initial state
and dynamics dist.
우리가 편하게 다룰 수 있는(혹은 다루고 싶은) 제안분포를 활용한다...?
→ 변분 추론을 하면 되겠군요!
30. Inference in Stochastic Environments
한편 우리는 Variational Inference의 하한이 다음과 같다는 사실을 알고 있습니다.
log 𝑃 𝑥 ≥ 𝔼𝑧~𝑞 𝑧 [log 𝑃 𝑥, 𝑧 − log 𝑞(𝑧)]
그 유명한 ELBO ..!
𝑥를 𝓞𝟏:𝑻 그리고 𝑧를 𝒔𝟏:𝑻, 𝒂𝟏:𝑻 ~𝑞 𝑠1 , 𝑞 𝑠𝑡+1 𝑠𝑡, 𝑎𝑡 , 𝑞(𝑎𝑡|𝑠𝑡)라고 한다면,
log 𝑃(𝒪1:𝑇) ≥ 𝔼𝑧~𝑞 𝑧 [log 𝑃 𝒪1:𝑇, 𝑠1:𝑇, 𝑎1:𝑇 − log 𝑞(𝑠1:𝑇, 𝑎1:𝑇)]
임을 얻습니다.
이제 와 를 대입하면 결국
임을 확인할 수 있습니다.
확률론적 환경일지라도 같은 objective
를 증가시키면 됩니다!
이는 후에 살펴보겠지만 Optimistic
Transition 문제로 고통받지 않게 하는
이점도 있습니다.
31. Maximum Entropy Reinforcement Learning
█ PGM으로 얻은 결과를 한번 다이나믹 프로그래밍 알고리즘 관점으로 살펴봅시다.
→앞서 살펴본 backward message를 다이나믹 프로그래밍 알고리즘으로 구해봅시다.
먼저 가장 뒷부분인 종단 상태부터 시작합니다.
이때 KL 거리를 최소화하는 정책은 아래와 같습니다.
정규화 상수
exp(𝑉(𝑠𝑇))=log exp(𝑟(𝑠𝑇, 𝑎𝑇))
KL-divergence의 정의에
따라 등식이 성립함.
→두 분포가 같을 때
32. Maximum Entropy Reinforcement Learning
종단 상태(backward message의 initial condition)를 계산했으니, 이제 연쇄적인 방법으로 쭉 표현할 수 있습니다.
먼저 우리가 Q와 V를 다음과 같이 정의한다면,
시간 𝑡에 아래와 같은 등식이 성립합니다.
SAC논문에서 주구장창 봐왔던 바로 그 식!
이 때의 최적 정책은 다음과 같습니다.
33. Maximum Entropy Reinforcement Learning
최종 정리
Note: Optimistic transition이 아님!
다이나믹 프로그
래밍으로 계산
Q와 V를 계산하였으면, 최적
정책을 정할 수 있다.
이 최적 정책이 최대화 하고자 하는 objective는 리워드와 엔트로피의 합입니다. 즉,
는 를 따라가고자 근사한 확률 분포 (정책)
= 𝑎𝑟𝑔𝑚𝑖𝑛𝜋𝐷𝐾𝐿(𝜋(𝑎𝑡|𝑠𝑡) ∥
exp(𝑄(𝑠𝑡, 𝑎𝑡))
exp(𝑄(𝑠𝑡, 𝑎𝑡))
)
34. Approximate Inference with Function Approximation
이제까지 살펴본 Maximum Entropy RL 프레임워크
를 이용한 알고리즘에 대해 살펴보겠습니다.
1. Maximum Entropy Policy Gradient
2. Maximum Entropy Actor-Critic (Soft Actor-Critic)
3. Maximum Entropy Q-Learning (Soft Q-Learning)
35. Approximate Inference with Function Approximation
Actor-
Critic
Policy
Gradient
Value-
Based
Policy Gradient:
Objective를 직접적으
로 최적화하는 방법
Value-Based:
Value function 혹은 Q
function을 평가하는
방법 (explicit 한 정책
은 없으며, V혹은Q값을
바탕으로 정책이 유도
된다.(ex.𝜖 − 𝑔𝑟𝑒𝑒𝑑𝑦))
Actor-Critic:
Explicit한 정책을 사용
하며 동시에 V혹은 Q
값 역시 활용하여
objective를 최적화한
다.
배경지식
36. Maximum Entropy Policy Gradient
Maximum Entropy Policy Gradient
: 리워드와 엔트로피의 합인 objective를 이용하여 policy gradient하는 방법입니다.
42. Maximum Entropy Policy Gradient
Interesting Relationship to Q-learning
앞서 구한 objective의 gradient를 다시 살펴보겠습니다.
≈
1
𝑁
𝑛=1
𝑁
𝑡=1
𝑇
[∇𝜃 log 𝑞𝜃 𝑎𝑡 𝑠𝑡 (
𝑡′=𝑡
𝑇
𝑟 𝑠𝑡′, 𝑎𝑡′ − log 𝑞𝜃 𝑎𝑡′ 𝑠𝑡′ ) − 1)]
=
1
𝑁
𝑛=1
𝑁
𝑡=1
𝑇
[∇𝜃 log 𝑞𝜃 𝑎𝑡 𝑠𝑡 (𝑟 𝑠𝑡, 𝑎𝑡 +
𝑡′=𝑡+1
𝑇
𝑟 𝑠𝑡′, 𝑎𝑡′ − log 𝑞𝜃 𝑎𝑡′ 𝑠𝑡′ − log 𝑞𝜃(𝑎𝑡|𝑠𝑡) − 1)]
𝑠𝑜𝑓𝑡 𝑚𝑎𝑥𝑎𝑡+1
𝑄(𝑠𝑡+1, 𝑎𝑡+1 )
≈
1
𝑁
𝑛=1
𝑁
𝑡=1
𝑇
[∇𝜃𝑄(𝑎𝑡, 𝑠𝑡)(𝑟 𝑠𝑡, 𝑎𝑡 + 𝑠𝑜𝑓𝑡 max
𝑎𝑡+1
𝑄 𝑠𝑡+1, 𝑎𝑡+1 − 𝑄(𝑠𝑡, 𝑎𝑡)]
baseline
Baseline을 0으
로 놓으면,
후에 살펴 볼 Soft Q-learning과 같아집니다!
아시다시피 baseline은 미분의 방향에 영향
을 주지 않습니다. 다만 정도에 따라 분산을
줄일 수 있습니다.
43. Maximum Entropy Actor-Critic (Soft Actor-Critic)
앞에서 살펴본 Maximum Entropy Policy Gradient 방법과 다르게 ELBO를 직접적으로 미분하
여 최적화하는 것이 아니라 message passing 방법을 이용해보도록 하겠습니다.
자연스럽게 다이나믹 프로그래밍 방법이
등장하겠죠?
먼저 우리는 다음을 알고 있습니다.
44. Maximum Entropy Actor-Critic (Soft Actor-Critic)
Q함수와 V함수는 다음의 error objectives를 최소
화 함으로써 얻을 수 있습니다.
자연스럽게 유도됩
니다.
45. Maximum Entropy Actor-Critic (Soft Actor-Critic)
정책은 ELBO를 maximization하는 방향으로 학습이 가능합니다.
SAC 논문에서는 정책 objective
를 KL거리로 표현하고 있습니다.
46. Maximum Entropy Q-Learning (Soft Q-Learning)
█ Soft Q-Learning 에서는 Q함수만 fitting하여 사용하게 됩니다.
임을 이용하면,
Parameterized Q 함수 는 아래처럼 fitting 할 수 있습니다.
L2 error로 부터 유도됩니다.
Softmax 연산
Step
size
47. Advantages of Maximum Entropy RL)
█ Maximum Entropy RL은 탐험에 있어 효율적입니다.
https://bair.berkeley.edu/blog/2017/10/06/soft-q-learning/
48. Advantages of Maximum Entropy RL
█ Maximum Entropy RL은 강인한 학습 결과를 보여줍니다.
다양한 환경을 탐험하도록 장려하기 때문에!
https://bair.berkeley.edu/blog/2017/10/06/soft-q-learning/