The team at TNO set out to combine knowledge of human driving — e.g. ethics, laws, norms, preferences, common environmental understanding — with the technological side of autonomous driving — e.g. control theory, data-driven AI, black-box algorithms (DNN), and end-to-end learning. To achieve this and be able to reason over the collective knowledge, they used TypeDB.
An example where the combination of this knowledge demonstrates its value is when hardcoded knowledge meets contextual knowledge of a given situation in time. Let’s say an autonomous vehicle is programmed to drive slower in school zones, obviously needed for safety, but what about when the school is closed? Does the vehicle still need to drive at a slower speed?
What about when that vehicle encounters something it does not recognise — say a pile of leaves? Willeke’s team found that when their vehicle encountered something unfamiliar, it would brake or stop as a default action. In the future, using TypeDB as the central knowledge of both humans and AI, they would like for the vehicle to reason about the situation.
A vehicle would for example reason as follows: “I [the vehicle] don’t know what this is, but I can reason that it is not a traffic participant, not something that can get hurt, or can move. I know the context, I know that there is no one around, that it is late in the evening. I know that my actions, the risk of the action, means I can go around it and continue on the journey.”
This process brings to mind an OODA loop: Observe, Orient, Decide, Act. The focus of Willeke’s work was in the Orient and Decide steps, the reasoning process, which starts with situational awareness.
Understand the Environment
With situational awareness at the heart of this understanding, there are three inputs: knowledge about the automotive domain, sensor information from other sources, information about current surroundings from other sources (e.g. a map of the environment).
These inputs take the form of an automotive domain schema that includes knowledge about infrastructure, traffic rules and laws, traffic signs, etc. We can see a subset of the automotive domain schema with some data in the visualisation below, as well as two examples of traffic rules that can be translated into rules in TypeDB that allow the vehicle to reason:
The other two inputs of the schema include real-time feedback from sensors on the car and perceived information from other resources like traffic prediction algorithms, intention predictors and POIs (points of interest like a school). This information is used to describe the current environment the vehicle is in and is used in reasoning rules to understand the vehicle’s competence in that situation. Below we can see how data from on-vehicle sensors can calculate things like the distance between vehicles, the speed of vehicles around the car, and positioning within a traffic lane.
The team is trying to combine all this information to build some situational awareness in the knowledge graph.
Understand and Reason About the Vehicle’s Own Competence
Willeke went into some detail on the context of the system used for prediction and then used these predictions in the decision-making of the autonomous vehicle. For the purposes of this blog, I want to talk about the implementation within TypeDB. How are these prediction algorithms and data input being modelled and used in autonomous vehicles?
Within the environmental model, TNO implemented values like feature uncertainty, prediction value, importance, visibility, and doubt in the ontology to help the AI to understand the situation the vehicle is in and take safe and effective actions.
importance is encoded by domain experts, knowledge about lane changes, and the importance of distance between entities (vehicles on the road). While
doubt is the measure of uncertainty, knowledge like unknown physical entities, high feature uncertainty, low visibility, or the uncertainty of a classifier. In the image below, we see how these attributes and entities are modelled in TypeDB so that as the vehicle moves down the road and encounters a situation, it can reason over real-time data and outputs from the algorithm to make decisions about what to do next.
How might this look in practice? Below we get the same model instantiated with some data about your car approaching a truck and making a decision whether to change lanes and surpass the truck or handoff to a human driver.
How does this decision on whether to pass the truck or handoff to the human driver get made? Action selection incorporates the modelling in TypeDB described above, some Machine Learning, and a planner; here we get into the specific actions that the vehicle can perform and how decisions are made.
For a bit of background, in this type of decision making we want to take actions:
brake, accelerate, switch lane, based on the current situation, and we want to do this fast (10x/sec).
The team at TNO train their own algorithms. This is done by taking in the sensor data from the vehicle and encoding it with state and action information. The ML algorithm then provides a score to each action given the current state via inverse reinforcement learning.
These actions and their scores are then fed to a Monte Carlo Tree Search planner that ultimately makes the decisions. However, MCTS is expensive because it creates a tree with all possible actions. To reduce this cost and increase the planner’s efficiency, TypeDB again provides a solution.
Using TypeDB they store and reason over the context and the actions of the actor (vehicle), information about the environment, and traffic predictions. By reducing/filtering down the possible actions MCTS can take into account, they are able to prune this tree for efficiency and speed to decision making when working in real-time scenarios.
This is done by querying for inferred relations between the vehicle, an action, and the legal and safety scores. Using rules in TypeDB Willeke can filter down the possible actions to send to the planner.
Conclusion and Future Work
Here we got a brief look at a hybrid AI approach to a self-aware autonomous car, that uses information about the environment around the car to reason about the competence of the car. Willeke mentions that at TNO, with this hybrid approach for building up situational awareness, they can reduce the risk of autonomous driving in the open world. Operationally a place where there are unknown situations for the vehicle to encounter and it is vital that it be prepared for them.
The team at TNO is now planning to iterate on the model within TypeDB, looking to add more structure to the context to be able to reason about additional situations using higher-level reasoning rules. They will also keep improving the competence assessment in an effort to add vehicle features and a richer action space. Using TypeDB, Willekes’ team adds the competence of self and situation awareness to autonomous vehicles and with that, work on safer AI for real-world situations.
A special thank you to Willeke for her and her team’s work, contribution to the autonomous vehicle space and TypeDB community.
All slides used with permission. You can find the full presentation on the Vaticle YouTube channel here.