Lune

CCS2025Top-tier venue

RAG-WM: An Efficient Black-Box Watermarking Approach for Retrieval-Augmented Generation of Large Language Models

Peizhuo Lv, Mengjie Sun, Hao Wang, XiaoFeng Wang, Shengzhi Zhang, Yuxuan Chen, Kai Chen, Limin Sun

Abstract

In recent years, tremendous success has been witnessed in Retrieval-Augmented Generation (RAG), widely used to enhance Large Language Models (LLMs) in domain-specific, knowledge-intensive, and privacy-sensitive tasks. However, attackers may steal those valuable RAGs and deploy or commercialize them, making it essential to detect Intellectual Property (IP) infringement. Most existing ownership protection solutions, such as watermarks, are designed for relational databases and texts. They cannot be directly applied to RAGs because relational database watermarks require white-box access to detect IP infringement, which is unrealistic for the knowledge base in RAGs. Meanwhile, post-processing by the adversary's deployed LLMs typically destructs text watermark information. To address those problems, we propose a novel black-box ''knowledge watermark'' approach, named RAG-WM, to detect IP infringement of RAGs. RAG-WM uses a multi-LLM interaction framework, comprising a Watermark Generator, Shadow LLM & RAG, and Watermark Discriminator, to create watermark texts based on watermark entity-relationship tuples and inject them into the target RAG. We evaluate RAG-WM across three domain-specific and two privacy-sensitive tasks on four benchmark LLMs. Experimental results show that RAG-WM effectively detects the stolen RAGs in various deployed LLMs. Furthermore, RAG-WM is robust against paraphrasing, unrelated content removal, knowledge insertion, and knowledge expansion attacks. Lastly, RAG-WM can also evade watermark detection approaches, highlighting its promising application in detecting IP infringement of RAG systems.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Safeguarding Multimodal Knowledge Copyright in the RAG-as-a-Service Environment cites Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection
  • Safeguarding Multimodal Knowledge Copyright in the RAG-as-a-Service Environment cites Language Models are Few-Shot Learners
  • Safeguarding Multimodal Knowledge Copyright in the RAG-as-a-Service Environment cites A Watermark for Large Language Models
  • A Watermark for Large Language Models cites Turning Your Weakness Into a Strength: Watermarking Deep Neural Networks by Backdooring
  • Logit Laundering: Evading Data-Use Auditing in Large Language Models cites Language Models are Few-Shot Learners
  • Logit Laundering: Evading Data-Use Auditing in Large Language Models cites A Watermark for Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. Silent Leaks: Implicit Knowledge Extraction Attack on RAG SystemsYuhao Wang, Wenjie Qu, Shengfang Zhai, Yanze Jiang et al.ICLR 2026 · 13 citations
  2. Confundo: Learning to Generate Robust Poison for Practical RAG SystemsHaoyang Hu, Zhejun Jiang, Yueming Lyu, Junyuan Zhang et al.USENIX Security 2026 · 5 citations
  3. Safeguarding Multimodal Knowledge Copyright in the RAG-as-a-Service EnvironmentTianyu Chen, Jian Lou, Wenjie WangICLR 2026 · 2 citations
  4. Logit Laundering: Evading Data-Use Auditing in Large Language ModelsRuihan Hu, Wei Luo, Yu-Ming Shang, Jiakai Wang et al.CCS 2026

Builds on15

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Self-RAG: Learning to Retrieve, Generate, and Critique through Self-ReflectionAkari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil et al.ICLR 2024 · 1,798 citations
  3. Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text RetrievalLee Xiong, Chenyan Xiong, Ye Li, Kwok-Fung Tang et al.ICLR 2021 · 1,547 citations
  4. A Watermark for Large Language ModelsJohn Kirchenbauer, Jonas Geiping, Yuxin Wen, Jonathan Katz et al.ICML 2023 · 854 citations
  5. Turning Your Weakness Into a Strength: Watermarking Deep Neural Networks by BackdooringYossi Adi, Carsten Baum, Moustapha Cissé, Benny Pinkas et al.USENIX Security 2018 · 832 citations

Related papers

  1. Knowledge-Infused Multi-Bit Watermarking for RAG Knowledge BasesKe Yang, Shuguang Yuan, Jing Yu, Chi ChenACL Findings 2026
  2. Ward: Provable RAG Dataset Inference via LLM WatermarksNikola Jovanovic, Robin Staab, Maximilian Baader, Martin T. VechevICLR 2025
  3. Protecting Intellectual Property of Large Language Model-Based Code Generation APIs via WatermarksZongjie Li, Chaozheng Wang, Shuai Wang, Cuiyun GaoCCS 2023 · 25 citations
  4. Mask-based Membership Inference Attacks for Retrieval-Augmented GenerationMingrui Liu, Sixiao Zhang, Cheng LongWWW 2025 · 28 citations
  5. REMARK-LLM: A Robust and Efficient Watermarking Framework for Generative Large Language ModelsRuisi Zhang, Shehzeen Samarah Hussain, Paarth Neekhara, Farinaz KoushanfarUSENIX Security 2024 · 88 citations
Dusk over the sea between two cliffs drawn in fine vertical lines