A System for Watermarking and Post-edits Detection in Large Language Models

This technology watermarks AI-generated text using hidden token patterns, allowing detection of edits by analyzing if the text still matches the expected pattern, helping verify authorship and identify modifications without affecting readability.

Background

Large Language Models (LLMs) have rapidly become a cornerstone of modern artificial intelligence, powering applications ranging from conversational agents to automated content creation. As these models are increasingly used to generate text that is indistinguishable from human writing, there is a growing need to reliably attribute authorship and ensure the integrity of AI-generated content. This is particularly important in contexts such as digital publishing, academic writing, and social media, where distinguishing between human and machine-generated text is critical for trust, accountability, and compliance. Watermarking techniques, which embed hidden signals in generated text, have emerged as a promising solution for this challenge, enabling downstream detection and verification of AI-generated content without compromising readability or user experience.

Despite their promise, current watermarking approaches face significant limitations, especially when it comes to detecting post-generation edits. Traditional watermarking methods often rely on statistical properties or subtle perturbations that can be easily disrupted by simple modifications such as word replacements, insertions, or deletions. As a result, even minor edits can render the watermark undetectable or lead to high rates of false positives and negatives. Furthermore, there is a delicate tradeoff between watermark robustness and text quality; increasing the strength of the watermark often degrades the naturalness and fluency of the generated text. Existing systems also struggle to localize the precise positions of edits, limiting their utility for forensic or compliance purposes. These challenges highlight the need for more sophisticated watermarking and detection mechanisms that can withstand adversarial edits while maintaining high text quality and providing accurate localization of modifications.

Technology

This technology provides a robust system for embedding and detecting watermarks in text generated by large language models (LLMs). The watermarking process works by partitioning the LLM’s vocabulary into multiple disjoint subsets and then generating text according to a deterministic combinatorial pattern, which is enforced by boosting the likelihood of selecting tokens from a specific subset at each step. The pattern—governed by a secret key and hash function—can range from simple binary alternations to more complex cyclical arrangements, making the watermark imperceptible to users but reliably detectable by authorized parties. To detect whether the watermarked text has been edited post-generation, the system slides a window across the text, checking if the sequence of tokens aligns with the expected watermark pattern. It computes edit scores for each position, flagging locations where the pattern is disrupted, and thus can identify and localize edits such as token replacements, insertions, or deletions.

What differentiates this technology is its combination of imperceptibility, robustness, and edit localization. By using combinatorial patterns and secret-key-based subset assignments, the system makes the watermark extremely difficult to detect or spoof by adversaries, while maintaining high detection accuracy for even small, localized edits. The sliding window approach allows for granular analysis, providing not just binary detection but also pinpointing the precise location of edits. Furthermore, the system is highly configurable: watermark strength and pattern complexity can be tuned to balance detection robustness against text quality (as measured by perplexity). Its versatility is enhanced by compatibility with a wide range of hardware and software platforms, making it suitable for applications in digital forensics, AI content monitoring, and content authentication where reliable attribution and integrity checking are critical.

Benefits

  • Enables robust and imperceptible watermarking of LLM-generated text for reliable attribution.
  • Detects post-generation edits (replacements, insertions, deletions) with high accuracy and localizes their positions.
  • Uses combinatorial patterns and secret keys to secure watermark embedding, making it hard to spoof or remove.
  • Balances watermark strength and text quality, optimizing detection accuracy without significantly degrading output.
  • Supports flexible watermark patterns (binary, quaternary, or more complex) for adaptable security levels.
  • Implements efficient detection via sliding window analysis and edit scoring for real-time or batch processing.
  • Applicable across diverse hardware and software platforms, including mobile, cloud, and embedded systems.
  • Facilitates AI content authentication, digital forensics, and integrity verification in adversarial environments.

Applications

  • AI-generated content authenticity verification
  • Detection of tampered AI text
  • Digital forensics for text integrity
  • Content provenance tracking
  • Automated copyright enforcement

Additional info

This technology embeds hidden signals in AI-generated text by partitioning vocabulary into disjoint subsets and selecting tokens according to a deterministic combinatorial pattern, enforced by boosting their generation likelihoods. It detects post-generation modifications by sliding a window over the text, analyzing token sequences for alignment with this pattern, and flagging deviations below a predefined threshold.