<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Robot. AI</journal-id>
<journal-title>Frontiers in Robotics and AI</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Robot. AI</abbrev-journal-title>
<issn pub-type="epub">2296-9144</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/frobt.2020.606361</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Robotics and AI</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Modeling Task Uncertainty for Safe Meta-Imitation Learning</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name><surname>Matsushima</surname> <given-names>Tatsuya</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x0002A;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/928387/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Kondo</surname> <given-names>Naruya</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>Iwasawa</surname> <given-names>Yusuke</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/1115827/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Nasuno</surname> <given-names>Kaoru</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>Matsuo</surname> <given-names>Yutaka</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>School of Engineering, The University of Tokyo</institution>, <addr-line>Tokyo</addr-line>, <country>Japan</country></aff>
<aff id="aff2"><sup>2</sup><institution>DeepX Inc.</institution>, <addr-line>Tokyo</addr-line>, <country>Japan</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Georg Martius, Max Planck Institute for Intelligent Systems, Germany</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: Eiji Uchibe, Advanced Telecommunications Research Institute International (ATR), Japan; Riccardo Zese, University of Ferrara, Italy</p></fn>
<corresp id="c001">&#x0002A;Correspondence: Tatsuya Matsushima <email>matsushima&#x00040;weblab.t.u-tokyo.ac.jp</email></corresp>
<fn fn-type="other" id="fn001"><p>This article was submitted to Computational Intelligence in Robotics, a section of the journal Frontiers in Robotics and AI</p></fn></author-notes>
<pub-date pub-type="epub">
<day>27</day>
<month>11</month>
<year>2020</year>
</pub-date>
<pub-date pub-type="collection">
<year>2020</year>
</pub-date>
<volume>7</volume>
<elocation-id>606361</elocation-id>
<history>
<date date-type="received">
<day>14</day>
<month>09</month>
<year>2020</year>
</date>
<date date-type="accepted">
<day>06</day>
<month>11</month>
<year>2020</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x000A9; 2020 Matsushima, Kondo, Iwasawa, Nasuno and Matsuo.</copyright-statement>
<copyright-year>2020</copyright-year>
<copyright-holder>Matsushima, Kondo, Iwasawa, Nasuno and Matsuo</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license>
</permissions>
<abstract><p>To endow robots with the flexibility to perform a wide range of tasks in diverse and complex environments, learning their controller from experience data is a promising approach. In particular, some recent meta-learning methods are shown to solve novel tasks by leveraging their experience of performing other tasks during training. Although studies around meta-learning of robot control have worked on improving the performance, the safety issue has not been fully explored, which is also an important consideration in the deployment. In this paper, we firstly relate uncertainty on task inference with the safety in meta-learning of visual imitation, and then propose a novel framework for estimating the task uncertainty through probabilistic inference in the task-embedding space, called PETNet. We validate PETNet with a manipulation task with a simulated robot arm in terms of the task performance and uncertainty evaluation on task inference. Following the standard benchmark procedure in meta-imitation learning, we show PETNet can achieve the same or higher level of performance (success rate of novel tasks at meta-test time) as previous methods. In addition, by testing PETNet with semantically inappropriate or synthesized out-of-distribution demonstrations, PETNet shows the ability to capture the uncertainty about the tasks inherent in the given demonstrations, which allows the robot to identify situations where the controller might not perform properly. These results illustrate our proposal takes a significant step forward to the safe deployment of robot learning systems into diverse tasks and environments.</p></abstract>
<kwd-group>
<kwd>meta-learning</kwd>
<kwd>imitation learning</kwd>
<kwd>robot learning</kwd>
<kwd>task uncertainty</kwd>
<kwd>safety</kwd>
</kwd-group>
<counts>
<fig-count count="5"/>
<table-count count="1"/>
<equation-count count="3"/>
<ref-count count="45"/>
<page-count count="10"/>
<word-count count="6961"/>
</counts>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="s1">
<title>1. Introduction</title>
<p>The development of generalist robots remains a key challenge in robotics. These robots are expected to perform a wide range of tasks in diverse environments, for instance, automation of household chores or operations in retail stores. As hand-engineering specific skills for every task and environment is clearly infeasible, many studies focus on data-driven approaches, which learn desired skills from experiences. For example, reinforcement learning is a popular choice, where robots learn their control policies from the interaction with the environment (Kober et al., <xref ref-type="bibr" rid="B17">2013</xref>; Sutton and Barto, <xref ref-type="bibr" rid="B32">2018</xref>). In addition, imitation learning is a more sample-efficient strategy in robot learning, which leverages demonstrations collected by experts or via teleoperation (Pomerleau, <xref ref-type="bibr" rid="B25">1989</xref>; Hussein et al., <xref ref-type="bibr" rid="B12">2017</xref>; Zhang et al., <xref ref-type="bibr" rid="B45">2018</xref>). From the perspective of learning task-general robot controllers, meta-learning is among the most prominent new methods in transfer learning, in which the algorithm learns to adapt to new environments or tasks (Finn et al., <xref ref-type="bibr" rid="B5">2017a</xref>). For these reasons, meta-imitation learning is considered to be a powerful robot learning method and several studies have focused on it to date. Especially, MIL (Finn et al., <xref ref-type="bibr" rid="B6">2017b</xref>) and TecNets (James et al., <xref ref-type="bibr" rid="B13">2018</xref>) learn policies using behavioral cloning, which enables offline learning. Both models learn to adapt to new tasks by inferring the task using demonstrations at hand and performing with a controller conditioned on the inferred task. The way each model adapts is different&#x02014;MIL uses gradient-based adaptation and TecNets uses conditional policies based on an explicit context variable.</p>
<p>Although the performance when adapting to various tasks is aimed at in previous studies, in the deployment of the robot system, the safety must also be considered. From the viewpoint of the safety of learned robot controllers, some studies work on ensuring safety in reinforcement learning (Garc&#x00131;a and Fern&#x000E1;ndez, <xref ref-type="bibr" rid="B7">2015</xref>; L&#x000F6;tjens et al., <xref ref-type="bibr" rid="B19">2019</xref>) and imitation learning (Zhang and Cho, <xref ref-type="bibr" rid="B44">2016</xref>; Thakur et al., <xref ref-type="bibr" rid="B33">2019</xref>). The settings in which robots have been deployed thus far are usually single-task and relatively simple, therefore we can imagine the behaviors that robots may perform in advance, and take measures that will ensure the safety of the robots and their environments. The safety of generalist robots, however, can be different from those conventional ones, in that there is no guarantee that the task given at test time can be achievable with the learned controller. Furthermore, if a robot is deployed in an environment with large variations in the tasks it must perform, it becomes impossible to anticipate and model behavior when a task inference is mistaken, which may lead to unsafe conditions in the real world. To give an example of meta-imitation learning, without any safety conditions, the robot may perform wrong with confidence even when the demonstration given to a robot is improper or ambiguous to specify the task requested at test time.</p>
<p>Keeping this concern in mind, we found that studies in meta-imitation learning to date implicitly suppose that the demonstrations given to robots during the test phase will be clear enough that the robot can be certain about the task at hand, while the demonstrations can potentially be noisy during real deployment. One possible solution to this issue is to measure the uncertainty on task inference from the demonstration, or the uncertainty about which task to perform, which we refer to as <italic>task uncertainty</italic>. When the task uncertainty is high, the task inference could be wrong. The robot could then take measures to ensure the safety of its action; for example, one measure could be leveraging the fallback policy by requesting additional demonstrations of the task to be performed. It should be noted that while some studies on imitation learning consider the uncertainty of the controller, these discussions are restricted to single-task settings. We instead focus on meta-imitation learning, and we are not aware of discussions about uncertainty in task inference for meta-imitation learning in the literature so far.</p>
<p>Considering the discussion above, this paper focuses on capturing task uncertainty from demonstrations in meta-imitation learning problems. We propose a new algorithm, Probabilistic Embedding over Task-space Network (PETNet), which embeds task information for adapting the controller as a distribution. This algorithm is intended to measure task uncertainty while deploying a meta-imitation learning algorithm. PETNet is designed around the notion that as a demonstration can sometimes be ambiguous, task embedding should be modeled in a probabilistic manner. This probabilistic inference on the task variable allows us to quantify how certain the model is about the task from the demonstrations at hand. As for the implementation, the model simultaneously learns the task embedding network that infers explicit task variables along with the control policy conditioned on those task variables. The task embedding network outputs a distribution on the task embedding space from few-shot demonstrations and we use the variance of the distribution as the measure of task uncertainty in these demonstrations.</p>
<p>We tested PETNet with the simulated manipulation environment presented in Finn et al. (<xref ref-type="bibr" rid="B6">2017b</xref>) and confirm that it can achieve state-of-the-art-level performance in the standard benchmark. We then show that the evaluated uncertainty in PETNet is useful for detecting demonstrations that are inappropriate for task identification. Tests were run with the demonstrations in the original dataset and with synthesized out-of-distribution demonstrations. In addition, the performance degrades if we use demonstrations with high task uncertainty, and increasing the number of demonstrations for adaptation can help reduce the task uncertainty. These results show that PETNet can contribute to the safety of meta-imitation learning for controllers by preventing robots from behaving unexpectedly when the demonstrations have too much uncertainty for robots to identify the task.</p>
<p>To summarize, key contributions of this paper are (1) proposing a framework for leveraging uncertainty of task indicated with demonstrations for realizing the safety of robot under various tasks in meta-imitation learning and (2) with the simple implementation with probabilistic inference on task embedding space, this approach can capture the task uncertainty, leading to identify demonstrations with which the model would not perform properly.</p>
</sec>
<sec id="s2">
<title>2. Related Work</title>
<p>Most studies aiming at generalist robots have focused on improving the sample efficiency of the learning algorithm. As in other domains in machine learning, such as image (Zamir et al., <xref ref-type="bibr" rid="B43">2018</xref>) and natural-language processing (Devlin et al., <xref ref-type="bibr" rid="B3">2019</xref>), transfer learning is one of the promising directions for efficient training of robot control to perform various tasks. For example, much of the literature in robot learning utilizes the sim-to-real approach. These algorithms train a general policy on simulated and diverse environments and then this policy is deployed to the real environment of interest (Tobin et al., <xref ref-type="bibr" rid="B34">2017</xref>; Peng et al., <xref ref-type="bibr" rid="B24">2018</xref>; James et al., <xref ref-type="bibr" rid="B15">2019</xref>). By leveraging simulated data, which is easier to obtain compared to real-world datasets, the sim-to-real approach sometimes successfully learns a policy that works well even in the real environment; however, it requires a great deal of effort in the design of simulator environments.</p>
<p>Other than learning one general policy as in sim-to-real approaches, several recent works focus on how to quickly adapt a policy to a new task of interest, which is in general referred to as meta-learning. Meta-learning is explained as a method to learn meta-knowledge to decide model bias depending on the target task or domain using experience (Vilalta and Drissi, <xref ref-type="bibr" rid="B38">2002</xref>). This approach is general across machine learning and is not limited to robot control. In models that use neural networks, the meta-learner adapts to test settings by either changing network parameters (Finn et al., <xref ref-type="bibr" rid="B5">2017a</xref>) or inferring latent variables (Garnelo et al., <xref ref-type="bibr" rid="B8">2018</xref>). A substantial number of studies have addressed meta-learning of robot control. For example, recurrent network (Duan et al., <xref ref-type="bibr" rid="B4">2016</xref>) and gradient descent (Finn et al., <xref ref-type="bibr" rid="B5">2017a</xref>,<xref ref-type="bibr" rid="B6">b</xref>) have been used for adaptation of the policy network, while James et al. (<xref ref-type="bibr" rid="B13">2018</xref>), Quei&#x000DF;er and Steil (<xref ref-type="bibr" rid="B26">2018</xref>), Rakelly et al. (<xref ref-type="bibr" rid="B27">2019</xref>), and Seyed Ghasemipour et al. (<xref ref-type="bibr" rid="B31">2019</xref>) utilize conditional policies with latent variables. Since the policy needs to both identify the test environment or task and adapt to it, we can expect better performance with a specific meta-learned policy. In this paper, our model is based on the idea of meta-learning and we propose a method that can estimate task uncertainty using probabilistic inference to latent task variables.</p>
<p>As for the algorithm used for policy learning, popular choices include reinforcement learning or imitation learning. Reinforcement learning is based on reward signals (Sutton and Barto, <xref ref-type="bibr" rid="B32">2018</xref>). Finn et al. (<xref ref-type="bibr" rid="B5">2017a</xref>), Humplik et al. (<xref ref-type="bibr" rid="B11">2019</xref>), and Rakelly et al. (<xref ref-type="bibr" rid="B27">2019</xref>) focus on the intersections of meta-learning and reinforcement learning. Instead of learning from scratch, imitation learning, also referred to as learning from demonstrations (Schaal, <xref ref-type="bibr" rid="B28">1997</xref>; Argall et al., <xref ref-type="bibr" rid="B2">2009</xref>), utilizes demonstrations presented to the robots in the form of teleportation (Van Den Berg et al., <xref ref-type="bibr" rid="B36">2010</xref>), kinesthetic teaching (Kober and Peters, <xref ref-type="bibr" rid="B18">2009</xref>), or as a demonstration video performed by a human (Sermanet et al., <xref ref-type="bibr" rid="B30">2018</xref>; Yu et al., <xref ref-type="bibr" rid="B40">2018</xref>). While this paper is based on imitation learning because it improves the sample efficiency of interactions with the environment, the core ideas discussed below can be extended to other learning methods in which measuring task uncertainty is useful for safe deployment of robot learning. Inverse reinforcement learning and behavioral cloning are the main algorithms in imitation learning. In the former method, the algorithm learns to recover the reward function behind demonstrations by assuming they are optimal under the reward function (Ng and Russell, <xref ref-type="bibr" rid="B22">2000</xref>). Behavioral cloning, in contrast, is a supervised method by which the algorithm learns mappings from observation to actions directly manner (Pomerleau, <xref ref-type="bibr" rid="B25">1989</xref>). In the context of meta-imitation learning, behavioral cloning is often used (Finn et al., <xref ref-type="bibr" rid="B6">2017b</xref>; James et al., <xref ref-type="bibr" rid="B13">2018</xref>), while Seyed Ghasemipour et al. (<xref ref-type="bibr" rid="B31">2019</xref>) and Xu et al. (<xref ref-type="bibr" rid="B39">2019</xref>) adopt inverse reinforcement learning. Our method employs behavioral cloning for the sake of its algorithmic simplicity. Note again that none of the studies above on meta-learning of robot control emphasize the importance of task uncertainty for ensuring safety.</p>
<p>Some papers mention the significance of evaluating predictive uncertainty to ensure the safety of the controller in the context of imitation learning. Previous papers have pointed out that the main problems in imitation learning lies in the inherent ambiguity of demonstrations (Goo and Niekum, <xref ref-type="bibr" rid="B9">2019</xref>) or the discrepancy between training and test conditions that can lead robots to perform unexpected actions (Pomerleau, <xref ref-type="bibr" rid="B25">1989</xref>; Osa et al., <xref ref-type="bibr" rid="B23">2018</xref>). In practice, one possible solution is measuring the predictive uncertainty, and if the robots are uncertain about their prediction, they can stop performing actions and request that experts provide additional demonstrations (Thakur et al., <xref ref-type="bibr" rid="B33">2019</xref>). These studies above, however, only consider single-task settings and the task uncertainty has never been taken into consideration yet, while our work is rather focusing on the task uncertainty of meta-learning and the safety of the controller.</p>
</sec>
<sec id="s3">
<title>3. Measuring Task Uncertainty in Meta-Imitation Learning</title>
<p>Our model PETNet consists of two parts, the task embedding network and the controller. The task embedding network builds a distribution over the task embedding space from visual demonstrations of the task. In this paper, the distribution is Gaussian with mean and variance as the output of the network. The controller is modeled with another neural network and takes the robot&#x00027;s observation and the task variable as inputs. The controller functions in a closed-loop as shown in <xref ref-type="fig" rid="F1">Figure 1</xref>.</p>
<fig id="F1" position="float">
<label>Figure 1</label>
<caption><p>Overview of PETNet. The model consists of two neural networks, task embedding network and controller. During meta-training, the latent task variable is sampled from the distribution over task embedding. In the meta-test, the variance is the measurement of task uncertainty.</p></caption>
<graphic xlink:href="frobt-07-606361-g0001.tif"/>
</fig>
<sec>
<title>3.1. Problem Statement of Meta-Imitation Learning</title>
<p>The goal of meta-imitation learning is to obtain a policy that can be adapted for use in a new task given one or a few demonstrations (Finn et al., <xref ref-type="bibr" rid="B6">2017b</xref>). The policy &#x003C0; maps observations <bold><italic>o</italic></bold> to predicted actions <inline-formula><mml:math id="M1"><mml:mover accent="true"><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>a</mml:mi></mml:mstyle></mml:mrow><mml:mo>^</mml:mo></mml:mover></mml:math></inline-formula>. Each imitated task is defined as</p>
<disp-formula id="E1"><label>(1)</label><mml:math id="M2"><mml:mtable class="eqnarray" columnalign="right center left"><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mo stretchy="false">{</mml:mo><mml:mrow><mml:mi>&#x003C4;</mml:mi><mml:mo>=</mml:mo><mml:mrow><mml:mo stretchy="false">{</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold"><mml:mtext>o</mml:mtext></mml:mstyle></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mstyle mathvariant="bold"><mml:mtext>a</mml:mtext></mml:mstyle></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x02026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mstyle mathvariant="bold"><mml:mtext>o</mml:mtext></mml:mstyle></mml:mrow><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mstyle mathvariant="bold"><mml:mtext>a</mml:mtext></mml:mstyle></mml:mrow><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo stretchy="false">}</mml:mo></mml:mrow><mml:mo>&#x0007E;</mml:mo><mml:msubsup><mml:mrow><mml:mi>&#x003C0;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mo>&#x022C6;</mml:mo></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:mrow><mml:mi mathvariant="-tex-caligraphic">L</mml:mi></mml:mrow><mml:mrow><mml:mo stretchy="true">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold"><mml:mtext>a</mml:mtext></mml:mstyle></mml:mrow><mml:mrow><mml:mn>1</mml:mn><mml:mo>:</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mstyle mathvariant="bold"><mml:mtext>a</mml:mtext></mml:mstyle></mml:mrow><mml:mo>^</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mn>1</mml:mn><mml:mo>:</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo stretchy="true">)</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:mi>T</mml:mi></mml:mrow><mml:mo stretchy="false">}</mml:mo></mml:mrow><mml:mo>,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<p>where &#x003C4; is the demonstration generated by expert policy <inline-formula><mml:math id="M3"><mml:msubsup><mml:mrow><mml:mi>&#x003C0;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mo>&#x022C6;</mml:mo></mml:mrow></mml:msubsup></mml:math></inline-formula> and <inline-formula><mml:math id="M4"><mml:mrow><mml:mi mathvariant="-tex-caligraphic">L</mml:mi></mml:mrow></mml:math></inline-formula> is the loss function. We assume that each task <inline-formula><mml:math id="M5"><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is sampled from the task distribution <inline-formula><mml:math id="M6"><mml:mi>p</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula>.</p>
<p>During meta-training, the robot is presented two types of demonstrations from expert <inline-formula><mml:math id="M7"><mml:msubsup><mml:mrow><mml:mi>&#x003C0;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mo>&#x022C6;</mml:mo></mml:mrow></mml:msubsup></mml:math></inline-formula> about the task <inline-formula><mml:math id="M8"><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. One is for adapting the model to the task that we refer as the <italic>cue</italic> <inline-formula><mml:math id="M9"><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula>, and one is for measuring the loss of the policy. We refer to the latter as the <italic>demonstrated trajectory</italic> <inline-formula><mml:math id="M10"><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula>. During meta-testing, for a new task <inline-formula><mml:math id="M11"><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>&#x0007E;</mml:mo><mml:mi>p</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula>, the robot performs in the actual environment provided only with one or a few cues <inline-formula><mml:math id="M12"><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula> from expert <inline-formula><mml:math id="M13"><mml:msubsup><mml:mrow><mml:mi>&#x003C0;</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mo>&#x022C6;</mml:mo></mml:mrow></mml:msubsup></mml:math></inline-formula>.</p>
<p>In this paper, we use only sequences of visual observation for the cues <inline-formula><mml:math id="M14"><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula>, so actions are not included, since in some problem settings, robots cannot access expert actions for cue demonstrations, for example, a human expert performs the cue as in Yu et al. (<xref ref-type="bibr" rid="B40">2018</xref>). For the demonstrated trajectory <inline-formula><mml:math id="M15"><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula>, we use a sequence of observations and the actions of the robot in each timestep.</p>
</sec>
<sec>
<title>3.2. Probabilistic Task Embedding</title>
<p>The main focus of this paper is to propose a method that can be deployed ensuring safety in the setting of meta-imitation learning. For this purpose, PETNet adopts a simple approach that measures the uncertainty of task inference from cues <inline-formula><mml:math id="M16"><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula>. If the task uncertainty is modeled, we can expect the safety to be enhanced, because, for example, the robot can avoid performing unexpectedly during meta-testing caused by an uncertain task inference.</p>
<p>In concrete, the task embedding network <inline-formula><mml:math id="M17"><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>;</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003B8;</mml:mi></mml:mstyle></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula> infers a latent task variable as an explicit random variable in a stochastic manner. This network provides the distribution over embedding <inline-formula><mml:math id="M18"><mml:mi>p</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>z</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">|</mml:mo><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula> conditioned by the cue <inline-formula><mml:math id="M19"><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula> by outputting the mean and variance of the distribution, that is,</p>
<disp-formula id="E2"><label>(2)</label><mml:math id="M20"><mml:mtable class="eqnarray" columnalign="right center left"><mml:mtr><mml:mtd><mml:mi>p</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>z</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">|</mml:mo><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mi mathvariant="-tex-caligraphic">N</mml:mi></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003BC;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C3;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mtext>&#x02003;</mml:mtext><mml:mtext class="textrm" mathvariant="normal">where</mml:mtext><mml:mtext>&#x02003;</mml:mtext><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003BC;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C3;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>;</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003B8;</mml:mi></mml:mstyle></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<p>The controller &#x003C0;(<bold><italic>o</italic></bold>, <bold><italic>z</italic></bold><sub><italic>i</italic></sub>; <bold>&#x003D5;</bold>) takes the task variable <bold><italic>z</italic></bold><sub><italic>i</italic></sub> and the visual observation <bold><italic>o</italic></bold> as inputs.</p>
<p>The network architecture we used in the experiments is almost the same as the previous method TecNets (James et al., <xref ref-type="bibr" rid="B13">2018</xref>), in concrete, both the task embedding network and the controller have four convolutional and three fully-connected layers. The difference in PETNet is that the controller has two outputs, namely the mean and variance of the Gaussian task embedding distribution, while in TecNets, the output is the task variable alone, which is passed directly into the controller. See section 4.1.1 for details of the implementation.</p>
<p>The task variable <bold><italic>z</italic></bold><sub><italic>i</italic></sub> is sampled from the task embedding distribution during meta-training as <inline-formula><mml:math id="M21"><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>z</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>&#x0007E;</mml:mo><mml:mi>p</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>z</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">|</mml:mo><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula>. As we hypothesize that the distribution is Gaussian, we can use reparameterization tricks in the sampling procedure to train both the task embedding networks and the controller simultaneously. To train the model, we use the mean-squared error between the action from the demonstrated trajectory and the predicted action from the policy &#x003C0; with the parameter <bold>&#x003D5;</bold>, so the loss for task <inline-formula><mml:math id="M22"><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is</p>
<disp-formula id="E3"><label>(3)</label><mml:math id="M23"><mml:mtable class="eqnarray" columnalign="right center left"><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">L</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:mfrac><mml:mstyle displaystyle="true"><mml:munder class="msub"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>o</mml:mi></mml:mstyle><mml:mo>,</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>a</mml:mi></mml:mstyle></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&#x02208;</mml:mo><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:mrow></mml:munder></mml:mstyle><mml:mo>&#x02225;</mml:mo><mml:mi>&#x003C0;</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>o</mml:mi></mml:mstyle><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>z</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>;</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003D5;</mml:mi></mml:mstyle></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>-</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>a</mml:mi></mml:mstyle><mml:msubsup><mml:mrow><mml:mo>&#x02225;</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<p>where <italic>T</italic> denotes the number of timesteps. The full training procedure is given in Algorithm 1.</p>
<p>During meta-testing, when the robot faces with the new task <inline-formula><mml:math id="M24"><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> determined by given cue demonstrations <inline-formula><mml:math id="M25"><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula>, the task variable <bold><italic>z</italic></bold><sub><italic>new</italic></sub> is computed as the mean of <inline-formula><mml:math id="M26"><mml:mi>p</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>z</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">|</mml:mo><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula>. Then the controller outputs its action &#x000E2;<sub><italic>t</italic></sub> &#x0003D; &#x003C0;(<bold><italic>o</italic></bold><sub><italic>t</italic></sub>, <bold><italic>z</italic></bold><sub><italic>new</italic></sub>; <bold>&#x003D5;</bold>) for each timestep <italic>t</italic>. The variance from the task-embedding network is the measurement of the uncertainty about inference from the cue to the task. Algorithm 2 describes the procedure used in meta-testing.</p>
<p>The cue is not restricted, in principle, to videos of demonstrations performed by the same robot. The cue could be any demonstration, like a video of a human performing an action, as long as the task information is preserved. We will discuss the generalizability of the approach further in the section 5.</p>
<table-wrap position="float">
<label>Algorithm 1</label>
<caption><p>Meta-training of PETNet.</p></caption>
<table frame="hsides" rules="groups">
<tbody>
<tr>
<td align="left" valign="top"><bold>Require</bold>: &#x000A0;Task distribution <inline-formula><mml:math id="M27"><mml:mi>p</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;1: &#x000A0;<bold>while</bold> not done <bold>do</bold></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;2: &#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0; Sample batch of tasks <inline-formula><mml:math id="M28"><mml:msubsup><mml:mrow><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>}</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:msubsup><mml:mo>&#x0007E;</mml:mo><mml:mi>p</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;3: &#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0; <bold>for all</bold> <inline-formula><mml:math id="M29"><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> <bold>do</bold></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;4: &#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0; Sample cue <inline-formula><mml:math id="M30"><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>&#x0007E;</mml:mo><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and demonstrated trajectory <inline-formula><mml:math id="M31"><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>&#x0007E;</mml:mo><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;5: &#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0; Encode demos <inline-formula><mml:math id="M32"><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003BC;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C3;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>;</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003B8;</mml:mi></mml:mstyle></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;6: &#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0; Sample task embedding <inline-formula><mml:math id="M33"><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>z</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>&#x0007E;</mml:mo><mml:mrow><mml:mi mathvariant="-tex-caligraphic">N</mml:mi></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003BC;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C3;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;7: &#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0; Compute loss for task <inline-formula><mml:math id="M34"><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> as <inline-formula><mml:math id="M35"><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">L</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:mfrac><mml:munder class="msub"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>o</mml:mi></mml:mstyle><mml:mo>,</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>a</mml:mi></mml:mstyle></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&#x02208;</mml:mo><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:mrow></mml:munder><mml:mo>&#x02225;</mml:mo><mml:mi>&#x003C0;</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>o</mml:mi></mml:mstyle><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>z</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>;</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003D5;</mml:mi></mml:mstyle></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>-</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>a</mml:mi></mml:mstyle><mml:msubsup><mml:mrow><mml:mo>&#x02225;</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;8: &#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0; <bold>end</bold> <bold>for</bold></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;9: &#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0; Compute average loss <inline-formula><mml:math id="M36"><mml:mrow><mml:mi mathvariant="-tex-caligraphic">L</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:mfrac><mml:munderover accentunder="false" accent="false"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:munderover><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">L</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;10: &#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0; Update parameters <bold>&#x003B8;</bold>, <bold>&#x003D5;</bold> with gradient descent</td></tr>
<tr>
<td align="left" valign="top">&#x000A0;11: &#x000A0;<bold>end</bold> <bold>while</bold></td></tr>
</tbody>
</table>
</table-wrap>
<table-wrap position="float">
<label>Algorithm 2</label>
<caption><p>Meta-test of PETNet.</p></caption>
<table frame="hsides" rules="groups">
<tbody>
<tr>
<td align="left" valign="top"><bold>Require</bold>: &#x000A0;Cue <inline-formula><mml:math id="M37"><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula> of meta-test (hold-out) task <inline-formula><mml:math id="M38"><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>&#x0007E;</mml:mo><mml:mi>p</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="-tex-caligraphic">T</mml:mi></mml:mrow></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;&#x000A0;Encode demos <inline-formula><mml:math id="M39"><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003BC;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C3;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mi>&#x003C4;</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>;</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003B8;</mml:mi></mml:mstyle></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;&#x000A0;Use <inline-formula><mml:math id="M40"><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C3;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula> as measure of task uncertainty</td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;&#x000A0;Use <inline-formula><mml:math id="M41"><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003BC;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula> as task embedding <inline-formula><mml:math id="M42"><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>z</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msubsup><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003BC;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;&#x000A0;<bold>for</bold> <italic>t</italic> &#x0003D; 1&#x02026; <italic>T</italic> <bold>do</bold></td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0; <bold><italic>o</italic></bold><sub><italic>t</italic></sub> &#x0003D; <italic>Env</italic>.<italic>GetObservation</italic>()</td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0; <bold><italic>&#x000E2;</italic></bold><sub><italic>t</italic></sub> &#x0003D; &#x003C0;(<bold><italic>o</italic></bold><sub><italic>t</italic></sub>, <bold><italic>z</italic></bold><sub><italic>new</italic></sub>; <bold>&#x003D5;</bold>)</td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0; <italic>Env</italic>.<italic>Act</italic>(<bold><italic>&#x000E2;</italic></bold><sub><italic>t</italic></sub>)</td></tr>
<tr>
<td align="left" valign="top">&#x000A0;&#x000A0;&#x000A0;&#x000A0;<bold>end</bold> <bold>for</bold></td></tr>
</tbody>
</table>
</table-wrap>
</sec>
</sec>
<sec id="s4">
<title>4. Experiment</title>
<p>In this section, we explain the experimental tests and our analysis of the characteristics of the PETNet algorithm. These tests address the following questions:</p>
<list list-type="order">
<list-item><p>Can PETNet attain performance comparable to that of previous methods in meta-testing?</p></list-item>
<list-item><p>Does PETNet can capture the uncertainty of the task embedding inferred from the cue?</p></list-item>
<list-item><p>Is the uncertainty estimated by PETNet useful for improving the safety of the controller?</p></list-item>
</list>
<sec>
<title>4.1. Experimental Setting</title>
<p>We evaluate PETNet with a simulated pushing task of MIL sim-push dataset using the MuJoCo physics simulator (Todorov et al., <xref ref-type="bibr" rid="B35">2012</xref>)<xref ref-type="fn" rid="fn0001"><sup>1</sup></xref>. The task is to push the target object indicated by the demonstration to the designated goal area using a 7-DoF robot arm.</p>
<p>Each task varies in terms of the objects in the environment and the target object to push. Within the same task, the pair of objects and the relationship of the target and the distractor is fixed, but their arrangement in the environment changes. 769 tasks are used for meta-training including those for validation. 74 tasks are held out for meta-testing, each of which has different objects than the meta-training tasks. Although 24 demonstrations are included for each task in the original MIL sim-push dataset, we used 12 demonstrations for each task following the experimental setting of previous studies, with six tasks for the cue and six for the demonstrated trajectory. The setup of disjoint datasets, which consists of the cues and demonstrated trajectories, comes from the motivation of meta-imitation learning, which aims to adapt to a new task given some information about the task at hand from the cue, while the demonstrated trajectories are used to measure the loss and train the policy. Therefore, the cues and demonstrated trajectories do not have to be in the same domain [for example, Yu et al. (<xref ref-type="bibr" rid="B40">2018</xref>) uses human video of a task as the cue and trajectories of target robot for the corresponding task as the demonstrated trajectory]. In our experiment, the cues and demonstrated trajectories are performed in the same setting (the same robot, camera, etc.), which is the simplest case we can consider.</p>
<p>A successful trial is defined as an episode in which the robot places the target object inside the goal area for at least 10 timesteps in a 100-timestep episode. The average success rate of six trials is reported for all meta-testing tasks.</p>
<sec>
<title>4.1.1. Implementation Details</title>
<p>The visual demonstration is a series of 125 &#x000D7; 125 RGB images with 100 timesteps. The sequence is represented by concatenating the first and last frame channel-wise, which we found is sufficient for MIL sim-push dataset (we may use an RNN if we are more interested in representing the dynamics). The network architecture is almost the same as TecNets for fair comparison. Both task embedding network and the controller have four convolutional layers (CNN) followed by three fully-connected layers. Each convolutional layer has 5 &#x000D7; 5 filters of 16 channels with 4 strides and ReLU activation function (Nair and Hinton, <xref ref-type="bibr" rid="B21">2010</xref>) is applied. The proprioceptive data (the joint angles, joint velocities, and end-effector pose of the robot arm) is concatenated to the output of the last layer of the CNN. The fully-connected layer has 200 units, except for the last layer. The number of output of the task embedding network is 20, 10 for the mean, and 10 for the variance of Gaussian distribution, which results in the same number of parameters as TecNets (TecNets uses task embedding vector with the length of 20). The output of the controller is torques applied to each joint of the 7DoF robot arm. We used Adam optimizer (Kingma and Ba, <xref ref-type="bibr" rid="B16">2015</xref>) with the learning rate of 5.0 &#x000D7; 10<sup>&#x02212;4</sup>.</p>
</sec>
</sec>
<sec>
<title>4.2. Performance of Simulated Pushing Task</title>
<p>We compared the performance of PETNet with that of two previous methods, namely MIL (Finn et al., <xref ref-type="bibr" rid="B6">2017b</xref>) and TecNets (James et al., <xref ref-type="bibr" rid="B13">2018</xref>). <xref ref-type="table" rid="T1">Table 1</xref> is the success rate in the meta-test of the simulated pushing task. PETNet attained a success rate of 72.52%, which outperforms MIL with visual demonstrations (66.44%) and is comparable to the performance of TecNets (<inline-formula><mml:math id="M43"><mml:msubsup><mml:mrow><mml:mi>&#x003BB;</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi><mml:mi>t</mml:mi><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi>U</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> = 0) (70.72%). It should be noted that although the main result of TecNets (main) (77.25%) is obtained by using actions from both the cues and the demonstrated trajectories, PETNet uses actions from the demonstrated trajectories only. This selection is more general as a setting in meta-imitation learning and it is fairer to compare PETNet with the ablation version of TecNets, namely TecNets (<inline-formula><mml:math id="M44"><mml:msubsup><mml:mrow><mml:mi>&#x003BB;</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi><mml:mi>t</mml:mi><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi>U</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> = 0). TecNets (&#x003BB;<sub><italic>emb</italic></sub> = 0) is the variant without the cosine embedding loss during the learning and its performance is worse than the other variants (58.56%), which shows the loss term is necessary to group embeddings of the same task in TecNets. However, while PETNet does not have such explicit embedding loss term, the performance is almost the same as TecNets, which implies that the probabilistic inference-based method of PETNet can contribute appropriate task representation in the embedding space. As shown in the experiment above, the proposed method for estimating task uncertainty has no negative impact on the final performance of meta-imitation.</p>
<table-wrap position="float" id="T1">
<label>Table 1</label>
<caption><p>Performance at meta-test of sim-push task.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold>Method</bold></th>
<th valign="top" align="center"><bold>Success Rate (%)</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">MIL (vision)</td>
<td valign="top" align="center">66.44</td>
</tr>
<tr>
<td valign="top" align="left">TecNets (main)</td>
<td valign="top" align="center">77.25</td>
</tr>
<tr>
<td valign="top" align="left">TecNets (<inline-formula><mml:math id="M45"><mml:msubsup><mml:mrow><mml:mi>&#x003BB;</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi><mml:mi>t</mml:mi><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi>U</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> = 0)</td>
<td valign="top" align="center">70.72</td>
</tr>
<tr>
<td valign="top" align="left">TecNets (&#x003BB;<sub><italic>emb</italic></sub> = 0)</td>
<td valign="top" align="center">58.56</td>
</tr>
<tr>
<td valign="top" align="left">PETNet (ours)</td>
<td valign="top" align="center">72.52</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><italic>The numbers of MIL and TecNets are taken from the original papers. TecNets (main) uses both internal states and visual observations as the cue demonstrations, whereas other methods use visual observation only. TecNets (&#x003BB;<sub>emb</sub> = 0) is a variant of TecNets without the cosine embedding loss</italic>.</p>
</table-wrap-foot>
</table-wrap>
</sec>
<sec>
<title>4.3. Analysis of Task Embedding and Task Uncertainty</title>
<p>Next, we analyzed the characteristics of the learned representation of the task embedding from the demonstrations. The focuses of this analysis is to find whether the task embedding effectively captures the uncertainty in the inference from cue to task, and to find whether this measure of uncertainty is useful for ensuring robot safety.</p>
<sec>
<title>4.3.1. Visualization of Task Embedding</title>
<p>Firstly, we visualized the task embedding by reducing its dimensions using t-SNE (van der Maaten and Hinton, <xref ref-type="bibr" rid="B37">2008</xref>). As illustrated in <xref ref-type="fig" rid="F2">Figure 2</xref>, we chose 15 tasks randomly from the meta-training and meta-testing tasks and we plotted the mean of each task embedding distribution. The same mark (shape and color) corresponds to the same task but the demonstration is different. The marker size is proportional to the variance of the task embedding. Meta-testing tasks are highlighted with a black border around the mark. Although we did not introduce any explicit loss function for the embedding, we found that the embeddings of the same task are grouped together for both meta-training tasks and meta-testing tasks, suggesting that the task representation learned by this model was generalized even for meta-test tasks.</p>
<fig id="F2" position="float">
<label>Figure 2</label>
<caption><p>Visualization of task embedding for randomly selected demonstrations, which is reduced to two-dimensional space with t-SNE. Points with the same marker denote demonstrations from the same task and markers with black round means demonstrations in meta-test tasks. The size of each marker is proportional to the variance of the task embedding.</p></caption>
<graphic xlink:href="frobt-07-606361-g0002.tif"/>
</fig>
</sec>
<sec>
<title>4.3.2. Evaluating Task Uncertainty</title>
<p>We then conducted three experiments to evaluate whether PETNet can correctly estimate task uncertainty to detect inappropriate demonstrations for imitation learning.</p>
<p>Firstly, we applied the learned task embedding network to the original MIL pushing dataset. <xref ref-type="fig" rid="F3">Figure 3</xref> shows some of the top 13 demonstrations with the highest variance of the task embedding distribution. The demonstrations in the first row are from meta-training tasks and those in the second row are from meta-testing tasks. While the MIL pushing dataset Finn et al. (<xref ref-type="bibr" rid="B6">2017b</xref>) seems well-controlled in its data generation, PETNet identifies some demonstrations that are inappropriate for task identification using the task embedding network. For example, the robot pushes both objects in (B) and (D), and the target object is completely occluded by the other in (F). This result shows that PETNet can find semantically inappropriate demonstrations without explicit supervision.</p>
<fig id="F3" position="float">
<label>Figure 3</label>
<caption><p>Demonstrations with highest variances in task embedding space of PETNet. Demonstrations in the first row are from meta-training tasks, while those in the second row are from meta-test tasks. These demonstrations can be inappropriate for task identification for the controller, for example, in <bold>(A&#x02013;E)</bold>, the arm pushes both target object and distractor, especially in <bold>(B)</bold> and <bold>(D)</bold>, they are overlapping, and in <bold>(F)</bold>, the target object is completely occluded by the other.</p></caption>
<graphic xlink:href="frobt-07-606361-g0003.tif"/>
</fig>
<p>Secondly, we synthesized some out-of-distribution demonstrations and checked whether PETNet can detect those examples that are not included in the original dataset and have no information about the task. <xref ref-type="fig" rid="F4">Figure 4</xref> represents the examples of the demonstrations. Starting on the left, the demonstrations in the original dataset (Normal), the robot arm does not move (No-Action), the robot arm moves randomly (Random), no objects are in the environment (No-Objects), and the demonstration is hidden by squares randomly placed in the observation (Hidden). <xref ref-type="fig" rid="F5">Figure 5A</xref> shows the average standard deviation of the task embedding distribution for each category of demonstration. The standard deviations for synthesized out-of-distribution demonstrations are obviously larger than those using demonstrations in the original dataset, implying that PETNet correctly detects the out-of-distribution demonstrations. This is an essential property for removing demonstrations with large task uncertainty during deployment.</p>
<fig id="F4" position="float">
<label>Figure 4</label>
<caption><p>Examples of synthesized out-of-distribution demonstrations (the normal demonstrations are from the original datasets).</p></caption>
<graphic xlink:href="frobt-07-606361-g0004.tif"/>
</fig>
<fig id="F5" position="float">
<label>Figure 5</label>
<caption><p>Experimental results about task uncertainty. <bold>(A)</bold> Average standard deviation of the task-embedding distribution using the original and synthesized out-of-distribution demonstrations as in <xref ref-type="fig" rid="F4">Figure 4</xref>. <bold>(B)</bold> Average standard deviation with different number of demonstrations. <bold>(C)</bold> Comparison of performance using the demonstrations with normal and anomalous standard deviations during meta-testing.</p></caption>
<graphic xlink:href="frobt-07-606361-g0005.tif"/>
</fig>
<p>Thirdly, we evaluated the standard deviation changing the number of demonstrations during meta-testing. This assessment assumes that the robot can access several demonstrations for each task, rather than only one demonstration in other settings. The task embedding distribution from multiple demonstrations is represented as a product of each distribution from a single demonstration and we can compute the product analytically, as in Hinton (<xref ref-type="bibr" rid="B10">2002</xref>). The result is shown in <xref ref-type="fig" rid="F5">Figure 5B</xref> and confirms that increasing the number of demonstrations reduces task uncertainty.</p>
</sec>
<sec>
<title>4.3.3. Task Uncertainty and Performance</title>
<p>If the task identification fails with the given cue in meta-imitation learning, the controller will not be able to attain the goal of the task and may perform unexpectedly. Therefore, it is necessary to know how certain the task identification is before the execution for preventing such undesired failure. We show in the previous section that the variance of the distribution over the task embedding space is useful for finding inappropriate cues for identifying the task (e.g., occlusion or object overlapping). Here, we can hypothesize that we can prevent such failures if the inappropriate cues are detected by monitoring the variance.</p>
<p>Therefore, we examined the relationship between the task uncertainty of the demonstrations and performance during meta-testing. We employ anomaly detection on the estimated variances to detect the anomalous demonstrations that may cause failure, using a one-class support vector machine (OCSVM) with a linear kernel (Sch&#x000F6;lkopf et al., <xref ref-type="bibr" rid="B29">2001</xref>). This is the most basic choice for unsupervised anomaly detection. The classifier is trained with the variances of the task embedding distribution from training tasks only, assuming that they contain 1% anomalous demonstrations. During meta-testing, we detect anomalous demonstrations from the variances of the demonstration using this linear OCSVM model. <xref ref-type="fig" rid="F5">Figure 5C</xref> clearly shows that the task performance with the cues detected as anomalies is worse than the normal one by about 10%, which suggests that the task execution is more likely to fail if we use such anomaly cues and that the anomaly detection can actually work for preventing failures (we confirmed that the variances of those anomalies have always contained some large element and that the model detects those high variances).</p>
</sec>
</sec>
</sec>
<sec id="s5">
<title>5. Discussion and Conclusion</title>
<p>In this paper, we first pointed out the significance of evaluating task uncertainty in meta-learning for robot control to ensure safe deployment. Motivated by this insight, we proposed PETNet, a novel method for measuring the task uncertainty in meta-imitation learning using probabilistic task embedding. We showed that PETNet achieves better performance than previous methods in the benchmark of the simulated pushing task, and tracks the uncertainty of the task while performing it. This feature could be important to ensure the safe deployment of meta-imitation learning algorithms applied to broader ranges of tasks.</p>
<p>The evaluations presented in this paper are done with the MIL dataset using a physics simulator, which is a standard setting for meta-imitation learning. However, deploying robot learning methods into real robots is not as easy as simulators and there can be several challenges. For example, if we think about transferring policies in simulators to real environments, sim-to-real is itself a challenge in robot learning, because we have to tackle the domain gap between simulator and real environment. On the other hand, when learning only from real environments, another concern arises about how to make the model &#x0201C;task-efficient&#x0201D; as well as the sample-efficient, because it is costly to prepare various tasks and their demonstrations. In addition, the &#x0201C;task&#x0201D; in the experiments is defined as the combination of the target object and the distractor, and the aspect of &#x0201C;pushing an object&#x0201D; is shared in all tasks. Scaling meta-imitation learning to different &#x0201C;skill-level&#x0201D; tasks (i.e., pushing, pick-and-place, peg insertion, etc.) is the ongoing work in the robot learning community (Yu et al., <xref ref-type="bibr" rid="B42">2019</xref>, <xref ref-type="bibr" rid="B41">2020</xref>; James et al., <xref ref-type="bibr" rid="B14">2020</xref>). Concurrently, since Ajay et al. (<xref ref-type="bibr" rid="B1">2020</xref>) reports that their model learns these skill embedding based on probabilistic inference, we suppose that our framework can scale to more diverse tasks, which we would like to evaluate as future work.</p>
<p>As the extensions of our work, the approach of measuring task uncertainty on the task-embedding space can be generalizable to other learning algorithms like reinforcement learning or inverse reinforcement learning. Our results open the door for using demonstrations in other modalities like language instructions, human demonstrators (Yu et al., <xref ref-type="bibr" rid="B40">2018</xref>) or multiple demonstrators via crowdsourcing services (Mandlekar et al., <xref ref-type="bibr" rid="B20">2018</xref>) which can inherently have higher uncertainty in task identification. Leveraging the evaluated task uncertainty for meta-training (for example, weighing imitation learning loss according to task uncertainty) could also be an important extension of our work and could also take the form of curriculum learning or active learning, which optimizes both data-collection and control policies.</p>
</sec>
<sec sec-type="data-availability-statement" id="s6">
<title>Data Availability Statement</title>
<p>Publicly available datasets were analyzed in this study. This data can be found at: <ext-link ext-link-type="uri" xlink:href="https://rail.eecs.berkeley.edu/datasets/mil_data.zip">https://rail.eecs.berkeley.edu/datasets/mil_data.zip</ext-link>.</p>
</sec>
<sec id="s7">
<title>Author Contributions</title>
<p>TM designed the study, developed the method, and wrote the initial draft of the manuscript. NK contributed to the implementation of the code, analysis of data, and assisted in the preparation of the manuscript. YI contributed to the experimental design and has critically reviewed the manuscript. KN and YM contributed to the design of the study and preparation of the manuscript. All authors contributed to the article and approved the submitted version.</p>
</sec>
<sec sec-type="COI-statement" id="conf1">
<title>Conflict of Interest</title>
<p>KN was employed by the company DeepX Inc. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
</body>
<back>
<ack><p>This paper was based on results obtained from a project commissioned by the New Energy and Industrial Technology Development Organization (NEDO).</p>
</ack>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Ajay</surname> <given-names>A.</given-names></name> <name><surname>Kumar</surname> <given-names>A.</given-names></name> <name><surname>Agrawal</surname> <given-names>P.</given-names></name> <name><surname>Levine</surname> <given-names>S.</given-names></name> <name><surname>Nachum</surname> <given-names>O.</given-names></name></person-group> (<year>2020</year>). <article-title>OPAL: offline primitive discovery for accelerating offline reinforcement learning</article-title>. <source>arXiv</source> 2010.13611.</citation></ref>
<ref id="B2">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Argall</surname> <given-names>B. D.</given-names></name> <name><surname>Chernova</surname> <given-names>S.</given-names></name> <name><surname>Veloso</surname> <given-names>M.</given-names></name> <name><surname>Browning</surname> <given-names>B.</given-names></name></person-group> (<year>2009</year>). <article-title>A survey of robot learning from demonstration</article-title>. <source>Robot. Auton. Syst.</source> <volume>57</volume>, <fpage>469</fpage>&#x02013;<lpage>483</lpage>. <pub-id pub-id-type="doi">10.1016/j.robot.2008.10.024</pub-id></citation></ref>
<ref id="B3">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Devlin</surname> <given-names>J.</given-names></name> <name><surname>Chang</surname> <given-names>M.-W.</given-names></name> <name><surname>Lee</surname> <given-names>K.</given-names></name> <name><surname>Toutanova</surname> <given-names>K.</given-names></name></person-group> (<year>2019</year>). <article-title>&#x0201C;BERT: pre-training of deep bidirectional transformers for language understanding,&#x0201D;</article-title> in <source>Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1</source> (<publisher-loc>Minneapolis, MN</publisher-loc>: <publisher-name>Long and Short Papers</publisher-name>), <fpage>4171</fpage>&#x02013;<lpage>4186</lpage>.</citation></ref>
<ref id="B4">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Duan</surname> <given-names>Y.</given-names></name> <name><surname>Schulman</surname> <given-names>J.</given-names></name> <name><surname>Chen</surname> <given-names>X.</given-names></name> <name><surname>Bartlett</surname> <given-names>P. L.</given-names></name> <name><surname>Sutskever</surname> <given-names>I.</given-names></name> <name><surname>Abbeel</surname> <given-names>P.</given-names></name></person-group> (<year>2016</year>). <article-title>RL<sup>2</sup>: fast reinforcement learning via slow reinforcement learning</article-title>. <source>arXiv</source> 1611.02779.</citation></ref>
<ref id="B5">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Finn</surname> <given-names>C.</given-names></name> <name><surname>Abbeel</surname> <given-names>P.</given-names></name> <name><surname>Levine</surname> <given-names>S.</given-names></name></person-group> (<year>2017a</year>). <article-title>&#x0201C;Model-agnostic meta-learning for fast adaptation of deep networks,&#x0201D;</article-title> in <source>International Conference on Machine Learning</source> (<publisher-loc>Sydney, NSW</publisher-loc>).</citation></ref>
<ref id="B6">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Finn</surname> <given-names>C.</given-names></name> <name><surname>Yu</surname> <given-names>T.</given-names></name> <name><surname>Zhang</surname> <given-names>T.</given-names></name> <name><surname>Abbeel</surname> <given-names>P.</given-names></name> <name><surname>Levine</surname> <given-names>S.</given-names></name></person-group> (<year>2017b</year>). <article-title>&#x0201C;One-shot visual imitation learning via meta-learning,&#x0201D;</article-title> in <source>Conference on Robot Learning</source> (<publisher-loc>Mountain View, CA</publisher-loc>).</citation></ref>
<ref id="B7">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Garc&#x00131;a</surname> <given-names>J.</given-names></name> <name><surname>Fern&#x000E1;ndez</surname> <given-names>F.</given-names></name></person-group> (<year>2015</year>). <article-title>A comprehensive survey on safe reinforcement learning</article-title>. <source>J. Mach. Learn. Res.</source> <volume>16</volume>, <fpage>1437</fpage>&#x02013;<lpage>1480</lpage>. <pub-id pub-id-type="doi">10.5555/2789272.2886795</pub-id></citation></ref>
<ref id="B8">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Garnelo</surname> <given-names>M.</given-names></name> <name><surname>Rosenbaum</surname> <given-names>D.</given-names></name> <name><surname>Maddison</surname> <given-names>C.</given-names></name> <name><surname>Ramalho</surname> <given-names>T.</given-names></name> <name><surname>Saxton</surname> <given-names>D.</given-names></name> <name><surname>Shanahan</surname> <given-names>M.</given-names></name> <etal/></person-group>. (<year>2018</year>). <article-title>&#x0201C;Conditional neural processes,&#x0201D;</article-title> in <source>International Conference on Machine Learning</source> (<publisher-loc>Stockholm</publisher-loc>).</citation></ref>
<ref id="B9">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Goo</surname> <given-names>W.</given-names></name> <name><surname>Niekum</surname> <given-names>S.</given-names></name></person-group> (<year>2019</year>). <article-title>&#x0201C;One-shot learning of multi-step tasks from observation via activity localization in auxiliary video,&#x0201D;</article-title> in <source>2019 IEEE International Conference on Robotics and Automation (ICRA)</source> (<publisher-loc>Montreal, QC</publisher-loc>). <pub-id pub-id-type="doi">10.1109/ICRA.2019.8793515</pub-id></citation></ref>
<ref id="B10">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hinton</surname> <given-names>G. E.</given-names></name></person-group> (<year>2002</year>). <article-title>Training products of experts by minimizing contrastive divergence</article-title>. <source>Neural Comput.</source> <volume>14</volume>, <fpage>1771</fpage>&#x02013;<lpage>1800</lpage>. <pub-id pub-id-type="doi">10.1162/089976602760128018</pub-id><pub-id pub-id-type="pmid">12180402</pub-id></citation></ref>
<ref id="B11">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Humplik</surname> <given-names>J.</given-names></name> <name><surname>Galashov</surname> <given-names>A.</given-names></name> <name><surname>Hasenclever</surname> <given-names>L.</given-names></name> <name><surname>Ortega</surname> <given-names>P. A.</given-names></name> <name><surname>Teh</surname> <given-names>Y. W.</given-names></name> <name><surname>Heess</surname> <given-names>N.</given-names></name></person-group> (<year>2019</year>). <article-title>Meta reinforcement learning as task inference</article-title>. <source>arXiv</source> 1905.06424.</citation></ref>
<ref id="B12">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hussein</surname> <given-names>A.</given-names></name> <name><surname>Gaber</surname> <given-names>M. M.</given-names></name> <name><surname>Elyan</surname> <given-names>E.</given-names></name> <name><surname>Jayne</surname> <given-names>C.</given-names></name></person-group> (<year>2017</year>). <article-title>Imitation learning: a survey of learning methods</article-title>. <source>ACM Comput. Surv.</source> <volume>50</volume>, <fpage>1</fpage>&#x02013;<lpage>35</lpage>. <pub-id pub-id-type="doi">10.1145/3054912</pub-id></citation></ref>
<ref id="B13">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>James</surname> <given-names>S.</given-names></name> <name><surname>Bloesch</surname> <given-names>M.</given-names></name> <name><surname>Davison</surname> <given-names>A. J.</given-names></name></person-group> (<year>2018</year>). <article-title>&#x0201C;Task-embedded control networks for few-shot imitation learning,&#x0201D;</article-title> in <source>Conference on Robot Learning</source> (<publisher-loc>Z&#x000FC;rich</publisher-loc>).</citation></ref>
<ref id="B14">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>James</surname> <given-names>S.</given-names></name> <name><surname>Ma</surname> <given-names>Z.</given-names></name> <name><surname>Arrojo</surname> <given-names>D. R.</given-names></name> <name><surname>Davison</surname> <given-names>A. J.</given-names></name></person-group> (<year>2020</year>). <article-title>RLbench: the robot learning benchmark &#x00026; learning environment</article-title>. <source>IEEE Robot. Autom. Lett.</source> <volume>5</volume>, <fpage>3019</fpage>&#x02013;<lpage>3026</lpage>. <pub-id pub-id-type="doi">10.1109/LRA.2020.2974707</pub-id></citation></ref>
<ref id="B15">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>James</surname> <given-names>S.</given-names></name> <name><surname>Wohlhart</surname> <given-names>P.</given-names></name> <name><surname>Kalakrishnan</surname> <given-names>M.</given-names></name> <name><surname>Kalashnikov</surname> <given-names>D.</given-names></name> <name><surname>Irpan</surname> <given-names>A.</given-names></name> <name><surname>Ibarz</surname> <given-names>J.</given-names></name> <etal/></person-group>. (<year>2019</year>). <article-title>&#x0201C;Sim-to-real via sim-to-sim: data-efficient robotic grasping via randomized-to-canonical adaptation networks,&#x0201D;</article-title> in <source>Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition</source> (<publisher-loc>Long Beach, CA</publisher-loc>). <pub-id pub-id-type="doi">10.1109/CVPR.2019.01291</pub-id></citation></ref>
<ref id="B16">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Kingma</surname> <given-names>D. P.</given-names></name> <name><surname>Ba</surname> <given-names>J.</given-names></name></person-group> (<year>2015</year>). <article-title>&#x0201C;Adam: a method for stochastic optimization,&#x0201D;</article-title> in <source>International Conference on Learning Representations (ICLR)</source> (<publisher-loc>San Diego, CA</publisher-loc>).</citation></ref>
<ref id="B17">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kober</surname> <given-names>J.</given-names></name> <name><surname>Bagnell</surname> <given-names>J. A.</given-names></name> <name><surname>Peters</surname> <given-names>J.</given-names></name></person-group> (<year>2013</year>). <article-title>Reinforcement learning in robotics: a survey</article-title>. <source>Int. J. Robot. Res.</source> <volume>32</volume>, <fpage>1238</fpage>&#x02013;<lpage>1274</lpage>. <pub-id pub-id-type="doi">10.1177/0278364913495721</pub-id></citation></ref>
<ref id="B18">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Kober</surname> <given-names>J.</given-names></name> <name><surname>Peters</surname> <given-names>J.</given-names></name></person-group> (<year>2009</year>). <article-title>&#x0201C;Learning motor primitives for robotics,&#x0201D;</article-title> in <source>2009 IEEE International Conference on Robotics and Automation (ICRA)</source> (<publisher-loc>Kobe</publisher-loc>). <pub-id pub-id-type="doi">10.1109/ROBOT.2009.5152577</pub-id></citation></ref>
<ref id="B19">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>L&#x000F6;tjens</surname> <given-names>B.</given-names></name> <name><surname>Everett</surname> <given-names>M.</given-names></name> <name><surname>How</surname> <given-names>J. P.</given-names></name></person-group> (<year>2019</year>). <article-title>&#x0201C;Safe reinforcement learning with model uncertainty estimates,&#x0201D;</article-title> in <source>2019 International Conference on Robotics and Automation (ICRA)</source> (<publisher-loc>Montreal, QC</publisher-loc>), <fpage>8662</fpage>&#x02013;<lpage>8668</lpage>. <pub-id pub-id-type="doi">10.1109/ICRA.2019.8793611</pub-id></citation></ref>
<ref id="B20">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Mandlekar</surname> <given-names>A.</given-names></name> <name><surname>Zhu</surname> <given-names>Y.</given-names></name> <name><surname>Garg</surname> <given-names>A.</given-names></name> <name><surname>Booher</surname> <given-names>J.</given-names></name> <name><surname>Spero</surname> <given-names>M.</given-names></name> <name><surname>Tung</surname> <given-names>A.</given-names></name> <etal/></person-group>. (<year>2018</year>). <article-title>&#x0201C;Roboturk: a crowdsourcing platform for robotic skill learning through imitation,&#x0201D;</article-title> in <source>Conference on Robot Learning</source> (<publisher-loc>Z&#x000FC;rich</publisher-loc>).</citation></ref>
<ref id="B21">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Nair</surname> <given-names>V.</given-names></name> <name><surname>Hinton</surname> <given-names>G. E.</given-names></name></person-group> (<year>2010</year>). <article-title>&#x0201C;Rectified linear units improve restricted Boltzmann machines,&#x0201D;</article-title> in <source>Proceedings of the 27th International Conference on International Conference on Machine Learning</source> (<publisher-loc>Madison, WI</publisher-loc>), <fpage>807</fpage>&#x02013;<lpage>814</lpage>.</citation></ref>
<ref id="B22">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Ng</surname> <given-names>A. Y.</given-names></name> <name><surname>Russell</surname> <given-names>S. J.</given-names></name></person-group> (<year>2000</year>). <article-title>&#x0201C;Algorithms for inverse reinforcement learning,&#x0201D;</article-title> in <source>International Conference on Machine Learning</source> (<publisher-loc>San Francisco, CA</publisher-loc>).</citation></ref>
<ref id="B23">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Osa</surname> <given-names>T.</given-names></name> <name><surname>Pajarinen</surname> <given-names>J.</given-names></name> <name><surname>Neumann</surname> <given-names>G.</given-names></name> <name><surname>Bagnell</surname> <given-names>J. A.</given-names></name> <name><surname>Abbeel</surname> <given-names>P.</given-names></name> <name><surname>Peters</surname> <given-names>J.</given-names></name></person-group> (<year>2018</year>). <source>An Algorithmic Perspective on Imitation Learning</source>. <publisher-name>Foundations and Trends in Robotics</publisher-name>.</citation></ref>
<ref id="B24">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Peng</surname> <given-names>X. B.</given-names></name> <name><surname>Andrychowicz</surname> <given-names>M.</given-names></name> <name><surname>Zaremba</surname> <given-names>W.</given-names></name> <name><surname>Abbeel</surname> <given-names>P.</given-names></name></person-group> (<year>2018</year>). <article-title>&#x0201C;Sim-to-real transfer of robotic control with dynamics randomization,&#x0201D;</article-title> in <source>2018 IEEE International Conference on Robotics and Automation (ICRA)</source> (<publisher-loc>Brisbane, QLD</publisher-loc>). <pub-id pub-id-type="doi">10.1109/ICRA.2018.8460528</pub-id></citation></ref>
<ref id="B25">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Pomerleau</surname> <given-names>D. A.</given-names></name></person-group> (<year>1989</year>). <article-title>&#x0201C;ALVINN: an autonomous land vehicle in a neural network,&#x0201D;</article-title> in <source>Advances in Neural Information Processing Systems</source>, <fpage>305</fpage>&#x02013;<lpage>313</lpage>.<pub-id pub-id-type="pmid">31141866</pub-id></citation></ref>
<ref id="B26">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Quei&#x000DF;er</surname> <given-names>J. F.</given-names></name> <name><surname>Steil</surname> <given-names>J. J.</given-names></name></person-group> (<year>2018</year>). <article-title>Bootstrapping of parameterized skills through hybrid optimization in task and policy spaces</article-title>. <source>Front. Robot. AI</source> <volume>5</volume>:<fpage>49</fpage>. <pub-id pub-id-type="doi">10.3389/frobt.2018.00049</pub-id></citation></ref>
<ref id="B27">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Rakelly</surname> <given-names>K.</given-names></name> <name><surname>Zhou</surname> <given-names>A.</given-names></name> <name><surname>Finn</surname> <given-names>C.</given-names></name> <name><surname>Levine</surname> <given-names>S.</given-names></name> <name><surname>Quillen</surname> <given-names>D.</given-names></name></person-group> (<year>2019</year>). <article-title>&#x0201C;Efficient off-policy meta-reinforcement learning via probabilistic context variables,&#x0201D;</article-title> in <source>Proceedings of the 36th International Conference on Machine Learning</source> (<publisher-loc>Long Beach, CA</publisher-loc>), <fpage>5331</fpage>&#x02013;<lpage>5340</lpage>.</citation></ref>
<ref id="B28">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Schaal</surname> <given-names>S.</given-names></name></person-group> (<year>1997</year>). <article-title>&#x0201C;Learning from demonstration,&#x0201D;</article-title> in <source>Advances in Neural Information Processing Systems</source> <volume>9</volume>, <fpage>1040</fpage>&#x02013;<lpage>1046</lpage>.</citation></ref>
<ref id="B29">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Sch&#x000F6;lkopf</surname> <given-names>B.</given-names></name> <name><surname>Platt</surname> <given-names>J. C.</given-names></name> <name><surname>Shawe-Taylor</surname> <given-names>J.</given-names></name> <name><surname>Smola</surname> <given-names>A. J.</given-names></name> <name><surname>Williamson</surname> <given-names>R. C.</given-names></name></person-group> (<year>2001</year>). <article-title>Estimating the support of a high-dimensional distribution</article-title>. <source>Neural Comput.</source> <volume>13</volume>, <fpage>1443</fpage>&#x02013;<lpage>1471</lpage>. <pub-id pub-id-type="doi">10.1162/089976601750264965</pub-id></citation>
</ref>
<ref id="B30">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Sermanet</surname> <given-names>P.</given-names></name> <name><surname>Lynch</surname> <given-names>C.</given-names></name> <name><surname>Chebotar</surname> <given-names>Y.</given-names></name> <name><surname>Hsu</surname> <given-names>J.</given-names></name> <name><surname>Jang</surname> <given-names>E.</given-names></name> <name><surname>Schaal</surname> <given-names>S.</given-names></name> <etal/></person-group>. (<year>2018</year>). <article-title>&#x0201C;Time-contrastive networks: self-supervised learning from video,&#x0201D;</article-title> in <source>2018 IEEE International Conference on Robotics and Automation (ICRA)</source> (<publisher-loc>Brisbane, QLD</publisher-loc>). <pub-id pub-id-type="doi">10.1109/ICRA.2018.8462891</pub-id></citation></ref>
<ref id="B31">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Seyed Ghasemipour</surname> <given-names>S. K.</given-names></name> <name><surname>Gu</surname> <given-names>S.</given-names></name> <name><surname>Zemel</surname> <given-names>R.</given-names></name></person-group> (<year>2019</year>). <article-title>&#x0201C;Smile: scalable meta inverse reinforcement learning through context-conditional policies,&#x0201D;</article-title> in <source>Advances in Neural Information Processing Systems 32</source> (<publisher-loc>Vancouver, BC</publisher-loc>).</citation></ref>
<ref id="B32">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Sutton</surname> <given-names>R. S.</given-names></name> <name><surname>Barto</surname> <given-names>A. G.</given-names></name></person-group> (<year>2018</year>). <source>Reinforcement Learning: An Introduction</source>. <publisher-loc>Cambridge</publisher-loc>: <publisher-name>MIT press</publisher-name>.</citation></ref>
<ref id="B33">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Thakur</surname> <given-names>S.</given-names></name> <name><surname>Hoof</surname> <given-names>H.</given-names></name> <name><surname>Higuera</surname> <given-names>J.</given-names></name> <name><surname>Precup</surname> <given-names>D.</given-names></name> <name><surname>Meger</surname> <given-names>D.</given-names></name></person-group> (<year>2019</year>). <article-title>&#x0201C;Uncertainty aware learning from demonstrations in multiple contexts using bayesian neural networks,&#x0201D;</article-title> in <source>2019 International Conference on Robotics and Automation (ICRA)</source> (<publisher-loc>Montreal, QC</publisher-loc>). <pub-id pub-id-type="doi">10.1109/ICRA.2019.8794328</pub-id></citation></ref>
<ref id="B34">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Tobin</surname> <given-names>J.</given-names></name> <name><surname>Fong</surname> <given-names>R.</given-names></name> <name><surname>Ray</surname> <given-names>A.</given-names></name> <name><surname>Schneider</surname> <given-names>J.</given-names></name> <name><surname>Zaremba</surname> <given-names>W.</given-names></name> <name><surname>Abbeel</surname> <given-names>P.</given-names></name></person-group> (<year>2017</year>). <article-title>&#x0201C;Domain randomization for transferring deep neural networks from simulation to the real world,&#x0201D;</article-title> in <source>2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)</source> (<publisher-loc>Vancouver, BC</publisher-loc>). <pub-id pub-id-type="doi">10.1109/IROS.2017.8202133</pub-id></citation></ref>
<ref id="B35">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Todorov</surname> <given-names>E.</given-names></name> <name><surname>Erez</surname> <given-names>T.</given-names></name> <name><surname>Tassa</surname> <given-names>Y.</given-names></name></person-group> (<year>2012</year>). <article-title>&#x0201C;MuJoCo: a physics engine for model-based control,&#x0201D;</article-title> in <source>2012 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)</source> (<publisher-loc>Vilamoura</publisher-loc>). <pub-id pub-id-type="doi">10.1109/IROS.2012.6386109</pub-id></citation></ref>
<ref id="B36">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Van Den Berg</surname> <given-names>J.</given-names></name> <name><surname>Miller</surname> <given-names>S.</given-names></name> <name><surname>Duckworth</surname> <given-names>D.</given-names></name> <name><surname>Hu</surname> <given-names>H.</given-names></name> <name><surname>Wan</surname> <given-names>A.</given-names></name> <name><surname>Fu</surname> <given-names>X.-Y.</given-names></name> <etal/></person-group>. (<year>2010</year>). <article-title>&#x0201C;Superhuman performance of surgical tasks by robots using iterative learning from human-guided demonstrations,&#x0201D;</article-title> in <source>2010 IEEE International Conference on Robotics and Automation (ICRA)</source> (<publisher-loc>Anchorage, AK</publisher-loc>). <pub-id pub-id-type="doi">10.1109/ROBOT.2010.5509621</pub-id></citation></ref>
<ref id="B37">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>van der Maaten</surname> <given-names>L.</given-names></name> <name><surname>Hinton</surname> <given-names>G.</given-names></name></person-group> (<year>2008</year>). <article-title>Visualizing data using t-SNE</article-title>. <source>J. Mach. Learn. Res.</source> <volume>9</volume>, <fpage>2579</fpage>&#x02013;<lpage>2625</lpage>.</citation></ref>
<ref id="B38">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Vilalta</surname> <given-names>R.</given-names></name> <name><surname>Drissi</surname> <given-names>Y.</given-names></name></person-group> (<year>2002</year>). <article-title>A perspective view and survey of meta-learning</article-title>. <source>Artif. Intell. Rev.</source> <volume>18</volume>, <fpage>77</fpage>&#x02013;<lpage>95</lpage>. <pub-id pub-id-type="doi">10.1023/A:1019956318069</pub-id></citation></ref>
<ref id="B39">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Xu</surname> <given-names>K.</given-names></name> <name><surname>Ratner</surname> <given-names>E.</given-names></name> <name><surname>Dragan</surname> <given-names>A.</given-names></name> <name><surname>Levine</surname> <given-names>S.</given-names></name> <name><surname>Finn</surname> <given-names>C.</given-names></name></person-group> (<year>2019</year>). <article-title>&#x0201C;Learning a prior over intent via meta-inverse reinforcement learning,&#x0201D;</article-title> in <source>International Conference on Machine Learning</source> (<publisher-loc>Long Beach, CA</publisher-loc>).</citation></ref>
<ref id="B40">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Yu</surname> <given-names>T.</given-names></name> <name><surname>Finn</surname> <given-names>C.</given-names></name> <name><surname>Dasari</surname> <given-names>S.</given-names></name> <name><surname>Xie</surname> <given-names>A.</given-names></name> <name><surname>Zhang</surname> <given-names>T.</given-names></name> <name><surname>Abbeel</surname> <given-names>P.</given-names></name> <etal/></person-group>. (<year>2018</year>). <article-title>&#x0201C;One-shot imitation from observing humans via domain-adaptive meta-learning,&#x0201D;</article-title> in <source>Proceedings of Robotics: Science and Systems</source> (<publisher-loc>Pittsburgh, PA</publisher-loc>). <pub-id pub-id-type="doi">10.15607/RSS.2018.XIV.002</pub-id></citation></ref>
<ref id="B41">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Yu</surname> <given-names>T.</given-names></name> <name><surname>Kumar</surname> <given-names>S.</given-names></name> <name><surname>Gupta</surname> <given-names>A.</given-names></name> <name><surname>Levine</surname> <given-names>S.</given-names></name> <name><surname>Hausman</surname> <given-names>K.</given-names></name> <name><surname>Finn</surname> <given-names>C.</given-names></name></person-group> (<year>2020</year>). <article-title>Gradient surgery for multi-task learning</article-title>. <source>arXiv</source> 2001.06782.</citation></ref>
<ref id="B42">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Yu</surname> <given-names>T.</given-names></name> <name><surname>Quillen</surname> <given-names>D.</given-names></name> <name><surname>He</surname> <given-names>Z.</given-names></name> <name><surname>Julian</surname> <given-names>R.</given-names></name> <name><surname>Hausman</surname> <given-names>K.</given-names></name> <name><surname>Finn</surname> <given-names>C.</given-names></name> <etal/></person-group>. (<year>2019</year>). <article-title>&#x0201C;Meta-world: a benchmark and evaluation for multi-task and meta reinforcement learning,&#x0201D;</article-title> in <source>Conference on Robot Learning</source> (<publisher-loc>Osaka</publisher-loc>), <fpage>1094</fpage>&#x02013;<lpage>1100</lpage>.</citation></ref>
<ref id="B43">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Zamir</surname> <given-names>A. R.</given-names></name> <name><surname>Sax</surname> <given-names>A.</given-names></name> <name><surname>Shen</surname> <given-names>W.</given-names></name> <name><surname>Guibas</surname> <given-names>L. J.</given-names></name> <name><surname>Malik</surname> <given-names>J.</given-names></name> <name><surname>Savarese</surname> <given-names>S.</given-names></name></person-group> (<year>2018</year>). <article-title>&#x0201C;Taskonomy: disentangling task transfer learning,&#x0201D;</article-title> in <source>Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition</source> (<publisher-loc>Salt Lake City, UT</publisher-loc>). <pub-id pub-id-type="doi">10.1109/CVPR.2018.00391</pub-id></citation></ref>
<ref id="B44">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Zhang</surname> <given-names>J.</given-names></name> <name><surname>Cho</surname> <given-names>K.</given-names></name></person-group> (<year>2016</year>). <article-title>Query-efficient imitation learning for end-to-end autonomous driving</article-title>. <source>arXiv</source> 1605.06450.</citation></ref>
<ref id="B45">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Zhang</surname> <given-names>T.</given-names></name> <name><surname>McCarthy</surname> <given-names>Z.</given-names></name> <name><surname>Jow</surname> <given-names>O.</given-names></name> <name><surname>Lee</surname> <given-names>D.</given-names></name> <name><surname>Chen</surname> <given-names>X.</given-names></name> <name><surname>Goldberg</surname> <given-names>K.</given-names></name> <etal/></person-group>. (<year>2018</year>). <article-title>&#x0201C;Deep imitation learning for complex manipulation tasks from virtual reality teleoperation,&#x0201D;</article-title> in <source>2018 IEEE International Conference on Robotics and Automation (ICRA)</source> (<publisher-loc>Brisbane, QLD</publisher-loc>). <pub-id pub-id-type="doi">10.1109/ICRA.2018.8461249</pub-id></citation></ref>
</ref-list>
<fn-group>
<fn id="fn0001"><p><sup>1</sup>The dataset is available in the original codebase of MIL at <ext-link ext-link-type="uri" xlink:href="https://github.com/tianheyu927/mil">https://github.com/tianheyu927/mil</ext-link>.</p></fn>
</fn-group>
</back>
</article>