Adding Watermarks to Text Generated by Black-Box Language ModelsWatermarking Text Generated by Black-Box Language Models
The researchers propose a watermarking framework for black-box language models, enabling third parties without access to the probability distribution to autonomously embed detectable watermarks in generated text. The method first defines a binary encoding function that computes a random binary code for words; the codes of unwatermarked text follow a Bernoulli distribution, and the probability that a word represents bit-1 is about 0.5. When injecting a watermark, words representing bit-0 are replaced with context-based synonyms so that they become bit-1, and statistical tests are then used to identify the watermark. Experiments on Chinese and English datasets show the method is effective, and under attacks such as retranslation, polishing, word deletion, and synonym substitution, the watermark is difficult to remove without damaging the original semantics.