StyleLess layer: Improving robustness for real-world driving

Julien Rebut, Andrei Bursuc, Patrick Pérez

Abstract

Deep Neural Networks (DNNs) in autonomous driving often fail to generalize to unseen environmental conditions like rain or fog due to an over-reliance on local textures, known as texture bias. We present the StyleLess layer, a plug-and-play module that leverages neural style transfer principles to decouple "style" (transient environmental noise) from "content" (geometric scene structure). By minimizing Gram matrix correlations during training, the StyleLess layer forces the model to prioritize shape and layout, significantly enhancing robustness in hazardous driving scenarios.

Introduction

Modern autonomous driving systems rely heavily on DNNs for perception tasks such as semantic segmentation and object detection. However, these models frequently exhibit a "generalization gap" when transitioning from clean training data (e.g., sunny weather) to adverse real-world conditions (e.g., rain, fog, or sensor degradation).

Research suggests this vulnerability stems from texture bias: models prioritize local color and texture patterns over global object geometry. In driving, "style" encompasses transient factors like raindrops on a lens or atmospheric haze. While data augmentation can mitigate some effects, it cannot account for the infinite variety of real-world corruptions. The StyleLess layer aims to make models inherently "style-blind," focusing exclusively on the invariant "content" of the scene.

Conceptual overview of separating transient environmental 'style' from invariant scene 'content'.

Methodology

The StyleLess layer is a trainable module designed for integration into standard backbones like ResNet. Its operation is grounded in two key concepts:

1. Style vs. Content Representation

Following Neural Style Transfer (NST) literature, "style" is represented by Gram matrices, which capture correlations between feature channels. Conversely, "content" is preserved in the spatial arrangement of feature maps. The goal is to filter out the former while retaining the latter.

2. Architecture and Loss Function

The StyleLess layer is implemented as a residual block featuring a bottleneck design: a $1 \times 1$ convolution for channel compression, a $3 \times 3$ convolution to learn spatial relationships, and a final $1 \times 1$ convolution for decompression.

The primary innovation is the Gram Loss ($L_{Gram}$). During training, the network minimizes a joint objective where the $L_{Gram}$ term encourages the StyleLess layer to produce feature maps with reduced Gram matrix values relative to its inputs, effectively "washing out" style information.

The StyleLess layer architecture and the integrated training pipeline featuring the Gram Loss.

3. Two-Stage Training

To ensure the model correctly identifies style before attempting to suppress it, a two-stage approach is employed:

  1. Stage 1: Train the base architecture on the target task (e.g., semantic segmentation).
  2. Stage 2: Insert StyleLess layers and fine-tune using the joint loss function.

Experimental Evaluation

The method was evaluated using the Cityscapes dataset and its corrupted variants: Foggy Cityscapes, Rain Cityscapes, and Cityscapes-C (which includes 15 types of algorithmic noise).

Key Results

  • Semantic Segmentation: On Rain Cityscapes, the StyleLess-equipped model achieved a mean Intersection over Union (mIoU) of 69.9%, a significant improvement over the baseline's 55.2%.
  • Object Detection: In foggy conditions, the model reached a mean Average Precision (mAP) of 26.6, outperforming specialized domain adaptation methods like "Advent."
  • Model Efficiency: A smaller ResNet18 model with StyleLess layers outperformed a standard ResNet50 on corrupted data, demonstrating that architectural intelligence for robustness can be more effective than raw scale.

Discussion and Conclusion

The StyleLess layer provides a mathematical framework for treating environmental noise as a "nuisance variable." By explicitly penalizing style correlations, the model learns to prioritize the geometric features essential for safety.

Current limitations include the necessity of a two-stage training process for stability and the need for careful hyperparameter tuning of the loss balance. Future work will explore extending this approach to other sensor modalities, such as Lidar and Radar, where similar "style" variations (e.g., reflections or interference) pose significant challenges to robust perception.

Summary updated

Abstract

Deep Neural Networks (DNNs) are a critical component for self-driving vehicles. They achieve impressive performance by reaping information from high amounts of labeled data. Yet, the full complexity of the real world cannot be encapsulated in the training data, no matter how big the dataset, and DNNs can hardly generalize to unseen conditions. Robustness to various image corruptions, caused by changing weather conditions or sensor degradation and aging, is crucial for safety when such vehicles are deployed in the real world. We address this problem through a novel type of layer, dubbed StyleLess, which enables DNNs to learn robust and informative features that can cope with varying external conditions. We propose multiple variations of this layer that can be integrated in most of the architectures and trained jointly with the main task. We validate our contribution on typical autonomous-driving tasks (detection, semantic segmentation), showing that in most cases, this approach improves predictive performance on unseen conditions (fog, rain), while preserving performance on seen conditions and objects.
BibTeX
@inproceedings{rebut2021styleless,
  author = {Julien Rebut and Andrei Bursuc and Patrick Pérez},
  title = {{StyleLess layer: Improving robustness for real-world driving}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=LgL3UHS_HyC},
}
Figure