Detecting Adversarial Attacks in Semantic Segmentation via Uncertainty Estimation: A Deep Analysis

Kira Maag, Roman Resner, Asja FischerarXiv 2024 · DOI

Introduction

Deep Neural Networks (DNNs) have become the standard for semantic segmentation tasks, particularly in safety-critical applications like autonomous driving. However, these models are susceptible to adversarial attacks—carefully crafted, human-imperceptible perturbations that lead to incorrect predictions. In a driving context, such attacks could cause a vehicle to misidentify a pedestrian or a road boundary, leading to catastrophic outcomes.

While adversarial defense is well-established for image classification, semantic segmentation presents unique challenges due to its high-dimensional, pixel-wise output space. This paper proposes a lightweight, post-processing detection method that leverages model uncertainty to identify adversarial inputs without requiring model retraining or architectural changes.

Methodology: Uncertainty as a Fingerprint

The researchers hypothesize that while adversarial attacks can fool a model's final classification, they often leave a distinct "fingerprint" in the model's uncertainty distribution. By analyzing the softmax output of a segmentation network, the authors calculate three primary dispersion measures:

  1. Entropy: Captures the overall spread of the probability distribution across all classes.
  2. Variation Ratio: Measures the probability that a pixel does not belong to the predicted class.
  3. Probability Margin: The difference between the probabilities of the top two predicted classes.
Comparison of benign (top) and adversarial (bottom) inputs. Note how the adversarial attack significantly increases the entropy (c) in the regions where the segmentation (b) is corrupted.

Detection Pipeline

The detection is framed as a binary classification task (Benign vs. Adversarial). The authors explored both unsupervised and supervised strategies:

  • Unsupervised: Methods like thresholding mean entropy or using One-Class Support Vector Machines (OCSVM) were tested to identify outliers based on clean data distributions.
  • Supervised: A Logistic Regression model (LASSO) and a shallow 2-layer CNN (the "Heatmap" detector) were trained to recognize the specific patterns of uncertainty caused by attacks.

Key Insights

The Robustness of Transformers

A core finding of the study is the comparison between traditional Convolutional Neural Networks (CNNs), such as DeepLabv3+, and Transformer-based architectures like SegFormer. The results indicate that Transformers generally exhibit higher inherent robustness to adversarial noise, likely due to their global receptive fields and attention mechanisms.

Generalization Across Attacks

One of the most significant results is the detector's ability to generalize. A detector trained on a simple, low-intensity attack (like FGSM) proved effective at detecting more complex, unseen attacks. This suggests that the "uncertainty signature" of adversarial perturbations is relatively consistent across different attack methodologies.

Experimental Results

Testing on the Cityscapes dataset—a benchmark for urban street scene understanding—the proposed method achieved an average optimal detection accuracy (ADA) of 89.36%*. For many specific attack types, the Area Under the Receiver Operating Characteristic (AuROC) reached between 80% and 100%.

Crucially, this performance is achieved with minimal computational overhead. Unlike "multi-run" detection methods that require multiple inferences per image, this approach relies on a single pass and simple post-processing, making it suitable for real-time applications.

Conclusion

This research demonstrates that pixel-wise uncertainty estimation is a powerful tool for securing semantic segmentation models. By treating detection as a post-processing step, the proposed method offers a "plug-and-play" solution that is both effective and efficient. Future work will focus on improving unsupervised detection methods and evaluating the system's resilience against adaptive attackers who may attempt to craft low-entropy adversarial examples.

Summary updated

BibTeX
@misc{maag2024detecting,
  author = {Kira Maag and Roman Resner and Asja Fischer},
  title = {{Detecting Adversarial Attacks in Semantic Segmentation via Uncertainty Estimation: A Deep Analysis}},
  year = {2024},
  eprint = {2408.10021},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.10021},
}
Figure