OpenAI introduces statistical watermarking for ChatGPT and Codex texts

2–3 minutes

On Monday, 5th, OpenAI announced a new watermarking technology called textGrain, which will be applied to texts generated by ChatGPT and Codex. The feature will be enabled by default in the European Union and will be available as an optional feature for API users worldwide.

How the watermark is embedded in the text

The watermark is embedded during the response generation process, subtly altering token selection based on a secret pattern and context. The system groups vocabulary and selects a group before choosing the next token, preserving relative probabilities within that set. This maintains response diversity, preventing the model from repeatedly generating the same sequence when given identical instructions.

How the detector identifies the watermark

The detector uses the same secret key and corresponding settings to reconstruct the expected pattern. It compares observed text choices with the statistical pattern, checking for a stronger association than would occur by chance. Unlike classifiers that analyze writing style, textGrain searches for a signal inserted during generation.

Impact of edits, copies, and translations

According to the company, copying and pasting the original text should preserve the signal, but rewrites and translations can weaken it. OpenAI tests showed that replacing 10% of words with synonyms in 400-token passages reduced detection from approximately 92% to 66%. With a 25% replacement rate, the detection rate dropped to 17%. The evaluation was conducted on English responses.

Implementation and availability

The watermark will be applied to eligible ChatGPT and Codex texts in the European Union across all plans in the coming weeks. This measure complies with the transparency requirements of the European AI regulation. In Brazil, the feature will not be enabled by default in ChatGPT, but API customers can choose to enable it globally for selected models.

Anthropic has also announced plans to add watermarks to texts generated by Claude.

Limitations and ethical considerations

Finding the watermark indicates that an OpenAI model was used, but it does not measure human contribution, identify the user, or verify authorship, ownership, or veracity. Similarly, the absence of the signal does not prove that the text was written by a person. OpenAI expects both false positives and false negatives.

Initially, access to the detector will be limited to researchers and specialized organizations approved by the company.