Towards Reliable Evaluation and Fast Training of Robust Semantic Segmentation Models

Francesco Croce, Naman Deep Singh, Matthias HeinOpenReview 2024 · Submission to ICLR 2024 · Rejected · OpenReview

Introduction

This paper reveals that current semantic segmentation models are far less robust to adversarial attacks than previously thought. To address this, the authors introduce a more rigorous evaluation suite called SEA (Semantic Ensemble Attack) and a highly efficient training method, PIR-AT. By leveraging robustly pre-trained ImageNet backbones, PIR-AT creates state-of-the-art robust models up to six times faster than traditional methods.

The Challenge of Robust Semantic Segmentation

While adversarial robustness—the ability of a model to resist small, intentional perturbations to input data—has been studied deeply in image classification, it has lagged in semantic segmentation. Segmentation is a much harder task to secure: instead of changing one label for an entire image, an attacker must flip the labels of thousands of pixels simultaneously.

Visual comparison of adversarial attacks on clean versus robust segmentation models.

The authors identify two major gaps in the current landscape:

  1. Unreliable Evaluation: Existing adversarial attacks are "weak," leading researchers to believe their models are robust when they actually aren't. Standard loss functions like Cross-Entropy (CE) fail here because they waste optimization effort on pixels that are already misclassified.
  2. Prohibitive Training Costs: Adversarial Training (AT)—the gold standard for defense—is notoriously slow. Scaling it to complex segmentation architectures and large datasets like ADE20K has been practically impossible for most researchers.

Methods: The Sword and the Shield

The researchers approached the problem by developing both stronger attacks (the sword) and more efficient defenses (the shield).

The Sword: Better Attacks

To properly evaluate models, the authors developed new attack strategies that avoid the pitfalls of standard Cross-Entropy:

  • Jensen-Shannon (JS) Divergence Loss: Unlike Cross-Entropy, the gradient of the JS loss vanishes for pixels that are already successfully misclassified. This forces the optimizer to focus on the "stubborn" pixels that the model is still getting right.
  • Masked Cross-Entropy (MCE): This explicitly ignores pixels that are already misclassified, focusing the attack solely on correctly classified regions.
  • mIoU Targeting: Since Mean Intersection over Union (mIoU) is the standard metric for segmentation but is mathematically difficult to optimize directly, the authors derived a class-balanced accuracy upper bound that serves as an effective proxy.
  • SEA (Semantic Ensemble Attack): An ensemble of the above attacks that provides a new, rigorous stress-test benchmark for robustness.

The Shield: PIR-AT

To defend against these stronger attacks without prohibitive computational costs, the authors introduce Pre-trained ImageNet Robust AT (PIR-AT). Instead of starting from scratch or a standard "clean" backbone, they initialize the segmentation model with a backbone already robustly trained on ImageNet. This head start allows the model to achieve superior robustness with significantly fewer training epochs and attack steps.

Key Insights

  • The Cross-Entropy Trap: In classification, attackers want to push the wrong class probability as high as possible. In segmentation, if you do this for every pixel, the optimizer gets stuck trying to make already-wrong pixels more wrong, rather than trying to flip the pixels the model is currently getting right.
  • Robustness is Transferable: A major finding is that robustness in a backbone (trained for classification) translates remarkably well to the downstream task of segmentation.
  • mIoU is Deceptive: A model might have decent pixel accuracy under attack but a terrible mIoU if the attack successfully wipes out smaller, rarer classes. The authors' balanced loss specifically targets these vulnerabilities.

Key Results

Robust accuracy of various models against previous SOTA attacks versus the proposed SEA ensemble.
  • Exposing "Fake" Robustness: Previous state-of-the-art robust models (like DDC-AT) were shown to have 0.0% robust accuracy when tested against the stronger SEA attack, highlighting the inadequacy of prior evaluation methods.
  • Efficiency Gains: PIR-AT models achieved SOTA results while being 6x faster to train. For example, on PASCAL-VOC, they achieved 71.7% robust accuracy at a perturbation radius of $\epsilon=8/255$.
  • First Robust ADE20K Models: The authors produced what they believe are the first truly robust models for the challenging ADE20K dataset (which features 150 different classes), achieving up to 55.5% robust accuracy.

Limitations and Future Work

  • Black-Box Attacks: The current SEA suite is primarily "white-box" (requiring access to the model's internal gradients). Future work should include strong black-box attacks to ensure models aren't just masking their gradients to appear robust.
  • Scope of Defense: While PIR-AT is highly effective, it relies on the availability of robustly pre-trained backbones. If a researcher wants to use a brand-new architecture that hasn't been robustly trained on ImageNet yet, the speedup benefit is lost.
  • Other Threat Models: This paper focuses on $\ell_\infty$-bounded perturbations. Future work could explore patch attacks or perceptual attacks in the context of segmentation.

Summary updated

Abstract

Adversarial robustness has been studied extensively in image classification, especially for the $\ell_\infty$-threat model, but significantly less so for related tasks such as object detection and semantic segmentation. Attacks on semantic segmentation models turn out to be harder than for image classification. We propose novel attacks and motivated by their complementary properties, we put them into an attack ensemble called SEA. We use SEA to show that existing attacks can severely overestimate the robustness of semantic segmentation models. Perhaps surprisingly, existing attempts of adversarial training for semantic segmentation turn out to yield only weakly robust models or are even completely non-robust. We investigate why previous adaptations of adversarial training to semantic segmentation failed and identify insufficient training time and number of attack steps as key elements. In turn we show how recently proposed robust ImageNet backbones can be used to obtain adversarially robust semantic segmentation models with up to six times less training time for Pascal-VOC and the more challenging ADE-20k.
BibTeX
@misc{croce2024towards,
  author = {Francesco Croce and Naman Deep Singh and Matthias Hein},
  title = {{Towards Reliable Evaluation and Fast Training of Robust Semantic Segmentation Models}},
  year = {2024},
  url = {https://openreview.net/forum?id=aM7US5jKCd},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2024},
}
Figure