Membership Inference Attacks against Vision Transformers: Mosaic MixUp Training to the Defense
Open Access
- 2 December 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1256-1270
Abstract
Vision transformers (ViTs) have demonstrated great success in various fundamental CV tasks, mainly benefiting from their self-attention-based transformer architectures, and the paradigm of pre-training followed by fine-tuning. However, such advantages may lead to significant data privacy risks, such as membership inference attacks (MIAs), which remain unclear. This paper presents the first comprehensive study on MIAs and corresponding defenses against ViTs. Our first contribution is a rollout-attention-based MIA method (RAMIA), based on an experimental observation that the attention, more precisely the rollout attention, behaves disproportionately for members and non-members. We evaluate RAMIA on the standard ViT architecture proposed by Google (ICLR 2021), achieving high accuracy, precision, and recall performance. Further, inspired by another experimental observation on a strong connection between positional embeddings (PEs) and attentions, we propose a novel framework for training ViTs, named Mosaic MixUp Training (MMUT), as a defense against RAMIA. Intuitively, MMUT mixes up private images and public ones at a patch level, and mosaics the corresponding PEs with a global learnable mosaic embedding. Our empirical results show MMUT achieves a much better accuracy-privacy trade-off than some common defense mechanisms. Extensive experiments are conducted to rigorously evaluate both RAMIA and MMUT.Keywords
Funding Information
- National Natural Science Foundation of China (62302183, 62372191, 62302187)
This publication has 34 references indexed in Scilit:
- Membership Inference Attacks by Exploiting Loss Trajectory2022
- A Survey on Vision TransformerIEEE Transactions on Pattern Analysis and Machine Intelligence, 2022
- EncoderMI: Membership Inference against Pre-trained Encoders in Contrastive Learning2021
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows2021
- Resisting membership inference attacks through knowledge distillationNeurocomputing, 2021
- Hardware Information Flow TrackingACM Computing Surveys, 2021
- End-to-End Object Detection with Transformers2020
- Machine Learning with Membership Privacy using Adversarial Regularization2018
- Deep Learning with Differential Privacy2016
- ImageNet: A large-scale hierarchical image database2009