Abstract
Preprocessing and outlier detection techniques have both been applied to neural networks to increase robustness with varying degrees of success. In this paper, we formalize the ideal preprocessor function as one that would take any input and set it to the nearest in-distribution input. In other words, we detect any anomalous pixels and set them such that the new input is in-distribution. We then illustrate a relaxed solution to this problem in the context of patch attacks. Specifically, we demonstrate that we can model constraints on the patch attack that specify regions as out of distribution. With these constraints, we are able to preprocess inputs successfully, increasing robustness on CARLA object detection.
Introduction
Object detection systems are critical components in autonomous vehicles and security infrastructure. However, these systems are notoriously fragile when faced with adversarial patches—small, localized stickers designed to cause misclassification or object "disappearance." Current state-of-the-art defenses, such as Segment and Complete (SAC) and PatchZero (PZ), attempt to mitigate this by employing a secondary segmentation model to identify and mask these patches.
Our research identifies a critical vulnerability in these defenses: the segmentation models themselves are susceptible to adaptive attacks. If an attacker incorporates the segmenter's behavior into their optimization process, they can generate patches that remain "invisible" to the defense while still successfully fooling the primary object detector.
The OODSmoother Framework
To analyze and address this vulnerability, we introduce OODSmoother, a unified framework that abstracts patch defenses into two primary components:
- OOD Oracle ($ood$): A component that assigns an "out-of-distribution" score to each pixel, identifying unnatural features.
- Smoothing Function ($s$): A component that removes these features, typically by masking them to a neutral value (e.g., black).
As shown in the framework above, we can define a powerful adaptive attack using a composite loss function. This attack optimizes for two goals simultaneously: fooling the object detector ($L_{obj\_det}$) and evading the patch segmenter by appearing "natural" to the OOD Oracle ($L_{patch\_seg}$).
SemPrior: Leveraging Semantic Priors
We observe that machine learning-based segmenters often fail to learn fundamental statistical properties of natural images, making them easy to bypass. To counter this, we propose SemPrior (Semantic Prior Defense). Unlike ML models, SemPrior uses non-learnable "oracles" based on human-understandable priors:
- Color Histograms Oracle: Flags pixels with colors that are statistically rare in the training set or unnaturally frequent in a specific image.
- HSV Oracle: Detects regions with high color saturation and high hue variance, which are common characteristics of high-contrast adversarial patches.
By explicitly encoding these "semantic priors," we create a hard constraint on the attack space that cannot be easily bypassed through gradient-based optimization.
Experimental Results
Our evaluation across MS COCO, Pascal VOC, and CARLA benchmarks demonstrates the devastating effectiveness of adaptive attacks against existing defenses. As seen in the table below, the performance of the SAC defense on MS COCO drops from a clean mAP of 0.618 to just 0.062 under our adaptive attack.
In contrast, SemPrior exhibits significantly higher resilience. When used as a standalone defense, it provides up to a 40% gain in robustness against adaptive attacks compared to previous methods. When combined with existing ML defenses like SAC, the hybrid approach increases adversarial robustness by up to 60%. Furthermore, SemPrior shows superior transferability, maintaining robustness even when the attack is optimized against a different defense mechanism.
Conclusion and Future Work
While SemPrior effectively constrains the attack space, it is not without limitations. Highly saturated natural objects (e.g., neon signs) may trigger false positives, leading to accidental masking. Future work will explore more sophisticated smoothing techniques, such as AI-based inpainting, to replace simple black-out masking. Additionally, investigating the resilience of these semantic priors against generative attacks (e.g., via Diffusion models) remains a vital area for ensuring the long-term security of object detection systems.
Summary updated