Macro Action Reinforcement Learning with Sequence Disentanglement using Variational Autoencoder

Heecheol Kim, Masanori Yamada, Kosuke Miyoshi, Hiroshi YamakawaarXiv 2019

Abstract

One problem in the application of reinforcement learning to real-world problems is the curse of dimensionality on the action space. Macro actions, a sequence of primitive actions, have been studied to diminish the dimensionality of the action space with regard to the time axis. However, previous studies relied on humans defining macro actions or assumed macro actions as repetitions of the same primitive actions. We present Factorized Macro Action Reinforcement Learning (FaMARL) which autonomously learns disentangled factor representation of a sequence of actions to generate macro actions that can be directly applied to general reinforcement learning algorithms. FaMARL exhibits higher scores than other reinforcement learning algorithms on environments that require an extensive amount of search.

Introduction

Reinforcement learning (RL) often struggles with the "curse of dimensionality," particularly in environments with continuous action spaces or tasks requiring long-horizon, precise movements. Standard RL agents explore by selecting primitive actions at every timestep, leading to an exponentially large search space. Macro actions—sequences of primitive actions treated as a single unit—offer a solution by compressing the temporal dimension. However, existing methods typically require manual definition of these sequences or limit them to simple repetitions of a single action. FaMARL addresses these limitations by autonomously learning complex, multi-step macro actions from expert demonstrations.

Methods

The FaMARL framework operates in three distinct stages to bridge the gap between expert data and autonomous RL exploration.

The FaMARL framework overview, illustrating action segmentation, FAVAE-based sequence disentanglement, and RL with latent actions.
  1. Unsupervised Segmentation: Expert demonstrations are sliced using a sliding window. An autoencoder maps these windows into a feature space, and natural boundaries are identified by detecting "peaks" in the distance between consecutive features. This allows for segmentation without human labels.
  2. Sequence Disentanglement (FAVAE): Segmented sequences are processed by a Factorized Action Variational Autoencoder (FAVAE). This ladder-structured VAE learns disentangled latent variables ($z$), where individual dimensions control specific movement attributes like speed or direction. 1D convolutions and "action_on/off" indicators allow the model to handle variable-length sequences.
  3. RL with Latent Actions: A Proximal Policy Optimization (PPO) agent is trained to select latent variables $z$ instead of primitive actions. The FAVAE decoder translates these latent selections into macro actions, which are executed in the environment.

Experiments and Results

The authors evaluated FaMARL in two simulated 2D environments: ContinuousWorld (navigation) and RobotHand (physics-based manipulation). In the Maze task of ContinuousWorld, agents must navigate around walls to reach a goal, a task requiring significant exploration.

Learning curves comparing FaMARL variants against primitive action and FiGAR baselines, showing superior performance in complex environments.

As shown in the learning curves, FaMARL variants significantly outperform standard PPO (PrimitiveAction) and FiGAR (which only repeats single actions). In the RobotHand environment, FaMARL was the only algorithm capable of completing both sparse-reward reaching and high-precision ball-placing tasks. Standard primitive-action agents failed due to the difficulty of credit assignment over long horizons, while FiGAR lacked the necessary precision.

Key Insights

  • Disentanglement and Generalization: By learning factorized representations, FaMARL does not merely mimic experts. It learns the fundamental "building blocks" of movement, allowing it to interpolate or extrapolate beyond the specific actions seen in the training data.
  • Search Space Compression: Executing macro actions effectively shortens the episode length from the policy's perspective, making the credit assignment problem more manageable.
  • Dynamic Length: The FAVAE decoder's "action_off" signal enables the agent to learn optimal macro action durations, adapting to time-sensitive task requirements.

Conclusion and Future Work

FaMARL demonstrates that autonomous macro action discovery can solve complex tasks where traditional RL fails. However, the current "open-loop" execution of macro actions—where the agent does not process state feedback during the sequence—limits its use in highly unstable environments. Future work may explore hybrid architectures that combine macro actions for high-level navigation with primitive actions for fine-grained, closed-loop control.

Summary updated

BibTeX
@misc{kim2019macro,
  author = {Heecheol Kim and Masanori Yamada and Kosuke Miyoshi and Hiroshi Yamakawa},
  title = {{Macro Action Reinforcement Learning with Sequence Disentanglement using Variational Autoencoder}},
  year = {2019},
  eprint = {1903.09366},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1903.09366},
}
Figure