Multi-Task Learning With Attention for End-to-End Autonomous Driving

Keishi Ishihara, Anssi Kanervisto, Jun Miura, Ville Hautamäki

Abstract

End-to-end autonomous driving models often struggle with generalization to unseen environments and the detection of rare but critical events like traffic light changes. This paper proposes a multi-task attention-aware network that integrates driving control with auxiliary perception tasks, including semantic segmentation, depth estimation, and traffic light state classification. By employing a dual-path attention mechanism tailored to the resolution requirements of different tasks, the model learns more robust scene representations. Evaluated in the CARLA simulator, the proposed approach achieves state-of-the-art success rates on the CoRL2017 and NoCrash benchmarks, significantly reducing traffic light infractions and improving interpretability through focused attention.

Introduction

The promise of end-to-end autonomous driving lies in its simplicity: a single neural network mapping raw sensory input directly to vehicle control commands. However, this "black box" approach faces significant hurdles. First, generalization remains a challenge; models often overfit to specific training environments and fail in new towns or weather conditions. Second, rare events—such as red traffic lights—are often underrepresented in training data, leading standard imitation learning models to ignore them. Finally, the lack of interpretability makes it difficult for engineers to understand why a model failed in a safety-critical situation.

To address these issues, this research introduces a multi-task learning (MTL) framework enhanced by task-specific attention. By forcing the network to simultaneously perform "perception" tasks alongside "driving" tasks, the model develops a deeper understanding of its environment, leading to safer and more reliable navigation.

Methodology

The proposed architecture is built upon the Conditional Imitation Learning (CIL) framework, which incorporates high-level navigational commands (e.g., "turn left") to disambiguate vehicle behavior at intersections.

The proposed multi-task architecture featuring a shared encoder and task-specific decoders and modules.

At its core, the model uses a shared ResNet-34 backbone to extract features from monocular RGB images. These features are then branched into four distinct tasks:

  1. Driving Control: Predicting steering, throttle, and brake values.
  2. Semantic Segmentation: Pixel-wise classification of scene objects.
  3. Depth Estimation: Predicting the distance of objects from the camera.
  4. Traffic Light (TL) State Classification: Explicitly identifying the current state of traffic signals.

A key innovation is the Dual-Path Attention mechanism. Recognizing that different tasks require different levels of detail, the authors implement two types of attention paths. Type 1 attention connects to every stage of the encoder, preserving high-resolution spatial information necessary for dense tasks like segmentation and depth estimation. In contrast, Type 2 attention focuses on the final, most abstract layers of the encoder for global tasks like driving control and traffic light classification. This ensures that the control module receives high-level semantic information without being overwhelmed by low-level noise.

Experimental Setup

The model was trained and evaluated using the CARLA simulator (v0.8.4). The training dataset consisted of 466,000 frames collected in "Town01" under four distinct weather conditions. To test robustness and generalization, the model was evaluated on the CoRL2017 and NoCrash benchmarks, which include "New Town" (Town02) and "New Weather" scenarios. These benchmarks are designed to push the limits of autonomous agents by introducing unseen layouts and lighting conditions.

Results and Discussion

The proposed model demonstrates superior performance across all benchmarks. In the most challenging "New Town & Weather" scenario, the model achieved a 91% success rate in navigation, a substantial improvement over the 67% achieved by the CILRS baseline.

Beyond raw success rates, the model showed significant improvements in safety. Explicitly training for traffic light classification led to a dramatic reduction in red-light violations. In Town02, violations dropped from over 17% in baseline models to just 7.8%. This suggests that the auxiliary task successfully "anchored" the importance of traffic lights in the model's latent representation.

Grad-CAM visualizations comparing the attention maps of different models for control and traffic light prediction.

Interpretability is another major strength of this approach. Using Grad-CAM to visualize the network's focus, the researchers found that their model consistently attends to relevant features such as lane markings, leading vehicles, and traffic lights. As shown in the visualization, while baseline models often exhibit scattered or irrelevant attention, the proposed model maintains a clear "focus" on the elements most critical for safe driving.

Conclusion

By integrating multi-task learning with a dual-path attention mechanism, this work significantly advances the state-of-the-art in end-to-end autonomous driving. The results highlight that perception is not just an auxiliary task but a fundamental component that improves control logic and safety. Future research will focus on incorporating temporal information to better handle dynamic objects and transitioning these simulated successes to real-world datasets to bridge the "sim-to-real" gap.

Summary updated

BibTeX
@inproceedings{ishihara2021multi,
  author = {Keishi Ishihara and Anssi Kanervisto and Jun Miura and Ville Hautamäki},
  title = {{Multi-Task Learning With Attention for End-to-End Autonomous Driving}},
  booktitle = {Workshops @ CVPR},
  year = {2021},
  doi = {10.1109/cvprw53098.2021.00325},
}
Figure