Training-Time Attacks Against K-Nearest Neighbors

Abstract

Nearest neighbor-based methods are commonly used for classification tasks and as subroutines of other data-analysis methods. An attacker with the capability of inserting their own data points into the training set can manipulate the inferred nearest neighbor structure. We distill this goal to the task of performing a training-set data insertion attack against k-Nearest Neighbor classification (kNN). We prove that computing an optimal training-time (a.k.a. poisoning) attack against kNN classification is NP-Hard, even when k = 1 and the attacker can insert only a single data point. We provide an anytime algorithm to perform such an attack, and a greedy algorithm for general k and attacker budget. We provide theoretical bounds and empirically demonstrate the effectiveness and practicality of our methods on synthetic and real-world datasets. Empirically, we find that kNN is vulnerable in practice and that dimensionality reduction is an effective defense. We conclude with a discussion of open problems illuminated by our analysis.

Cite

Text

Vartanian et al. "Training-Time Attacks Against K-Nearest Neighbors." AAAI Conference on Artificial Intelligence, 2023. doi:10.1609/AAAI.V37I8.26198

Markdown

[Vartanian et al. "Training-Time Attacks Against K-Nearest Neighbors." AAAI Conference on Artificial Intelligence, 2023.](https://mlanthology.org/aaai/2023/vartanian2023aaai-training/) doi:10.1609/AAAI.V37I8.26198

BibTeX

@inproceedings{vartanian2023aaai-training,
  title     = {{Training-Time Attacks Against K-Nearest Neighbors}},
  author    = {Vartanian, Ara and Rosenbaum, Will and Alfeld, Scott},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year      = {2023},
  pages     = {10053-10060},
  doi       = {10.1609/AAAI.V37I8.26198},
  url       = {https://mlanthology.org/aaai/2023/vartanian2023aaai-training/}
}