can autonomous vehicles identify, recover from,and adapt ... · 1. introduction autonomous agents...

14
Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts? Angelos Filos 1* Panagiotis Tigas 1* Rowan McAllister 2 Nicholas Rhinehart 2 Sergey Levine 2 Yarin Gal 1 Abstract Out-of-distribution (OOD) driving scenarios are a common failure of learning agents at deploy- ment, typically leading to arbitrary deductions and poorly-informed decisions. In principle, de- tection of and adaption to OOD scenes can mit- igate their adverse effects. In this paper, we highlight the limitations of current approaches to novel driving scenes and propose an epistemic uncertainty-aware planning method, called robust imitative planning (RIP). Our method can detect and recover from some distribution shifts, reduc- ing the overconfident but catastrophic extrapola- tions in out-of-training-distribution scenes. When the model’s uncertainty quantification is insuffi- cient to suggest a safe course of action by itself, it is used to query the driver for feedback, enabling sample-efficient online adaptation, a variant of our method we term adaptive robust imitative plan- ning (AdaRIP). Since no benchmark evaluating OOD detection and adaption currently exists to assess our methods, we introduce an autonomous car novel-scene benchmark, CARNOVEL, to eval- uate the robustness of driving agents to a suite of tasks involving distribution shift. The code is available on github.com/OATML/carnovel. 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human mis- takes. Recent advances in machine learning (ML) enable the deployment of such agents in challenging, real-world, safety-critical domains, such as autonomous driving (AD) in urban areas. However, it has been repeatedly demonstrated that the reliability of ML models degrades radically when they are exposed to novel settings (i.e., under distribution * Equal contribution 1 University of Oxford 2 University of California, Berkeley. Correspondence to: Angelos Fi- los <angelos.fi[email protected]>, Panagiotis Tigas <panagio- [email protected]>. (a) OOD driving scenario models, q k q 3 q 2 q 1 trajectories, s i s 1 s 2 s 3 0.7 0.3 0.4 0.2 0.4 0.1 0.1 0.3 0.5 min k 0.3 0.1 0.1 max i s 1 1 K k 1.4 3 0.7 3 0.9 3 max i s 1 max i s 1 s 2 s 3 (b) Robust imitaive planning Figure 1. Didactic example: the ensemble of models q k score tra- jectories s i for the ego vehicle in a novel, out-of-training distri- bution scenario (a), where represents the goal, the other cars and the pedestrians. The models q1 and q2 fail to generalize, choosing the catastrophic trajectories s 3 and s 2 , respectively, while our epistemic uncertainty-aware robust (RIP) objectives propose the safe trajectory s 1 . The RIP objectives take into account the disagreement between the models and avoid overconfident but catastrophic extrapolations in out-of-distribution scenes. shift) due to their failure to generalize, leading to catas- trophic outcomes (Sugiyama & Kawanabe, 2012; Amodei et al., 2016; Snoek et al., 2019). The diminishing perfor- mance of ML models to out-of-training distribution (OOD) regimes is concerning in life-critical applications, such as AD (Quionero-Candela et al., 2009; Leike et al., 2017). For instance, a traffic light detector missing a red light due to its unfamiliar faded color could lead to a lethal accident. Due to the complexity of the real-world and its ever- changing dynamics, the deployed agents inevitably face novel situations and should be able to cope with them, to at least (a) identify and ideally (b) recover from them, without catastrophically failing. These desiderata are not captured by the existing benchmarks (Ros et al., 2019; Codevilla et al., 2019) and as a consequence, not satisfied by the cur- rent state-of-the-art methods (Rhinehart et al., 2020; Chen et al., 2019; Tang et al., 2019), which are prone to fail in unpredictable ways when they experience OOD scenarios (illustrated in Figure 1 and empirically verified in Section 4). In this paper, we demonstrate the practical importance of OOD detection in AD and its importance for safety. The key contributions are summarized as follows:

Upload: others

Post on 30-Jul-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From,and Adapt to Distribution Shifts?

Angelos Filos 1 * Panagiotis Tigas 1 * Rowan McAllister 2 Nicholas Rhinehart 2 Sergey Levine 2 Yarin Gal 1

Abstract

Out-of-distribution (OOD) driving scenarios area common failure of learning agents at deploy-ment, typically leading to arbitrary deductionsand poorly-informed decisions. In principle, de-tection of and adaption to OOD scenes can mit-igate their adverse effects. In this paper, wehighlight the limitations of current approachesto novel driving scenes and propose an epistemicuncertainty-aware planning method, called robustimitative planning (RIP). Our method can detectand recover from some distribution shifts, reduc-ing the overconfident but catastrophic extrapola-tions in out-of-training-distribution scenes. Whenthe model’s uncertainty quantification is insuffi-cient to suggest a safe course of action by itself, itis used to query the driver for feedback, enablingsample-efficient online adaptation, a variant of ourmethod we term adaptive robust imitative plan-ning (AdaRIP). Since no benchmark evaluatingOOD detection and adaption currently exists toassess our methods, we introduce an autonomouscar novel-scene benchmark, CARNOVEL, to eval-uate the robustness of driving agents to a suiteof tasks involving distribution shift. The code isavailable on github.com/OATML/carnovel.

1. IntroductionAutonomous agents hold the promise of systematizingdecision-making to reduce catastrophes due to human mis-takes. Recent advances in machine learning (ML) enablethe deployment of such agents in challenging, real-world,safety-critical domains, such as autonomous driving (AD) inurban areas. However, it has been repeatedly demonstratedthat the reliability of ML models degrades radically whenthey are exposed to novel settings (i.e., under distribution

*Equal contribution 1University of Oxford 2Universityof California, Berkeley. Correspondence to: Angelos Fi-los <[email protected]>, Panagiotis Tigas <[email protected]>.

(a) OOD driving scenario

mod

els,q k

q3

q2

q1

trajectories, sis1 s2 s3

0.7

0.3

0.4

0.2

0.4

0.1

0.1

0.3

0.5

mink 0.3 0.1 0.1maxi

s1

1K

∑k

1.43

0.73

0.93

maxi

s1

maxi

s1

s2

s3

(b) Robust imitaive planning

Figure 1. Didactic example: the ensemble of models qk score tra-jectories si for the ego vehicle in a novel, out-of-training distri-bution scenario (a), where represents the goal, the other carsand the pedestrians. The models q1 and q2 fail to generalize,choosing the catastrophic trajectories s3 and s2, respectively, whileour epistemic uncertainty-aware robust (RIP) objectives proposethe safe trajectory s1. The RIP objectives take into account thedisagreement between the models and avoid overconfident butcatastrophic extrapolations in out-of-distribution scenes.

shift) due to their failure to generalize, leading to catas-trophic outcomes (Sugiyama & Kawanabe, 2012; Amodeiet al., 2016; Snoek et al., 2019). The diminishing perfor-mance of ML models to out-of-training distribution (OOD)regimes is concerning in life-critical applications, such asAD (Quionero-Candela et al., 2009; Leike et al., 2017). Forinstance, a traffic light detector missing a red light due to itsunfamiliar faded color could lead to a lethal accident.

