techlist.io

Hierarchical Reinforcement Learning

3 posts

OpenAI2018-07-252 min readCurated summary

Variational option discovery algorithms

This paper applies variational inference to option discovery in reinforcement learning and shows that these methods have a close connection to variational autoencoders (VAEs). The authors introduce VALOR, a new method built on that connection, and add a curriculum that increases the number of contexts the agent sees as its performance improves. The curriculum stabilizes training for VALOR and earlier variational option discovery methods, letting a single agent learn many more modes of behavior than a fixed context distribution allows. ## Connecting Option Discovery to Variational Autoencoders - The authors draw a tight link between variational option discovery methods and VAEs. - This connection leads to VALOR (Variational Autoencoding Learning of Options by Reinforcement). - In VALOR, the policy acts as the encoder, mapping contexts sampled from a noise distribution into trajectories. - A decoder then tries to recover the original context from the complete trajectory. ## Curriculum Over Contexts - The number of contexts the agent trains on grows over time. - The set expands only when the decoder shows the agent performs well enough on the current contexts. - The authors report that this simple schedule stabilizes training for VALOR and prior variational methods. - With the curriculum, a single agent can learn many more distinct behaviors than it can under a fixed context distribution. ## Limitations and Downstream Use - The authors also examine fundamental limitations of the general variational option discovery approach. - They investigate whether the learned options can be applied to downstream tasks.

OpenAI2017-10-252 min readCurated summary

Learning a hierarchy

# Learning a Hierarchy with Meta-Learning Shared Hierarchies Humans tackle complex problems by chaining together learned sub-skills, but standard reinforcement learning searches over low-level actions one step at a time, which becomes inefficient for long tasks. The post introduces Meta-Learning Shared Hierarchies (MLSH), a hierarchical reinforcement learning algorithm that discovers reusable high-level actions automatically. Applied to navigation tasks, it learns walking and crawling behaviors in different directions that let an agent master new tasks quickly. ## Why Flat Reinforcement Learning Struggles - Current reinforcement learning methods rely on brute-force search over low-level actions, such as individual muscle contractions. - Long tasks requiring thousands of timesteps demand an enormous number of attempts, making these methods very inefficient. - Humans, by contrast, decompose tasks like making pancakes into reusable components and sequence them together. ## Hierarchical Reinforcement Learning - The core idea is to represent complex behavior as a short sequence of high-level actions. - In the authors' example, a solution requiring 2,000 low-level actions becomes 10 high-level actions, and searching a 10-step sequence is far cheaper than searching a 2,000-step one. ## Meta-Learning Shared Hierarchies (MLSH) - A master policy chooses among a set of sub-policies and selects a new action every N timesteps (for example, N=200). - A sub-policy executed for N timesteps forms one high-level action. In navigation tasks, sub-policies correspond to walking or crawling in particular directions. - Unlike most prior work, which hand-engineers hierarchies, MLSH discovers the structure automatically through interaction with the environment. - The method takes a meta-learning view: a good hierarchy is one that enables fast reward acquisition on unseen tasks. - Training samples a distribution of tasks, shares the sub-policies across them, and learns a new master policy for each sampled task. Repeatedly training new master policies pushes the sub-policies toward structures that suit the master's learning dynamics. ## Experiments in AntMaze - A Mujoco Ant robot must navigate from a start position to a goal across a distribution of nine different mazes. - The algorithm finds a diverse set of sub-policies that can be sequenced to solve these mazes, learned purely from environment interaction. - The learned sub-policies can then be reused to master a larger task than those used during training. ## Code Release - The authors released the code for training MLSH agents, along with the MuJoCo environments built to evaluate them.

OpenAI2017-04-092 min readCurated summary

Stochastic Neural Networks for hierarchical reinforcement learning

This work proposes a two-stage framework for hierarchical reinforcement learning that tackles sparse rewards and long horizons. An agent first learns a library of reusable skills in a pre-training environment, guided by a single proxy reward that requires little domain knowledge about the downstream tasks. A high-level policy then operates over these skills, which improves exploration and lets the agent learn faster in downstream tasks with sparse rewards. ## Motivation - Deep reinforcement learning performs well on many tasks, but sparse-reward and long-horizon tasks remain difficult. - The approach aims to reuse skills learned in advance rather than learning each downstream task from scratch. ## Skill Pre-training with a Proxy Reward - Skills are learned in a pre-training environment using one proxy reward, which combines ideas from intrinsic motivation and hierarchical methods. - The proxy reward needs very little knowledge of the downstream tasks, so the skills are not tailored to any particular one. - Stochastic Neural Networks are used to represent a broad span of skills efficiently. - An information-theoretic regularizer encourages the learned skills to be diverse and distinguishable. ## High-level Policy for Downstream Tasks - A high-level policy is trained on top of the pre-trained skills and chooses which skill to use. - Working at the level of skills improves exploration, which helps where rewards are sparse. ## Experimental Results - The learned skills are interpretable and were acquired sample-efficiently. - Learning performance improved consistently across a wide range of downstream tasks.