Skip to content
AI360Xpert
Gen AI

Watermarking and Provenance

To prevent deepfakes and AI plagiarism, systems embed invisible statistical signals into generated text or images, allowing future systems to verify that the content was created by an AI.

An LLM generates a paragraph of text using a slightly biased vocabulary, embedding a statistical watermark. Later, a detector tool reads the text, notices the exact pattern of the bias, and flags the content as AI-generated.
An LLM generates a paragraph of text using a slightly biased vocabulary, embedding a statistical watermark. Later, a detector tool reads the text, notices the exact pattern of the bias, and flags the content as AI-generated.

Why Does This Exist?

As Generative AI becomes indistinguishable from human creation, society faces a massive trust crisis. Students submit AI-written essays as their own, political campaigns generate fake audio of opponents confessing to crimes, and scammers clone the voices of family members.

If we cannot trust what we see or read, the digital ecosystem collapses. To fight this, AI developers and industry consortiums are building systems for Watermarking (embedding a hidden signal into AI output) and Provenance (cryptographically tracking the history of a piece of media from the camera to the screen). The goal is not necessarily to stop AI generation, but to ensure transparent labeling so the public always knows when they are looking at AI.

Think of It Like This

UV ink on modern bank notes

Imagine trying to figure out if a $100 bill is counterfeit just by looking at it. Counterfeiters have gotten so good that a naked-eye inspection is no longer enough.

To solve this, governments don't just ban printers. Instead, they embed UV-reactive threads and micro-printing into real money during the manufacturing process. The threads are invisible in normal light, but if a store clerk holds the bill under a UV lamp (the detector), the authentic watermark glows brightly.

AI watermarking does exactly this for digital content. It embeds a "UV thread" directly into the pixels of an image or the vocabulary of an essay, allowing a detector to prove its origin.

How It Actually Works

Text Watermarking (The "Green List" approach)

Watermarking text is notoriously difficult because you cannot change pixels; you can only change words. The most popular approach alters the LLM's decoding process.

  1. Before the LLM picks the next word, a mathematical pseudo-random number generator (seeded by the previous word) splits the entire vocabulary into a "Green List" and a "Red List."
  2. The model is forced (or heavily biased) to only pick the next word if it is on the Green List.
  3. To a human reader, the text looks completely normal; there are many valid ways to write a sentence.
  4. When a detector tool (which knows the secret seed) reads the paragraph, it counts how many words belong to the Green List. If 95% of the words are on the Green List, the detector mathematically proves the text was AI-generated, as a human would naturally use a 50/50 mix.

Image Watermarking (Pixel perturbations)

Image generators (like Midjourney or DALL-E) embed watermarks by applying a subtle, mathematical pattern across the pixels in the latent space during generation. The pattern is completely invisible to the human eye, but highly resilient. Even if a user crops the image, adds a filter, or converts it to a JPEG, a specialized detector can still find the underlying frequency pattern.

Cryptographic Provenance (C2PA)

Watermarks can sometimes be scrubbed by advanced attackers. Provenance takes a different approach: cryptography. The Coalition for Content Provenance and Authenticity (C2PA) is an open standard. When a real camera takes a photo, or an AI generates an image, the software attaches a cryptographic signature to the metadata. As the image moves through Photoshop or social media, every edit is signed and appended to an unforgeable "Content Credentials" ledger. The end user can click an "i" icon on the image to see its exact history—whether it was generated by an AI, or taken by a real camera on a specific date.

Show Me the Code

# A highly simplified conceptual view of Text Watermarkingimport random
def watermark_generation(prompt, model, secret_key):    generated_tokens = []    current_context = prompt        for _ in range(50):        # 1. Get raw probabilities for the next word        logits = model.get_next_word_probabilities(current_context)                # 2. Use the previous word and a secret key to deterministically         # split the vocabulary into Green and Red lists        random.seed(hash(current_context[-1] + secret_key))        green_list = get_random_half_of_vocabulary()                # 3. Artificially boost the probability of Green List words        for word in green_list:            logits[word] += 5.0 # Bias the model towards the green list                    # 4. Select the next word normally        next_word = sample(logits)        generated_tokens.append(next_word)        current_context += next_word            return generated_tokens

Watch Out For

The Paraphrasing Attack

Text watermarking is fragile. If a student generates a watermarked essay using ChatGPT, they can easily defeat the watermark by pasting the text into a different AI tool (like an open-source model running locally) and asking it to "Paraphrase this." The second tool rewrites the sentences using its own vocabulary, completely destroying the Green/Red list statistical pattern.

Metadata Stripping

C2PA cryptographic provenance is incredibly strong, but it relies on metadata attached to the file. Currently, many major social media platforms and messaging apps automatically strip all metadata from images to save space and protect privacy when a user uploads a photo. When the metadata is stripped, the cryptographic proof of provenance is lost.

The Quick Version

  • Watermarking embeds invisible statistical patterns into AI-generated text or images so detectors can identify them later.
  • Text watermarking works by subtly biasing the LLM's vocabulary choices during generation.
  • Provenance (like the C2PA standard) uses cryptographic signatures to track the origin and edit history of a piece of media, providing a tamper-evident ledger.
  • Watermarks are vulnerable to paraphrasing or cropping attacks, while provenance is vulnerable to platforms stripping metadata.
  • Both are critical to fighting deepfakes and maintaining trust in digital media.
  • Synthetic Media Detection explores how we identify deepfakes that don't have watermarks by analyzing visual artifacts and biological inconsistencies.
  • Hallucination Mechanisms covers how the same token generation process used to insert watermarks is responsible for model hallucinations.

Related concepts