Conditional Neural Expert Processes for Learning Movement Primitives From Demonstration

Yiğit Yıldırım, Emre Uğur

TL;DR

This paper introduces Conditional Neural Expert Processes (CNEP), a novel framework for robot learning from demonstration that can autonomously discover and utilize multiple "expert" controllers for different modes within a single skill. CNEP outperforms existing methods on complex, multimodal tasks by effectively assigning demonstrations to the correct expert, leading to more accurate and adaptable robot behavior.

What Problem Does This Paper Address?

Robots need to learn complex skills from human demonstrations. A major challenge is that a single skill can often be performed in multiple distinct ways (e.g., picking up an object from different angles). Traditional Learning from Demonstration (LfD) methods struggle when demonstrations exhibit these "multimodal" variations. They might either try to average these different ways, leading to suboptimal or even unsafe behavior, or require explicit labels for each demonstration mode, which is often impractical. This paper tackles the problem of learning multimodal skills without requiring explicit supervision on which demonstration belongs to which mode.

Methods

The core of the proposed method, CNEP, is a neural network architecture inspired by Conditional Neural Processes (CNPs). It consists of three main components:

  • Encoder Network: Takes a set of observed points from a demonstration trajectory and encodes them into a compact latent representation.
  • Gate Network: Uses the latent representation to predict probabilities for each "expert" network being responsible for generating the current trajectory. This is a key novelty, as it allows for unsupervised mode discovery.
  • Multiple Expert Networks (Query Networks): Each expert network is trained to generate a specific mode or type of movement primitive. When generating a trajectory, CNEP uses the probabilities from the Gate Network to select the most likely expert's output.

A crucial aspect is the training objective, which includes:

  • Reconstruction Loss: Ensures the generated trajectories match the ground truth.
  • Batch Entropy Loss: Encourages the use of multiple experts, preventing any single expert from dominating.
  • Individual Entropy Loss: Promotes specialization by rewarding high confidence in expert assignments.

For real-world execution, a PID controller is appended to ensure precise trajectory following.

Datasets

The paper uses several datasets for evaluation:

  • Synthetic Datasets: Three synthetic datasets of sensorimotor trajectories were created with increasing complexity (unimodal, bimodal, and multimodal) to systematically evaluate the model's performance.
  • Real-Robot Datasets:
    • Obstacle Avoidance: Demonstrations collected using kinesthetic teaching on a Baxter robot.
  • Pick-and-Place: Demonstrations collected on a Baxter robot for picking and placing wine glasses, incorporating visual input from a camera and complex object manipulation.

Key Insights and Ideas

  • Unsupervised Mode Discovery: CNEP's ability to learn distinct movement primitives (experts) for different modes of a skill without explicit labels is a significant advancement. The Gate Network's probabilistic assignment is the mechanism for this discovery.
  • Handling Intersections: The model excels at situations where trajectories from different modes intersect. Unlike methods that interpolate, CNEP can correctly identify and follow the intended mode, avoiding collisions.
  • Explainability: The probability values assigned by the Gate Network offer a degree of interpretability, indicating which expert is responsible for a given trajectory segment.
  • On-the-fly Adaptation: CNEP can adapt to environmental changes in real-time by re-conditioning on new sensory data and switching experts dynamically.

Key Results

  • Superior Performance on Multimodal Data: CNEP consistently outperformed baseline methods (ProMP, GMM-GMR, CNMP, Stable MP) on multimodal trajectory datasets, achieving lower Mean Squared Error (MSE). For instance, in a 4-mode scenario, CNEP achieved an MSE of 0.027 ± 0.042, significantly better than CNMP's 0.112 ± 0.074.
  • Real-World Success: On the Baxter robot, CNEP successfully learned to avoid obstacles without collisions, whereas CNMP-generated trajectories led to collisions. In the pick-and-place task, CNEP successfully grasped and placed objects, while ProMP and GMM failed when the object's position was changed.
  • Effective Expert Specialization: Ablation studies showed that including both batch and individual entropy terms in the loss function was crucial for optimal performance, highlighting the importance of encouraging expert diversity and specialization.

Limitations and Future Work

  • Number of Experts: The number of experts is a hyperparameter that needs to be set manually. The paper suggests that this number should be at least equal to the number of modalities in the data. Future work could explore methods for automatically determining the optimal number of experts.
  • Extrapolation: Similar to other neural network-based approaches, CNEP cannot extrapolate beyond the training range of the data.
  • PID Controller Dependency: For precise execution on the robot, CNEP relies on an external PID controller to guarantee passing through observation points. Future work might aim to integrate this precision directly into the learned model.

Summary updated

BibTeX
@article{yldrm2024conditional,
  author = {Yiğit Yıldırım and Emre Uğur},
  title = {{Conditional Neural Expert Processes for Learning Movement Primitives From Demonstration}},
  journal = {IEEE Robotics and Automation Letters},
  year = {2024},
  doi = {10.1109/lra.2024.3477169},
}
Figure