Due to the complexity of the real-world and its ever-changing dynamics, the deployed agents inevitably facenovel situations and should be able to cope with them, to atleast (a) identify and ideally (b) recover from them, withoutcatastrophically failing. These desiderata are not capturedby the existing benchmarks (Ros et al., 2019; Codevillaet al., 2019) and as a consequence, not satisfied by the cur-rent state-of-the-art methods (Rhinehart et al., 2020; Chenet al., 2019; Tang et al., 2019), which are prone to fail inunpredictable ways when they experience OOD scenarios(illustrated in Figure 1 and empirically verified in Section 4).

In this paper, we demonstrate the practical importance ofOOD detection in AD and its importance for safety. Thekey contributions are summarized as follows:

Page 2: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

(x1, s1)

(xN , sN )

(a) Demonstrations, D = {(xi, si)}Ni=1

D = D1 ∪ · · · Dk · · · ∪ DK

θk,MLE = arg maxθ E(x,s)∼Dk[log q(s|x;θ)]

x ∼ D1 θ1 θ1 q(s|x;θ1)

s ∼ D1

x ∼ DK θK θK q(s|x;θK)

s ∼ DK

(b) Bootstrap ensemble trtaining

x

θ1

s

θK

s

⊕ e.g., mink, 1K

∑k

U = ⊕ log q(s|x), ∂U∂s

plan s∗ = arg maxs U

(c) Planning under uncertainty

Figure 2. The robust imitative planning (RIP) framework. (a) Expert demonstrations. We assume access to observations x andcorresponding expert plans s, collected either in simulation (Dosovitskiy et al., 2017) or in real-world (Caesar et al., 2019; Sun et al., 2019;Kesten et al., 2019). (b) Learning algorithm (cf. Section 2.1). We capture epistemic (model) uncertainty by training a bootstrap ensembleof density estimators q(s|x;θk)k=1,...,K , via maximum likelihood. (c) Planning paradigm (cf. Section 2.2). The epistemic uncertaintyis taken into account at planning via the aggregation operator ⊕, and the optimal plan s∗ is calculated online with gradient-basedoptimization through the learned likelihood models.

1. Epistemic uncertainty-aware planning: We presentan epistemic uncertainty-aware planning method,called robust imitative planning (RIP) for detectingand recovering from distribution shifts. Simple quan-tification of epistemic uncertainty with deep ensemblesenables detection of distribution shifts. By employingBayesian decision theory and robust control objectives,we show how we can act conservatively in unfamiliarstates which often allows us to recover from distribu-tion shifts (didactic example depicted in Figure 1).

2. Uncertainty-driven online adaptation: Our adap-tive, online method, called adaptive robust imitativeplanning (AdaRIP), uses RIP’s epistemic uncertaintyestimates to efficiently query the expert for feedbackwhich is used to adapt on-the-fly, without compromis-ing safety. Therefore, AdaRIP could be deployed in thereal world: it can reason about what it does not knowand in these cases ask for human guidance to guaranteecurrent safety and enhance future performance.

3. Autonomous car novel-scene benchmark: We in-troduce an autonomous car novel-scene benchmark,called CARNOVEL, to assess the robustness of ADmethods to a suite of out-of-distribution tasks. In par-ticular, we evaluate them in terms of their ability to:(a) detect OOD events, measured by the correlationof infractions and model uncertainty; (b) recover fromdistribution shifts, quantified by the percentage of suc-cessful manoeuvres in novel scenes and (c) efficientlyadapt to OOD scenarios, provided online supervision.

2. Robust Imitative PlanningWe seek a method that (a) provides a distribution over plans;(b) quantifies epistemic uncertainty to allow for novelty

detection and (c) enables robustness to distribution shiftwith an explicit mechanism for recovery. Next, we presentour assumptions, common in the literature (Codevilla et al.,2018; Rhinehart et al., 2020; Chen et al., 2019). Our methodis illustrated in Figure 2.

Assumption 1 (Expert demonstrations) We assume ac-cess to a dataset, D = {(xi, si)}Ni=1, of time-profiled experttrajectories (i.e., plans), s, paired with high-dimensional ob-servations, x, of the corresponding scenes. The trajectoriesare drawn from the optimal policy, s ∼ πexpert(·|x).

Assumption 2 (Local controller) We assume access to alocal planner (Bellman, 2015, PID controller), which per-forms the low-level control, at (i.e., steering, braking andthrottling), provided the current and next states (i.e., posi-tions), st and st+1, respectively. Therefore, the transitiondynamics are deterministic, p(st+1|st, at) = 1{feasible}.

Assumption 3 (Global planner) We assume access to aglobal navigation system, such as GPS, which provides uswith high-level goal locations G or/and commands C (e.g.,turn left/right at the intersection, take the second exit).

2.1. Bayesian Imitative Model

We perform context-conditioned density estimation of thedistribution over future expert trajectories (i.e., plans), us-ing a probabilistic “imitative” model q(s|x;θ), trained viamaximum likelihood estimation (MLE)

θMLE = arg maxθ

E(x,s)∼D [log q(s|x;θ)] . (1)

Contrary to existing methods in AD (Rhinehart et al., 2020;Chen et al., 2019), we place a prior distribution p(θ) overpossible model parameters θ, which induces a distribution

Page 3: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

over the density models q(s|x;θ). After observing data D,the distribution over density models has a posterior p(θ|D).

Practical implementation. We use an autoregressivedeep neural network (Rhinehart et al., 2018), depicted inFigure 2b, is used as the imitative model, parametrized bylearnable parameters θ, where

q(s|x;θ) =

T∏t=1

p(st|s<t,x;θ)

=

T∏t=1

N (st;µ(s<t,x;θ),Σ(s<t,x;θ)), (2)

where µ(·;θ) and Σ(·;θ) are recurrent neural networks,with a shared torso. The evaluation of the posterior p(θ|D)with exact inference is intractable for non-trivial mod-els (Neal, 2012). We use ensembles of deep imitative modelsas a simple approximation to the posterior p(θ|D), as doneby Lakshminarayanan et al. (2017); Chua et al. (2018). Weconsider a bootstrap ensemble of K components, using θk

to refer to the parameters of our k-th model qk, trained withvia maximum likelihood (cf. Eq. (1) and Figure 2b).

2.2. Planning Under Epistemic Uncertainty

We formulate planning to a goal location G under epistemicuncertainty, i.e., posterior over model parameters p(θ|D),as the optimization (Barber, 2012) of the generic objective

sGRIP ,arg maxs

aggregation operator︷ ︸︸ ︷⊕

θ∈supp(p(θ|D))log p(s|G,x;θ)︸ ︷︷ ︸

imitation posterior

=arg maxs

⊕θ∈supp(p(θ|D))

logq(s|x;θ)︸ ︷︷ ︸imitation prior

+ log p(G|s)︸ ︷︷ ︸goal likelihood

(3)

where ⊕ is an operator (defined below) applied on the pos-terior p(θ|D) and the goal-likelihood is given, for example,by a Gaussian centered at the final goal location sGT and apre-specified tolerance ε – p(G|s) = N (sT ; sGT , ε

2I).

