[Feasibility Study] Automating the "Mind" of Autonomous Vehicles: Generating SWRL Rules from Data
Feasibility Study: Rule Generation for Ontology-Based Decision-Making Systems
This paper presents a feasibility study on generating Semantic Web Rule Language (SWRL) rules for ontology-based autonomous vehicle decision-making systems using machine learning. By applying the Apriori association rule mining algorithm to simulated CARLA data, the authors successfully automated the creation of logical rules for navigating uncontrolled four-way intersections, achieving 100% confidence for the generated ruleset.
TL;DR
While Deep Learning dominates autonomous driving, the "black-box" nature of neural networks poses a massive hurdle for safety certification. This paper explores a hybrid path: using Association Rule Mining to automatically generate human-readable SWRL (Semantic Web Rule Language) rules. By training on simulated intersection data, the system discovers traffic laws for itself, producing a decision-making engine that is both data-driven and fully explainable.
Problem & Motivation: The Transparency Gap
Current Autonomous Driving Systems (ADS) often rely on end-to-end neural networks. While powerful, these models cannot explain why they chose to stop or swerve. Ontology-based systems—which use formal logic to reason about the world—offer a solution via human-understandable "If-Then" rules.
However, the bottleneck is knowledge engineering. Manually writing rules for every possible traffic scenario is a Herculean task. The authors ask: Can we keep the transparency of an ontology but use machine learning to skip the manual writing process?
Methodology: From Raw Simulation to Formal Logic
The authors propose a two-phase workflow to bridge the gap between raw data and symbolic reasoning.
1. Data Abstraction
Using the CARLA simulator, they generated 108 scenarios of vehicles approaching a four-way intersection. Instead of using raw pixels, they extracted "Knowledge Items" such as:
- Approach Direction: Left, Right, Opposite.
- Goal Direction: Straight, Left, Right.
- Actions: Proceed or Stop.
2. Rule Extraction via Apriori
The team applied the Apriori Algorithm, a classic data mining technique, to find frequent patterns in these snapshots. They specifically looked for associations where the "Head" of the rule is an action (Stop) and the "Body" is a set of observations.
The ADAS Ontology provides the vocabulary (Map, Control, Car) that the learned rules must inhabit.
3. Translation to SWRL
The discovered patterns are then mapped to the ADAS Ontology. For example, a discovered pattern like Ego: Left & Opposite: Straight is translated into a complex SWRL string that defines lanes, road segments, and vehicle types, ensuring the software can actually execute the logic.
Experiments & Results
The experiment focused on an uncontrolled four-way intersection—one of the most complex "negotiation" zones in urban driving.
Key Findings:
- Accuracy: The algorithm successfully generated 7 primary rules that govern intersection behavior.
- Confidence: All generated rules reached a Confidence of 1.0, meaning they were consistently valid across the dataset.
- Representability: The study confirmed that the existing ADAS ontology has enough "expressive power" to handle these learned maneuvers.
A visualization of Rule 1: Ego vehicle (Black) must stop when turning left if another vehicle is approaching from the right and also turning left.
| Support | Confidence | Generated Rule |
|---|---|---|
| 0.09 | 1.00 | Ego: Left ∧ Right: Left ⇒ Stop |
| 0.04 | 1.00 | Ego: Left ∧ Opposite: Straight ⇒ Stop |
| 0.02 | 1.00 | Ego: Straight ∧ Right: Straight ⇒ Stop |
Critical Analysis & Conclusion
This study serves as a vital proof-of-concept. It proves that we don't have to choose between Learning and Logic. We can use ML to "mine" the logic from data.
Limitations:
- Map Dependency: The current system relies heavily on pre-existing map data. In a "wild" environment without HD maps, the ontology would need to integrate SLAM (Simultaneous Localization and Mapping).
- Scope: The study only looked at 2-3 vehicle scenarios. Real-world traffic involves pedestrians, cyclists, and rule-breakers.
Future Outlook: The next step for this research is scaling to "Social Negotiation"—scenarios where traffic laws are ambiguous and vehicles must "negotiate" through subtle movements. By mining these patterns from human drivers, ontology-based systems could finally achieve the fluidity of human driving without sacrificing the safety of formal logic.
