Riddle Me This! Stealthy Membership Inference for Retrieval-Augmented Generation
Open accessThe DOI matches its Crossref record; 37 of the 37 references it cites were found in a registry or an index.
Abstract
Retrieval-Augmented Generation (RAG) enables Large Language Models (LLMs) to generate grounded responses by leveraging external knowledge databases without altering model parameters. Although the absence of weight tuning prevents leakage via model parameters, it introduces the risk of inference adversaries exploiting retrieved documents in the model's context. Existing methods for membership inference and data extraction often rely on jailbreaking or carefully crafted unnatural queries, which can be easily detected or thwarted with query rewriting techniques common in RAG systems. In this work, we present øurattackfull (øurattack), a membership inference technique targeting documents in the RAG datastore. By crafting natural-text queries that are answerable only with the target document's presence, our approach demonstrates successful inference with just 30 queries while remaining stealthy; straightforward detectors identify adversarial prompts from existing methods up to ~76× more frequently than those generated by our attack. We observe a 2× improvement in TPR@1%FPR over prior inference attacks across diverse RAG configurations, all while costing less than $0.02 per document inference.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“Therefore, some outstanding RAG MIA methods proposed by Naseh et al. [15] and Anderson et al. [1] may not work well in our setting, since they rely on multiple judgment queries (e.g., yes/no questions) to directly ask the model about the membership of the target item, which could be easily predicted or inferred with other memory units.”
From MRMMIA: Membership Inference Attacks on Memory in Chat Agents (2026) · cites this paper as [15]
Experimental — accuracy not yet measuredIn the citing paper
“Past work [1, 11, 12, 15, 17] has shown that carefully designed prompts can extract specific information from a language model system, such as finetuned LLMs and RAG systems.”
From MRMMIA: Membership Inference Attacks on Memory in Chat Agents (2026) · cites this paper as [15]
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Survey of Hallucination in Natural Language Generation
Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., Ishii, E., Bang, Y. J., Madotto, A., & Fung, P. (2023) · ACM Computing Surveys · doi:10.1145/3571730 · Cited by 5,025
Membership Inference Attacks Against Machine Learning Models
Shokri, R., Stronati, M., Song, C., & Shmatikov, V. (2017) · 2017 IEEE Symposium on Security and Privacy (SP) · doi:10.1109/sp.2017.41 · Cited by 4,754
Nasr, M., Shokri, R., & Houmansadr, A. (2019) · 2019 IEEE Symposium on Security and Privacy (SP) · doi:10.1109/sp.2019.00065 · Cited by 1,760 · cited 1×
“Most real-world systems that deploy user-facing LLMs rely on guardrails [10] to detect and avoid potentially malicious queries.”
Self-citationAutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
Shin, T., Razeghi, Y., Logan IV, R. L., Wallace, E., & Singh, S. (2020) · Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2020.emnlp-main.346 · Cited by 1,279
HotFlip: White-Box Adversarial Examples for Text Classification
Ebrahimi, J., Rao, A., Lowd, D., & Dou, D. (2018) · Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers) · doi:10.18653/v1/p18-2006 · Cited by 922 · cited 1×
“These inferences carry implications for privacy, IP exposure, and regulatory compliance.”
Membership Inference Attacks From First Principles
Carlini, N., Chien, S., Nasr, M., Song, S., Terzis, A., & Tramèr, F. (2022) · 2022 IEEE Symposium on Security and Privacy (SP) · doi:10.1109/sp46214.2022.9833649 · Cited by 502
The Good and The Bad: Exploring Privacy Issues in Retrieval-Augmented Generation (RAG)Preprint
Zeng, S.-L., Zhang, J., He, P.-F., Liu, Y., Xing, Y., Xu, H., Ren, J., Chang, Y., Wang, S.-Q., Yin, D.-W., et al. (2024) · Annual Meeting of the Association for Computational Linguistics · doi:10.48550/arxiv.2402.16893 · Cited by 300
Query Rewriting in Retrieval-Augmented Large Language Models
Ma, X., Gong, Y., He, P., Zhao, H., & Duan, N. (2023) · Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2023.emnlp-main.322 · Cited by 263
Building Guardrails for Large Language Models
Dong, Y., Mu, R., Jin, G., Qi, Y., Hu, J., Zhao, X., Meng, J., Ruan, W., & Huang, X. (2024) · International Conference on Machine Learning · doi:10.48550/arxiv.2402.01822 · Cited by 216
Document Expansion by Query Prediction
Nogueira, R. F., Yang, W., Lin, J., & Cho, K. (2019) · arXiv (Cornell University) · doi:10.48550/arxiv.1904.08375 · Cited by 191
Phantom: General Backdoor Attacks on Retrieval Augmented Language GenerationPreprint
Chaudhari, H., Severi, G., Abascal, J., Suri, A., Jagielski, M., Choquette-Choo, C. A., Nasr, M., Nita-Rotaru, C., & Oprea, A. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2405.20485 · Cited by 157
Self-citationConvGQR: Generative Query Reformulation for Conversational Search
Mo, F., Mao, K., Zhu, Y., Wu, Y., Huang, K., & Nie, J. (2023) · Proceedings of the conference - Association for Computational Linguistics. Meeting · doi:10.18653/v1/2023.acl-long.274 · Cited by 149
The Good and The Bad: Exploring Privacy Issues in Retrieval-Augmented Generation (RAG)
Zeng, S., Zhang, J., He, P., Liu, Y., Xing, Y., Xu, H., Ren, J., Chang, Y., Wang, S., Yin, D., et al. (2024) · Findings of the Association for Computational Linguistics ACL 2024 · doi:10.18653/v1/2024.findings-acl.267 · Cited by 149
Gemma 2: Improving Open Language Models at a Practical Size
Gemma Team, Riviere, M., Pathak, S., Sessa, P. G., Hardin, C., Bhupatiraju, S., Hussenot, L., Mesnard, T., Shahriari, B., Ramé, A., et al. (2024) · arXiv · doi:10.48550/arxiv.2408.00118 · Cited by 149
Qwen, :, Yang, A., Yang, B., Zhang, B., Hui, B., Zheng, B., Yu, B., Li, C., Liu, D., et al. (2024) · arXiv · doi:10.48550/arxiv.2412.15115 · Cited by 128
Ignore Previous Prompt: Attack Techniques For Language Models
Perez, F., & Ribeiro, I. (2022) · arXiv · doi:10.48550/arxiv.2211.09527 · Cited by 110 · cited 1×
“Suchinferencesmay alreadyconstituteprivacyviolationsunderdataprotection regulationslikeGDPR,particularlywhentiedtospecific individuals.”
Qi, Z., Zhang, H., Xing, E., Kakade, S., & Lakkaraju, H. (2024) · International Conference on Learning Representations · doi:10.48550/arxiv.2402.17840 · Cited by 104
Lin, S.-C., Yang, J.-H., Nogueira, R. F., Tsai, M.-F., Wang, C., & Lin, J. (2020) · arXiv (Cornell University) · doi:10.48550/arxiv.2004.01909 · Cited by 103
Membership Inference Attacks against Language Models via Neighbourhood Comparison
Mattern, J., Mireshghallah, F., Jin, Z., Schoelkopf, B., Sachan, M., & Berg-Kirkpatrick, T. (2023) · Findings of the Association for Computational Linguistics: ACL 2023 · doi:10.18653/v1/2023.findings-acl.719 · Cited by 89
Towards General Text Embeddings with Multi-stage Contrastive Learning
Li, Z., Zhang, X., Zhang, Y., Long, D., Xie, P., & Zhang, M. (2023) · arXiv · doi:10.48550/arxiv.2308.03281 · Cited by 79
PLeak: Prompt Leaking Attacks against Large Language Model Applications
Hui, B., Yuan, H., Gong, N., Burlina, P., & Cao, Y. (2024) · Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security · doi:10.1145/3658644.3670370 · Cited by 55 · cited 1×
“Apart from adversaries that can inject their own documents via poisoning [6], prompt-stealing adversaries [18] may be able to infer the presence of retrieved documents present in the model’s context via membership inference [46], or extract them directly via data-extraction [5].”
Data Extraction Attacks in Retrieval-Augmented Generation via BackdoorsPreprint
Peng, Y., Wang, J., Hong, Y., & Houmansadr, A. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2411.01705 · Cited by 50
Self-citationGospodinov, M. V., MacAvaney, S., & Macdonald, C. (2023) · Lecture notes in computer science · doi:10.1007/978-3-031-28238-6_31 · Cited by 49
BEIR: A Heterogenous Benchmark for Zero-shot Evaluation of Information Retrieval Models
Thakur, N., Reimers, N., Rücklé, A., Srivastava, A., & Gurevych, I. (2021) · arXiv · doi:10.48550/arxiv.2104.08663 · Cited by 45
On the Privacy Risk of In-context LearningPreprint
Duan, H., Dziedzic, A., Yaghini, M., Papernot, N., & Boenisch, F. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2411.10512 · Cited by 44
Membership Inference Attacks against Fine-tuned Large Language Models via Self-prompt Calibration
Fu, W., Wang, H., Gao, C., Liu, G., Li, Y., & Jiang, T. (2024) · Advances in Neural Information Processing Systems 37 · doi:10.52202/079017-4290 · Cited by 43
Abdin, M., Aneja, J., Behl, H., Bubeck, S., Eldan, R., Gunasekar, S., Harrison, M., Hewett, R. J., Javaheripi, M., Kauffmann, P., et al. (2024) · arXiv · doi:10.48550/arxiv.2412.08905 · Cited by 31
On the Reliability of Watermarks for Large Language Models
Kirchenbauer, J., Geiping, J., Wen, Y., Shu, M., Saifullah, K., Kong, K., Fernando, K., Saha, A., Goldblum, M., & Goldstein, T. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2306.04634 · Cited by 22
Anderson, M., Amit, G., & Goldsteen, A. (2025) · Proceedings of the 11th International Conference on Information Systems Security and Privacy · doi:10.5220/0013108300003899 · Cited by 20
Do Membership Inference Attacks Work on Large Language Models?
Duan, M., Suri, A., Mireshghallah, N., Min, S., Shi, W., Zettlemoyer, L., Tsvetkov, Y., Choi, Y., Evans, D., & Hajishirzi, H. (2024) · arXiv · doi:10.48550/arxiv.2402.07841 · Cited by 17
Self-citationMask-based Membership Inference Attacks for Retrieval-Augmented Generation
Liu, M., Zhang, S., & Long, C. (2024) · arXiv · doi:10.48550/arxiv.2410.20142 · Cited by 8
Membership Inference Attack against Long-Context Large Language ModelsPreprint
Wang, Z., Liu, G., Yang, Y., & Wang, C. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2411.11424 · Cited by 6
Feedback-Guided Extraction of Knowledge Base from Retrieval-Augmented LLM Applications
Jiang, C., Pan, X., Hong, G., Bao, C., Chen, Y., & Yang, M. (2024) · arXiv · doi:10.48550/arxiv.2411.14110 · Cited by 5
InjecGuard: Benchmarking and Mitigating Over-defense in Prompt Injection Guardrail Models
Li, H., & Liu, X. (2024) · arXiv · doi:10.48550/arxiv.2410.22770 · Cited by 2 · cited 2×
“The adversary lacks knowledge of the retriever and generator models used by the victim, including their hyperparameters (e.g., 𝑘 for top-𝑘 retrieval, temperature settings for generation, etc.).”
Baseline Defenses for Adversarial Attacks Against Aligned Language Models
Jain, N., Schwarzschild, A., Wen, Y., Somepalli, G., Kirchenbauer, J., Chiang, P.-Y., Goldblum, M., Saha, A., Geiping, J., & Goldstein, T. (2023) · arXiv · doi:10.48550/arxiv.2309.00614
Cohen, S., Bitton, R., & Nassi, B. (2024) · arXiv · doi:10.48550/arxiv.2409.08045
Do Parameters Reveal More than Loss for Membership Inference?
Suri, A., Zhang, X., & Evans, D. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2406.11544
Self-citation
Research works printed but not linked: 21
- [5] Nicholas Carlini, Florian Tramer, Eric Wallace, Matthew Jagielski, Ariel HerbertVoss, Katherine Lee, Adam Roberts, Tom Brown, Dawn Song, Ulfar Erlingsson, et al. 2021. Extracting training data from large language models. In USENIX Security Symposium . 2633-2650. -
- [8] Zhuyun Dai, Vincent Y Zhao, Ji Ma, Yi Luan, Jianmo Ni, Jing Lu, Anton Bakalov, Kelvin Guu, Keith Hall, and Ming-Wei Chang. 2023. Promptagator: Few-shot Dense Retrieval From 8 Examples. In The Eleventh International Conference on Learning Representations . https://openreview.net/forum?id=gmL46YMpu2J -
- [9] Debeshee Das, Jie Zhang, and Florian Tramèr. 2024. Blind baselines beat membership inference attacks for foundation models. arXiv preprint arXiv:2406.16201 (2024). - · arXiv
- [12] Jinhao Duan, Fei Kong, Shiqi Wang, Xiaoshuang Shi, and Kaidi Xu. 2023. Are diffusion models vulnerable to membership inference attacks?. In International Conference on Machine Learning . PMLR, 8717-8730. -
- [14] Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783 (2024). 16. Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers) . - · arXiv
- Nikola Jovanović, Robin Staab, Maximilian Baader, and Martin Vechev. 2025. Ward: Provable RAG Dataset Inference via LLM Watermarks. In The Thirteenth International Conference on Learning Representations. https://openreview.net/forum?id=kVrwHLAb20
- [23] Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, et al. 2020. Retrieval-augmented generation for knowledge-intensive nlp tasks. In Advances in Neural Information Processing Systems . -
- [25] Xinyue Li, Zhenpeng Chen, Jie M Zhang, Yiling Lou, Tianlin Li, Weisong Sun, Yang Liu, and Xuanzhe Liu. 2024. Benchmarking Bias in Large Language Models during Role-Playing. arXiv preprint arXiv:2411.00585 (2024). - · arXiv
- [26] Yuying Li, Gaoyang Liu, Chen Wang, and Yang Yang. 2024. Generating Is Believing: Membership Inference Attacks against Retrieval-Augmented Generation. arXiv preprint arXiv:2406.19234 (2024). - · arXiv
- [30] Yupei Liu, Yuqi Jia, Runpeng Geng, Jinyuan Jia, and Neil Zhenqiang Gong. 2024. Formalizing and benchmarking prompt injection attacks and defenses. In USENIX Security Symposium . -
- [32] Pratyush Maini, Hengrui Jia, Nicolas Papernot, and Adam Dziedzic. 2024. LLM Dataset Inference: Did you train on my dataset? arXiv preprint arXiv:2406.06443 (2024). - · arXiv
- [34] Matthieu Meeus, Igor Shilov, Shubham Jain, Manuel Faysse, Marek Rei, and YvesAlexandre de Montjoye. 2024. SoK: Membership Inference Attacks on LLMs are Rushing Nowhere (and How to Fix It). arXiv preprint arXiv:2406.17975 (2024). - · arXiv
- [38] Yonatan Oren, Nicole Meister, Niladri Chatterji, Faisal Ladhak, and Tatsunori B Hashimoto. 2023. Proving test set contamination in black box language models. In International Conference on Learning Representations . -
- [41] Haritz Puerto, Martin Gubri, Sangdoo Yun, and Seong Joon Oh. 2024. Scaling Up Membership Inference: When and How Attacks Succeed on Large Language Models. arXiv preprint arXiv:2411.00154 (2024). - · arXiv
- [43] Lianhui Qin, Sean Welleck, Daniel Khashabi, and Yejin Choi. 2022. Cold decoding: Energy-based constrained text generation with langevin dynamics. In Advances in Neural Information Processing Systems . -
- [44] Alexandre Sablayrolles, Matthijs Douze, Cordelia Schmid, Yann Ollivier, and Hervé Jégou. 2019. White-box vs black-box: Bayes optimal strategies for membership inference. In International Conference on Machine Learning . PMLR, 55585567. -
- [50] Yujing Wang, Hainan Zhang, Liang Pang, Hongwei Zheng, and Zhiming Zheng. 2024. MaFeRw: Query Rewriting with Multi-Aspect Feedbacks for RetrievalAugmented Large Language Models. arXiv preprint arXiv:2408.17072 (2024). - · arXiv
- [52] Lauren Watson, Chuan Guo, Graham Cormode, and Alexandre Sablayrolles. 2022. On the Importance of Difficulty Calibration in Membership Inference Attacks. In International Conference on Learning Representations . -
- [53] Alexander Wei, Nika Haghtalab, and Jacob Steinhardt. 2024. Jailbroken: How does llm safety training fail?. In Advances in Neural Information Processing Systems . -
- [55] Sajjad Zarifzadeh, Philippe Liu, and Reza Shokri. 2024. Low-Cost High-Power Membership Inference Attacks. In International Conference on Machine Learning . -
- [57] Peitian Zhang, Shitao Xiao, Zheng Liu, Zhicheng Dou, and Jian-Yun Nie. 2023. Retrieve anything to augment large language models. arXiv preprint arXiv:2310.07554 (2023). · arXiv
Cited by
External Data Extraction Attacks Against Retrieval-Augmented Large Language Models
He, Y., Chen, Y., Li, Y., Shao, S., Qi, L., Li, B., Tao, D., & Qin, Z. (2026) · IEEE Transactions on Information Forensics and Security · doi:10.1109/tifs.2026.3705326 · Cited by 4
“More recently, Naseh et al. [48] propose a stealthy interrogation attack that generates natural questions whose answers reveal whether a target document is present.”
Hu, L., Wang, H., Xiang, T., Chen, Z. H., He, J., & Guo, S. (2026) · IEEE Transactions on Cognitive Communications and Networking · doi:10.1109/tccn.2026.3694035 · Cited by 2
“Naseh et al. [32] develop stealthy interrogation attacks that use natural-language queries answerable only if the target chunk is retrieved, evading detection while requiring minimal queries.”
MRMMIA: Membership Inference Attacks on Memory in Chat Agents
Chen, K., Pang, Y., & Wang, T. (2026) · arXiv · Cited by 4
“This setting is because, unlike RAG, where each retrieved document may span hundreds of tokens and require strong text-understanding capabilities [15], memory units are often short statements, for which a 7B open-source model proves sufficient.”
InfluentialPrivacy Risk Assessment of AI Models in the Healthcare Domain
Anderson, M., Goldsteen, A., Amit, G., Shachor, S., Razinkov, N., Koren, N., & Farkash, A. (2026) · Springer eBooks · doi:10.1007/978-3-032-25917-2_7
Palanisamy, B., Chalapathi, G., & Hassija, V. (2026) · IEEE International Conference on Electronics, Computing and Communication Technologies (CONECCT) · doi:10.1109/conecct68978.2026.11700574
“Prior work demonstrates that retrieval scores, ranking confidence, and difficulty calibration can be exploited to infer whether documents were present in the retriever’s corpus [11], [12].”
Metadata
- Authors
- Naseh, A., Peng, Y., Suri, A., Chaudhari, H., Oprea, A., & Houmansadr, A.
- Affiliations
- University of Massachusetts Amherst (US)
- Northeastern University (US)
- Venue
- Proceedings of the 2025 ACM SIGSAC Conference on Computer and Communications Security
- Publisher
- ACM
- Published
- 2025-11-19
- Pages
- 1245-1259
- ISSN
- 1543-7221 (ISSN-L)
- OpenAlex
- W4416549407
- Semantic Scholar
- be43884bfae5c6c6add21640a41b1d19197cbee5
- Cited by
- 3
- References
- 13
- Citations by year
- 2026: 3
- FWCI
- 2.84
- Type
- conference paper
- Language
- en
- Open access
- hybrid
- doi.org
- Locations
- ACM SIGSAC Conference on Computer and Communications Security (CCS) (publishedVersion, cc-by)
- arXiv (Cornell University) (submittedVersion)
- arXiv (Cornell University)
- Funders
- National Science Foundation Graduate Research Fellowship Program (CNS-2247484, CNS-2131910)
- National Artificial Intelligence Research Resource (NAIRR 240392)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Artificial Intelligence › Privacy-Preserving Technologies in Data
- Keywords
- membership inference, retrieval-augmented generation, large language models, stealthy attacks, data extraction, adversarial prompts, privacy attacks, query rewriting
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.