VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
Β
Unsupervised Curricula for Visual Meta Reinforcement Learning(CARML)
1. Unsupervised Curricula
for Visual Meta-Reinforcement Learning
2020. 07. 06
Jeong-Gwan Lee
1 / 17
Jabri, Allan, et al. "Unsupervised curricula for visual meta-reinforcement learning." Advances
in Neural Information Processing Systems. 2019.
2. Meta Reinforcement Learning
β’ Regular RL : learn policy for single task (=Specialist)
2 / 17
β’ Meta-RL : learn meta-policy for task distribution, by learning good
initial weights and adaptation rule (=Generalist)
Appendix for adaptation in detail
3. Preliminaries: Task Distribution
β’ Single Task (= Single MDP)
β’ Task Distribution (= MDP Distribution)
β’ A task is sampled from task distribution where
β’ Each task can be defined as βMDP without general rewardβ and
a sampled task-specific reward.
3 / 22
start point
Sampled Task 1
Sampled Task 2
Target-reaching problem
with given
4. Preliminaries: Unsupervised Meta-RL
β’ Supervised meta-RL
β’ Given, hand-crafted task distribution
β’ When task is sampled, the reward function is provided
to the meta-policy at both meta-train and meta-test phase.
β’ Unsupervised meta-RL
β’ Thereβs no task distribution and goal description
at meta-train phase.
β’ Thereβs no reward function at meta-train phase,
only uses reward function at meta-test phase.
4 / 22
start point
Target-reaching problem
with no reward supervision at meta train
meta-train
meta-train = meta-test
meta-test
β
start point
Sampled Task 1
Target-reaching problem
with given
start point
Sampled Task 1
Q. How to train meta-policy without reward function?
5. Preliminaries: DIAYN(Diversity is all you need)
5 / 22
β’ Goal : Learning useful skills without any reward function at train time
β’ Skill ( ) : Determinant of How to move in the state space
β’ Skill-conditioned Policy :
2. Only States, Not Actions( ) are used to distinguish skills( )
3. Encouraging exploration (maximizing the policy entropy)
β’ 3 Desiderata
start point
Skill example
: Categorical var.
(Category = 8)
1. Sampled Skill( ) should control which States( ) the agent visits
= States( ) the agent visited can easily infer the used Skill( )
π§!
π§"
π§#
π§$
π§%
π§&
π§'
π§(
6. Preliminaries: DIAYN(Diversity is all you need)
6 / 22
β’ Then how to define pseudo reward?
β’ Define the object as,
β’ DIAYN implemented with SAC maximizes the policyβs entropy over actions.
Exploration Sample skill variable π,
action π based on π and get next state π
Intractable
Fixed discrete uniform dist.
(Cat. =50)
7. Preliminaries: DIAYN(Diversity is all you need)
7 / 22
β’ Then how to define pseudo reward?
Inferable ability to sampled skill
Skill-conditioned Policy
Update the discriminator to maximize
8. Preliminaries: DIAYN(Diversity is all you need)
8 / 22
β’ Skills learned with no reward
β’ After training, sample and rollout using
Run forward Walk forward Run backward Acrobatic
β’ Accelerating Learning with Policy Initialization
β’ (1)takes the skill with highest reward for each benchmark task and
(2)finetune this policy using the task-specific reward function.
9. Curricula for Unsupervised Meta-Reinforcement Learning : CARML
β’ Goal : In unsupervised meta-RL setting, learn meta-policy with evolved task
distribution via EM algorithm.
9 / 17
Task distribution π! Meta-RL Policy
Tasks
Data?
1. Sample a task
2. Define task reward
3. Update Meta-policy
How to evolve task distribution using data?
M-step : Meta-LearningE-step : Fitting task distribution
10. Diversity Structure
Organize task distribution from policy by maximizing the Mutual
Information between each state π and a latent task variable π
β’ Task distribution to be well-
structured by task variable π§
10 / 17
Objective : Information Maximization via EM
β’ Meta-RL policy π! to be
as diverse as possible in
state space
β’ Meta-RL policy π! to follow
sampled task variable π§
11. How to Learn a task distribution π π
11 / 17
Using collected states of post-updated meta-policy π$ in previous M-
step, π π estimates the state density model as Gaussian Mixture Model.
π§ = 1
π§ = 2
π§ = 3
π§ = 4
π§ = 5
Density
Estimation
State Space
Features of state
12. How to design a task distribution π π
12 / 17
β’ Gaussian mixture modelβs parameters
β’ Categorical random variable ,
Define as Gaussian Mixture Model,
β’ Prior (Task distribution)
β’ Likelihood
β’ State marginal distribution
13. E-Step: Task Acquisition (Fitting π π)
13 / 17
In just before meta-RL step,
Sample task variable π§ and add states into π
E-step : Estimate given
derivation
Define
Be structured well!
We donβt care where states come from previous π§
Just reorganize to be well structured!
14. Task Acquisition via Discriminative Clustering
[1]Caron, Mathilde, et al. "Deep clustering for unsupervised learning of visual features." Proceedings of the European Conference on
Computer Vision (ECCV). 2018 14 / 17
2. Based on posterior π)(π§|π*(π )),
Assign pseudo-label
3. Based on pseudo-labels,
Update ResNet by supervised learning
encoder
(ResNet)
π!
Gaussian Mixture
π"
A variant of DeepCluster[1]
Pseudo Label
1. Update Gaussian Mixture Model
by MLE (EM algorithm for GMM)
15. M-step: How to define a reward function ?
15 / 17
unknown
π(π) β π π(π)
Task-conditioned reward function for meta-policy is,
derivation
assumption that the fitted
marginal distribution π π π
matches that of the policy π(π)
unknown
Known from previous E-step
Be diverse Do the task well
16. M-step: Meta-Learning (Fitting π π½)
16 / 17
We can trade-off between discriminability of skills and task-specific
exploration by weighting π β 0,1
Inference ability to skills
If π ,-! infers the sampled task π§ well,
Reward should be high.
Task-specific exploration
Given task z, the policy tries unfamiliar state,
Reward should be high.
Task-conditioned reward function for meta-policy is,
17. Experiment Setting : Visual Navigation Task
VizDoom involving a room filled with five different objects
β’ Goal : Reaching a single target object
β’ Observation : egocentric images with limited field of view.
β’ Actions : Turn Right, Turn Left, Move forward
β’ Reward Function : inverse l2 distance from the specified target object.
17 / 17
Observation example Bird-eye view (2D position)
18. Evolution of Task Distribution
18 / 17
1 E-step
3 E / 2 M
5 E / 4 M
Random initial policy trajectories :
Less structured and less distinct
More structured and well-organized
Exploration (wide range) &
Exploitation (direction)
Projecting trajectories of each mixture components (=task) into the true state space
19. RL2 as M-step meta-policy
β’ Meta-RL algorithm using RNN policy
β’ When βTrialβ is initiated, a new task is sampled.
β’ One trial = two episode with hidden state sharing
β’ Process Flow
19 / 17
Duan, Yan, et al. "Rl $^ 2$: Fast reinforcement learning via slow reinforcement learning." arXiv preprint
arXiv:1611.02779 (2016).
Initial state
Initial hidden state
Embedding
π
GRU
FC
SOFTMAX
RL2 structure
Trial 1 (sampled Task 1) Trial 2 (sampled Task 2)
Episode 1 Episode 2 Episode 1
20. Direct Transfer & Finetuning for one test task
β’ Direct Transfer(Marker and dotted line) :
Apply policy to test task without finetuning.
β’ Finetuning : Update parameters of policy
to specific test tasks
200 400 600# of episodes 800 1000
20 / 17
Sample only one test task (r.seed 20)
Baselines
1) PPO from scratch
2) Pre-training with random network distillation
(RND) for unsupervised exploration
3) Supervised meta-learning, as an oracle
21. CARML as Meta-pretraining
21 / 17
Experiment description :
Train with different initialization weights
from train task distribution and
plot learning curve from test task distribution.
Purpose :
Check Meta-pretraining ability
Variants :
Encoder init : only initialize the pre-trained
encoder to separate the effect of meta-policy
and visual representation (ResNet)
The acquired meta-learning strategies may be useful for learning related task
distributions, effectively acting as pretrain model for meta-RL.
22. Summary
They proposed a framework for inducing unsupervised, adaptive task
distributions for meta-RL that scales to environments with high-
dimensional pixel observations.
They showed CARML enables (1)unsupervised acquisition(skill maps) of
meta-learning strategies that transfer to test task distributions in terms
of (2) direct evaluation, more sample efficient fine-tuning and
(3) more sample-efficient supervised meta-learning
22 / 17