An Unforgeable Publicly Verifiable Watermark for Large Language Models

Aiwei Liu, Leyi Pan, Xuming Hu, Shuang Li, Lijie Wen +2 more
2/12/2026

No official code found. Best implementation: THU-BPM/MarkLLM (1,067 stars, Apache-2.0, last commit 2026-03-17). 1 more below.

Abstract

Recently, text watermarking algorithms for large language models (LLMs) have been proposed to mitigate the potential harms of text generated by LLMs, including fake news and copyright issues. However, current watermark detection algorithms require the secret key used in the watermark generation process, making them susceptible to security breaches and counterfeiting during public detection. To address this limitation, we propose an unforgeable publicly verifiable watermark algorithm named UPV that uses two different neural networks for watermark generation and detection, instead of using the same key at both stages. Meanwhile, the token embedding parameters are shared between the generation and detection networks, which makes the detection network achieve a high accuracy very efficiently. Experiments demonstrate that our algorithm attains high detection accuracy and computational efficiency through neural networks. Subsequent analysis confirms the high complexity involved in forging the watermark from the detection network. Our code is available at \href{https://github.com/THU-BPM/unforgeable_watermark}{https://github.com/THU-BPM/unforgeable\_watermark}. Additionally, our algorithm could also be accessed through MarkLLM \citep{pan2024markllm} \footnote{https://github.com/THU-BPM/MarkLLM}.

View on arXivView PDF

Code Implementations(2)

THU-BPM/MarkLLMCommunity100%
Apache-2.0

[EMNLP 2024 Demo] MarkLLM: An Open-Source Toolkit for LLM Watermarking

1,06795Shell, CythonMay 16, 20247 months agoApache-2.0
large-language-modelsllmsafetytoolkittrustworthy-ai+1 more

[ICLR 2024] Source code of paper "An Unforgeable Publicly Verifiable Watermark for Large Language Models"

342PythonAug 2, 20232 years ago

Similar Papers

Cite this paper

@article{liu2026unforgeable,
  title  = {An Unforgeable Publicly Verifiable Watermark for Large Language Models},
  author = {Aiwei Liu and Leyi Pan and Xuming Hu and Shuang Li and Lijie Wen and Irwin King and Philip S. Yu},
  year   = {2026},
  eprint = {2307.16230},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2307.16230},
  journal = {ICLR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.16230.svg)](https://codeofpaper.com/paper/2307.16230)

Discussion