NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning to Shift Attention for Motion Generation

You Zhou, Jianfeng Gao, Tamim AsfourarXiv 2021

Abstract

Learning from Demonstration (LfD) allows robots to acquire complex skills from human guidance. However, standard approaches often struggle with multi-modal demonstrations and fail to extrapolate to task parameters outside the training distribution. This paper introduces SALaT (Shift Attention Latent Transformation), a framework that addresses these challenges by combining normalizing flows with a recurrent attention mechanism. SALaT maps multi-modal trajectories into a unimodal latent space using Real-valued Non-Volume Preserving (RealNVP) transformations and employs a Gated Recurrent Unit (GRU) to dynamically shift focus between local coordinate frames. Experimental results on simulated benchmarks and a humanoid robot demonstrate that SALaT significantly outperforms existing task-parameterized models in both success rate and generalization capability.

Introduction

In modern robotics, Learning from Demonstration (LfD) is a vital tool for teaching robots complex tasks without manual programming. Despite its success, two primary obstacles remain: the multi-modality problem and the extrapolation problem.

Overview of the SALaT framework, showing how human demonstrations are processed to handle multiple motion modes and extrapolate to new scenarios.

The multi-modality problem arises when human teachers provide inconsistent demonstrations (e.g., bypassing an obstacle from different sides). Standard regression-based models often "average" these paths, resulting in collisions. The extrapolation problem occurs when a robot must perform a task in a configuration never seen during training, such as reaching a goal significantly further away than any demonstrated example. While Task-Parameterized Gaussian Mixture Models (TP-GMM) offer some robustness by using local coordinate frames, they often fail to maintain trajectory integrity in extreme extrapolation scenarios.

Methodology: The SALaT Framework

The proposed SALaT architecture consists of two core components designed to mitigate these challenges.

Latent Transformation via RealNVP

To handle multi-modality, SALaT utilizes Real-valued Non-Volume Preserving (RealNVP) transformations. RealNVP is a type of normalizing flow that learns to "unwarp" complex, multi-modal trajectory distributions into a simple, single-mode Gaussian distribution in a latent space. Because these transformations are invertible, the robot can sample a smooth path from the latent space and map it back to a valid real-world trajectory. Bi-directional Gated Recurrent Units (Bi-GRUs) are integrated to ensure temporal consistency across the generated paths.

The SALaT architecture, featuring the Shift Attention mechanism and the RealNVP-based latent transformation blocks.

Recurrent Attention Model

For robust extrapolation, the model employs a GRU-based attention mechanism. Instead of viewing the workspace from a single global perspective, the model associates every relevant task query (e.g., start point, obstacle, goal) with a local coordinate frame. The attention mechanism learns to "shift" focus dynamically: attending to the start frame at the beginning of a motion, shifting to an obstacle frame mid-path, and finally focusing on the goal frame. This attention-shifting makes the generated motion invariant to the absolute distance between landmarks, allowing for successful execution even when goal positions are far outside the training set.

Experimental Evaluation

The authors evaluated SALaT against TP-GMM and αTP-GMM baselines across several simulated benchmarks and a real-world task using the ARMAR-6 humanoid robot.

Experiment TP-GMM Success αTP-GMM Success SALaT Success
Docker 42% 60% 60%
Docker-Obstacle 6% 25% 52%
Docker-Obstacle-Tunnel 10% 9% 40%

In the Docker-Obstacle scenario, which requires navigating around a collision object, SALaT was the only model capable of choosing a distinct mode (left or right) rather than averaging the paths. On the ARMAR-6 robot, the model successfully generalized a "sliding and inserting" tool task to new table positions, handling two different demonstrated motion styles seamlessly.

Conclusion

SALaT represents a significant step forward in making LfD more robust for real-world applications. By treating extrapolation as a problem of shifting attention between local landmarks and using normalizing flows to manage multi-modal data, the framework achieves higher success rates in complex environments. Future work will focus on automating the discovery of local frames and integrating this attention mechanism into Reinforcement Learning frameworks to further enhance robotic autonomy.

Summary updated

BibTeX
@misc{zhou2021learning,
  author = {You Zhou and Jianfeng Gao and Tamim Asfour},
  title = {{Learning to Shift Attention for Motion Generation}},
  year = {2021},
  eprint = {2102.12141},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.12141},
}
Figure