Integrating kNN with Foundation Models for Adaptable and Privacy-Aware Image Classification (2402.12500v1)
Abstract: Traditional deep learning models implicity encode knowledge limiting their transparency and ability to adapt to data changes. Yet, this adaptability is vital for addressing user data privacy concerns. We address this limitation by storing embeddings of the underlying training data independently of the model weights, enabling dynamic data modifications without retraining. Specifically, our approach integrates the $k$-Nearest Neighbor ($k$-NN) classifier with a vision-based foundation model, pre-trained self-supervised on natural images, enhancing interpretability and adaptability. We share open-source implementations of a previously unpublished baseline method as well as our performance-improving contributions. Quantitative experiments confirm improved classification across established benchmark datasets and the method's applicability to distinct medical image classification tasks. Additionally, we assess the method's robustness in continual learning and data removal scenarios. The approach exhibits great promise for bridging the gap between foundation models' performance and challenges tied to data privacy. The source code is available at https://github.com/TobArc/privacy-aware-image-classification-with-kNN.
- “Bert: Pre-training of deep bidirectional transformers for language understanding,” in North American Chapter of the Association for Computational Linguistics, 2019.
- “Language models are few-shot learners,” in Advances in Neural Information Processing Systems, H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, Eds. 2020, vol. 33, pp. 1877–1901, Curran Associates, Inc.
- “An image is worth 16x16 words: Transformers for image recognition at scale,” in International Conference on Learning Representations, 2021.
- “Learning transferable visual models from natural language supervision,” in International Conference on Machine Learning, 2021.
- “Emerging properties in self-supervised vision transformers,” 2021 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 9630–9640, 2021.
- “Retrieval augmented language model pre-training,” in Proceedings of the 37th International Conference on Machine Learning, Hal Daumé III and Aarti Singh, Eds. 13–18 Jul 2020, vol. 119 of Proceedings of Machine Learning Research, pp. 3929–3938, PMLR.
- “Revisiting a knn-based image classification system with high-capacity storage,” in Computer Vision – ECCV 2022. 2022, pp. 457–474, Springer Nature Switzerland.
- “Data security issues in deep learning: Attacks, countermeasures, and opportunities,” IEEE Communications Magazine, vol. 57, no. 11, pp. 116–122, 2019.
- European Union, “Regulation (eu) 2016/679 of the european parliament and of the council of 27 april 2016 on the protection of natural persons with regard to the processing of personal data and on the free movement of such data, and repealing directive 95/46/ec (general data protection regulation),” 2016, Article 17, Right to erasure (‘right to be forgotten’).
- “A comprehensive survey of forgetting in deep learning beyond continual learning,” 2023.
- “A continual learning survey: Defying forgetting in classification tasks,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 44, no. 07, pp. 3366–3385, 2022.
- “k-nearest neighbour classifiers - a tutorial,” ACM Computing Surveys (CSUR), vol. 54, pp. 1 – 25, 2020.
- “Attention is all you need,” in Neural Information Processing Systems, 2017.
- “Hierarchical text-conditional image generation with clip latents,” ArXiv, vol. abs/2204.06125, 2022.
- “Dinov2: Learning robust visual features without supervision,” 2023.
- “Gradient episodic memory for continual learning,” in Neural Information Processing Systems, 2017.
- “Experience replay for continual learning,” in Neural Information Processing Systems, 2018.
- “icarl: Incremental classifier and representation learning,” 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 5533–5542, 2016.
- “Deep k-NN for noisy labels,” in Proceedings of the 37th International Conference on Machine Learning, Hal Daumé III and Aarti Singh, Eds. 13–18 Jul 2020, vol. 119 of Proceedings of Machine Learning Research, pp. 540–550, PMLR.
- “Improving language models by retrieving from trillions of tokens,” in International Conference on Machine Learning, 2021.
- Distance and Similarity Measures, pp. 385–400, Springer New York, New York, NY, 2014.
- “Chroma - the open-source embedding database,” 2023.
- “Imagenet classification with deep convolutional neural networks,” in Advances in Neural Information Processing Systems, F. Pereira, C.J. Burges, L. Bottou, and K.Q. Weinberger, Eds. 2012, vol. 25, Curran Associates, Inc.
- “An analysis of single-layer networks in unsupervised feature learning,” in Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, Geoffrey Gordon, David Dunson, and Miroslav Dudík, Eds., Fort Lauderdale, FL, USA, 11–13 Apr 2011, vol. 15 of Proceedings of Machine Learning Research, pp. 215–223, PMLR.
- “Identifying medical diagnoses and treatable diseases by image-based deep learning,” Cell, vol. 172, no. 5, pp. 1122–1131.e9, 2018.
- “Skin lesion analysis toward melanoma detection 2018: A challenge hosted by the international skin imaging collaboration (isic),” 2019.
- “Descriptor : The ham 10000 dataset , a large collection of multi-source dermatoscopic images of common pigmented skin lesions,” 2018.
- “Wide residual networks,” 2017.
- “Imagenet: A large-scale hierarchical image database,” 2009 IEEE Conference on Computer Vision and Pattern Recognition, pp. 248–255, 2009.
- “Covxnet: A multi-dilation convolutional neural network for automatic covid-19 and other pneumonia detection from chest x-ray images with transferable multi-receptive feature optimization,” Computers in Biology and Medicine, vol. 122, pp. 103869, 2020.
- “Analysis of the isic image datasets: Usage, benchmarks and recommendations,” Medical Image Analysis, vol. 75, pp. 102305, 2022.