Intuitively, we choose the plan sGRIP that maximizes the likeli-hood to have come from an expert demonstrator (i.e., “imita-tion prior”) and is “close” to the goal G. The model posteriorp(θ|D) represents our belief (uncertainty) about the true ex-pert model, having observed data D and started from priorp(θ) and the aggregation operator ⊕ determines our levelof awareness to uncertainty under a unified framework.

For example, deep imitative models (Rhinehart et al., 2020)is a particular instance of the more general family of objec-tives described by Eqn. (3), where the operator ⊕ selects asingle θk from the posterior (point estimate). However, thisapproach is oblivious to the epistemic uncertainty and proneto fail in unfamiliar scenes (cf. Section 5.1).

In contrast, we focus our attention on two operators dueto their favourable properties, which take epistemic uncer-tainty into account: (a) one inspired by robust control (Wald,

1939) which encourages pessimism in the face of uncer-tainty and (b) one from Bayesian decision theory, whichmarginalizes the epistemic uncertainty. Table 1 summarizesthe different operators considered in our experiments andFigure 1 illustrate their application. Next, we motivate theused operators.

2.2.1. WORST CASE MODEL (RIP-WCM)

In the face of (epistemic) uncertainty, robost control (Wald,1939) suggests to act pessimistically – reason about theworst case scenario and optimize it. All the models withnon-zero posterior probability p(θ|D) are likely and henceour robust imitative planning with respect to the worst casemodel (RIP-WCM) objective acts with respect to the mostpessimistic, i.e.,

sRIP-WCM ,arg maxs

minθ∈supp(p(θ|D))

logq(s|x;θ) . (4)

The solution of the arg maxs minθ optimization problemis generally not tractable, but our deep ensemble approxima-tion enables us to solve it by evaluating the minimum over afinite number of K models (particles). Alternative, “softer”robust operators include the Conditional Value at Risk (Em-brechts et al., 2013, CVaR) that looks at quantiles, instead ofthe minimum in the support of the posterior, which may betoo pessimistic and hence useless in case of a full posterior.

2.2.2. EXPECTED MODEL (RIP-EM)

In the face of (epistemic) uncertainty, Bayesian decisiontheory (Barber, 2012) uses the predictive posterior (i.e.,model averaging), which weights each model’s contributionaccording to its posterior probability, i.e.,

sRIP-EM ,arg maxs

∫logq(s|x;θ)p(θ|D)dθ . (5)

Despite the intractabiliy of the exact integration, the deepensemble approximation used allows us to efficiently esti-mate and optimize the objective. We call this method robustimitative planning with respect to the expected model (RIP-EM), where the more likely models’ impact is upweightedaccording to the predictive posterior.

Table 1. Robust imitative planning (RIP) unified framework. Thedifferent aggregation operators applied on the posterior distributionp(θ|D), approximated with the deep ensemble (Lakshminarayananet al., 2017) components θk.

Methods Operator ⊕ Interpretation

Imitative Models log qk=1 SampleOptimistic maxk log qk Max

Robust Imitative Planning (ours)

Model Average (RIP-EM)∑

k log qk Geometric MeanPessimistic (RIP-WCM) mink log qk Min

Page 4: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

(a) Ground truth state (b) First-person camera view (c) LIDAR

Figure 3. The different available observations per time step. The ground truth state (a) is provided only during training since some methods(e.g., (Chen et al., 2019)) need it. The vectors of position, velocity and acceleration are also provided, along with the next navigationcommand and goal location. The first-person RGB camera view (b) and the LIDAR (c) are provided as 3D arrays.

2.3. Adaptive Robust Imitative Planning

We empirically observe that the quantification of epistemicuncertainty and its use in the RIP objectives is not alwayssufficient to recover from distribution shifts (see Section 4).However, we can use uncertainty estimates (e.g., the vari-ance of ensemble models) to ask the human driver to takeback control or default to a safe policy, avoiding potentialinfractions. In the former case, the human driver’s behaviorcan be recorded and used to reduce RIP’s epistemic uncer-tainty via online adaptation. The epistemic uncertainty isreducible can be eliminated, provided enough demonstra-tions (Gal, 2016).

We propose an adaptive variant of RIP, called AdaRIP, whichuses the epistemic uncertainty estimates to decide when toquery the human driver for feedback, which is used to updateits parameters online, adapting to arbitrary new regimes.AdaRIP relies on external, online feedback from an expertdemonstrator, similar to DAgger (Ross et al., 2011) andits variants (Zhang & Cho, 2016; Cronrath et al., 2018).However, unlike this prior work, AdaRIP uses an epistemicuncertainty-aware acquisition mechanism.

3. Benchmarking Robustness to NoveltyTo assess RIP and AdaRIP, we need to benchmark these ona collection of OOD scenes. However, no benchmark existsyet for such evaluations. Here, we present the CARNOVELautonomous driving online control benchmark for evaluat-ing robustness to distribution shifts. In contrast to existingapproaches (Ros et al., 2019), we assess the effectiveness ofAD methods to (a) detect novel driving scenes (b) recoverfrom them and (c) provided online feedback, adapt to dis-tribution shifts. We simulate distribution shifts in CARLA,by varying either (i) the map topology (Figure 4a, 4b) or(ii) the distribution of the other agents (i.e., pedestrians anddrivers – Figure 4c, 4d) between train and test scenarios. Asillustrated in Figure 4, the statistics of the evaluation tasksare dissimilar to the training ones, requiring extrapolation,a generalization of learned strategies.

(a) In-distribution (Town01) (b) Distribution shift (Town03)

train eval

