Skip to Content
View all events

Understanding AI Text Watermarking

Published by O'Reilly Media, Inc.

Intermediate content levelIntermediate

Learn the inner-workings of the algorithm used by Claude and other LLMs

What you’ll learn and how you can apply it

  • Explain how Claude uses the Google SynthID-style text watermarks to hide a statistical signal in word choice, and why detection is impossible without the secret key
  • Generate watermarked text with an open weight model, then detect it on an ordinary laptop using mean scores, z-scores, and p-values

Course description

Every major AI provider now watermarks the content its models produce, and the EU AI Act has turned what was once a research curiosity into a legal requirement. But most people, including many engineers who work with these models daily, have never seen a watermark, couldn’t point to one in a sentence, and don’t know what it takes to detect one. That’s the gap this course closes.

In one hour, you’ll explore invisible image and text watermarking. First, compare identical-looking photos, detect a hidden watermark, and see it survive JPEG compression, resizing, and screenshots. Next, learn how text watermarking embeds signals directly within words. Examine Google’s SynthID-Text using secret keys, g-values, and tournament sampling, and observe a detector scoring watermarked versus unwatermarked outputs. Finally, discover why human writing and Claude output return “not detected,” and analyze failure cases like short passages, factual answers, code, and zero-temperature generation. You’ll be able to explain to a colleague, a compliance team, or a skeptical stakeholder what a text watermark is, what it reliably tells you, and what it can’t tell you.

This live event is for you because...

  • You’re a software developer or ML engineer who needs to add, detect, or evaluate AI content watermarks in your own products.
  • You’re a security or trust-and-safety engineer who gets asked “Was this written by AI?” and wants to know what the evidence is really worth.
  • You’re a compliance lead or product manager preparing for Article 50 of the EU AI Act or California’s AI Transparency Act.
  • You’re an educator, journalist, or researcher who needs to understand what AI text detection can and cannot prove.
  • You use Claude, ChatGPT, or Gemini every day and want to know what happens to the text those models hand back to you.

Prerequisites

  • A laptop (macOS, Windows, or Linux) with Python 3.12 managed by uv, and about 6 GB of free disk space (no GPU required)
  • A free Google account signed in to Google Colab (used to generate the watermarked samples ahead of time)
  • The course repository with the detector, the attack scripts, and the sample data (link provided before class)
  • Comfort with reading and running Python scripts from the command line
  • A basic understanding of how a language model picks its next word (tokens, temperature, sampling)
  • Experience using Claude, ChatGPT, or Gemini (as a user)
  • A free Google account for Google Colab

Recommended preparation:

Recommended follow-up:

Schedule

The time frames are only estimates and may vary according to how the class is progressing.

Watermarks you cannot see (30 minutes)

  • Presentation: Why AI output is watermarked in 2026; text-watermarking requirements under the EU AI Act; differences between image and text watermarks
  • Demonstrations: Comparing two photos to identify a watermark; detecting a watermark after JPEG compression, resizing, and a screenshot
  • Q&A

Adding and detecting text watermarks (30 minutes)

  • Presentation: How SynthID-Text embeds a signal through word choice, secret keys, g-values, and tournament sampling; limitations for short and factual text, code, and temperature-zero output
  • Demonstrations: Comparing watermarked and unwatermarked responses to the same prompt; using the detector and interpreting z-scores, including “not detected” results for human and Claude-generated text
  • Q&A

Your Instructor

Bruce Hopkins

Bruce Hopkins is a widely-recognized AI expert. He's a Claude Certified Developer, an Oracle ACE and Intel Software Innovator (both in the fields of AI), as well as a Java Champion. He’s also the author of ChatGPT for Java and the coauthor of Beginning ChatGPT for Python.

Xlinksearch

Skill covered

GPT