Task-Conditioned Variational Autoencoders for Learning Movement Primitives

Michael Noseworthy, Rohan Paul, Subhro Roy, Daehyung Park, Nicholas RoyCoRL 2019

Abstract

Consider a task such as pouring liquid from a cup into a container. Some parameters, such as the location of the pour, are crucial to task success, while others, such as the length of the pour, can be varied without affecting the outcome. This paper introduces the Task-Conditioned Variational Autoencoder (TC-VAE) to learn robotic movement primitives from demonstrations. By explicitly separating specified "task" parameters (what to do) from learned "manner" parameters (how to do it) using an adversarial loss, the model allows users to control the style of a motion without failing the underlying task. This enables highly interpretable and robust trajectory generation for complex actions like robotic pouring.

Introduction

A central challenge in Learning from Demonstration (LfD) is the representation of motion. Movement Primitives (MPs) are often used to parameterize these motions. However, real-world actions typically involve a mix of strict task constraints and flexible stylistic variations. For instance, in a robotic pouring task, the location of the target container is a non-negotiable constraint (the "what"), whereas the speed, height, or angle of the pour represents stylistic "manner" (the "how").

Robotic pouring task illustrating task parameters (target location g) and manner parameters (pouring angle θ and timing t0, tf).

If a generative model entangles these factors in a single latent space, modifying a stylistic parameter might inadvertently alter the task execution, leading to failure (e.g., spilling liquid). This work addresses the problem of disentangling specified task parameters from unspecified, learned manner parameters to create an interpretable and robust latent space for trajectory generation.

Methodology: Task-Conditioned VAE

The proposed Task-Conditioned Variational Autoencoder (TC-VAE) architecture is designed to explicitly factorize the movement representation.

Architecture

The model consists of an encoder that maps a trajectory $\mathbf{x}$ to a latent "manner" space $\mathbf{h}$, and a decoder that reconstructs the trajectory given $\mathbf{h}$ and the task parameters $\mathbf{w}$. To handle the sequential nature of robotic trajectories, the authors utilize Temporal Convolutional Networks (TCNs), which provide a large receptive field and capture long-range dependencies more effectively than standard recurrent units.

Architecture of the Task-Conditioned Variational Autoencoder (TC-VAE) featuring TCN-based encoder (left) and decoder (right).

Adversarial Information Factorization

To ensure that the learned manner parameters $\mathbf{h}$ are truly independent of the task parameters $\mathbf{w}$, an adversarial training objective is introduced. An auxiliary network is trained to predict $\mathbf{w}$ from $\mathbf{h}$. Simultaneously, the VAE encoder is trained to maximize this auxiliary network's error. This min-max game forces the encoder to strip all task-related information from the latent space, ensuring that $\mathbf{h}$ encodes only stylistic variations. The total objective combines a $\beta$-VAE loss with this adversarial component.

Experimental Setup

The TC-VAE was evaluated on two distinct datasets:

  1. Synthetic Arcs: A 2D dataset where the task is defined by the circle's center, and stylistic variations include radius, start angle, and arc length.
  2. MIME Pouring Dataset: Real-world demonstrations of a Baxter robot performing pouring tasks. Task parameters (source and target locations) were extracted algorithmically. To compensate for the small dataset size, the authors used Dynamic Movement Primitives (DMPs) to augment the data by perturbing goal locations.

Results and Discussion

The performance was measured by Success (hitting the target within a 5cm threshold) and Robustness (maintaining success when manner parameters are varied).

  • Quantitative Performance: On the MIME pouring dataset, the TC-VAE achieved 100% Robustness and 83% Success. In contrast, a standard unconditioned VAE failed significantly, with only 4% Robustness and 31% Success.
  • Ablation Study: Removing the adversarial loss led to a drop in Robustness to 93%, confirming that the adversarial component is essential for preventing "information leaks" where task data is hidden in the manner latent space.
  • Interpretability: Qualitative analysis showed that individual latent dimensions in $\mathbf{h}$ naturally mapped to human-understandable concepts, such as the duration of the pour or the maximum pouring angle. Tweaking these variables allowed for smooth stylistic adjustments while the end-effector remained strictly on target.

Conclusion

The TC-VAE framework demonstrates that explicit conditioning combined with adversarial disentanglement creates a powerful tool for learning movement primitives. While the current approach requires manual task specification and does not always achieve perfect internal disentanglement between different manner parameters, it provides a significant step toward interpretable and controllable robotic learning. Future work may explore using visual features as task parameters and applying the model to more diverse manipulation tasks.

Summary updated

BibTeX
@inproceedings{noseworthy2019task,
  author = {Michael Noseworthy and Rohan Paul and Subhro Roy and Daehyung Park and Nicholas Roy},
  title = {{Task-Conditioned Variational Autoencoders for Learning Movement Primitives}},
  booktitle = {Conference on Robot Learning},
  year = {2019},
  url = {https://openreview.net/forum?id=cocat9ZYsv},
}
Figure