Explaining Autonomous Driving by Learning End-to-End Visual Attention

Luca Cultrera, Lorenzo Seidenari, Federico Becattini, Pietro Pala, Alberto Del Bimbo

Introduction

Deep learning has enabled "end-to-end" autonomous driving models that map raw sensor data directly to vehicle controls. However, these models often function as "black boxes," making it difficult to understand why a vehicle makes a specific decision. Researchers from the University of Florence have addressed this by developing an agent that integrates a multi-headed visual attention mechanism into a conditional imitation learning framework. This approach not only achieves state-of-the-art performance on the CARLA benchmark but also provides human-interpretable "heatmaps" that reveal the visual cues influencing steering decisions.

Methodology

The proposed architecture utilizes Conditional Imitation Learning composed of three primary stages:

  1. Shared Convolutional Backbone: A 5-layer CNN extracts feature maps from raw RGB input images.
  2. Multi-Scale Region Proposals: The model processes a fixed grid of 48 "Regions of Interest" (RoIs) across four scales (Big-Horizontal, Big-Vertical, Medium, and Small). This allows the system to capture both broad environmental structures and fine-grained details like traffic signs.
  3. Multi-Head Attention Block: Depending on high-level navigation commands (e.g., "Turn Left"), the model activates a specific "head." Each head assigns weights to the 48 RoIs, and the final steering prediction is derived from a weighted sum of these regions, effectively filtering out irrelevant visual noise.
The multi-head architecture integrates high-level commands to select specific attention blocks for steering prediction.

The model is trained to minimize the Mean Squared Error (MSE) between its predicted steering angle and ground truth data from expert human drivers.

Experimental Setup and Datasets

The study was conducted using the CARLA simulator. Training data was collected in "Town1" across various weather conditions, totaling 14 hours of driving. To test generalization, evaluation was performed in "Town2"—an environment unseen during training—and under novel weather conditions. Performance was assessed across four standard tasks: Straight, One Turn, Navigation, and Navigation Dynamic (incorporating pedestrians and other vehicles).

Key Insights and Results

The integration of attention mechanisms yielded significant improvements in both performance and transparency:

  • Enhanced Stability: By focusing on salient regions and ignoring distractions, the model achieved more stable steering and a 84% average success rate across all tasks, outperforming single-frame RGB baselines.
  • Intuitive Explainability: The generated attention maps align with human driving logic. For instance, when commanded to "Turn Right," the model focuses on the lower-right sidewalk and road curvature.
  • Scale Importance: Ablation studies revealed that "Medium" scale RoIs (covering roughly a quarter of the image) are most critical for identifying intersections and road boundaries.
Visualized attention maps demonstrate how the model focuses on different road regions based on the driving task.

In the most challenging "New Weather and New Town" benchmark, the model achieved a 100% success rate on the Straight task and significantly outperformed non-attentional baselines. Remarkably, it remained competitive with multi-modal models that utilize additional depth or semantic segmentation data.

Limitations and Future Directions

While effective, the current model relies on a fixed grid of regions. Future iterations could explore flexible, dynamic grids to improve efficiency. Additionally, while this work focuses on lateral control (steering), extending the attention mechanism to longitudinal control (acceleration and braking) and incorporating explicit 3D spatial awareness are promising avenues for further research.

Summary updated

BibTeX
@inproceedings{cultrera2020explaining,
  author = {Luca Cultrera and Lorenzo Seidenari and Federico Becattini and Pietro Pala and Alberto Del Bimbo},
  title = {{Explaining Autonomous Driving by Learning End-to-End Visual Attention}},
  booktitle = {Workshops @ CVPR},
  year = {2020},
  doi = {10.1109/cvprw50498.2020.00178},
}
Figure