  In few-shot imitation learning (FSIL), using behavioral cloning (BC) to solve
unseen tasks with few expert demonstrations becomes a popular research
direction. The following capabilities are essential in robotics applications:
(1) Behaving in compound tasks that contain multiple stages. (2) Retrieving
knowledge from few length-variant and misalignment demonstrations. (3) Learning
from a different expert. No previous work can achieve these abilities at the
same time. In this work, we conduct FSIL problem under the union of above
settings and introduce a novel stage conscious attention network (SCAN) to
retrieve knowledge from few demonstrations simultaneously. SCAN uses an
attention module to identify each stage in length-variant demonstrations.
Moreover, it is designed under demonstration-conditioned policy that learns the
relationship between experts and agents. Experiment results show that SCAN can
learn from different experts without fine-tuning and outperform baselines in
complicated compound tasks with explainable visualization.
