mlsanityData to 14 Oct 2026

ASK: Adversarial Soft k-Nearest Neighbor Attack and Defense

arXiv 2106.14300 ↗First posted 27 Jun 2021cs.LG cs.AI cs.CRcited by 4

Not on the map. Why?

Abstract (arXiv)

K-Nearest Neighbor (kNN)-based deep learning methods have been applied to many applications due to their simplicity and geometric interpretability. However, the robustness of kNN-based classification models has not been thoroughly explored and kNN attack strategies are underdeveloped. In this paper, we propose an Adversarial Soft kNN (ASK) loss to both design more effective kNN attack strategies and to develop better defenses against them. Our ASK loss approach has two advantages. First, ASK loss can better approximate the kNN's probability of classification error than objectives proposed in previous works. Second, the ASK loss is interpretable: it preserves the mutual information between the perturbed input and the in-class-reference data. We use the ASK loss to generate a novel attack method called the ASK-Attack (ASK-Atk), which shows superior attack efficiency and accuracy degradation relative to previous kNN attacks. Based on the ASK-Atk, we then derive an ASK-underlineDefense (ASK-Def) method that optimizes the worst-case training loss induced by ASK-Atk. Experiments on CIFAR-10 (ImageNet) show that (i) ASK-Atk achieves ≥ 13% (≥ 13%) improvement in attack success rate over previous kNN attacks, and (ii) ASK-Def outperforms the conventional adversarial training method by ≥ 6.9% (≥ 3.5%) in terms of robustness improvement.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 16 of its 44 references that are in the map. First posted on arXiv 27 Jun 2021.

Builds on

16 of 44 references.

References · 16

  1. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
  2. 2018Representation Learning with Contrastive Predictive Codingcited by 7,777
  3. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,415
  4. 2013Intriguing properties of neural networkscited by 5,155
  5. 2017Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithmscited by 4,349
  6. 2016Adversarial examples in the physical worldcited by 1,769
  7. 2019Theoretically Principled Trade-off between Robustness and Accuracycited by 1,517
  8. 2020Nearest Neighbor Machine Translationcited by 209
  9. 2018Deep k-Nearest Neighbors: Towards Confident, Interpretable and Robust Deep Learningcited by 207
  10. 2018Neural Nearest Neighbors Networkscited by 98
  11. 2019Analyzing and Improving Representations with the Soft Nearest Neighbor Losscited by 95
  12. 2020Deep k-NN for Noisy Labelscited by 55
4 more
  1. 2017Analyzing the Robustness of Nearest Neighbors to Adversarial Examplescited by 36
  2. 2019An adaptive nearest neighbor rule for classificationcited by 13
  3. 2019On the Robustness of Deep K-Nearest Neighborscited by 10
  4. 2019AdvKnn: Adversarial Attacks On K-Nearest Neighbor Classifiers With Approximate Gradientscited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2022: 1; 2023: 1; 2024: 1; 2025: 0; 2026: 1.

4 papers.