Detecting Adversarial Samples Using Influence Functions and Nearest Neighbors
Not on the map. Why?
Abstract (arXiv)
Deep neural networks (DNNs) are notorious for their vulnerability to adversarial attacks, which are small perturbations added to their input images to mislead their prediction. Detection of adversarial examples is, therefore, a fundamental requirement for robust classification frameworks. In this work, we present a method for detecting such adversarial attacks, which is suitable for any pre-trained neural network classifier. We use influence functions to measure the impact of every training sample on the validation set data. From the influence scores, we find the most supportive training samples for any given validation example. A k-nearest neighbor (k-NN) model fitted on the DNN's activation layers is employed to search for the ranking of these supporting training samples. We observe that these samples are highly correlated with the nearest neighbors of the normal inputs, while this correlation is much weaker for adversarial inputs. We train an adversarial detector using the k-NN ranks and distances and show that it successfully distinguishes adversarial examples, getting state-of-the-art results on six attack methods with three datasets. Code is available at https://github.com/giladcohen/NNIF_adv_defense.
Key facts. Cited by 72 papers in the map (data through 14 Oct 2026). First posted on arXiv 15 Sep 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 18; 2022: 18; 2023: 14; 2024: 6; 2025: 12; 2026: 4.
72 papers.
Sort:
By area:
- 2022Training Data Influence Analysis and Estimation: A Surveycited by 135
- 2021Advances in adversarial attacks and defenses in computer vision: A surveycited by 127
- 2021Adversarial Example Detection for DNN Models: A Review and Experimental Comparisoncited by 52
- 2021LiBRe: A Practical Bayesian Approach to Adversarial Detectioncited by 40
- 2021SpectralDefense: Detecting Adversarial Attacks on CNNs in the Fourier Domaincited by 30
- 2022Robust Models are less Over-Confidentcited by 25
- 2022Understanding Influence Functions and Datamodels via Harmonic Analysiscited by 23
- 2022Membership Inference Attack Using Self Influence Functionscited by 20
- 2023Revisiting the Fragility of Influence Functionscited by 20
- 2021MagDR: Mask-guided Detection and Reconstruction for Defending Deepfakescited by 17
- 2021Two Coupled Rejection Metrics Can Tell Adversarial Examples Apartcited by 14
- 2023Defenses in Adversarial Machine Learning: A Surveycited by 14
38 more
- 2021Multi-Expert Adversarial Attack Detection in Person Re-identification Using Context Inconsistencycited by 12
- 2021Out-of-Distribution Generalization Analysis via Influence Functioncited by 11
- 2022Visual Adversarial Attacks and Defenses in the Physical World: A Surveycited by 11
- 2025Understanding Impact of Human Feedback via Influence Functionscited by 11
- 2021Detecting AutoAttack Perturbations in the Frequency Domaincited by 10
- 2021NoiLIn: Improving Adversarial Training and Correcting Stereotype of Noisy Labelscited by 8
- 2022Residue-Based Natural Language Adversarial Attack Detectioncited by 8
- 2022Understanding Programmatic Weak Supervision via Source-aware Influence Functioncited by 8
- 2022Dispersed Pixel Perturbation-based Imperceptible Backdoor Trigger for Image Classifier Modelscited by 7
- 2022Special Session: Towards an Agile Design Methodology for Efficient, Reliable, and Secure ML Systemscited by 6
- 2023New Adversarial Image Detection Based on Sentiment Analysiscited by 6
- 2021Simple Post-Training Robustness Using Test Time Augmentations and Random Forestcited by 4
- 2021A Uniform Framework for Anomaly Detection in Deep Neural Networkscited by 4
- 2023Revisiting the Trade-off between Accuracy and Robustness via Weight Distribution of Filterscited by 4
- 2024Data Poisoning Attacks on Off-Policy Policy Evaluation Methodscited by 4
- 2021Anomaly Detection of Adversarial Examples using Class-conditional Generative Adversarial Networkscited by 3
- 2021Unity is strength: Improving the Detection of Adversarial Examples with Ensemble Approachescited by 3
- 2022Nowhere to Hide: A Lightweight Unsupervised Detector against Adversarial Examplescited by 3
- 2022An Adversarial Robustness Perspective on the Topology of Neural Networkscited by 3
- 2023Improving Robustness Against Adversarial Attacks with Deeply Quantized Neural Networkscited by 3
- 2023Adversarial Medical Image with Hierarchical Feature Hidingcited by 3
- 2024Fall Leaf Adversarial Attack on Traffic Sign Classificationcited by 3
- 2025Generative Data Mining with Longtail-Guided Diffusioncited by 3
- 2025Influence Functions for Edge Edits in Non-Convex Graph Neural Networkscited by 3
- 2021Feature-Filter: Detecting Adversarial Examples through Filtering off Recessive Featurescited by 2
- 2021Two Souls in an Adversarial Image: Towards Universal Adversarial Example Detection using Multi-view Inconsistencycited by 2
- 2022Rethinking Machine Learning Robustness via its Link with the Out-of-Distribution Problemcited by 2
- 2022Exploiting the Potential of Datasets: A Data-Centric Approach for Model Robustnesscited by 2
- 2022A Mask-Based Adversarial Defense Schemecited by 2
- 2022Detecting Textual Adversarial Examples Based on Distributional Characteristics of Data Representationscited by 2
- 2022Detecting Adversarial Examples in Batches -- a geometrical approachcited by 2
- 2023Class based Influence Functions for Error Detectioncited by 2
- 2025GenoArmory: A Unified Evaluation Framework for Adversarial Attacks on Genomic Foundation Modelscited by 2
- 2021Medical Aegis: Robust adversarial protectors for medical imagescited by 1
- 2022Attack-Agnostic Adversarial Detectioncited by 1
- 2023Detection of Adversarial Physical Attacks in Time-Series Image Datacited by 1
- 2023Adversarial-Aware Deep Learning System based on a Secondary Classical Machine Learning Verification Approachcited by 1
- 2023Towards Black-box Adversarial Example Detection: A Data Reconstruction-based Methodcited by 1
50 most cited of 72 All 72 (JSON)
- 2026GeoDetect: Geometric Adversarial Detection for VLPs16 Jul 2026
- 2026VLAMotor: Test-Guided Enhancement of Vision-Language-Action Models via Agent-BasedData Synthesis16 May 2026
- 2026Detecting Adversarial Data via Provable Adversarial Noise Amplification4 May 2026
- 2026Mechanistic Anomaly Detection via Functional Attribution21 Apr 2026
- 2025Faithful and Fast Influence Function via Advanced Sampling30 Oct 2025
- 2025A Statistical Method for Attack-Agnostic Adversarial Attack Detection with Compressive Sensing Comparison3 Oct 2025
- 2025Revisiting Data Attribution for Influence Functions10 Aug 2025
- 2025A Comparative Analysis of Influence Signals for Data Debugging13 Jun 2025
- 2025Influence Functions for Edge Edits in Non-Convex Graph Neural Networks5 Jun 2025
- 2025Anomaly Detection Based on Critical Paths for Deep Neural Networks20 May 2025
- 2025GenoArmory: A Unified Evaluation Framework for Adversarial Attacks on Genomic Foundation Models16 May 2025
- 2025Quantitative Analysis of Deeply Quantized Tiny Neural Networks Robust to Adversarial Attacks12 Mar 2025
38 more
- 2025Generative Data Mining with Longtail-Guided Diffusion4 Feb 2025
- 2025Topological Signatures of Adversaries in Multimodal Alignments29 Jan 2025
- 2025TLXML: Task-Level Explanation of Meta-Learning via Influence Functions24 Jan 2025
- 2025Understanding Impact of Human Feedback via Influence Functions10 Jan 2025
- 2024Fall Leaf Adversarial Attack on Traffic Sign Classification27 Nov 2024
- 2024Time Traveling to Defend Against Adversarial Example Attacks in Image Classification10 Oct 2024
- 2024Discerning the Chaos: Detecting Adversarial Perturbations while Disentangling Intentional from Unintentional Noises29 Sep 2024
- 2024Channel Matters: Estimating Channel Influence for Multivariate Time Series27 Aug 2024
- 2024Resilience and Security of Deep Neural Networks Against Intentional and Unintentional Perturbations: Survey and Research Challenges31 Jul 2024
- 2024Data Poisoning Attacks on Off-Policy Policy Evaluation Methods6 Apr 2024
- 2023Defenses in Adversarial Machine Learning: A Survey13 Dec 2023
- 2023Adversarial Medical Image with Hierarchical Feature Hiding4 Dec 2023
- 2023What Learned Representations and Influence Functions Can Tell Us About Adversarial Examples19 Sep 2023
- 2023GIT: Detecting Uncertainty, Out-Of-Distribution and Adversarial Samples using Gradients and Invariance Transformations5 Jul 2023
- 2023Revisiting the Trade-off between Accuracy and Robustness via Weight Distribution of Filters6 Jun 2023
- 2023Towards Black-box Adversarial Example Detection: A Data Reconstruction-based Method3 Jun 2023
- 2023Adversarial-Aware Deep Learning System based on a Secondary Classical Machine Learning Verification Approach1 Jun 2023
- 2023New Adversarial Image Detection Based on Sentiment Analysis3 May 2023
- 2023Class based Influence Functions for Error Detection2 May 2023
- 2023Detection of Adversarial Physical Attacks in Time-Series Image Data27 Apr 2023
- 2023Improving Robustness Against Adversarial Attacks with Deeply Quantized Neural Networks25 Apr 2023
- 2023AdvCheck: Characterizing Adversarial Examples via Local Gradient Checking25 Mar 2023
- 2023Revisiting the Fragility of Influence Functions22 Mar 2023
- 2023Explainability and Robustness of Deep Visual Classification Models3 Jan 2023
- 2022Training Data Influence Analysis and Estimation: A Survey9 Dec 2022
- 2022An Adversarial Robustness Perspective on the Topology of Neural Networks4 Nov 2022
- 2022Visual Adversarial Attacks and Defenses in the Physical World: A Survey3 Nov 2022
- 2022Nowhere to Hide: A Lightweight Unsupervised Detector against Adversarial Examples16 Oct 2022
- 2022Robust Models are less Over-Confident12 Oct 2022
- 2022Understanding Influence Functions and Datamodels via Harmonic Analysis3 Oct 2022
- 2022Dispersed Pixel Perturbation-based Imperceptible Backdoor Trigger for Image Classifier Models19 Aug 2022
- 2022Detecting Adversarial Examples in Batches -- a geometrical approach17 Jun 2022
- 2022Attack-Agnostic Adversarial Detection1 Jun 2022
- 2022Membership Inference Attack Using Self Influence Functions26 May 2022
- 2022Understanding Programmatic Weak Supervision via Source-aware Influence Function25 May 2022
- 2022Detecting Textual Adversarial Examples Based on Distributional Characteristics of Data Representations29 Apr 2022
- 2022A Mask-Based Adversarial Defense Scheme21 Apr 2022
- 2022Special Session: Towards an Agile Design Methodology for Efficient, Reliable, and Secure ML Systems18 Apr 2022
50 newest of 72 All 72 (JSON)
- 2026Mechanistic Anomaly Detection via Functional Attribution21 Apr 2026
- 2024Data Poisoning Attacks on Off-Policy Policy Evaluation Methods6 Apr 2024
- 2022Membership Inference Attack Using Self Influence Functions26 May 2022
- 2025Generative Data Mining with Longtail-Guided Diffusioncited by 3
- 2025Generative Data Mining with Longtail-Guided Diffusion4 Feb 2025
- 2026GeoDetect: Geometric Adversarial Detection for VLPscited by 0
- 2026GeoDetect: Geometric Adversarial Detection for VLPs16 Jul 2026
- 2022Training Data Influence Analysis and Estimation: A Surveycited by 135
- 2021Advances in adversarial attacks and defenses in computer vision: A surveycited by 127
- 2021Adversarial Example Detection for DNN Models: A Review and Experimental Comparisoncited by 52
- 2021LiBRe: A Practical Bayesian Approach to Adversarial Detectioncited by 40
- 2021SpectralDefense: Detecting Adversarial Attacks on CNNs in the Fourier Domaincited by 30
- 2022Robust Models are less Over-Confidentcited by 25
- 2022Understanding Influence Functions and Datamodels via Harmonic Analysiscited by 23
- 2023Revisiting the Fragility of Influence Functionscited by 20
- 2021MagDR: Mask-guided Detection and Reconstruction for Defending Deepfakescited by 17
- 2021Two Coupled Rejection Metrics Can Tell Adversarial Examples Apartcited by 14
- 2023Defenses in Adversarial Machine Learning: A Surveycited by 14
- 2021Multi-Expert Adversarial Attack Detection in Person Re-identification Using Context Inconsistencycited by 12
12 most cited of 65 All 65 (JSON)
- 2026Detecting Adversarial Data via Provable Adversarial Noise Amplification4 May 2026
- 2025Faithful and Fast Influence Function via Advanced Sampling30 Oct 2025
- 2025A Statistical Method for Attack-Agnostic Adversarial Attack Detection with Compressive Sensing Comparison3 Oct 2025
- 2025Revisiting Data Attribution for Influence Functions10 Aug 2025
- 2025A Comparative Analysis of Influence Signals for Data Debugging13 Jun 2025
- 2025Influence Functions for Edge Edits in Non-Convex Graph Neural Networks5 Jun 2025
- 2025Anomaly Detection Based on Critical Paths for Deep Neural Networks20 May 2025
- 2025GenoArmory: A Unified Evaluation Framework for Adversarial Attacks on Genomic Foundation Models16 May 2025
- 2025Quantitative Analysis of Deeply Quantized Tiny Neural Networks Robust to Adversarial Attacks12 Mar 2025
- 2025Topological Signatures of Adversaries in Multimodal Alignments29 Jan 2025
- 2025TLXML: Task-Level Explanation of Meta-Learning via Influence Functions24 Jan 2025
- 2024Fall Leaf Adversarial Attack on Traffic Sign Classification27 Nov 2024
12 newest of 65 All 65 (JSON)