mlsanityData to 14 Oct 2026

Membership Inference Attacks for Retrieval Based In-Context Learning for Document Question Answering

arXiv 2605.04116 ↗First posted 5 May 2026cs.CR cs.LGcited by 0

On the map: LLM safety and security → Membership inference attacks

Abstract (arXiv)

We show that remotely hosted applications employing in-context learning when augmented with a retrieval function to select in-context examples can be vulnerable to membership-inference attacks even when the service provider and users are separate parties. We propose two black-box membership inference attacks that exploit query text prefixes to distinguish member from non-member inputs. The first attack uses a reference model to estimate an otherwise unavailable loss metric. The second attack improves upon it by eliminating the reference model and instead computing a membership statistic through a simple but novel weighted-averaging scheme. Our comprehensive empirical evaluations consider a stricter case in which the adversary has a paraphrased version of the text in the queries and show that our attacks can exhibit stronger resilience to paraphrasing and outperform three prior attacks in many cases with small number of prefixes. We also adapt an existing ensemble prompting defense to our setting, demonstrating that it substantially mitigates the privacy leakage caused by our second attack.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Membership inference attacks, one of 12 directions in LLM safety and security. Builds on 35 of its 45 references that are in the map. First posted on arXiv 5 May 2026.

Builds on

35 of 45 references.

Closest ancestors · 6

Same direction, newest first

  1. 2024On the Privacy Risk of In-context Learning15 Nov
  2. 2024Membership Inference Attacks Against In-Context Learning2 Sep
  3. 2024Do Membership Inference Attacks Work on Large Language Models?12 Feb
  4. 2023Membership Inference Attacks against Language Models via Neighbourhood Comparison29 May
  5. 2022Quantifying Privacy Risks of Masked Language Models Using Membership Inference Attacks8 Mar
  6. 2021Membership Inference Attacks From First Principles7 Dec

Other references · 29

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  3. 2016Membership Inference Attacks against Machine Learning Modelscited by 2,281
  4. 2020Extracting Training Data from Large Language Modelscited by 2,189
  5. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
  6. 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
  7. 2024A Survey on LLM-as-a-Judgecited by 1,423
  8. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
  9. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
  10. 2024Gemma: Open Models Based on Gemini Research and Technologycited by 916
  11. 2022A Survey on In-context Learningcited by 721
  12. 2023Med-Flamingo: a Multimodal Medical Few-shot Learnercited by 392
17 more
  1. 2024The Faiss librarycited by 376
  2. 2016NewsQA: A Machine Comprehension Datasetcited by 331
  3. 2022Demystifying Prompts in Language Models via Perplexity Estimationcited by 216
  4. 2022Active Example Selection for In-Context Learningcited by 196
  5. 2022In-context Examples Selection for Machine Translationcited by 172
  6. 2021Counterfactual Memorization in Neural Language Modelscited by 156
  7. 2020The Effect of Natural Distribution Shift on Question Answering Modelscited by 104
  8. 2023Privacy-Preserving In-Context Learning with Differentially Private Few-Shot Generationcited by 96
  9. 2023Flocks of Stochastic Parrots: Differentially Private Prompt Learning for Large Language Modelscited by 83
  10. 2023Privacy-Preserving In-Context Learning for Large Language Modelscited by 50
  11. 2022Datasheet for the Pilecited by 43
  12. 2023Privacy Side Channels in Machine Learning Systemscited by 40
  13. 2023User Inference Attacks on Large Language Modelscited by 36
  14. 2024Private prediction for large-scale synthetic text generationcited by 24
  15. 2023Machine Unlearning: A Surveycited by 19
  16. 2023SummQA at MEDIQA-Chat 2023:In-Context Learning with GPT-4 for Medical Summarizationcited by 13
  17. 2024Data-adaptive Differentially Private Prompt Synthesis for In-Context Learningcited by 10

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026Five Queries Are Enough: Query-Efficient and Surrogate-Free Membership Inference Attacks on RAG via Entailment
  2. 2026CIG-MIA: Context-Induced Information Gain Membership Inference Attacks against Retrieval-Augmented Generation
  3. 2024Membership Inference Attack against Long-Context Large Language Models
  4. 2025DocMIA: Document-Level Membership Inference Attacks against DocVQA Models
  5. 2025Ensemble Privacy Defense for Knowledge-Intensive LLMs against Membership Inference Attacks
  6. 2025Riddle Me This! Stealthy Membership Inference for Retrieval-Augmented Generation
  7. 2025Safeguarding Privacy of Retrieval Data against Membership Inference Attacks: Is This Query Too Close to Home?
  8. 2026Pop Quiz Attack: Black-box Membership Inference Attacks Against Large Language Models