HyperAI

SynthID-Text AI Text Watermark Generation Tool

1. Tutorial Introduction

SynthID is a technology introduced by Google DeepMind in 2024 that can watermark and identify AI-generated content by embedding digital watermarks directly into AI-generated images, audio, text, or video. For a more complete technical description of the method, see Nature The paper "Scalable watermarking for identifying large language model outputs" in .

This tutorial is about SynthID-Text, a watermarking technology for identifying and verifying text generated by large language models (LLMs), which can maintain text quality and achieve high detection accuracy while minimizing latency costs. The core of this technology is to embed almost imperceptible watermarks by slightly adjusting the token probability scores during the generation process without compromising text quality and user experience, thereby achieving high detection accuracy. SynthID-Text does not affect LLM training, only the sampling procedure is modified, and watermark detection is computationally efficient without using the underlying LLM.

This tutorial demonstrates the model using Gemma-2b-it, and the watermark detector used is Mean (which can be demonstrated quickly and is not trained).Watermarked responses tend to have higher average scores than unwatermarked responses, the test results correspond to 2 scores:

  • Average score: To classify the response, you can set a score threshold, but this will depend on the score distribution for your use case and your expected false positive/false negative rates.
  • Weighted Average Score: The weighted average scoring function provides better classification performance than the average scoring function (in particular, watermarked responses score higher).

2. Operation steps

After starting the container, click the API address to enter the Web interface

Input prompt word

Enter the prompt word in the dialog box and click Submit. The model will generate two responses, one without a watermark and one with a watermark. Then use the watermark detection tool to generate an evaluation score.

Figure 1 Watermark text generation and detection

By comparing the above two scores, the higher the score, the more likely it is that a watermark has been added. After production, a watermark threshold can be set to determine whether a watermark is added to the output text.

Exchange and discussion

🖌️ If you see a high-quality project, please leave a message in the background to recommend it! In addition, we have also established a tutorial exchange group. Welcome friends to scan the QR code and remark [SD Tutorial] to join the group to discuss various technical issues and share application effects↓