Detecting and preventing imminent property violations is an important problem for the safe operation of autonomous robots in highly dynamic environments. Such violations include collisions between multiple robots, failure to respond to events or robots entering restricted areas. Detecting such violations at design time is often impractical: behaviors are dependent on possible environmental conditions. The space of possible behaviors is too large, or may not be completely known to the designers. Thus, runtime monitoring approaches have recently gained popularity. However, these approaches require a model of the robot’s motion to predict its future position. Recent approaches have employed such models to detect the possible positions that a robot can reach in the near future using physics-based dynamic models and reachability analysis [althoff2014online, liu2017provably, koschi2020set, chou2020predictive]. Similarly, a pattern-based approach predicts future positions based on historical data and predicts likely future positions [peddi2020datadriven] (Cf. [rudenko2020human] for a survey of trajectory prediction for dynamic agents).
However, forecasting future moves by extrapolating the past trajectories is often likely to fail unless we also have a specification of the task (or current subtask) that a robot is performing. In this paper, we term this as the robot’s (current/short term) intent. This approach assumes that the robot has a high-level mission or intent. Furthermore, the robot is assumed to choose an “efficient” plan for implementing the mission. The efficient path can be either the shortest path or the almost shortest path. In many scenarios, this assumption is reasonable since operators want robots to implement more missions with limited resources. Therefore, if a robot does not choose an efficient strategy for completing a task, we can deduce that either the robot is not rational or that our current model of the robot’s goals are incorrect [best2015bayesian, ahmad2016bayesian, hwang2008intent, yepes2007new, Fisac2018Probabilistically, fridovich2020confidence, bajcsy2019scalable].
In this paper, we use the robot’s intent information for predictive runtime monitoring. Our assumption is that, if a robot has a high-level mission, we are able to (1) not only infer the mission by observing its behavior (2) but also use the information to predict future positions. Therefore, the ability to find the intent is key in our work.
To that end, we use temporal logic formulas to represent the intent. Temporal logics have been quite popular for specifying missions in a precise manner and generating efficient plans for carrying them out [bhatia2010sampling, bhatia2010motion, fainekos2009temporal, kress2009temporal, humphrey2014formal, vasile2014reactive, ulusoy2013optimality]. Temporal logics have been demonstrated as suitable reprentations of complex real-world missions such as surveillance and package delivery [lj2019priority, humphrey2014formal, ferri2020cooperative, choudhury2020efficient]. We identify a subset of temporal logic formulas corresponding to the safety and guarantee formulas in the Manna-Pnueli hierarchy of temporal logic formulas [Manna+Pnueli/1989/Hierarchy]. Such formulas can be satisfied or violated by a finite prefix of an infinite sequence of actions and thus quite suitable as representations of “near-term”/“immediate” intents suitable for finite time horizon predictions of the robot’s position. The Bayesian intent inference framework then generates a finite set of possible intents using given patterns of temporal logic formulas and places a prior distribution on these formulas to represent the probability that a given formula represents the robot’s intent. Next, we use a model of “noisy rationality” to provide a probability that a robot takes a given action in the workspace given its true intent. This model compares the cost of the action and the most efficient path from the resulting state to the overall goal of the intent against other possible actions. We use temporal logic planning techniques based on converting formulas to automata and solving shortest path problems to compute these costs.
Temporal logic specification inference from observation data have been studied widely in the recent past [shah2018bayesian, kim2019bayesian, vazquez2020maximum, vazquez2018learning]. The main difference from our work is that they assume the entire trajectory is available at once, whereas we use the parts of the trajectory. Furthermore, our approach uses intents as a means to perform predictions of future positions.
We evaluate our framework on two datasets: a probabilistic roadmap simulation dataset, wherein we use the popular PRM planning technique to generate motion plans for some tasks while using our intent inference technique to predict the intents and future positions without knowledge of the overall mission plan. A second data set consists of trajectories of humans inside a room, called TḦOR [thorDataset2019]: here we are provided noisy position measurements with unknown intents. Thus, both datasets include a moving agent implementing various subtasks on the way to a goal, which is unknown to our monitor. The results show that our method can predict future positions with high accuracy, and all computations can be implemented in real-time.
The contributions of this paper are as follows:
We introduce a Bayesian intent inference framework leveraging an intent information of a robot. The framework computes the probability distribution of all possible intents written in LTL.
Using the outputs of the framework, we can effectively carry out predictive monitoring that can be used in many robotic applications.
All computations can be implemented with sufficient efficiency to enable real-time monitoring.
To the best of our knowledge, this work is the first attempt to use a logic-based Bayesian intent inference for predictive monitoring.
Ii Problem Formulation
Central to our framework is a “map” of the robot’s workspace that is discretized into finitely many cells. Each cell is labeled with an atomic proposition that characterizes the attributes of the cell. We use the mathematical model of a weighted finite transition system to capture the map (or the workspace) of the robot.
Definition 1 (Weighted Finite Transition System)
A weighted finite transition system is a tuple wherein is a finite set of cells, is the transition relation that represents all allowable moves from one cell to the next by the robot, is a set of boolean atomic propositions, is a labeling function that associates each cell with a set of atomic propositions , and maps each edge in to a non-negative weight.
Therefore, the position of a robot at time can be defined as a cell . Atomic propositions label attributes/features such as airport, fire, mountain, and so on (see Fig. 1). A path in is an infinite sequence of cells such that and for each .
Linear Temporal Logic
In this paper, we assume that a robot has a high-level mission to implement before going to a goal location. For example, “: Visit , and in some order”, or “: Visit while avoiding ”. To formally express such requirements, we use linear temporal logic (LTL) whose grammar is defined as follows:
In addition, two temporal operators, eventually () and globally () can be derived. The formula is satisfied if holds for all time and is satisfied if eventually at some point in time is satisfied. We refer the reader to standard texts for a detailed description of temporal logic and its applications [Manna+Pnueli/92/Temporal, Baier+Katoen/2008/Principles]. Using LTL, we can express the mission and . Using LTL is beneficial because it is capable of describing complex missions clearly although some fundamental properties like safety () and reachability () are mostly used for robot missions in many scenarios, and because it enables us to use temporal logic motion planning [bhatia2010sampling, bhatia2010motion, fainekos2009temporal, kress2009temporal, humphrey2014formal, vasile2014reactive, ulusoy2013optimality].
We assume full knowledge of the transition system is available at any time. Also, if the map is updated in the case of dynamic scenarios, the new information is assumed to be available immediately. On the other hand, the robot’s mission is assumed to be unknown but expressible as a temporal logic formula involving atomic propositions in the map.
In this paper, we investigate two problems — intent inference and predictive monitoring. Fig. 2 shows how these problems relate to each other in our proposed framework.
Intent Inference: Given a transition system and the recent history of robot cells at time , , we wish to infer a distribution of likely intents, wherein is a temporal logic formula involving atomic propositions , and is its associated probability with .
Predictive Monitoring: Given a distribution over intents, we wish to compute a distribution of future positions at time . At time , our approach receives new robot position , requiring updates to the intents, and the predicted future cell. This update needs to be computed in time that is much smaller than the overall sampling time.
Iii Bayesian Intent Inference
We first introduce our Bayesian approach to solve the intent inference problem. The idea of our approach is to generate possible intents as our hypotheses and evaluate their probabilities using Bayesian inference (see Fig. 2).
Iii-a Hypothesis Generation
Hypothesis generation is achieved using temporal logic specification patterns that have been explored in previous works (Cf. [humphrey2014formal, fainekos2009temporal]). Such patterns specify temporal logic formulae with “holes” that can be filled in with atomic propositions. Each such pattern defines a set of formulas obtained by substituting all possible atomic propositions of interest for each hole. To avoid potentially vacuous or inconsistent intents, we may further require that the same atomic proposition not be used in two distinct holes for a given template.
We list some commonly encountered patterns of interest below. We substitute an atomic proposition in the place of a hole denoted by “”, ensuring that the same proposition does not appear in more than one hole.
First and Then Second Region:
Reach While Avoid:
As a result, each pattern can be expanded out into a set of LTL formulae that represent possible intents of the agent.
Iii-B Temporal Logic and Büchi Automata
We recall the standard connection between temporal logics and automata on infinite strings, specifically Büchi automata [Wolper/2002/Constructing, Thomas/1990/Automata]. Let be a temporal logic formula over atomic propositions in . Recall such a formula can be encoded as a nondeterministic Büchi automaton.
Definition 2 (Büchi Automaton)
A Büchi automaton is a tuple wherein is a finite set of states; is a finite set of atomic propositions; is a set of transitions, wherein each transition indicates the transition from state to upon observing atomic proposition ; is an initial state and is the set of accepting state.
Given an infinite sequence of atomic propositions , a run of the automaton is an infinite sequence of states , such that is the initial state and for all . Finally, a run is accepting iff it visits an accepting state infinitely often. It is well-known that every LTL formula can be translated into a Büchi automaton [Manna+Pnueli/92/Temporal, Baier+Katoen/2008/Principles]. The problem of constructing a Büchi automaton from a LTL specification has been widely studied [gastin2001fast] with numerous tools such as SPOT [duret.16.atva2].
Safety/Guarantee Formulas and Automata
In this paper, we focus on a very specific class of safety and guarantee formulas, originally introduced by Manna & Pnueli as part of a larger classification of all LTL formulas [Manna+Pnueli/1989/Hierarchy]. Briefly, safety formulas can be written using the operator with negations appearing only in front of atomic propositions, whereas guarantee formulas are written using the operator with negations appearing only in front of atomic propositions.
Going back to the Example 1, we note that the “avoid regions” pattern is a safety formula, whereas the “cover regions” and “temporal sequencing” patterns are guarantee formulas. Note that the coverage with the safety pattern is the conjunction of a guarantee sub-formula (involving ) and a safety sub-formula (involving ).
Assumption: We will assume that any hypothesis being considered can be written as
wherein is disjoint from , and (i.e, ). Such a formula represents the intent that the robot seeks to reach all regions labeled by atomic propositions in the set , in some order, while avoiding all regions in A. More generally, however, our framework can accommodate the conjunction of safety formulas and guarantee formulas.
However, since our framework is probabilistic it associates a measure of belief/probability with each hypothesis. Also, since our framework is dynamic, these probabilities change over time. Thus, it is possible for our framework to implicitly infer a more complex high level objective that is not expressible in our restricted fragment of LTL. We will explore this aspect of our work further in the future.
We now consider a special type of Büchi automaton that we will call a safety-guarantee automaton.
Definition 3 (Safety-Guarantee Automaton)
A Büchi automaton is said to be a safety-guarantee automaton if the set of states is partitioned into three mutually disjoint parts: wherein (a) the initial state , (b) is a set of “transient” states such that no state in is accepting; (c) is the set of accepting states, and (d) is a special reject state. Furthermore, the outgoing edges from each state in either take us to a state in or to the reject state . Finally, all outgoing edges from are self-loops back to . Fig. LABEL:fig:safety-guarantee-aut illustrates safety-guarantee automata.