CoChat

Is My Data in Your Retrieval Database? Membership Inference Attacks Against Retrieval Augmented Generation

Open access
Anderson, Maya, Amit, Guy, Goldsteen, Abigail · 2025 · Proceedings of the 11th International Conference on Information Systems Security and Privacy

The DOI matches its Crossref record; 12 of the 12 references it cites were found in a registry or an index.

Abstract

Retrieval Augmented Generation (RAG) systems have shown great promise in natural language processing. However, their reliance on data stored in a retrieval database, which may contain proprietary or sensitive information, introduces new privacy concerns. Specifically, an attacker may be able to infer whether a certain text passage appears in the retrieval database by observing the outputs of the RAG system, an attack known as a Membership Inference Attack (MIA). Despite the significance of this threat, MIAs against RAG systems have yet remained under-explored. This study addresses this gap by introducing an efficient and easy-to-use method for conducting MIA against RAG systems. We demonstrate the effectiveness of our attack using two benchmark datasets and multiple generative models, showing that the membership of a document in the retrieval database can be efficiently determined through the creation of an appropriate prompt in both black-box and gray-box settings. Moreover, we introduce an initial defense strategy based on adding instructions to the RAG template, which shows high effectiveness for some datasets and models. Our findings highlight the importance of implementing security countermeasures in deployed RAG systems and developing more advanced defenses to protect the privacy and security of retrieval databases.

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.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.5220/0013108300003899

Cites

0 citation errors · 0 not checkable

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.

A few free checks a day · papers already verified open instantly · results are public

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?

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

The publisher hasn’t deposited this paper’s reference list.

Research works printed but not linked: 18

  1. Amin, K., Bie, A., Kong, W., Kurakin, A., Ponomareva, N., Syed, U., Terzis, A., and Vassilvitskii, S. (2024). Private prediction for large-scale synthetic text generation. arXiv preprint arXiv:2407.12108 . · arXiv
  2. Carlini, N., Chien, S., Nasr, M., Song, S., Terzis, A., and Tramer, F. (2022). Membership inference attacks from first principles. In 2022 IEEE Symposium on Security and Privacy (SP) , pages 1897-1914. IEEE.
  3. Galli, F., Melis, L., and Cucinotta, T. (2024). Noisy neighbors: Efficient membership inference attacks against llms. arXiv preprint arXiv:2406.16565 . · arXiv
  4. Guo, R., Luan, X., Xiang, L., Yan, X., Yi, X., Luo, J., Cheng, Q., Xu, W., Luo, J., Liu, F., et al. (2022). Manu: a cloud native vector database management system. Proceedings of the VLDB Endowment , 15(12):3548-3561.
  5. Hu, Z., Wang, C., Shu, Y., Zhu, L., et al. (2024). Prompt perturbation in retrieval-augmented generation based large language models. arXiv preprint arXiv:2402.07179 . · arXiv
  6. Li, H., Guo, D., Li, D., Fan, W., Hu, Q., Liu, X., Chan, C., Yao, D., Yao, Y., and Song, Y. (2024a). Privlmbench: A multi-level privacy evaluation benchmark for language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) , pages 54-73.
  7. Li, Y., Liu, G., Wang, C., and Yang, Y. (2024b). Generating is believing: Membership inference attacks against retrieval-augmented generation. arXiv preprint arXiv:2406.19234 . · arXiv
  8. Liu, Y., Jia, Y ., Geng, R., Jia, J., and Gong, N. Z. (2024). Formalizing and benchmarking prompt injection attacks and defenses. In ArXiv . USENIX Security Symposium.
  9. Lyu, K., Zhao, H., Gu, X., Yu, D., Goyal, A., and Arora, S. (2024). Keeping llms aligned after fine-tuning: The crucial role of prompt templates. arXiv preprint arXiv:2402.18540 . · arXiv
  10. Majmudar, J., Dupuy, C., Peris, C., Smaili, S., Gupta, R., and Zemel, R. (2022). Differentially private decoding in large language models. In NAACL 2022 Second Workshop on Trustworthy Natural Language Processing (TrustNLP) .
  11. Panda, A., Tang, X., Nasr, M., Choquette-Choo, C. A., and Mittal, P. (2024). Privacy auditing of large language models. In ICML 2024 Workshop on Foundation Models in the Wild .
  12. Reynolds, L. and McDonell, K. (2021). Prompt programming for large language models: Beyond the few-shot paradigm. In Extended abstracts of the 2021 CHI conference on human factors in computing systems , pages 1-7.
  13. Shejwalkar, V., Inan, H. A., Houmansadr, A., and Sim, R. (2021). Membership inference attacks against nlp classification models. In NeurIPS 2021 Workshop Privacy in Machine Learning .
  14. Shokri, R., Stronati, M., Song, C., and Shmatikov, V. (2017). Membership inference attacks against machine learning models. In 2017 IEEE symposium on security and privacy (SP) , pages 3-18. IEEE.
  15. Tramer, F., Carlini, N., Brendel, W., and Madry, A. (2020). On adaptive attacks to adversarial example defenses. Advances in neural information processing systems , 33:1633-1645.
  16. Tseng, W.-C., Kao, W.-T., and Lee, H.-y. (2021). Membership inference attacks against self-supervised speech models. arXiv preprint arXiv:2111.05113 . · arXiv
  17. Zhang, J., Sun, J., Yeats, E., Ouyang, Y ., Kuo, M., Zhang, J., Yang, H. F., and Li, H. (2024). Min-k%++: Improved baseline for detecting pre-training data from large language models. arXiv preprint arXiv:2404.02936 . · arXiv
  18. Zhong, Z., Huang, Z., Wettig, A., and Chen, D. (2023). Poisoning retrieval corpora by injecting adversarial passages. arXiv preprint arXiv:2310.19156 . · arXiv

Cited by

See all 84

Metadata

Authors
Anderson, M., Amit, G., & Goldsteen, A.
Affiliations
IBM Research - Haifa (IL)
Venue
Proceedings of the 11th International Conference on Information Systems Security and Privacy
Published
2025
Pages
474-485
OpenAlex
W4407938156
Cited by
20
References
0
Citations by year
2026: 9 · 2025: 11
FWCI
18.97
Type
conference paper
Language
en
Open access
Licence
cc-by-nc-nd
Locations
  • International Conference on Information Systems Security and Privacy (ICISSP) (publishedVersion, cc-by-nc-nd)
  • arXiv (Cornell University) (submittedVersion, cc-by)
  • arXiv (Cornell University) (cc-by)
Funders
  • Government of the United Kingdom
  • UK Research and Innovation
  • European Commission (101094323)
  • HORIZON EUROPE Framework Programme
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
  • Physical Sciences › Computer Science › Artificial Intelligence › Privacy-Preserving Technologies in Data
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
Keywords
membership inference attacks, retrieval-augmented generation, data privacy, large language models, privacy attacks

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.