Introduction
As large language models (LLMs) become increasingly integrated into digital workflows, the ability to distinguish between human-authored and machine-generated content has become a critical security and safety requirement. "Watermarking"—the process of embedding a hidden signal within AI output—offers a potential solution. However, existing watermarking schemes typically struggle with a fundamental trilemma: maintaining high Quality (not degrading the model's output), ensuring Robustness (surviving edits like word swaps or deletions), and providing Security (remaining undetectable to observers).
This paper introduces Pseudorandom Error-Correcting Codes (PRCs), a new cryptographic primitive designed to resolve this trilemma. PRCs allow for the creation of watermarks that are mathematically indistinguishable from random noise to an observer, yet remain decodable even after significant modifications to the text.
The PRC Primitive
A Pseudorandom Error-Correcting Code is a specialized code where any polynomial number of codewords are computationally indistinguishable from random strings unless the observer possesses a secret decoding key. This bridges the gap between two traditionally distinct fields:
- Error Correction: Which requires highly structured data to recover information from noise.
- Cryptography: Which requires a lack of discernible structure to ensure security.
By hiding the structure of an error-correcting code within a pseudorandom distribution, the authors enable a "stateless" steganography scheme—one where the sender and receiver do not need to synchronize or track message history—that can survive transmission through a noisy channel.
Construction and Security
The authors construct PRCs by leveraging Low-Density Parity-Check (LDPC) codes. The security of the scheme rests on the Learning Parity with Noise (LPN) assumption, a standard hard problem in lattice-based cryptography.
In this construction, the structured "parity checks" that define the code are hidden. To anyone without the secret key, the resulting codewords appear to be pure noise. This allows the watermark to be embedded by replacing the LLM's natural randomness (its word choice probabilities) with a PRC codeword. Because the PRC is pseudorandom, the statistical properties of the AI's output remain unchanged, ensuring the watermark is undetectable and the output quality is preserved.
Overcoming the Deletion Challenge
While standard error correction is effective at handling "substitutions" (e.g., swapping one word for another), "deletions" (e.g., removing words or phrases) are significantly more difficult to manage because they shift the alignment of the remaining data.
To address this, the authors introduce a "majority code" wrapper. Information is encoded into the statistical bias of a block of random bits. Even if a portion of these bits is deleted, the overall bias of the remaining segment typically remains consistent. This allows the PRC to recover the embedded message even from truncated or heavily edited text.
Key Results and Applications
The paper demonstrates several theoretical and practical breakthroughs for AI watermarking:
- Robust Undetectability: The authors prove that their LLM watermark is robust to a constant rate of random substitutions and deletions. For example, a user could delete or change 10% of the text, and the watermark would still be detectable by the model owner.
- Constant-Rate Efficiency: The construction achieves a constant rate, meaning the hidden message does not require a massive overhead in text length to remain recoverable.
- Public Attribution: The scheme can be extended to support public attribution. In this scenario, a public key allows anyone to verify that a piece of text originated from a specific model, while the private key remains with the model owner to prevent third parties from forging the watermark.
Limitations and Future Directions
Despite its strengths, the PRC approach has specific requirements and limitations:
- Entropy Requirements: Watermarking relies on the model having multiple valid choices for the next token. In low-entropy scenarios—such as answering a math problem where only one correct answer exists—there is no "randomness" to replace, making watermarking impossible.
- Computational Complexity: While decoding is efficient in a complexity-theoretic sense, the current detection algorithm for deletions involves a search over possible text boundaries, which may be computationally intensive for very long documents.
- Adversarial Edits: The current proofs focus on random noise (the Binary Symmetric Channel and Binary Deletion Channel). Future research is needed to determine how these codes perform against adversarial edits, where a malicious actor specifically targets the watermark's structure to remove it.
Summary updated