GNAP Attacking and Defending Facial Detection on Edge Devices

Adversarial attack and defense framework for robust facial detection on edge devices.

In this project, we present GNAP (Guided inspired Noise Attack Pyramid) and GNAG (Guided Noise Attack Guard), a paired adversarial attack and defense framework for facial detection systems deployed on resource-constrained edge devices. The work was developed as part of the research paper titled "GNAPing On the Job: Attacking and Defending Facial Detection on Edge Devices", published in IEEE SoutheastCon 2025. The main objective of this project is to study how facial detection models operating on edge hardware can be disrupted by carefully designed adversarial perturbations, and how lightweight defensive techniques can be used to recover model robustness without sacrificing real-time performance.

The proposed GNAP attack is designed to reduce facial detection confidence in practical edge-device scenarios by injecting guided multi-scale noise that degrades the model’s ability to detect or classify faces accurately. The repository provides support for both still-image and real-time video attack pipelines, including experiments on the Labeled Faces in the Wild (LFW) dataset and YOLO-based confidence evaluation. Complementing the attack, the GNAG defense introduces a restoration strategy that mitigates the adversarial impact and improves the detector’s performance on corrupted inputs. This makes the framework useful not only for demonstrating model vulnerabilities, but also for evaluating defense effectiveness in security-sensitive facial analytics systems.

Experimental results reported in the project show that the proposed attack significantly reduces the system’s mean highest confidence from 0.99 on original inputs to 0.82 under GNAP attack conditions. After applying the proposed GNAG defense, confidence is restored to 0.98, demonstrating strong recovery of facial detection robustness. These results highlight the practical relevance of adversarial robustness research for edge AI systems, especially in scenarios where computational efficiency, accuracy, and security must all be maintained simultaneously.

Implementation of entire project can be found here: Code