<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>f-GAIL: Learning f-Divergence for Generative Adversarial Imitation Learning</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>2020 December</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10290596</idno>
					<idno type="doi"></idno>
					<title level='j'>Advances in neural information processing systems</title>
<idno>1049-5258</idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Xin Zhang</author><author>Yanhua Li</author><author>Ziming Zhang</author><author>Zhi-Li. Zhang</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Imitation learning (IL) aims to learn a policy from expert demonstrations that minimizes the discrepancy between the learner and expert behaviors. Various imitation learning algorithms have been proposed with different pre-determined divergences to quantify the discrepancy. This naturally gives rise to the following question: Given a set of expert demonstrations, which divergence can recover the expert policy more accurately with higher data efficiency? In this work, we propose f -GAIL, a new generative adversarial imitation learning (GAIL) model, that automatically learns a discrepancy measure from the f -divergence family as well as a policy capable of producing expert-like behaviors. Compared with IL baselines with various predefined divergence measures, f -GAIL learns better policies with higher data efficiency in six physics-based control tasks.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Imitation Learning (IL) or Learning from Demonstrations (LfD) <ref type="bibr">[1,</ref><ref type="bibr">6,</ref><ref type="bibr">18]</ref> aims to learn a policy directly from expert demonstrations, without access to the environment for more data or any reward signal. One successful IL paradigm is Generative Adversarial Imitation Learning (GAIL) <ref type="bibr">[18]</ref>, which employs generative adversarial network (GAN) <ref type="bibr">[15]</ref> to jointly learn a generator (as a stochastic policy) to mimic expert behaviors, and a discriminator (as a reward signal) to distinguish the generated vs expert behaviors. The learned policy produces behaviors similar to the expert, and the similarity is evaluated using the reward signal, in Jensen-Shannon (JS) divergence (with a constant shift of log 4 <ref type="bibr">[24]</ref>) between the distributions of learner vs expert behaviors. Thus, GAIL can be viewed as a variational divergence minimization (VDM) <ref type="bibr">[25]</ref> problem with JS-divergence as the objective.</p><p>Figure <ref type="figure">1</ref>: f -divergences and policies from GAIL, RKL-VIM, and f -GAIL on Walker task <ref type="bibr">[32]</ref>.</p><p>Beyond JS-divergence (as originally employed in GAIL), variations of GAIL have been proposed <ref type="bibr">[18,</ref><ref type="bibr">13,</ref><ref type="bibr">12,</ref><ref type="bibr">20,</ref><ref type="bibr">14]</ref>, essentially using different divergence measures from the fdivergence family <ref type="bibr">[24,</ref><ref type="bibr">25]</ref>, for example, behavioral cloning (BC) <ref type="bibr">[26]</ref> with Kullback-Leibler (KL) divergence <ref type="bibr">[24]</ref>, AIRL <ref type="bibr">[13]</ref> and RKL-VIM <ref type="bibr">[20]</ref> with reverse KL (RKL) divergence <ref type="bibr">[24]</ref>, and DAGGER <ref type="bibr">[28]</ref> with the Total Variation (TV) <ref type="bibr">[7]</ref>. Choosing the right divergence is crucial in order to recover the expert policy more accurately with high data efficiency (as observed in <ref type="bibr">[20,</ref><ref type="bibr">14,</ref><ref type="bibr">18,</ref><ref type="bibr">13,</ref><ref type="bibr">25,</ref><ref type="bibr">33]</ref>).</p><p>Motivation. All the above literature works rely on a fixed divergence measure manually chosen a priori from a set of well-known divergence measures (with an explicit analytic form), e.g., KL, RKL, JS, ignoring the large space of all potential divergences. Thus, the resulting IL network likely learns a sub-optimal learner policy. For example, Fig. <ref type="figure">1</ref> shows the results from GAIL <ref type="bibr">[18]</ref> and RKL-VIM <ref type="bibr">[20]</ref>, which employ JS and RKL divergences, respectively. The learned input density distributions (to the divergence functions) are quite dispersed (thus with large overall divergence) in Fig. <ref type="figure">1</ref>(a), leading to learner policies with only 30%-70% expert return in Fig. <ref type="bibr">1(b)</ref>. In this work, we are motivated to develop a learnable model to search and automatically find an appropriate discrepancy measure from the f -divergence family for GAIL.</p><p>Our f -GAIL. We propose f -GAIL -a new generative adversarial imitation learning model, with a learnable f -divergence from the underlying expert demonstrations. The model automatically learns an f -divergence between expert and learner behaviors, and a policy that produces expert-like behaviors. In particular, we propose a deep neural network structure to model the f -divergence space. Fig. <ref type="figure">1</ref> shows a quick view of our results: f -GAIL learns a new and unique f -divergence, with more concentrated input density distribution (thus smaller overall divergence) than JS and RKL in Fig. <ref type="figure">1(a)</ref>; and its learner policy has higher performance (80%-95% expert return) in Fig. <ref type="figure">1(b)</ref> (See more details in Sec 4). The code for reproducing the experiments are available at <ref type="url">https: //github.com/fGAIL3456/fGAIL</ref>. Our key contributions are summarized below:</p><p>&#8226; We are the first to model imitation learning with a learnable divergence measure from fdivergence space, which yields better learner policies, than pre-defined divergence choices (Sec 2). &#8226; We develop an f * -network structure, to model the space of f -divergence family, by enforcing two constraints, including i) convexity and ii) f (1) = 0 (Sec 3). &#8226; We present promising comparison results of learned f -divergences and the performances of learned policies with baselines in six different physics-based control tasks (Sec 4).</p><p>2 Problem Definition</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Preliminaries</head><p>Markov Decision Processes (MDPs). In an MDP denoted as a 6-tuple S, A, P, r, &#961; 0 , &#947; where S is a set of states, A is a set of actions, P : S &#215; A &#215; S &#8594; [0, 1] is the transition probability distribution, r : S &#215; A &#8594; R is the reward function, &#961; 0 : S &#8594; R is the distribution of the initial state s 0 , and &#947; &#8712; [0, 1] is the discount factor. We denote the expert policy as &#960; E , and the learner policy as &#960;. In addition, we use an expectation with respect to a policy &#960; to denote an expectation with respect to the trajectories it generates:</p><p>, with s 0 &#8764; &#961; 0 , a t &#8764; &#960;(a t |s t ), s t+1 &#8764; P(s t+1 |s t , a t ) and h as any function.</p><p>f -Divergence. f -Divergence <ref type="bibr">[24,</ref><ref type="bibr">23,</ref><ref type="bibr">11]</ref> is a broad class of divergences that measures the difference between two probability distributions. Different choices of f functions recover different divergences, e.g. the Kullback-Leibler (KL) divergence, Jensen-Shannon (JS) divergence, or total variation (TV) distance <ref type="bibr">[22]</ref>. Given two distributions P and Q, an absolutely continuous density function p(x) and q(x) over a finite set of random variables x defined on the domain X , an f -divergence is defined as</p><p>with the generator function f : R + &#8594; R as a convex, lower-semicontinuous function satisfying f (1) = 0. The convex conjugate function f * also known as the Fenchel conjugate <ref type="bibr">[16]</ref> is</p><p>]} (See more details in <ref type="bibr">[25]</ref>). Common choices of f functions are summarized in Tab. 1 and the plots of corresponding f * are visualized in Fig. <ref type="figure">4</ref>.</p><p>Imitation Learning as Variational f -Divergence Minimization (VDM). Imitation learning aims to learn a policy for performing a task directly from expert demonstrations. GAIL <ref type="bibr">[18]</ref> is an IL solution employing GAN <ref type="bibr">[15]</ref> structure, that jointly learns a generator (i.e., learner policy) and a discriminator (i.e., reward signal). In the training process of GAIL, the learner policy imitates the behaviors from the expert policy &#960; E , to match the generated state-action distribution with that of the expert. The distance between these two distributions, measured by JS divergence, is minimized. Thus the GAIL objective is stated as follows:</p><p>where T is a binary classifier distinguishing state-action pairs generated by &#960; vs &#960; E , and it can be viewed as a reward signal used to guide the training of policy &#960;. H(&#960;) = E &#960; [-log &#960;(a|s)] is the &#947;discounted causal entropy of the policy &#960; <ref type="bibr">[18]</ref>. Using the variational lower bound of an f -divergence, several studies <ref type="bibr">[20,</ref><ref type="bibr">14,</ref><ref type="bibr">25,</ref><ref type="bibr">5]</ref> have extended GAIL to a general variational f -divergence minimization (VDM) problem for a fixed f -divergence (defined by a generator function f ), with an objective below,</p><p>However, all these works rely on manually choosing an f -divergence measure, i.e., f * , which is limited by those well-known f -divergence choices (ignoring the large space of all potential fdivergences), thus lead to a sub-optimal learner policy. Hence, we are motivated to develop a new and more general GAIL model, which automatically searches an f -divergence from the f -divergence space given expert demonstrations.</p><p>2.2 Problem Definition: Imitation Learning with Learnable f -Divergence.</p><p>Divergence Choice Matters! As observed in <ref type="bibr">[20,</ref><ref type="bibr">14,</ref><ref type="bibr">13,</ref><ref type="bibr">25,</ref><ref type="bibr">33]</ref>, given an imitation learning task, defined by a set of expert demonstrations, different divergence choices lead to different learner policies. Taking KL divergence and RKL divergence (defined in eq. ( <ref type="formula">4</ref>) below) as an example, let p(x) be the true distribution, and q(x) be the approximate distribution learned by minimizing its divergence from p(x). With KL divergence, the difference between p(x) and q(x) is weighted by p(x). Thus, in the ranges of x with p(x) = 0, the discrepancy of q(x) &gt; 0 from p(x) will be ignored.</p><p>On the other hand, with RKL divergence, q(x) becomes the weight. In the ranges of x with q(x) = 0, RKL divergence does not capture the discrepancy of q(x) from p(x) &gt; 0. Hence, KL divergence can be used to better learn multiple modes from a true distribution p(x) (i.e., for mode-covering), while RKL divergence will perform better in learning a single mode (i.e., for mode-seeking).</p><p>Beyond KL and RKL divergences, there are infinitely many choices in the f -divergence family, where each divergence measures the discrepancy between expert vs learner distributions from a unique perspective. Hence, choosing the right divergence for an imitation learning task is crucial and can more accurately recover the expert policy with higher data efficiency.</p><p>f -GAIL: Imitation Learning with Learnable f -Divergence. Given a set of expert demonstrations to imitate and learn from, the f -divergence, that can highly evaluate the discrepancy between the learner and expert distributions (i.e., the largest f -divergence from the family), can better guide the learner to learn from the expert (as having larger improvement margin). As a result, in addition to the policy function &#960;, the reward signal function T , we aim to learn a (convex conjugate) generator function f * as a regularization term to the objective. The f -GAIL objective is as follows,</p><p>where F * denotes the admissible function space of f * , namely, each function in F * represents a valid f -divergence. The conditions for a generator function f to represent an f -divergence include: i) convexity and ii) f (1) = 0. In other words, the corresponding convex conjugate f * needs to be i) convex (the convexity constraint), ii) inf u&#8712;dom f * {f * (u) -u} = 0 (the zero gap constraint, namely, the minimum distance from f * (u) to u is 0)<ref type="foot">foot_0</ref> . Functions satisfying these two conditions form the admissible space F * . Note that the zero gap constraint can be obtained by combining convex conjugate f (v) = sup u&#8712;dom f * {uv -f * (u)} and f (1) = 0. Tab. 1<ref type="foot">foot_1</ref> below shows a comparison of our proposed f -GAIL with the state-of-the-art GAIL models <ref type="bibr">[18,</ref><ref type="bibr">13,</ref><ref type="bibr">14,</ref><ref type="bibr">20]</ref>. These models use pre-defined f -divergences, where f -GAIL can learn an f -divergence from f -divergence family. Table <ref type="table">1</ref>: f -Divergence and imitation learning (JS * is a constant shift of JS divergence by log 4). <ref type="formula">5</ref>) IL Method FAIRL <ref type="bibr">[14]</ref> RKL-VIM <ref type="bibr">[20]</ref>, AIRL <ref type="bibr">[13]</ref> GAIL <ref type="bibr">[18]</ref> f -GAIL (Ours) 3</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Imitation Learning with Learnable f -Divergence</head><p>There are three functions to learn in the f -GAIL objective in eq. ( <ref type="formula">5</ref>), including the policy &#960;, the f * -function f * , and the reward signal T , where we model them with three deep neural networks parameterized by &#952;, &#969; and &#966; respectively. Following the generative-adversarial approach <ref type="bibr">[15]</ref>, f * &#966; and T &#969; networks together can be viewed as a discriminator. The policy network &#960; &#952; is the generator. As a result, the goal is to find the saddle-point of the objective in eq. ( <ref type="formula">5</ref>), where we minimize it with respect to &#952; and maximize it with respect to &#969; and &#966;. In this section, we will tackle two key challenges including i) how to design an algorithm to jointly learn all three networks to solve the f -GAIL problem in eq. ( <ref type="formula">5</ref>)? (See Sec 3.1); and ii) how to design the f * &#966; network structure to enforce it to represent a valid f -divergence? (See Sec 3.2). Fig. <ref type="figure">2</ref> shows the overall f -GAIL model structure.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">f -GAIL Algorithm</head><p>Our proposed f -GAIL algorithm is presented in Alg. 1. It uses the alternating gradient method (instead of one-step gradient method in f -GAN <ref type="bibr">[25]</ref>) to first update the f * -function f * &#966; and the reward signal T &#969; in a single back-propagation, and then update the policy &#960; &#952; . It utilizes Adam <ref type="bibr">[21]</ref> gradient step on &#969; to increase the objective in eq. ( <ref type="formula">5</ref>) with respect to both T &#969; and f * &#966; , followed by a shifting operation on f * &#966; to guarantee the zero gap constraint (See Sec 3.2 and eq. ( <ref type="formula">7</ref>)). Then, it uses the Trust Region Policy Optimization (TRPO) <ref type="bibr">[29]</ref> step on &#952; to decrease eq. ( <ref type="formula">7</ref>) with respect to &#960; &#952; .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Algorithm 1 f -GAIL</head><p>Require: Initialize parameters of policy &#960; &#952; , reward signal T &#969; , and f * &#966; networks as &#952; 0 , &#969; 0 and &#966; 0 (with shifting operation eq. ( <ref type="formula">7</ref>) required on &#966; 0 to enforce the zero gap constraint); expert trajectories &#964; E &#8764; &#960; E containing state-action pairs. Ensure: Learned policy &#960; &#952; , f * -function f * &#966; and reward signal T &#969; . 1: for each epoch i = 0, 1, 2, ... do</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>2:</head><p>Sample trajectories &#964; i &#8764; &#960; &#952;i .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>3:</head><p>Sample state-action pairs: D E &#8764; &#964; E and D i &#8764; &#964; i with the same batch size.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>4:</head><p>Update &#969; i to &#969; i+1 and &#966; i to &#966; i+1 by ascending with the gradients:</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>5:</head><p>Estimate the minimum gap &#948; with gradient descent in Alg. 2 and shift f * &#966;i+1 (by eq. 7).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>6:</head><p>Take a policy step from &#952; i to &#952; i+1 , using the TRPO update rule to decrease the objective:</p><p>-&#202;Di [f * &#966;i+1 (T &#969;i+1 (s, a))] -H(&#960; &#952;i ). The architecture of the f * &#966; network is crucial to obtain a family of convex conjugate generator functions f * that represents the entire f -divergence space. To achieve this goal, two constraints need to be guaranteed (as discussed in Sec 3.2), including i) the convexity constraint, i.e., f * (u) is convex, and ii) the zero gap constraint, i.e., inf u&#8712;dom f * {f * (u) -u} = 0. To enforce the convex constraint, we implement the f * &#966; network with a neural network structure convex to its input. Moreover, in each epoch, we estimate the minimum gap of &#948; = inf u&#8712;dom f * {f * (u) -u}, with which we shift it to enforce the zero gap constraint. Below, we detail the design of the f * &#966; network. 1. Convexity constraint on f * &#966; network. The f * &#966; network takes a scalar input u from the reward signal network T &#969; output, i.e., u = T &#969; (s, a), with (s, a) as a state-action pair generated by &#960; &#952; . To ensure the convexity of the f * &#966; network, we employ the structure of a fully input convex neural network (FICNN) <ref type="bibr">[3]</ref> with a composition of convex nonlinearites (e.g., ReLU) and linear mappings (See Fig. <ref type="figure">2</ref>). The convex structure consists of multiple layer perceptrons. Differing from a fully connected feedforward structure, it includes shortcuts from the input layer u to all subsequent layers, i.e., for each layer i = 0,</p><p>where z i denotes the i-th layer activation, g i represents non-linear activation functions, with W (z) 0 &#8801; 0. b s is a bias over both the input u and the last layer output z k , which is used to enforce the zero gap constraint (as detailed below). As a result, the parameters in</p><p>1:k-1 to be non-negative and g i 's to be convex non-decreasing activation functions (e.g. ReLU) guarantee the network output to be convex to the input u = T &#969; (s, a). The convexity follows the fact that a non-negative sum of convex functions is convex and that the composition of a convex and convex non-decreasing function is also convex <ref type="bibr">[9]</ref>. To ensure the non-negativity on W  </p><p>3: </p><p>, where &#948; = inf</p><p>This shift guarantees zero gap constraint, and we delegate the proof to Appendix A. In each epoch, the estimation process of &#948; is detailed in Alg. 2, and the shift operation is implemented by updating b s = b s -&#948;/2. Fig. <ref type="figure">3</ref> illustrates the operations of estimating &#948; and shifting f * &#966; . Note that &#948; represents the minimum gap in function value between f * &#966; (u) and u. Shifting &#948;/2 over both input and output space of f * &#966; (u) (i.e., Line 5 in Alg. 1) enforces the zero gap constraint. Note that this shifting operation is also performed, when initializing the parameters &#966; 0 for f * &#966; (u), to make sure the training starts from a valid f -divergence<ref type="foot">foot_2</ref> .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Experiments</head><p>We evaluate Alg. 1 by comparing it with baselines on six physical-based control tasks, including the CartPole <ref type="bibr">[8]</ref> from the classic RL literature, and five complex tasks simulated with MuJoCo <ref type="bibr">[32]</ref>, such as HalfCheetah, Hopper, Reacher, Walker, and Humanoid. By conducting experiments on these tasks, we show that i) our f -GAIL algorithm can learn diverse f -divergences, comparing to the limited choices in the literature (See Sec 4.1); ii) f -GAIL algorithm always learn policies performing better than baselines (See Sec 4.2); iii) f -GAIL algorithm is robust in performance with respect to structure changes in the f * &#966; network (See Sec 4.3). Each task in the experiment comes with a true reward function, defined in the OpenAI Gym <ref type="bibr">[10]</ref>. We first use these true reward functions to train expert policies with trust region policy optimization (TRPO) <ref type="bibr">[29]</ref>. The trained expert policies are then utilized to generate expert demonstrations. To evaluate the data efficiency of f -GAIL algorithm, we sampled datasets of varying trajectory counts from the expert policies, while each trajectory consists of about 50 state-action pairs. Below are five IL baselines, we implemented to compare against f -GAIL.</p><p>&#8226; Behavior cloning (BC) <ref type="bibr">[26]</ref>: A set of expert state-action pairs is split into 70% training data and 30% validation data. The policy is trained with supervised learning. BC can be viewed as minimizing KL divergence between expert's and learner's policies <ref type="bibr">[20,</ref><ref type="bibr">14]</ref>. &#8226; Generative adversarial imitation learning (GAIL) <ref type="bibr">[18]</ref>: GAIL is an IL method using GAN architecture <ref type="bibr">[15]</ref>, that minimizes JS divergence between expert's and learner's behavior distributions. &#8226; BC initialized GAIL (BC+GAIL): As discussed in GAIL <ref type="bibr">[18]</ref>, BC initialized GAIL will help boost GAIL performance. We pre-train a policy with BC and use it as initial parameters to train GAIL. &#8226; Adversarial inverse reinforcement learning (AIRL) <ref type="bibr">[13]</ref>: AIRL applies the adversarial training approach to recover the reward function and its policy at the same time, which is equivalent to minimizing the reverse KL (RKL) divergence of state-action visitation frequencies between the expert and the learner <ref type="bibr">[14]</ref>. &#8226; Reverse KL -variational imitation (RKL-VIM) <ref type="bibr">[20]</ref>: the algorithm uses the RKL divergence instead of the JS divergence to quantify the divergence between expert and learner in GAIL architecture <ref type="foot">4</ref> .</p><p>For fair comparisons, the policy network structures &#960; &#952; of all the baselines and f -GAIL are the same in all experiments, with two hidden layers of 100 units each, and tanh nonlinearlities in between. The implementations of reward signal networks and discriminators vary according to baseline architectures, and we delegate these implementation details to Appendix B. All networks were always initialized randomly at the start of each trial. For each task, we gave GAIL, BC+GAIL, AIRL, RKL-VIM and f -GAIL exactly the same amount of environment interactions for training.</p><p>4.1 f * &#966; Learned from f -GAIL Fig. <ref type="figure">4</ref> shows that f -GAIL learned unique f * &#966; (u) functions for all six tasks, and they are different from those well-known divergences, such as RKL and JS divergences. Clearly, the learned f * &#966; (u)'s are convex and with zero gap from u, thus represent valid f -divergences. Moreover, the learned f -divergences are similar, when the underlying tasks share commonalities. For example, the two f * &#966; (u) functions learned from CartPole and Reacher tasks (Fig. <ref type="figure">4</ref>(a) and (d)) are similar, because the two tasks are similar, i.e., both aiming to keep a balanced distance from the controlling agent to a target. On the other hand, both Hopper and Walker tasks aim to train the agents (with one foot for Hopper and two feet for Walker) to proceed as fast as possible, thus their learned f * &#966; (u) are similar (Fig. <ref type="figure">4(c)</ref> and<ref type="figure">(e)</ref>). (See Appendix B for descriptions and screenshots of tasks.) We also plot Fig. <ref type="figure">5</ref> to show that given a task, the learned f * functions are consistent (small variance) for different sample sizes. Similar observations are made for tasks CartPole, Reacher and Humanoid as well.</p><p>In state-of-the-art IL approaches and our f -GAIL (from eq. ( <ref type="formula">3</ref>) and ( <ref type="formula">5</ref>)), the f * -function takes the learner reward signal u = T &#969; (s, a) (over generated state-action pairs (s, a)'s) as input. By examining the distribution of u, two criteria can indicate that the learner policy &#960; &#952; is close to the expert &#960; E : i. u centers around zero gap, i.e., f * (u) -u &#8776; 0. This corresponds to the generator function f centered around f (p(s, a)/q(s, a)) &#8776; f (1) = 0, with p and q as the expert vs learner distributions; ii. u has small standard deviation. This means that u concentrates on the nearby range of zero gap, leading to a small f -divergence between learner and expert, since D f (p(s, a) q(s, a)) &#8776; q(s, a)f (1)d(s, a) = 0.  &#966; (u) -u &#8776; 0, equivalently, f (p(s, a)/q(s, a)) &#8776; f (1) = 0, with close expert vs learner behavior distributions (i.e., p vs q). The distributions of input u were estimated by kernel density estimation <ref type="bibr">[31]</ref> with Gaussian kernel of bandwidth 0.3. &#966; (u) with different sample sizes. In Fig. <ref type="figure">4</ref>, we empirically estimated and showed the distributions of input u for the state-of-theart IL methods (including GAIL and RKL-VIM <ref type="foot">5</ref> ) and our f -GAIL. Fig. <ref type="figure">4</ref> shows that overall u distributions from our f -GAIL match the two criteria (i.e., close to zero gap and small standard deviation) better than baselines (See more statistical analysis on the two criteria across different approaches in Appendix B). This indicates that learner policies learned from f -GAIL are with smaller divergence, i.e., higher quality. We will provide experimental results on the learned policies to further validate this in Sec 4.2 below.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">f -GAIL Performance in Policy Recovery</head><p>Fig. <ref type="figure">6</ref> shows the performances of our f -GAIL and all baselines under different training data sizes, and the tables in Appendix B provide detailed performance scores. In all tasks, our f -GAIL outperforms all the baselines. Especially, in more complex tasks, such as Hopper, Reacher, Walker, and Humanoid, f -GAIL shows a larger winning margin over the baselines, with at least 80% of expert performances for all datasets. GAIL shows lower performances on complex tasks such as Hopper, Reacher, Walker, and Humanoid, comparing to simple tasks, i.e., CartPole and  HalfCheetah (with much smaller state and action spaces). Overall, BC and BC initialized GAIL (BC+GAIL) have the lowest performances comparing to other baselines and our f -GAIL in all tasks. Moreover, they suffer from data efficiency problem, with extremely low performance when datasets are not sufficiently large. These results are consistent with that of <ref type="bibr">[19]</ref>, and the poor performances can be explained as a result of compounding error by covariate shift <ref type="bibr">[27,</ref><ref type="bibr">28]</ref>. AIRL performs poorly for Walker, with only 20% of expert performance when 4 trajectories were used for training, which increased up to 80% when using 25 trajectories. RKL-VIM had reasonable performances on CartPole, Hopper, Reacher, and Humanoid when sufficient amount of data was used, but was not able to get more than 80% expert performance for HalfCheetah, where our f -GAIL achieved expert performance. (See Tab. 6 in Appendix B for more detailed return values.) In terms of the convergence of the proposed f -GAIL, Fig. <ref type="figure">7</ref> below shows the training curve of f -divergence (i.e., the objective in eq. ( <ref type="formula">5</ref>)) with respect to training epochs where it converges to less than 0.02 for HalfCheetah after 450 epochs. Similar results were observed in other tasks.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">Ablation Experiments</head><p>In this section, we investigate how structure choices of the proposed f * &#966; network, especially, the network expressiveness such as the number of layers and the number of nodes per layer, affect the model performance. In experiments, we took the CartPole, HalfCheetah and Reacher tasks as examples, and fixed the network structures of policy &#960; &#952; and the reward signal T &#969; . We changed the number of layers to be 1, 2, 4, and 7 (with 100 nodes each layer) and changed the number of nodes per layer to be 25, 50, 100 and 200 (with 4 layers). The comparison results are presented in Tab. 2. In simpler tasks with smaller state and action space, e.g. the CartPole, we observed quick convergence with f -GAIL, achieving expert return of 200. In this case, the structure choices do not have impact on the performance. However, in more complex tasks such as HalfCheetah and Reacher, a simple linear transformation of input (with one convex transformation layer) is not sufficient to learn a good policy function &#960; &#952; . This naturally explains the better performances with the number of layers increased to 4 and the number of nodes per layer increased to 100. However, further increasing the number of layers to 7 and the number of nodes per layer to 200 decreased the performance a little bit. As a result, for </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Discussion and Future Work</head><p>Our work makes the first attempt to model imitation learning with a learnable f -divergence from the underlying expert demonstrations. The model automatically learns an f -divergence between expert and learner behaviors, and a policy that produces expert-like behaviors.</p><p>Meaning of the best f -divergence. As a minimax optimization problem in eq. ( <ref type="formula">5</ref>), f -GAIL searches for the best f -divergence in the "max" inner-loop given the current learned policy &#960; learned from the "min" outer-loop, eventually leading to a stable solution of (&#960;, f * ). Here, given an expert demonstration dataset, a better divergence can measure the discrepancy more precisely than other divergences, thus enables training a learner with closer behaviors to the expert.</p><p>Future work. This work focuses on searching within the f -divergence space, where Wasserstein distance <ref type="bibr">[17,</ref><ref type="bibr">4]</ref> is not included. However, the divergence search space can be further extended to c-Wasserstein distance family <ref type="bibr">[2]</ref>, which subsumes f -divergence family and Wasserstein distance as special cases. Designing a network structure to represent c-Wasserstein distance family is challenging (we leave it as part of our future work), while a naive way is to model it as a convex combination of the f -divergence family (using our f * &#966; network) and Wasserstein distance. Moreover, beyond imitation learning, our f * -network structure can be potentially "coupled" with f -GAN <ref type="bibr">[25]</ref> and f -EBM <ref type="bibr">[33]</ref> to learn an f -divergence between the generated vs real data distributions (e.g., image and audio files), which in turn trains a higher quality generator.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Broader Impact</head><p>This paper aims to advance the imitation learning techniques, by learning an optimal discrepancy measure from f -divergence family, which has a wide range of applications in robotic engineering, system automation and control, etc. The authors do not expect the work will address or introduce any societal or ethical issues.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>Convex and zero-gap constraints are necessary and sufficient conditions to guarantee an f -divergence, based on f * * = f (see &#167;3.3.2 in<ref type="bibr">[9]</ref>) for convex functions, i.e., f (1) = f * * (1) = maxu{u -f * (u)} = 0.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1"><p>Similar observations can be found in<ref type="bibr">[20,</ref><ref type="bibr">14]</ref>.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_2"><p>Theoretically, given &#948; (defined as an infimum), it may not be achievable with a feasible u &#8712; domf * &#966; . However, empirically, given the diverse input distributions of f * (See Sec</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_3"><p><ref type="bibr">4</ref>.1), we can always introduce a projection operator<ref type="bibr">[9]</ref> to limit the feasible space of u for a better control of the shift operation. In our experiments, we never found any issue when directly applying Alg. 2 for the shifting operation.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_4"><p>Both AIRL and RKL-VIM can be viewed as RKL divergence minimization problem. However, they use different lower bounds on RKL divergence (See details in<ref type="bibr">[14]</ref> and<ref type="bibr">[20,</ref><ref type="bibr">25]</ref>).</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="5" xml:id="foot_5"><p>With AIRL, similar results were obtained as that of RKL-VIM, since they both employ RKL divergence (while using different lower bounds). We omitted the results for AIRL for brevity.</p></note>
		</body>
		</text>
</TEI>
