Introduction
Adversarial attacks pose a significant threat to deep learning models, particularly in safety-critical applications like autonomous driving. While much research has focused on image classification, semantic segmentation—the pixel-level labeling of images—presents unique challenges and opportunities for defense. Unlike classification, segmentation relies heavily on spatial context, where a pixel's identity is intrinsically linked to its surroundings. This paper explores the "fragility" of adversarial perturbations in segmentation and proposes a novel defense based on spatial consistency.
The Spatial Consistency Information (SCI) Defense
The researchers introduce Spatial Consistency Information (SCI), a defense mechanism that exploits the spatial dependencies inherent in semantic segmentation. The core intuition is that while a model's predictions for a natural image should remain consistent regardless of the viewing window, adversarial perturbations are often highly optimized for a specific global context.
The SCI pipeline involves three main steps:
- Random Patch Selection: Two overlapping patches are randomly cropped from the input image.
- Independent Inference: The segmentation model processes both patches separately.
- Consistency Check: The labels in the overlapping region are compared using the mean Intersection Over Union (mIOU) metric.
In benign images, the model produces nearly identical labels for the overlap. In contrast, adversarial examples—which are often "brittle"—produce inconsistent results when the context is shifted or restricted, leading to a sharp drop in mIOU that serves as a detection signal.
Experimental Evaluation
The authors evaluated SCI using two prominent autonomous driving datasets: Cityscapes, featuring high-resolution urban street scenes, and BDD100K, which offers diverse driving conditions. They tested the defense against state-of-the-art architectures, including Dilated Residual Networks (DRN) and Deep Layer Aggregation (DLA), using sophisticated attack methods like DAG and Houdini.
Key Findings
Robustness Against Adaptive Attackers
A critical contribution of this work is the defense's resilience to "adaptive attackers"—adversaries who are aware of the defense mechanism. While simple defenses like Gaussian blurring are easily bypassed by incorporating the blur into the attack optimization, SCI remains effective. Because the patches are selected randomly, an attacker cannot predict which specific spatial contexts the defense will check, making it computationally prohibitive to optimize a perturbation that remains consistent across all possible patch combinations.
The Transferability Gap
The study reveals that adversarial examples in semantic segmentation are significantly less transferable than those in classification. Attacks optimized for one model rarely succeed on another, even if the models share the same architecture. This suggests that segmentation attacks are highly specific to the internal feature representations of a specific trained instance.
Near-Perfect Detection
Empirical results show that SCI achieves an Area Under the Curve (AUC) of nearly 100% for detecting adversarial examples. While baseline defenses like Scale Consistency saw their effectiveness plummet (sometimes to 0% AUC) against adaptive attacks, SCI maintained its high detection accuracy.
Conclusion
Spatial consistency provides a powerful signal for distinguishing between natural and adversarial images in semantic segmentation. By leveraging the model's reliance on spatial context, the SCI defense offers a robust, randomness-based shield that is difficult for even adaptive attackers to penetrate. Future work will focus on optimizing the computational overhead for real-time applications and further investigating the theoretical underpinnings of low attack transferability in segmentation tasks.
Summary updated