Membership inference attacks against in-context learning (ICL)Membership Inference Attacks Against In-Context Learning
The authors propose a membership inference attack against in-context learning (ICL) that can determine a sample's membership status using only text generated by the model, without probability outputs, and state that this is the first such attack in this setting. The attack includes four strategies to adapt to different constrained settings; experiments on four mainstream large language models show that it can accurately determine membership status in most cases, with an accuracy advantage of up to 95% on LLaMA; a hybrid attack combining the strengths of each strategy achieves an accuracy advantage exceeding 95% in most cases. The authors also propose defenses targeting three aspects—data, instructions, and outputs—and experiments show that combining defenses across orthogonal dimensions can significantly reduce privacy leakage and provide stronger privacy guarantees.