0 100 200 300 400Number of agents [#]

(c) Population distribution

0 10 20 30Speed [km/h]

(d) Speed distribution

Figure 4. The map topology of (a) in-distribution differs from (b)evaluation (e.g., multiple lanes and roundabouts). The populationsize (c) and speed (d) of the other agents varies too (normalizedhistograms that sum to 1).

3.1. Training

During training, access is granted to (a) the CARLA simula-tor for Town01; (b) a dataset of time-profiled expert trajec-tories of sequential positions, paired with high-dimensionalobservations of the corresponding scenes. The latter is col-lected by recording the rule-based CARLA autopilot (Doso-vitskiy et al., 2017) in Town01. Future work lies in match-ing the observations of open-source real driving data (Caesar

Page 5: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

(a) Epistemic uncertainty (b) Aleatoric uncertainty

Figure 5. The disentanglement of the two types of uncertainties(a) the epistemic uncertainty, quantified by the mutual informa-tion between the model parameters posterior and the distributionover trajectories, is higher in out-of-training distribution scenesin Town03 and Town05 compared to in-distribution Town01and Town02 and (b) the aleatoric uncertainty, measured by theentropy of the distribution over trajectories, is not indicative of out-of-distribution scenes. Details on the calculation of these quantitiesare provided in Appendix G.

et al., 2019; Sun et al., 2019; Kesten et al., 2019) to the sim-ulated ones to allow for richer expert behaviours within thesimulator.

3.2. Evaluation

During the evaluation phase, the method under considerationgets deployed on CARLA Town03, Town04 or Town05.The selected routes involve OOD scenarios (e.g., spawnednear roundabouts which do not exist in Town01-02). Weprovide more insights into the selection of these scenariosand examples in Appendix A. This is to avoid in-distributionevaluations, e.g., on straight street segments. The agent hasto complete navigation tasks without violating the rulesof the road or crashing into other agents (i.e., infractions).We repeat each scenario five times with a different initial(random) state for the simulator, which results in differentbehavior, density of other drivers, pedestrians and states forthe traffic lights. All methods have access to the same datamodalities (e.g., LIDAR, cameras), reviewed next.

3.3. Observations

Time-profiled observations are provided, from which dif-ferent methods can choose which modalities to use. Thesehave been selected to align with real specifications currentdeployed systems follow (Chai et al., 2019), including: po-sition, velocity, acceleration, goal location, navigation com-mand, LIDAR (cf. Figure 3c), first-person camera view (cf.Figure 3b). Details on the dimensionality and representationof each observation modality are provided at Appendix H.

-3 -2 -1 0time (in seconds)

0.000

0.025

0.050

0.075

0.100

0.125

0.150

I(s;p

(|

))

infractionssafe

Figure 6. The mutual information between the predictive distri-bution over trajectories q(s|x) and the posterior of the modelparameters p(θ|D) can be used for predicting infractions, up to3 seconds before an infraction occurs. The mutual information islow when the model is in-distribution and can safely navigate.

3.4. Metrics

The goal of CARNOVEL is to assess AD methods in terms oftheir ability to identify, recover from and adapt to distribu-tion shifts. We propose three metrics, each one addressingone of these properties.

Predictability of infractions. The correlation of infrac-tions and model uncertainty termed detection score is usedto measure a method’s ability to predict the out-of-trainingdistribution scenes that lead to catastrophic events. As dis-cussed by Michelmore et al. (2018), we look at time win-dows of 4 seconds (Taoka, 1989; Coley et al., 2009). Amethod that can detect potential infractions should havehigh detection score.

Recovery from distribution shift. The percentage ofsuccessful manoeuvres in novel scenes — where theuncertainty-unaware methods fail — is used to quantifya method’s ability to recover from distribution shifts. Werefer to this metric as recovery score. A method that is obliv-ious to novelty should have 0% recovery score, but positiveotherwise.

Adaptability to novelty. We suggest the adaptabilityscore, given by the percentage reduction of infractions perkilometer after online feedback. A non-adaptive methoddoesn’t improve after feedback and hence should have 0%adaptability score, while an adaptive method should have apositive score. Catastrophic forgetting can lead to negativeadaptability score.

3.5. Baselines

We compare RIP against the current state-of-the-art imita-tion learning methods in the CARLA benchmark (Rhinehart

Page 6: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

et al., 2020; Chen et al., 2019). For a fair comparison, weuse the same observation modalities (i) first-person cam-era view; (ii) position; (iii) velocity and (iv) goal locationor command. More details on the exact implementationused for these baselines is provided in Appendix B. We alsoprovide a baseline that has access to the simulator groundtruth state instead of perception observation – privilegedinformation that cannot be used in real world.

(a) RIP (b) AdaRIP

Figure 7. Qualitative comparison of non-adaptive and adaptivemethods: (a) RIP detect out-of-distribution (dark red) but failsto recover, leading to a collision; (b) AdaRIP queries the humandriver which reduces its epistemic uncertainty (light white) andallows it to solve the scene. Both columns share the same colorbar, where low uncertainty is light red (white) and high uncertaintyis dark red.

4. Experimental ResultsWe collect the results for the baselines and our method RIPon CARNOVEL in Table 2. We demonstrate that all base-lines, e.g., deep imitative models (Rhinehart et al., 2020,DIM) and learning by cheating (Chen et al., 2019, LbC),when trained in CARLA Town01, without any tuning, solveTown02 with 100%. However, LbC performs very poorly

(a) RIP (our method) (b) LbC

Figure 8. Uncertainty maps for (a) robust imitative planning (RIP,our method) and (b) learning by cheating (Chen et al., 2019, LbC),overlaid on CARLA Town03 (distribution shift). Both columnsshare the same color bar, where low uncertainty is light red (white)and high uncertainty is dark red. We observe that RIP’s uncertaintyis high in unfamiliar states, e.g., roundabouts (top row) , 45 angleturns (middple row) and hills (bottom row), while LbC’s aleatoricuncertainty is almost flat.

in Town03, Town04 and Town05 where the presence of(i) roundabouts; (ii) hills and (iii) multiple lanes is out-of-distribution for the models. Refer to Figure 4 for a qualita-tive comparison of Town01’s and Town03’s map topolo-gies and to Appendix F for the remaining towns. Interest-ingly, the baseline with access to the simulator’s groundtruth (LbC-GT) scores very poorly in all out-of-distributiontowns too. Consequently, a richer and more structured in-put representation is not succifient to safely generalize toout-of-distribution scenarios. Next we provide a focusedanalysis of the results, in terms of the metrics introduced inSection 3.4.

Page 7: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

Table 2. We evaluate different autonomous driving methods in terms of their robustness to distribution scene, under our new benchmark,CARNOVEL. All methods are trained on CARLA Town01 using imitation learning on the autopilot (Dosovitskiy et al., 2017). A “♣”indicates methods that use first-person camera view (see Figure 3b) and a “♦” methods that use the ground truth game engine state (seeFigure 3a). A “F” indicates that we used the reference implementation from the original paper, otherwise we used our implementation.For all the towns we chose pairs of start-destination locations and ran 5 trials with randomized intial simulator state for each pair.

Town02 (in-distribution) Town03 (out-of-distribution)

Success ↑ Ran Red Light ↓ Infraction per km ↓ Success ↑ Ran Red Light ↓ Infraction per km ↓Methods (12× 5 scenes) (variable total number) (×1e− 3) (14× 5 scenes) (variable total number) (×1e− 3)

LbC♣F (Chen et al., 2019) 100% 7.2% 0 7.1% 33.3% 15.1DIM♣ (Rhinehart et al., 2020) 100% 4.8% 0 7.1% 25.0% 13.7

LbC-GT♦F (Chen et al., 2019) 100% 2.3% 0 7.1% 0.0% 12.3

RIP-EM♣ (ours, cf. Section 2.2.2) 100% 1.1% 0 14.3% 25.0% 13.8RIP-WCM♣ (ours, cf. Section 2.2.1) 100% 2.7% 0 14.3% 0.0% 12.4

Town04 (out-of-distribution) Town05 (out-of-distribution)

Success ↑ Ran Red Light ↓ Infraction per km ↓ Success ↑ Ran Red Light ↓ Infraction per km ↓Methods (17× 5 scenes) (variable total number) (×1e− 3) (15× 5 scenes) (variable total number) (×1e− 3)

LbC♣F (Chen et al., 2019) 0% 27.4% 11.6 0% 23.0 17.6DIM♣ (Rhinehart et al., 2020) 0% 18.3% 10.4 0% 24.2 13.1

LbC-GT♦F (Chen et al., 2019) 0% 0.0% 4.2 0% 44.4% 6.7

RIP-EM♣ (ours, cf. Section 2.2.2) 5.8% 17.2% 5.3 6.7% 21.4% 11.2RIP-WCM♣ (ours, cf. Section 2.2.1) 5.8% 21.1% 6.1 6.7% 20.0% 12.3

4.1. Identifying OOD

In Figure 6, RIP’s epistemic uncertainty is used to de-tect future, potential infractions. We observe that the un-cerainty spikes up to 3 seconds before an infraction, whileit stays flat for safe trajectories. Moreover, in Figure 5a,we visualize RIP’s epistemic uncertainty (i.e., mutual in-fromation between model parameters posterior distributionand predictive distribution over trajectories). We collectthese values through the different tasks and then createthese “smoothed histograms”, aggregated by town. Wenotice that in the out-of-training-distribution scenarios ofTown03 and Town05, RIP’s uncertainty is higher com-pared to the in-distribution towns. When we repeat thesecalculations for LbC’s aleatoric uncertainty in Figure 5b,we do not recover any useful detection mechanism for out-of-distribution scenes. Lastly, Figure 8 illustrated RIP’shigh uncertainty (dark red) in out-of-distribution scenes,e.g., roundabouts and T-junctions on hills, while the LbCbaseline is oblivious of the novelty of the scene, leading toconfident but catastrophic outcome. Next we analyze RIP’sability to recover from unfamiliar scenes.

4.2. Recovering from OOD

RIP’s mechanism for taking epistemic uncertainty into ac-count during planning enables recovery from some distribu-tion shifts. This is reflected to its improvement in successrate over the baselines, as summarized in Table 2, as well asits up to 196.2% improvement in infractions per kilometer,compared to the second best baseline, DIM (Rhinehart et al.,2020). Despite RIP’s improvement over the baselines on

the detection and recovery scores (see Section 3.4), it is in-adequate to be deployed in the real world. We next presenthow AdaRIP can use expert guidance in conjunction with itsepistemic uncertainty quantification for online adaptation.

4.3. Adapting to OOD

We evaluate AdaRIP’s adaptability score by selecting themost epistemically uncertain scenarios and asking for onlinedemonstrations from the autopilot (Dosovitskiy et al., 2017)on them. In Figure 7a, we see the models high epistemicuncertainty (dark red color) before expert feedback, whichleads to a catastrophic path. However, after the demon-strations from the autopilot, in Figure 7b, AdaRIP solvedconfidently (light red-white color) the same scene. In thenext section, we summarize our results and discuss futureresearch directions.

5. Related Work5.1. Imitation Learning

Learning from expert demonstrations (i.e., imitation learn-ing (Widrow & Smith, 1964; Pomerleau, 1989, IL)) is an at-tractive framework for sequential decision-making in safety-critical domains such as AD, where a parametric model istrained to stay in “safe”, expert-like parts of the state spaceand without the need of an explicit reward function.

Traditional behavioural cloning approaches (Liang et al.,2018; Sauer et al., 2018; Li et al., 2018; Codevilla et al.,2018; 2019; Chen et al., 2019) and density estimation-basedplanning methods (Rhinehart et al., 2020) fit point-estimates

Page 8: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

novel (OOD)

in-distribution

(a) Data distribution (b) Domain Randomization

ENC

(c) Domain adaptation (d) Online adaptation

Figure 9. Common approaches to distribution shift, as in (a) there are novel (OOD) points that are outside the support of the training data:(b) domain randomization (e.g., Sadeghi & Levine (2016)) covers the data distribution by exhaustively sampling configurations from asimulator; (c) domain adaptation (e.g., McAllister et al. (2019)) projects (or encodes) the (OOD) points to the in-distribution space and (d)online adaptation (e.g., Ross et al. (2011)) progressively expands the in-distribution space by incorporating online, external feedback.

to their model parameters, thus do not quantify their model(epistemic) uncertainty (Section 5.2). This is especiallyproblematic when estimating what an expert would or wouldnot do in unfamiliar, OOD scenes. In contrast, we seekan imitation learning method that does quantify epistemicuncertainty in order to both improve planning performanceand triage situations in which an expert should intervene.

5.2. Novelty Detection & Epistemic Uncertainty

A principled means to capture epistemic uncertaintyis with Bayesian inference to compute: q(s|x) =∫q(s|x;θ)p(θ|D) dθ. However, evaluating the poste-

rior p(θ|D) with exact inference is intractable for non-trivial models (Neal, 2012). Approximate inference meth-ods (Graves, 2011; Blundell et al., 2015; Gal & Ghahramani,2016; Hernandez-Lobato & Adams, 2015) have been intro-duced that can efficiently capture epistemic uncertainty.

One approximation for epistemic uncertainty in deep modelsis model ensembles (Lakshminarayanan et al., 2017; Chuaet al., 2018). Prior work by Kahn et al. (2017) and Kentonet al. (2019) use ensembles of deep models to detect andavoid catastrophic actions in navigation tasks, although theycan not recover (cf. RIP in Section 2) from or adapt (cf.AdaRIP in Section 2.3) to distribution shifts.

5.3. Coping with Distribution Shift

Several approaches have been taken to cope with distribu-tion shifts, including (a) domain randomization; (b) domainadaptation and (c) online adaptation. Domain randomiza-tion assumes access to a simulator and exhaustively searchesfor configurations that cover all the data distribution sup-port in order to eliminate OOD scenes, as illustrated inFigure 9b. This approach has been successfully used insimple robotic tasks (Sadeghi & Levine, 2016; OpenAIet al., 2018; Akkaya et al., 2019) but it is impractical foruse in large, real-world tasks, such as AD. Domain adapta-

tion and bisimulation (Castro & Precup, 2010), depicted inFigure 9c, tackle OOD points by projecting them back toin-distribution points, that are “close” to training points ac-cording to some metric. Despite its success in simple visualtasks (McAllister et al., 2019), it has no guarantees underarbitrary distribution shifts. In contrast, online learningmethods (Cesa-Bianchi & Lugosi, 2006; Ross et al., 2011;Zhang & Cho, 2016; Cronrath et al., 2018) have no-regretguarantees and, provided frequent expert supervision, theyasymptotically cover the whole data distribution’s support,adaptive to any distribution shift, as shown in Figure 9d. Inorder to continually cope with distribution shift, a learnermust receive interactive feedback (Ross et al., 2011), how-ever, the frequency of this costly feedback should be min-imised. Our epistemic uncertainty-aware method, RIP, cancope with some OOD events, thereby reducing the system’sdependency on expert feedback, and can use this uncertaintyto decide when it cannot cope–when the expert must inter-vene. The expert interventions–feedback–can be used foronline adaptation, as done by AdaRIP.

5.4. Autonomous Driving Benchmarks

We are interested in the control problem, where AD agentsget deployed in reactive environments and make sequentialdecisions. The CARLA Challenge (Ros et al., 2019; Doso-vitskiy et al., 2017; Codevilla et al., 2019) is an open-sourcebenchmark for control in AD. It is based on 10 traffic scenar-ios from the NHTSA pre-crash typology (National HighwayTraffic Safety Administration, 2007) to inject challengingdriving situations into traffic patterns encountered by ADagents. The methods are only assessed in terms of theirgeneralization to weather conditions, the initial state of thesimulation (e.g., the start and goal locations, and the randomseed of other agents.) and the traffic density (i.e., emptytown, regular traffic and dense traffic).

Despite these challenging scenarios selected in the CARLAChallenge, the agents are allowed to train on the same sce-

Page 9: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

narios in which they evaluated, and so the robustness todistributional shift is not assessed. Consequently, both Chenet al. (2019) and Rhinehart et al. (2020) manage to solve theCARLA Challenge with almost 100% success rate, whentrained in Town01 and tested in Town02. However, bothmethods score almost 0% when evaluated in Town03 dueto the presence of OOD roundabouts, as discussed in Sec-tion 3. We next discuss imitation learning, a successfulapproach to sequential decision-making in safety-criticaldomains.

6. DiscussionCan autonomous vehicles identify, recover from, and adaptto distribution shifts? No prior work has developed abenchmark to answer this question. Using our bench-mark, CARNOVEL, which we release and encourage otherresearchers to use (see Appendix D for how to use it), wefound that several existing state-of-the-art simulated au-tonomous driving methods can neither identify nor recoverfrom distribution shifts. We propose metrics that explicitlycapture these requirements, provided under our evaluationframework. Even methods that have direct access to the sim-ulator’s ground truth state fail to generalise out-of-training-distribution scenes and fail catastrophically.

We demonstrated that by leveraging epistemic uncertainty,our method, RIP, could identify and recover from distribu-tion shifts more reliably than prior work. We believe thatepistemic-uncertainty-aware techniques may be critical tothe successful identification of and adaptation to distribu-tion shifts. Provided expert, online feedback, the uncertaintyquantification can be ask for expert guidance to guaranteecurrent safety and enhance future performance via onlineadaptation. We showed that AdaRIP can first successfullyidentify novel scenes, and, after expert supervision, adapt tothese scenes — confidently and successfully solving themin the future.

6.1. Future Work

Although AdaRIP can adapt to any distribution shift, it isprone to catastrophic forgetting and sample-inefficiency, asmany online methods (French, 1999). In this paper, weonly demonstrate AdaRIP’s efficacy to adapt under distri-bution shifts and do not address either of these limitations.Future work lies in providing a practical, sample-efficientalgorithm to be used in conjunction with the AdaRIP frame-work. Methods for efficient (e.g., few-shot or zero-shot)and safe adaptation (Finn et al., 2017; Zhou et al., 2019) areorthogonal to AdaRIP and hence any improvement in thesefields could be directly used for AdaRIP.

ReferencesAkkaya, I., Andrychowicz, M., Chociej, M., Litwin, M.,

McGrew, B., Petron, A., Paino, A., Plappert, M., Powell,G., Ribas, R., et al. Solving Rubik’s cube with a robothand. arXiv preprint arXiv:1910.07113, 2019.

Amodei, D., Olah, C., Steinhardt, J., Christiano, P., Schul-man, J., and Mane, D. Concrete problems in AI safety.arXiv preprint arXiv:1606.06565, 2016.

Barber, D. Bayesian reasoning and machine learning. Cam-bridge University Press, 2012.

Bellman, R. E. Adaptive control processes: a guided tour.Princeton university press, 2015.

Blundell, C., Cornebise, J., Kavukcuoglu, K., and Wierstra,D. Weight uncertainty in neural networks. arXiv preprintarXiv:1505.05424, 2015.

Caesar, H., Bankiti, V., Lang, A. H., Vora, S., Liong, V. E.,Xu, Q., Krishnan, A., Pan, Y., Baldan, G., and Beijbom, O.nuscenes: A multimodal dataset for autonomous driving.arXiv preprint arXiv:1903.11027, 2019.

Castro, P. S. and Precup, D. Using bisimulation for pol-icy transfer in MDPs. In AAAI Conference on ArtificialIntelligence, 2010.

Cesa-Bianchi, N. and Lugosi, G. Prediction, learning, andgames. Cambridge University Press, 2006.

Chai, Y., Sapp, B., Bansal, M., and Anguelov, D. Multipath:Multiple probabilistic anchor trajectory hypotheses forbehavior prediction. arXiv preprint arXiv:1910.05449,2019.

Chen, D., Zhou, B., Koltun, V., and Krahenbuhl, P. Learningby cheating. arXiv preprint arXiv:1912.12294, 2019.

Cho, K., Van Merrienboer, B., Gulcehre, C., Bahdanau,D., Bougares, F., Schwenk, H., and Bengio, Y. Learn-ing phrase representations using rnn encoder-decoderfor statistical machine translation. arXiv preprintarXiv:1406.1078, 2014.

Chua, K., Calandra, R., McAllister, R., and Levine, S. Deepreinforcement learning in a handful of trials using proba-bilistic dynamics models. In Neural Information Process-ing Systems (NeurIPS), pp. 4754–4765, 2018.

Codevilla, F., Miiller, M., Lopez, A., Koltun, V., and Doso-vitskiy, A. End-to-end driving via conditional imitationlearning. In International Conference on Robotics andAutomation (ICRA), pp. 1–9. IEEE, 2018.

Page 10: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

Codevilla, F., Santana, E., Lopez, A. M., and Gaidon, A.Exploring the limitations of behavior cloning for au-tonomous driving. In International Conference on Com-puter Vision (ICCV), pp. 9329–9338, 2019.

Coley, G., Wesley, A., Reed, N., and Parry, I. Driver reactiontimes to familiar, but unexpected events. TRL PublishedProject Report, 2009.

Cronrath, C., Jorge, E., Moberg, J., Jirstrand, M.,and Lennartson, B. BAgger: A Bayesian al-gorithm for safe and query-efficient imitationlearning. https://personalrobotics.cs.washington.edu/workshops/mlmp2018/assets/docs/24_CameraReadySubmission_180928_BAgger.pdf, 2018.

Dosovitskiy, A., Ros, G., Codevilla, F., Lopez, A., andKoltun, V. CARLA: An open urban driving simulator.arXiv preprint arXiv:1711.03938, 2017.

Embrechts, P., Kluppelberg, C., and Mikosch, T. Modellingextremal events: for insurance and finance, volume 33.Springer Science & Business Media, 2013.

Finn, C., Abbeel, P., and Levine, S. Model-agnostic meta-learning for fast adaptation of deep networks. In Inter-national Conference on Machine Learning (ICML), pp.1126–1135, 2017.

French, R. M. Catastrophic forgetting in connectionist net-works. Trends in cognitive sciences, 3(4):128–135, 1999.

Gal, Y. Uncertainty in deep learning. PhD thesis, 2016.

Gal, Y. and Ghahramani, Z. Dropout as a Bayesian approx-imation: Representing model uncertainty in deep learn-ing. In International Conference on Machine Learning(ICML), pp. 1050–1059, 2016.

Graves, A. Practical variational inference for neuralnetworks. In Neural Information Processing Systems(NeurIPS), pp. 2348–2356, 2011.

He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learn-ing for image recognition. In Proceedings of the IEEEconference on computer vision and pattern recognition,pp. 770–778, 2016.

Hernandez-Lobato, J. M. and Adams, R. Probabilistic back-propagation for scalable learning of Bayesian neural net-works. In International Conference on Machine Learning(ICML), pp. 1861–1869, 2015.

Kahn, G., Villaflor, A., Pong, V., Abbeel, P., and Levine, S.Uncertainty-aware reinforcement learning for collisionavoidance. arXiv preprint arXiv:1702.01182, 2017.

Kenton, Z., Filos, A., Evans, O., and Gal, Y. Generalizingfrom a few environments in safety-critical reinforcementlearning. arXiv preprint arXiv:1907.01475, 2019.

Kesten, R., Usman, M., Houston, J., Pandya, T., Nadhamuni,K., Ferreira, A., Yuan, M., Low, B., Jain, A., Ondruska,P., Omari, S., Shah, S., Kulkarni, A., Kazakova, A., Tao,C., Platinsky, L., Jiang, W., and Shet, V. Lyft level 5 avdataset 2019, 2019. URL https://level5.lyft.com/dataset/.

Kingma, D. P. and Ba, J. Adam: A method for stochasticoptimization. arXiv preprint arXiv:1412.6980, 2014.

Lakshminarayanan, B., Pritzel, A., and Blundell, C. Simpleand scalable predictive uncertainty estimation using deepensembles. In Neural Information Processing Systems(NeurIPS), pp. 6402–6413, 2017.

Leike, J., Martic, M., Krakovna, V., Ortega, P. A., Everitt,T., Lefrancq, A., Orseau, L., and Legg, S. AI safetygridworlds. arXiv preprint arXiv:1711.09883, 2017.

Levine, S., Finn, C., Darrell, T., and Abbeel, P. End-to-end training of deep visuomotor policies. The Journal ofMachine Learning Research, 17(1):1334–1373, 2016.

Li, Z., Motoyoshi, T., Sasaki, K., Ogata, T., and Sugano, S.Rethinking self-driving: Multi-task knowledge for bettergeneralization and accident explanation ability. arXivpreprint arXiv:1809.11100, 2018.

Liang, X., Wang, T., Yang, L., and Xing, E. Cirl: Control-lable imitative reinforcement learning for vision-basedself-driving. In European Conference on Computer Vision(ECCV), pp. 584–599, 2018.

McAllister, R., Kahn, G., Clune, J., and Levine, S. Robust-ness to out-of-distribution inputs via task-aware genera-tive uncertainty. In International Conference on Roboticsand Automation (ICRA), pp. 2083–2089. IEEE, 2019.

Michelmore, R., Kwiatkowska, M., and Gal, Y. Evaluat-ing uncertainty quantification in end-to-end autonomousdriving control. arXiv preprint arXiv:1811.06817, 2018.

National Highway Traffic Safety Administration. Pre-crashscenario typology for crash avoidance research, 2007.URL https://www.nhtsa.gov/sites/nhtsa.dot.gov/files/pre-crash_scenario_typology-final_pdf_version_5-2-07.pdf.

Neal, R. M. Bayesian learning for neural networks, volume118. Springer Science & Business Media, 2012.

OpenAI, M. A., Baker, B., Chociej, M., Jozefowicz, R., Mc-Grew, B., Pachocki, J., Petron, A., Plappert, M., Powell,

Page 11: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

G., Ray, A., et al. Learning dexterous in-hand manipula-tion. arXiv preprint arXiv:1808.00177, 2018.

Pomerleau, D. A. Alvinn: An autonomous land vehiclein a neural network. In Neural Information ProcessingSystems (NeurIPS), pp. 305–313, 1989.

Quionero-Candela, J., Sugiyama, M., Schwaighofer, A., andLawrence, N. D. Dataset shift in machine learning. MITPress, 2009.

Rhinehart, N., Kitani, K. M., and Vernaza, P. R2P2: Areparameterized pushforward policy for diverse, precisegenerative path forecasting. In European Conference onComputer Vision (ECCV), pp. 772–788, 2018.

Rhinehart, N., McAllister, R., and Levine, S. Deep imitativemodels for flexible inference, planning, and control. InInternational Conference on Learning Representations(ICLR), April 2020.

Ros, G., Koltun, V., Codevilla, F., and Lopez, M. A. CARLAchallenge, 2019. URL https://carlachallenge.org.

Ross, S., Gordon, G., and Bagnell, D. A reduction ofimitation learning and structured prediction to no-regretonline learning. In Artificial Intelligence and Statistics(AISTATS), pp. 627–635, 2011.

Sadeghi, F. and Levine, S. Cad2rl: Real single-imageflight without a single real image. arXiv preprintarXiv:1611.04201, 2016.

Sauer, A., Savinov, N., and Geiger, A. Conditional affor-dance learning for driving in urban environments. arXivpreprint arXiv:1806.06498, 2018.

Snoek, J., Ovadia, Y., Fertig, E., Lakshminarayanan, B.,Nowozin, S., Sculley, D., Dillon, J., Ren, J., and Nado,Z. Can you trust your model’s uncertainty? evaluatingpredictive uncertainty under dataset shift. In Neural Infor-mation Processing Systems (NeurIPS), pp. 13969–13980,2019.

Sugiyama, M. and Kawanabe, M. Machine learning in non-stationary environments: Introduction to covariate shiftadaptation. MIT press, 2012.

Sun, P., Kretzschmar, H., Dotiwalla, X., Chouard, A., Pat-naik, V., Tsui, P., Guo, J., Zhou, Y., Chai, Y., Caine,B., et al. Scalability in perception for autonomousdriving: An open dataset benchmark. arXiv preprintarXiv:1912.04838, 2019.

Tang, Y. C., Zhang, J., and Salakhutdinov, R. Worst casespolicy gradients. arXiv preprint arXiv:1911.03618, 2019.

Taoka, G. T. Brake reaction times of unalerted drivers. ITEjournal, 59(3):19–21, 1989.

Wald, A. Contributions to the theory of statistical estimationand testing hypotheses. The Annals of MathematicalStatistics, 10(4):299–326, 1939.

Widrow, B. and Smith, F. W. Pattern-recognizing controlsystems, 1964.

Zhang, J. and Cho, K. Query-efficient imitation learn-ing for end-to-end autonomous driving. arXiv preprintarXiv:1605.06450, 2016.

Zhou, A., Jang, E., Kappler, D., Herzog, A., Khansari, M.,Wohlhart, P., Bai, Y., Kalakrishnan, M., Levine, S., andFinn, C. Watch, try, learn: Meta-learning from demon-strations and reward. arXiv preprint arXiv:1906.03352,2019.

Page 12: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

A. ScenariosA selection of test scenarios from the CARNOVEL bench-mark and the performance of the different baselines and RIPare presented next.

(a) LbC (b) DIM (c) RIP (our method)

Figure 10. The trajectories followed at challenging out-of-distribution scenarios by the different methods overlaid on theoverhead map.

Table 3. Quantitative analysis of the methods on challenging, out-of-distribution scenarios. A “♣” indicates methods that use first-person camera view (see Figure 3b) and a “♦” methods that use theground truth game engine state (see Figure 3a). A “F” indicatesthat we used the reference implementation from the original paper,otherwise we used our implementation. We ran 5 trials per scenariowith randomized intial simulator state.

Roundabouts (out-of-distribution)

Success ↑ Infraction per km ↓Methods (4× 5 scenes) (×1e− 3)

LbC♣F (Chen et al., 2019) 0% 90.3DIM♣ (Rhinehart et al., 2020) 5% 77.8

LbC-GT♦F (Chen et al., 2019) 0% 63.1

RIP-EM♣ (ours) 20% 32.9RIP-WCM♣ (ours) 15% 47.6

Hill T-Junctions (out-of-distribution)

Success ↑ Infraction per km ↓Methods (1× 5 scenes) (×1e− 3)

LbC♣F (Chen et al., 2019) 0% 87.3DIM♣ (Rhinehart et al., 2020) 0% 82.2

LbC-GT♦F (Chen et al., 2019) 0% 77.6

RIP-EM♣ (ours) 0% 70.1RIP-WCM♣ (ours) 0% 73.8

45Angle Turns (out-of-distribution)

Success ↑ Infraction per km ↓Methods (1× 5 scenes) (×1e− 3)

LbC♣F (Chen et al., 2019) 0% 22.1DIM♣ (Rhinehart et al., 2020) 0% 32.6

LbC-GT♦F (Chen et al., 2019) 0% 27.9

RIP-EM♣ (ours) 0% 19.6RIP-WCM♣ (ours) 0% 18.2

Highways (out-of-distribution)

Success ↑ Infraction per km ↓Methods (8× 5 scenes) (×1e− 3)

LbC♣F (Chen et al., 2019) 32.5% 32.6DIM♣ (Rhinehart et al., 2020) 65.0% 24.2

LbC-GT♦F (Chen et al., 2019) 35.5% 18.1

RIP-EM♣ (ours) 82.5% 22.3RIP-WCM♣ (ours) 72.5% 24.7

Page 13: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

B. Baselines ImplementationLearning by Cheating. We use the official implementa-tion provided by the authors, and their hosted LbC and LbC-GT models github.com/dianchen96/LearningByCheating/.

Deep Imitative Models. We provide out own1 implemen-tation of DIM. In contrast to Rhinehart et al. (2020), whoused LIDAR observations, and in order to provide a faircomparison between the baselines, we use first-person cam-era view observation. For the encoder, we use the samemodel architecture and hyperparameters with LbC (Chenet al., 2019), while for the decoder we use a GRU (Cho et al.,2014) cell and a fully-connected output layer for the mean,µt ∈ R2, and covariance, Σt ∈ R2×2

�0 , outputs. We alsoperform on-policy training (i.e., policy distillation) with theprivileged agent, as in LbC (Chen et al., 2019), which wefind to be very important for reaching 100% success ratein-distribution.

However, we noticed that during this policy distillationphase the student agent rarely but confidently makes sys-tematic mistakes. We hypothetize that this is because ofthe teacher’s–privileged agent’s– epistemic uncerainty notbeing captured and hence propagated to the student, whichbecomes epistemically confident about OOD scenes. Futurework lies in exploring the impact of uncerainty in the policydistillation phase.

C. HyperparametersRobust imitative planning (RIP) comprises of an ensembleof K = 4 DIM models. The network hyperparameters aresummarized:

Backbone Vision Model ResNet34 (He et al., 2016)Decoder GRU (Cho et al., 2014) cell, 64 hidden units

Optimizer ADAM (Kingma & Ba, 2014), learning rate 1e− 4Batch Size 24

Observation first-person camera view (see Figure 3b) & velocity

D. CodebaseThe code used for the experiments, Section 4, is madeavailable. Follow the <root>/README.md file forinstallation instructions and details on how to reproducethe experiments. The training scripts can be found in<root>/carnovel baselines/*/train.py, andthe evaluation of the different methods is done by the<root>/carnovel baselines/*/benchmark.pyscripts.

1To the best of our knowledge, this is the first open-sourceimplementation of DIM.

E. Download DataThe expert demonstrations collected from CARLA Town01is publicly hosted at [add the link to Google Drive]. Thedata is consumed by the training scripts, and no postpro-cessing is required. The command line arguments can beused to specify the full path to the downloaded dataset fortraining the models.

F. CARLA TownsIn addition to Figure 4a and Figure 4b, Figure 11 depicts theremaining 3 CARLA towns used in CARNOVEL. We alsohighlight the similarity, in terms of road topology, betweenTown01 and Town02 which are used exclusively for eval-uating autonomous drivng methods, by existing evaluationtools (Ros et al., 2019).

(a) Town02 (b) Town04 (c) Town05

Figure 11. The remaining CARLA town topologies.

G. Uncertainty Estimates CalculationLbC Aleatoric Uncertainty. The LbC model (Chen et al.,2019) uses a spatial softmax (Levine et al., 2016) at its ouputlayer, and assumes temporal (i.e. causal) independence ofthe predictions

p(s) = p(s1, . . . , sT |x)

=

T∏t=1

p(st|x)︸ ︷︷ ︸T SpatialSoftmax heads

(6)

We use the softmax layer activations ptij where i ∈{0, . . . ,H−1} and j ∈ {0, . . . ,W −1} to calculate the en-tropy,H(st) per time step t, and due to the assumed causalindependence of the predictions (see Eqn. (6)), we obtainthe entropy over the trajectoriesH(s) =

∑Tt=1H(st).

DIM Aleatoric Uncertainty. The DIM model (Rhinehartet al., 2018; 2020) parametrized directly the conditional den-sity of trajectories, hence we use this directly as a measureof aleatoric uncertainty.

Page 14: Can Autonomous Vehicles Identify, Recover From,and Adapt ... · 1. Introduction Autonomous agents hold the promise of systematizing decision-making to reduce catastrophes due to human

Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?

H. CARNOVEL Observations• position: ego vehicle’s global coordinates in R3.• velocity: ego vehicle’s velocity vector in R3.• acceleration: ego vehicle’s acceleration vector in R3.• goal location: world coordinates of a high-level way-

pointer (e.g., GPS navigator) in R3.• navigation command: high-level command (“fol-

lowlane”, “turn left”, “turn right”, “go straight”), ob-tained by processing the goal location (Codevilla et al.,2018; Liang et al., 2018; Sauer et al., 2018).

• LIDAR: processed LIDAR point-cloud, as doneby Rhinehart et al. (2020), see Figure 3c.

• first-person camera view: RGB camera view fromthe ego vehicle, see Figure 3b.

• ground truth simulator state2: a seven-channels grid,one channel each for (i) road, (ii) lane boundaries, (iii)vehicles, (iv) pedestrians, (v) traffic, (vi) lights and(vii) ego vehicle, as done by Chen et al. (2019), seeFigure 3a.

2available only during training.