mlsanityData to 14 Oct 2026

Detecting Adversarial Samples Using Influence Functions and Nearest Neighbors

arXiv 1909.06872 ↗First posted 15 Sep 2019cs.LG stat.MLcited by 72

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

Cited by year (2026 to 14 Oct)

Citing papers per year: 2021: 18; 2022: 18; 2023: 14; 2024: 6; 2025: 12; 2026: 4.

72 papers.

Sort:

By area:

  1. 2022Training Data Influence Analysis and Estimation: A Surveycited by 135
  2. 2021Advances in adversarial attacks and defenses in computer vision: A surveycited by 127
  3. 2021Adversarial Example Detection for DNN Models: A Review and Experimental Comparisoncited by 52
  4. 2021LiBRe: A Practical Bayesian Approach to Adversarial Detectioncited by 40
  5. 2021SpectralDefense: Detecting Adversarial Attacks on CNNs in the Fourier Domaincited by 30
  6. 2022Robust Models are less Over-Confidentcited by 25
  7. 2022Understanding Influence Functions and Datamodels via Harmonic Analysiscited by 23
  8. 2022Membership Inference Attack Using Self Influence Functionscited by 20
  9. 2023Revisiting the Fragility of Influence Functionscited by 20
  10. 2021MagDR: Mask-guided Detection and Reconstruction for Defending Deepfakescited by 17
  11. 2021Two Coupled Rejection Metrics Can Tell Adversarial Examples Apartcited by 14
  12. 2023Defenses in Adversarial Machine Learning: A Surveycited by 14
38 more
  1. 2021Multi-Expert Adversarial Attack Detection in Person Re-identification Using Context Inconsistencycited by 12
  2. 2021Out-of-Distribution Generalization Analysis via Influence Functioncited by 11
  3. 2022Visual Adversarial Attacks and Defenses in the Physical World: A Surveycited by 11
  4. 2025Understanding Impact of Human Feedback via Influence Functionscited by 11
  5. 2021Detecting AutoAttack Perturbations in the Frequency Domaincited by 10
  6. 2021NoiLIn: Improving Adversarial Training and Correcting Stereotype of Noisy Labelscited by 8
  7. 2022Residue-Based Natural Language Adversarial Attack Detectioncited by 8
  8. 2022Understanding Programmatic Weak Supervision via Source-aware Influence Functioncited by 8
  9. 2022Dispersed Pixel Perturbation-based Imperceptible Backdoor Trigger for Image Classifier Modelscited by 7
  10. 2022Special Session: Towards an Agile Design Methodology for Efficient, Reliable, and Secure ML Systemscited by 6
  11. 2023New Adversarial Image Detection Based on Sentiment Analysiscited by 6
  12. 2021Simple Post-Training Robustness Using Test Time Augmentations and Random Forestcited by 4
  13. 2021A Uniform Framework for Anomaly Detection in Deep Neural Networkscited by 4
  14. 2023Revisiting the Trade-off between Accuracy and Robustness via Weight Distribution of Filterscited by 4
  15. 2024Data Poisoning Attacks on Off-Policy Policy Evaluation Methodscited by 4
  16. 2021Anomaly Detection of Adversarial Examples using Class-conditional Generative Adversarial Networkscited by 3
  17. 2021Unity is strength: Improving the Detection of Adversarial Examples with Ensemble Approachescited by 3
  18. 2022Nowhere to Hide: A Lightweight Unsupervised Detector against Adversarial Examplescited by 3
  19. 2022An Adversarial Robustness Perspective on the Topology of Neural Networkscited by 3
  20. 2023Improving Robustness Against Adversarial Attacks with Deeply Quantized Neural Networkscited by 3
  21. 2023Adversarial Medical Image with Hierarchical Feature Hidingcited by 3
  22. 2024Fall Leaf Adversarial Attack on Traffic Sign Classificationcited by 3
  23. 2025Generative Data Mining with Longtail-Guided Diffusioncited by 3
  24. 2025Influence Functions for Edge Edits in Non-Convex Graph Neural Networkscited by 3
  25. 2021Feature-Filter: Detecting Adversarial Examples through Filtering off Recessive Featurescited by 2
  26. 2021Two Souls in an Adversarial Image: Towards Universal Adversarial Example Detection using Multi-view Inconsistencycited by 2
  27. 2022Rethinking Machine Learning Robustness via its Link with the Out-of-Distribution Problemcited by 2
  28. 2022Exploiting the Potential of Datasets: A Data-Centric Approach for Model Robustnesscited by 2
  29. 2022A Mask-Based Adversarial Defense Schemecited by 2
  30. 2022Detecting Textual Adversarial Examples Based on Distributional Characteristics of Data Representationscited by 2
  31. 2022Detecting Adversarial Examples in Batches -- a geometrical approachcited by 2
  32. 2023Class based Influence Functions for Error Detectioncited by 2
  33. 2025GenoArmory: A Unified Evaluation Framework for Adversarial Attacks on Genomic Foundation Modelscited by 2
  34. 2021Medical Aegis: Robust adversarial protectors for medical imagescited by 1
  35. 2022Attack-Agnostic Adversarial Detectioncited by 1
  36. 2023Detection of Adversarial Physical Attacks in Time-Series Image Datacited by 1
  37. 2023Adversarial-Aware Deep Learning System based on a Secondary Classical Machine Learning Verification Approachcited by 1
  38. 2023Towards Black-box Adversarial Example Detection: A Data Reconstruction-based Methodcited by 1

50 most cited of 72 All 72 (JSON)