K Nearest Neighbors (KNN) is a supervised machine learning algorithm used for classification and regression tasks. It is a type of instance-based learning where the algorithm makes predictions based on the majority class or average of the k-nearest data points in the feature space.

Posts

Improving neural network robustness through neighborhood preserving layers

Improving neural network robustness through neighborhood preserving layers One major source of vulnerability of neural nets in classification tasks is from overparameterized fully connected layers near the end of the network. In this paper, we propose a new neighborhood preserving layer which can replace these fully connected layers to improve the network robustness. Networks including these neighborhood preserving layers can be trained efficiently. We theoretically prove that our proposed layers are more robust against distortion because they effectively control the magnitude of gradients. Finally, we empirically show that networks with our proposed layers are more robust against state-of-the-art gradient descent-based attacks, such as a PGD attack on the benchmark image classification datasets MNIST and CIFAR10.