PatchBlock: A Lightweight Defense Against Adversarial Patches for Embedded EdgeAI Devices
Nandish Chattopadhyay 1, Abdul Basit 1, Amira Guesmi 1, Muhammad Abdullah Hanif 1, Bassem Ouni 2, Muhammad Shafique 1
Published on arXiv
2601.00367
Input Manipulation Attack
OWASP ML Top 10 — ML01
Key Finding
PatchBlock recovers up to 77% of model accuracy under the Google Adversarial Patch attack on ViT-16 while running CPU-only in parallel with GPU inference, outperforming SOTA defenses in efficiency on embedded edge devices.
PatchBlock
Novel technique introduced
Adversarial attacks pose a significant challenge to the reliable deployment of machine learning models in EdgeAI applications, such as autonomous driving and surveillance, which rely on resource-constrained devices for real-time inference. Among these, patch-based adversarial attacks, where small malicious patches (e.g., stickers) are applied to objects, can deceive neural networks into making incorrect predictions with potentially severe consequences. In this paper, we present PatchBlock, a lightweight framework designed to detect and neutralize adversarial patches in images. Leveraging outlier detection and dimensionality reduction, PatchBlock identifies regions affected by adversarial noise and suppresses their impact. It operates as a pre-processing module at the sensor level, efficiently running on CPUs in parallel with GPU inference, thus preserving system throughput while avoiding additional GPU overhead. The framework follows a three-stage pipeline: splitting the input into chunks (Chunking), detecting anomalous regions via a redesigned isolation forest with targeted cuts for faster convergence (Separating), and applying dimensionality reduction on the identified outliers (Mitigating). PatchBlock is both model- and patch-agnostic, can be retrofitted to existing pipelines, and integrates seamlessly between sensor inputs and downstream models. Evaluations across multiple neural architectures, benchmark datasets, attack types, and diverse edge devices demonstrate that PatchBlock consistently improves robustness, recovering up to 77% of model accuracy under strong patch attacks such as the Google Adversarial Patch, while maintaining high portability and minimal clean accuracy loss. Additionally, PatchBlock outperforms the state-of-the-art defenses in efficiency, in terms of computation time and energy consumption per sample, making it suitable for EdgeAI applications.
Key Contributions
- Three-stage pipeline (Chunking, Separating via redesigned isolation forest with targeted cuts, Mitigating via dimensionality reduction) that detects and neutralizes adversarial patches as a pre-processing step
- CPU-only, model- and patch-agnostic preprocessing module that runs in parallel with GPU inference, adding robustness with no additional GPU overhead — suitable for resource-constrained EdgeAI devices
- Recovers up to 77% of model accuracy under strong patch attacks (e.g., Google Adversarial Patch on ViT-16) while outperforming SOTA defenses in computation time and energy consumption per sample
🛡️ Threat Analysis
PatchBlock is explicitly a defense against adversarial patch attacks — localized adversarial perturbations applied at inference time that cause misclassification. The paper detects and suppresses these patches as a pre-processing step, directly addressing the core ML01 threat.