mlsanityData to 14 Oct 2026

In-Context Watermarks for Large Language Models

arXiv 2505.16934 ↗First posted 22 May 2025cs.CLcited by 10

On the map: LLM safety and security → Watermarking generated content and models

Abstract (arXiv)

The growing use of large language models (LLMs) for sensitive applications has highlighted the need for effective watermarking techniques to ensure the provenance and accountability of AI-generated text. However, most existing watermarking methods require access to the decoding process, limiting their applicability in real-world settings. One illustrative example is the use of LLMs by dishonest reviewers in the context of academic peer review, where conference organizers have no access to the model used but still need to detect AI-generated reviews. Motivated by this gap, we introduce In-Context Watermarking (ICW), which embeds watermarks into generated text solely through prompt engineering, leveraging LLMs' in-context learning and instruction-following abilities. We investigate four ICW strategies at different levels of granularity, each paired with a tailored detection method. We further examine the Indirect Prompt Injection (IPI) setting as a specific case study, in which watermarking is covertly triggered by modifying input documents such as academic manuscripts. Our experiments validate the feasibility of ICW as a model-agnostic, practical watermarking approach. Moreover, our findings suggest that as LLMs become more capable, ICW offers a promising direction for scalable and accessible content attribution. Our code is available at https://github.com/yepengliu/In-Context-Watermarks.

Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Placed in Watermarking generated content and models, one of 12 directions in LLM safety and security. Builds on 62 of its 89 references that are in the map. First posted on arXiv 22 May 2025.

Builds on

62 of 89 references.

Closest ancestors · 38

Same direction, newest first

  1. 2025Defending LLM Watermarking Against Spoofing Attacks with Contrastive Representation Learning9 Apr
  2. 2025Improved Unbiased Watermark for Large Language Models16 Feb
  3. 2025Dataset Protection via Watermarked Canaries in Retrieval-Augmented LLMs15 Feb
  4. 2024SoK: Watermarking for AI-Generated Content27 Nov
  5. 2024Robust Detection of Watermarks for Large Language Models Under Human Edits21 Nov
  6. 2024A Watermark for Order-Agnostic Language Models17 Oct
  7. 2024A Watermark for Black-Box Language Models2 Oct
  8. 2024Can Watermarking Large Language Models Prevent Copyrighted Text Generation and Hide Training Data?24 Jul
  9. 2024PostMark: A Robust Blackbox Watermark for Large Language Models20 Jun
  10. 2024MarkLLM: An Open-Source Toolkit for LLM Watermarking16 May
  11. 2024A Statistical Framework of Watermarks for Large Language Models: Pivot, Detection Efficiency and Optimal Rules1 Apr
  12. 2024Learning to Watermark LLM-generated Text via Reinforcement Learning13 Mar
26 more
  1. 2024Duwak: Dual Watermarks in Large Language Models12 Mar
  2. 2024WaterMax: breaking the LLM watermark detectability-robustness-quality trade-off6 Mar
  3. 2024Token-Specific Watermarking with Enhanced Detectability and Semantic Coherence for Large Language Models28 Feb
  4. 2024GumbelSoft: Diversified Language Model Watermarking via the GumbelMax-trick20 Feb
  5. 2024Permute-and-Flip: An optimally stable and watermarkable decoder for LLMs8 Feb
  6. 2024Adaptive Text Watermark for Large Language Models25 Jan
  7. 2023A Survey of Text Watermarking in the Era of Large Language Models13 Dec
  8. 2023On the Learnability of Watermarks for Language Models7 Dec
  9. 2023A Robust Semantics-based Watermark for Large Language Model against Paraphrasing15 Nov
  10. 2023REMARK-LLM: A Robust and Efficient Watermarking Framework for Generative Large Language Models18 Oct
  11. 2023Embarrassingly Simple Text Watermarks13 Oct
  12. 2023A Semantic Invariant Robust Watermark for Large Language Models10 Oct
  13. 2023Unbiased Watermark for Large Language Models22 Sep
  14. 2023An Unforgeable Publicly Verifiable Watermark for Large Language Models30 Jul
  15. 2023Robust Distortion-free Watermarks for Language Models28 Jul
  16. 2023Three Bricks to Consolidate Watermarks for Large Language Models26 Jul
  17. 2023Provable Robust Watermarking for AI-Generated Text30 Jun
  18. 2023Undetectable Watermarks for Language Models25 May
  19. 2023Who Wrote this Code? Watermarking for Code Generation24 May
  20. 2023Watermarking Text Data on Large Language Models for Dataset Copyright22 May
  21. 2023Watermarking Text Generated by Black-Box Language Models14 May
  22. 2023Robust Multi-bit Natural Language Watermarking through Invariant Features3 May
  23. 2023Can AI-Generated Text be Reliably Detected?17 Mar
  24. 2023Protecting Language Generation Models via Invisible Watermarking6 Feb
  25. 2023A Watermark for Large Language Models24 Jan
  26. 2021Tracing Text Provenance via Context-Aware Lexical Substitution15 Dec

Other references · 24

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  4. 2024Qwen2.5 Technical Reportcited by 4,942
  5. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  6. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,443
  7. 2024A Survey on LLM-as-a-Judgecited by 1,423
  8. 2023Instruction-Following Evaluation for Large Language Modelscited by 1,228
  9. 2023DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvaturecited by 726
  10. 2023Prompt Injection attack against LLM-integrated Applicationscited by 605
  11. 2019ELI5: Long Form Question Answeringcited by 575
  12. 2023Formalizing and Benchmarking Prompt Injection Attacks and Defensescited by 364
12 more
  1. 2023The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learningcited by 257
  2. 2024Monitoring AI-Modified Content at Scale: A Case Study on the Impact of ChatGPT on AI Conference Peer Reviewscited by 164
  3. 2024CycleResearcher: Improving Automated Research via Automated Reviewcited by 148
  4. 2024Automatic and Universal Prompt Injection Attacks against Large Language Modelscited by 119
  5. 2024Mapping the Increasing Use of LLMs in Scientific Paperscited by 118
  6. 2023On the Possibilities of AI-Generated Text Detectioncited by 88
  7. 2023A Survey on Detection of LLMs-Generated Contentcited by 71
  8. 2024Image Watermarks are Removable Using Controllable Regeneration from Clean Noisecited by 50
  9. 2025Can LLM feedback enhance review quality? A randomized study of 20K reviews at ICLR 2025cited by 47
  10. 2023Can LLMs Follow Simple Rules?cited by 46
  11. 2025CoheMark: A Novel Sentence-Level Watermark for Enhanced Text Qualitycited by 19
  12. 2025Distributional Information Embedding: A Framework for Multi-bit Watermarkingcited by 9

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 5; 2026: 5.

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Watermarking Large Language Models in Europe: Interpreting the AI Act in Light of Technology
  2. 2025The Feasibility of Topic-Based Watermarking on Academic Peer Reviews
  3. 2025Detecting LLM-Generated Peer Reviews
  4. 2024Watermarking Large Language Models and the Generated Content: Opportunities and Challenges
  5. 2024Watermarking Language Models through Language Models
  6. 2025PRO: Enabling Precise and Robust Text Watermark for Open-Source LLMs
  7. 2023Necessary and Sufficient Watermark for Large Language Models
  8. 2025Enhancing Watermarking Quality for LLMs via Contextual Generation States Awareness