SemStamp: A Semantic Watermark with Paraphrastic Robustness for Text Generation

Abe Bohan Hou, Jingyu Zhang, Tianxing He, Yichen Wang, Yung-Sung Chuang +5 more
10/6/2023
cs.CL

No official code found. Best implementation: abehou/SemStamp (31 stars, last commit 2024-12-09).

Abstract

Existing watermarking algorithms are vulnerable to paraphrase attacks because of their token-level design. To address this issue, we propose SemStamp, a robust sentence-level semantic watermarking algorithm based on locality-sensitive hashing (LSH), which partitions the semantic space of sentences. The algorithm encodes and LSH-hashes a candidate sentence generated by an LLM, and conducts sentence-level rejection sampling until the sampled sentence falls in watermarked partitions in the semantic embedding space. A margin-based constraint is used to enhance its robustness. To show the advantages of our algorithm, we propose a "bigram" paraphrase attack using the paraphrase that has the fewest bigram overlaps with the original sentence. This attack is shown to be effective against the existing token-level watermarking method. Experimental results show that our novel semantic watermark algorithm is not only more robust than the previous state-of-the-art method on both common and bigram paraphrase attacks, but also is better at preserving the quality of generation.

View on arXivView PDF

Code Implementations(1)

abehou/SemStampCommunity100%

Repo for SemStamp (NAACL2024) and k-SemStamp (ACL2024)

315PythonFeb 17, 20241 years ago

Similar Papers

Cite this paper

@article{hou2023semstamp,
  title  = {SemStamp: A Semantic Watermark with Paraphrastic Robustness for Text Generation},
  author = {Abe Bohan Hou and Jingyu Zhang and Tianxing He and Yichen Wang and Yung-Sung Chuang and Hongwei Wang and Lingfeng Shen and Benjamin Van Durme and Daniel Khashabi and Yulia Tsvetkov},
  year   = {2023},
  eprint = {2310.03991},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.03991v2}
}

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/2310.03991.svg)](https://codeofpaper.com/paper/2310.03991)

Discussion