ROAD-R is a benchmark for predicting road events. In addition to labelled images, the dataset contains 243 rules which encode known facts about the world. For example, that a traffic cannot be red and green at the same time. By ensuring a machine learning model satisfies these rules, its predictions become more accurate and consistent.
Consider the example images below. On the left, you can see the neural network prediction, which predicts that the traffic light is located in the vehicle lane. When we add a new rule, which says that a traffic light cannot be in a vehicle lane, the location prediction changes to the right pavement.
In this dataset, each detected object has three sets of labels: the Agent (what is it), the Actions (what is it doing) and the Location (where it is). For more information, we refer to the Road-R competition from NeurIPS 2023, and the dataset paper by Giunchiglia et al.
Below, we have a working implementation of DeepProbLog on 10 images from ROAD-R. In the editor, the full set of logical rules is encoded in ProbLog. DeepProbLog can condition on these rules, to calculate what the output of the neural networks should be given that these rules are correct. Press evaluate to see the predictions on the image. Feel free to change the rules, and re-evalute, to see how the predictions change.