Segment-Anything Models Achieve Zero-shot Robustness in Autonomous Driving

Jun Yan, Pengyu Wang, Danni Wang, Weiquan Huang, Daniel Watzenig, Huilin Yin · DOI

TL;DR

This paper investigates the surprising zero-shot adversarial robustness of the Segment Anything Model (SAM) in autonomous driving scenarios. Even without task-specific fine-tuning, SAM demonstrates a notable resilience to both simulated environmental corruptions (black-box attacks) and crafted adversarial perturbations (white-box attacks), suggesting that large-scale foundation models may inherently possess a degree of robustness.

What Problem Does This Paper Address?

Autonomous driving systems heavily rely on semantic segmentation to understand their surroundings, identifying objects like roads, pedestrians, and vehicles. However, deep learning models, including those used for segmentation, are notoriously vulnerable to adversarial examples – subtle, imperceptible input perturbations that can cause catastrophic misclassifications. This vulnerability poses a significant safety risk (SOTIF) for autonomous vehicles. While previous research has focused on the adversarial robustness of traditional CNN-based and even Vision Transformer (ViT)-based segmentation models, the advent of massive foundation models like SAM, which can segment arbitrary objects without task-specific training, raises a crucial question: how robust are these powerful, general-purpose models to adversarial attacks in safety-critical applications like autonomous driving? This paper aims to systematically address this gap by empirically studying SAM's zero-shot adversarial robustness.

Methods

The core of this research is a comprehensive empirical study evaluating SAM's performance under various adversarial attack scenarios. The authors employ two main categories of attacks:

  • Black-box corruptions: These simulate real-world environmental challenges and sensor noise that autonomous vehicles might encounter. The paper uses 19 different procedural adversarial noises, including Gaussian noise, motion blur, snow, frost, and JPEG compression, applied at varying severity levels. This approach is particularly relevant for SOTIF testing.
  • White-box adversarial attacks: These involve crafted perturbations where the attacker has full knowledge of the model's architecture and parameters. The study specifically uses the Fast Gradient Sign Method (FGSM) and Projected Gradient Descent (PGD) attacks, which are standard benchmarks for evaluating model robustness.

The evaluation is conducted in a zero-shot setting, meaning SAM is used directly without any additional training or fine-tuning on the autonomous driving dataset. This highlights SAM's inherent capabilities. The authors compare SAM's performance against traditional CNN-based models (FCN, SegNet, PSPNet, DeepLabV3+) and other ViT-based segmentation models (SegFormer, OneFormer).

Datasets

The primary dataset used for evaluation is Cityscapes. This is a widely used, high-resolution dataset for semantic urban scene understanding, containing images from various cities with detailed annotations for road elements, vehicles, pedestrians, and more. The experiments were conducted on the validation set of Cityscapes, comprising 500 images.

Key Insights and Ideas

  • Emergent Robustness: The most striking finding is that SAM, even without task-specific training, exhibits a surprising degree of adversarial robustness. This suggests that the sheer scale of parameters and training data in foundation models might lead to emergent properties like inherent robustness, a phenomenon observed in other large models.
  • SAM's Versatility Extends to Robustness: SAM's ability to handle diverse segmentation tasks without explicit training translates to its robustness across different attack types. It performs acceptably well against both simulated environmental corruptions and crafted adversarial perturbations.
  • Foundation Models as a Path to AGI Safety: The paper posits that SAM, as a vision foundation model, is a prototype for Artificial General Intelligence (AGI) pipelines. Its inherent robustness hints at a potential pathway towards developing safer, more trustworthy AGI systems.
  • OneFormer Backbone Advantage: When SAM is integrated with the OneFormer backbone, its robustness, particularly against black-box corruptions, is notably enhanced. This suggests that architectural choices within the foundation model framework can further bolster resilience.

Key Results

The paper presents quantitative results using the mean Intersection over Union (mIoU) metric.

  • Black-box Corruptions: In many black-box corruption scenarios, SAM (both vanilla SAM and MobileSAM, with SegFormer and OneFormer backbones) achieved mIoU scores that were comparable to or even surpassed most CNN-based models and a subset of Transformer-based models. For instance, SAM-OneFormer showed remarkable robustness against various blur, noise, and weather corruptions, even at severity level 5.
  • White-box Attacks (FGSM & PGD): SAM models maintained zero-shot adversarial robustness under FGSM attacks, with performance sometimes exceeding supervised learning models. Under PGD attacks, while performance generally degraded with increased attack iterations, SAM-OneFormer consistently outperformed SAM-SegFormer, maintaining higher mIoU values.
  • Trade-off: While SAM generally showed higher robustness than MobileSAM, MobileSAM offered a better trade-off between robustness, inference speed, and storage, making it more suitable for edge devices.

Limitations and Future Work

The authors acknowledge several limitations and suggest future research directions:

  • New Attack Methods: Current strong attack methods might pose more severe threats to ViT backbones, and the study did not integrate sufficient test-time defense modules.
  • Test Scale: The scale of the experiments could be enlarged to include more diverse scenarios and datasets.
  • Future Attacks: The paper anticipates that malicious actors may develop new attack methods specifically tailored to SAM variants.
  • Test-Time Defense: Integrating test-time defense mechanisms is a promising avenue for further enhancing robustness.
  • Interpretation of Robustness: Understanding why these foundation models exhibit zero-shot robustness is an open area requiring further exploration.
  • Real-World Deployment: Further study on the deployment of these models in real-world applications is needed to build trustworthy AGI systems.

Summary updated

Abstract

Semantic segmentation is a significant perception task in autonomous driving. It suffers from the risks of adversarial examples. In the past few years, deep learning has gradually transitioned from convolutional neural network (CNN) models with a relatively small number of parameters to foundation models with a huge number of parameters. The segment-anything model (SAM) is a generalized image segmentation framework that is capable of handling various types of images and is able to recognize and segment arbitrary objects in an image without the need to train on a specific object. It is a unified model that can handle diverse downstream tasks, including semantic segmentation, object detection, and tracking. In the task of semantic segmentation for autonomous driving, it is significant to study the zero-shot adversarial robustness of SAM. Therefore, we deliver a systematic empirical study on the robustness of SAM without additional training. Based on the experimental results, the zero-shot adversarial robustness of the SAM under the black-box corruptions and white-box adversarial attacks is acceptable, even without the need for additional training. The finding of this study is insightful in that the gigantic model parameters and huge amounts of training data lead to the phenomenon of emergence, which builds a guarantee of adversarial robustness. SAM is a vision foundation model that can be regarded as an early prototype of an artificial general intelligence (AGI) pipeline. In such a pipeline, a unified model can handle diverse tasks. Therefore, this research not only inspects the impact of vision foundation models on safe autonomous driving but also provides a perspective on developing trustworthy AGI. The code is available at: https://github.com/momo1986/robust_sam_iv.
BibTeX
@misc{yan2024segment,
  author = {Jun Yan and Pengyu Wang and Danni Wang and Weiquan Huang and Daniel Watzenig and Huilin Yin},
  title = {{Segment-Anything Models Achieve Zero-shot Robustness in Autonomous Driving}},
  year = {2024},
  eprint = {2408.09839},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.09839},
}
Figure