In this thesis we study two problems, one in unsupervised learning - k-means clustering and the other in a supervised learning setting with the presence of adversarial perturbations. We do a beyond-worst case style analysis and show that in either case instances that are resilient to adversarial perturbations are also...