Building with AI

Mistral releases distortion-free watermark Keyrings and detector TextOrca

Mistral introduces Keyrings, a distortion-free LLM watermarking method, and TextOrca, a high-power detector. The system preserves output diversity and supports speculative decoding with machine-checke

A glass ring with digital keys on a server rack.
Illustration generated for this article

Mistral has released Keyrings and TextOrca, a new pair of tools for watermarking large language model outputs and detecting them. Published on December 3, 2026, this research introduces a distortion-free sampling method that preserves the model’s original token distribution while embedding a detectable signal. The accompanying detector, TextOrca, offers strong statistical guarantees without requiring calibration.

What happened

Keyrings is a sampling-time watermark that integrates directly into the generation process. Unlike earlier methods that biased token probabilities by boosting specific "green list" tokens, Keyrings uses the Gumbel-max trick with secret pseudorandom function (PRF) keys. This approach ensures that every individual token draw follows the model’s exact next-token law, meaning there is no logit bias or reweighting. The result is a text output that is statistically indistinguishable from non-watermarked text to anyone without the secret key, yet contains a hidden signal derived from the sequence of previous tokens.

To address the problem of diversity collapse, where repeated prompts yield identical outputs, Keyrings employs multiple hidden keyrings. The system holds L keyrings of m keys and samples one hidden keyring per request. This mechanism restores diversity across repeated prompts because different requests likely draw different keyrings, leading to different Gumbel noise and thus different continuations. Optionally, the system can mix keyed Gaussian noise with private noise using a Gaussian copula, trading a small amount of detection power for further diversity gains.

TextOrca serves as the detector for these watermarks. It computes grounded conservative p-values using a weighted sum of exponentials with a closed-form tail. Crucially, TextOrca does not depend on the specific sampler used to generate the text. This allows it to score outputs from other systems, such as TextSeal, often detecting more watermarked responses than the original system’s own detector. The entire method is supported by machine-checked proofs in Lean 4 and Mathlib, ensuring the theoretical guarantees hold in practice.

How it works

The core mechanism relies on the Gumbel-max trick, a standard method for sampling from categorical distributions. For each candidate token, the system draws a uniform variable and transforms it into Gumbel noise. In Keyrings, these uniform values are generated by a PRF seeded with a secret key and evaluated on the context window of preceding tokens. Because the pseudorandom draws follow the same marginal distribution as fresh noise, the sampling remains distortion-free. The detector then recomputes these values for the observed tokens. Since watermarked tokens tend to have larger Gumbel noise values, their corresponding uniform variables cluster near 1, creating a statistical signal that accumulates over the length of the text.

TextOrca leverages this signal by calculating per-token Aaronson scores. Under the null hypothesis that the text is not watermarked, these scores follow an exponential distribution with mean 1. Under the watermark hypothesis, the expected score is higher, particularly for tokens where the model was uncertain. TextOrca sums these scores with weights based on the model’s confidence, producing a p-value that is valid by construction. This means the false positive rate is controlled exactly at the target level, such as 0.1%, without needing empirical calibration on held-out data.

Key details

  • Keyrings achieves 91–95% detection rates at a 0.1% false positive rate on 256-token outputs.
  • The method preserves near-native diversity, measured by Self-BLEU, and shows no significant difference on agentic benchmarks.
  • TextOrca outperforms existing detectors, including TextSeal’s official entropy-weighted detector, even when scoring TextSeal’s own outputs.
  • The system supports speculative decoding, allowing it to be used in high-throughput serving stacks without degrading acceptance rates.
  • All theoretical guarantees are machine-checked in Lean 4 + Mathlib, providing strong verification of the distortion-free property.
  • Keyrings uses a bootstrap buffer and context deduplication to prevent repetition loops and ensure whole-sequence validity.

Why it matters

For engineers building AI products, the trade-off between security and quality has long been a bottleneck. Previous watermarking techniques often degraded the fluency or creativity of the model, making them unsuitable for customer-facing applications. Keyrings removes this barrier by proving that watermarking can be truly distortion-free. This allows developers to embed provenance signals in generated content without risking user experience or model performance, which is critical for compliance and trust in enterprise settings.

The compatibility with speculative decoding is another major practical advantage. Modern LLM serving infrastructure relies heavily on speculative decoding to reduce latency and cost. Many watermarking schemes break this optimization by requiring sequential verification of each token. Keyrings is designed to work within this parallel verification framework, meaning it can be deployed in production environments without sacrificing the speed benefits of modern inference engines. This makes it a viable option for real-time applications where latency is a key constraint.

What you can do

  • Evaluate Keyrings if you need to embed provenance in LLM outputs without affecting generation quality.
  • Use TextOrca to detect watermarked text with high confidence, leveraging its calibration-free p-values.
  • Consider the Gaussian copula option if your application requires maximum diversity across repeated prompts.
  • Verify the machine-checked proofs in Lean 4 if your use case demands rigorous formal guarantees.
  • Test the system with speculative decoding to ensure it meets your latency requirements in production.
  • Compare TextOrca against your current detection pipeline, as it may improve detection rates even for non-Keyrings watermarks.
  • #llm
  • #watermarking
  • #mistral
  • #ai safety
  • #machine learning

Tools from the Bytechap store

$89

DocBento

Self-hosted document management that reads every scan and answers with page citations.

Live demo

Keep reading

All stories