Show simple item record

dc.rights.licenseCC-BY-NC-ND
dc.contributor.advisorDoyran, Metehan
dc.contributor.authorPoll, Ian van de
dc.date.accessioned2025-10-02T00:01:57Z
dc.date.available2025-10-02T00:01:57Z
dc.date.issued2025
dc.identifier.urihttps://studenttheses.uu.nl/handle/20.500.12932/50490
dc.description.abstractAdversarial attacks pose a serious threat to the use of deep learning in computer vision. This thesis addresses two primary questions: whether a single detection method can effectively handle multiple types of adversarial attacks, and whether combining global and localised features enhances the detection of adversarial attacks. The proposed method integrates a ResNet-18-based global branch with a local branch, using local patches with a shallow CNN, along with a fusion branch that combines both representations to make a more fine-grained prediction. We perform experiments using DPatch (a localised attack) and PGD (a global gradient-based attack) to evaluate how each component contributes to detection performance. Our results demonstrate that ResNet-18 already serves as a strong baseline for detecting adversarial attacks. Using explainable AI techniques, we observed that the model focuses on local patches for its decision-making. Global attacks are more challenging to explain using xAI, so we conducted a deeper analysis. This demonstrated that the global branch learns highfrequency patterns to distinguish between clean and adversarial examples. When adversarial noise resembles adversarial attacks, the model becomes more brittle and misclassifies these hard-negative cases, indicating that adversarial detection methods should incorporate and utilise non-adversarial examples as a robustness test. The use of cross-entropy was found to be not expressive enough in forming meaningful features in the latent space of the convolution layers. It suggests that the model may learn shortcuts or memorization. The use of contrastive learning emphasises an adversarial detector to learn these important features. We also demonstrated that the local branch can effectively detect attacks using only small patches of the image, showing that neural networks can classify adversarial examples with limited input. Since patch-wise detection is not widely studied in the literature, we conducted an ablation study focusing on the number of patches, patch size, and the aggregation function. The key finding is that self-attention significantly improves the local branch’s performance, surpassing the benefits of increasing the patch size or number of patches during the extraction of local patches from the input image. Accuracy-wise, the local branch can compete with the global ResNet approach, achieving an overall accuracy of 81%. The fusion of global and local features resulted in improved overall detection accuracy, increasing from 81% with ResNet-18 to 91%. It did not lead to more discriminative features, especially for global attacks in combination with hard-negative examples of non-adversarial noise. All branches performed well on localised attacks. These findings suggest that combining global and local feature extraction is a promising direction for adversarial detection; however, further research on global gradient-based attacks is needed to understand the limitations of this approach better.
dc.description.sponsorshipUtrecht University
dc.language.isoEN
dc.subjectThis thesis explores whether a single method can detect multiple adversarial attacks and if combining global and local features improves detection. A ResNet-18 global branch, a local patch-based CNN, and a fusion branch were tested on DPatch and PGD attacks. Results show that combining global and local features boosts accuracy from 81% to 91%. Self-attention greatly enhances the local branch, but global attacks remain harder to detect, requiring further study.
dc.titleEnhancing Adversarial Detection for Multi-Type Attacks through Globalized and Localized Features
dc.type.contentMaster Thesis
dc.rights.accessrightsOpen Access
dc.subject.keywordsadversarial;xai;classification;resnet;detection;resnet
dc.subject.courseuuArtificial Intelligence
dc.thesis.id54341


Files in this item

Thumbnail

This item appears in the following Collection(s)

Show simple item record