Explainable Hierarchical Imitation Learning for Robotic Drink Pouring

Dandan Zhang, Yu Zheng, Qiang Li, Wei Lei, Dongsheng Zhang, Zhengyou Zhang

Abstract

To accurately pour drinks into various containers is an essential skill for service robots. However, drink pouring is a dynamic process and difficult to model. Traditional deep imitation learning techniques for implementing autonomous robotic pouring have an inherent black-box effect and require a large amount of demonstration data for model training. To address these issues, an Explainable Hierarchical Imitation Learning (EHIL) method is proposed in this paper such that a robot can learn high-level general knowledge and execute low-level actions across multiple drink pouring scenarios. Moreover, with EHIL, a logical graph can be constructed for task execution, through which the decision-making process for action generation can be made explainable to users and the causes of failure can be traced out. Based on the logical graph, the framework is manipulable to achieve different targets while the adaptability to unseen scenarios can be achieved in an explainable manner. A series of experiments have been conducted to verify the effectiveness of the proposed method. Results indicate that EHIL outperforms the traditional behavior cloning method in terms of success rate, adaptability, manipulability and explainability.

Introduction

Robotic drink pouring is deceptively difficult. It involves complex fluid dynamics that are hard to model analytically, and visual perception of transparent or reflective liquids is a significant challenge for computer vision. While Deep Imitation Learning (IL)—where a robot learns by watching a human—has shown promise, it often suffers from a "black-box" effect. Traditional models map pixels directly to motor actions, making it impossible to diagnose failures. Furthermore, standard behavior cloning often fails to generalize when faced with new cup shapes or liquid colors because it lacks an underlying logical understanding of the task.

The EHIL Framework

The core innovation of this research is the Explainable Hierarchical Imitation Learning (EHIL) framework. This method decomposes the complex pouring task into three distinct hierarchies to improve both performance and transparency.

The EHIL framework overview, illustrating the three-step process from data collection to online deployment.

Hierarchical Structure

  1. Hierarchy 1 (Phase Determination): Identifies the high-level stage of the task: Approaching, Pouring, Slowing Down, or Leaving.
  2. Hierarchy 2 (State Estimation): Estimates the "fullness" of the target container, divided into $N$ discrete states.
  3. Hierarchy 3 (Action Generation): Calculates the specific angular velocity for the robot's wrist to control the tilt of the source container.

These hierarchies are linked via a Logical Graph that enforces sequential common sense. For example, the graph prevents the robot from jumping from "Approaching" to "Leaving" without completing the "Pouring" phase. This structure allows the robot to handle partially full containers by identifying the current state and skipping unnecessary steps.

Experimental Setup and Datasets

The researchers collected a custom dataset using a UR16E robotic arm. The training set included 80 trials across 20 different scenes. To test generalization, an evaluation set of 14 entirely new "unseen" scenes was used, featuring various combinations of container shapes, sizes, and liquid types.

Classification of target containers and drinks used in the study to test adaptability.

Key Results

The EHIL method significantly outperformed traditional behavior cloning (BC) across several metrics:

  • Success Rate: EHIL achieved a 92% overall success rate compared to 59% for the BC baseline.
  • Generalization: In unseen scenes, EHIL maintained an 88% success rate, while the baseline dropped to 48%.
  • Explainability: Using Grad-CAM (Gradient-weighted Class Activation Mapping), the authors demonstrated that the EHIL model correctly focuses its attention on the rim of the container and the liquid surface, rather than irrelevant background features.
  • Manipulability: Users can adjust the robot's goal (e.g., filling a cup to 70% instead of 90%) by simply modifying the target state in the logical graph, requiring no retraining.

Conclusion

By moving away from end-to-end black-box learning and toward a hierarchical, logic-based approach, EHIL provides a robust framework for complex robotic tasks. While the system currently relies on a single RGB camera, future work will explore multi-sensor fusion and automated labeling to further enhance the system's reliability and ease of training.

Summary updated

Abstract

To accurately pour drinks into various containers is an essential skill for service robots. However, drink pouring is a dynamic process and difficult to model. Traditional deep imitation learning techniques for implementing autonomous robotic pouring have an inherent black-box effect and require a large amount of demonstration data for model training. To address these issues, an Explainable Hierarchical Imitation Learning (EHIL) method is proposed in this paper such that a robot can learn high-level general knowledge and execute low-level actions across multiple drink pouring scenarios. Moreover, with EHIL, a logical graph can be constructed for task execution, through which the decision-making process for action generation can be made explainable to users and the causes of failure can be traced out. Based on the logical graph, the framework is manipulable to achieve different targets while the adaptability to unseen scenarios can be achieved in an explainable manner. A series of experiments have been conducted to verify the effectiveness of the proposed method. Results indicate that EHIL outperforms the traditional behavior cloning method in terms of success rate, adaptability, manipulability and explainability.
BibTeX
@misc{zhang2021explainable,
  author = {Dandan Zhang and Yu Zheng and Qiang Li and Wei Lei and Dongsheng Zhang and Zhengyou Zhang},
  title = {{Explainable Hierarchical Imitation Learning for Robotic Drink Pouring}},
  year = {2021},
  eprint = {2105.07348},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.07348},
}
Figure