Improved Pseudorandom Codes from Permuted Puzzles

Miranda Christ, Noah Golowich, Sam Gunn, Ankur Moitra, Daniel Wichs

TL;DR

This paper introduces a new construction for Pseudorandom Codes (PRCs), providing the first watermarking scheme for AI-generated content that is simultaneously subexponentially secure, robust to worst-case edits on binary text, and resilient even against attackers who possess the secret detection key. By grounding their security in a new "permuted codes conjecture," the authors overcome the "quasipolynomial-time" security bottleneck that has plagued previous watermarking methods.

What Problem Does This Paper Address?

As AI-generated content proliferates, watermarking—embedding a hidden, detectable signal in text or images—has become essential for identifying AI provenance. A powerful way to build these watermarks is through Pseudorandom Codes (PRCs). Ideally, a PRC should be:

  1. Undetectable: The watermarked output should look exactly like natural AI output.
  2. Robust: The watermark should survive if an adversary edits, deletes, or swaps words.
  3. Secure: It should be hard for an attacker to "crack" the watermark or remove it, even with significant computing power.

Until now, existing PRCs had three major flaws. First, they were vulnerable to "quasipolynomial-time" attacks ($n^{\log n}$), meaning a motivated attacker could eventually find the watermark pattern. Second, they struggled with "edit robustness" (handling insertions/deletions) unless the text had an unrealistically high amount of entropy per word. Finally, they weren't "strongly-adaptive"—if an attacker somehow got the detection key, they could easily strip the watermark. This paper aims to solve all three issues at once.

Methods

The authors move away from the "sparse" structures used in previous works, which were easy to decode but also easy to brute-force. Instead, they introduce the Permuted Codes Conjecture.

The Core Technique: Triple Scrambling

To make a codeword look like random noise, they apply three layers of randomization:

  1. Index Permutation: Shuffling the positions of the symbols in the codeword.
  2. Alphabet Permutation: Applying a random mapping to the symbols themselves (e.g., in a binary code, randomly flipping 0s and 1s at specific positions).
  3. Random Noise: Injecting a constant rate of random substitutions.

The paper proves that omitting any one of these three steps makes the code insecure against specific algebraic attacks.

Algebraic Heavy Lifting: Folded Reed-Solomon Codes

To handle the tricky problem of edit distance (where an attacker might delete or insert characters, shifting the whole string), the authors use Folded Reed-Solomon (FRS) codes. By "folding" multiple symbols into one, they can use a technique called list recovery. This allows the decoder to "brute-force" small local windows of the text to find potential matches, even if the global alignment has been shifted by deletions.

Datasets

As a theoretical cryptography paper, this work does not use empirical datasets (like the Pile or Common Crawl). Instead, the "data" consists of mathematical objects: linear codes, permutations, and probability distributions. The authors provide statistical evidence for their conjectures by testing them against a broad class of "distinguishers" (algorithms that try to tell the difference between watermarked and random text), specifically read-once branching programs.

Key Insights and Ideas

  • The Sparsity Trap: Previous researchers used sparse patterns to ensure the watermark survived errors. The authors realized this sparsity was exactly what allowed $n^{\log n}$ attacks. By using "dense" codes and the permuted codes assumption, they achieve much higher security.
  • Borrowing from PIR: The authors show that their new conjecture is actually implied by the "permuted puzzles" conjecture, a well-studied problem in the field of Private Information Retrieval (PIR). This gives the new assumption immediate academic "street cred."
  • Binary is Better: Most previous edit-robust schemes required a large alphabet (many possible words/symbols). This paper achieves robustness even on a binary alphabet, which is critical for real-world LLMs where the "entropy" (unpredictability) of the next word might be very low.
  • Strongly-Adaptive Robustness: This is the first scheme where even an adversary who knows the detection key cannot easily find a small edit that removes the watermark.

Key Results

  • Subexponential Security: The construction is the first to plausibly resist any attack faster than $2^{n^c}$, a massive leap over the previous $n^{\log n}$ limit.
  • Constant Edit Rate: The scheme can handle a constant fraction of worst-case edits. For an LLM watermark, it remains robust as long as the text has at least a constant amount of entropy ($\alpha$) per token.
  • The "Aha" Moment on Randomization: The authors proved that alphabet permutations are strictly necessary for security. Without them, they demonstrated a successful attack against Reed-Solomon-based codes using matrix rank analysis.

Limitations and Future Work

  • New Assumption: The security rests on the "permuted codes conjecture." While the authors provide evidence for it, it is a relatively new assumption that requires further "battle-testing" by the cryptanalysis community.
  • Efficiency vs. Entropy: The current robustness bound for LLM watermarking is $\Omega(\alpha^7)$, where $\alpha$ is the per-token entropy. The authors note that improving this exponent (making it more robust with less entropy) is a key open question.
  • Public Encoding: The current system requires a secret key for both encoding and decoding. Developing a version where anyone can encode (watermark) but only the owner can decode (detect) remains a challenge for this specific architecture.

Summary updated

BibTeX
@inproceedings{christ2026improved,
  author = {Miranda Christ and Noah Golowich and Sam Gunn and Ankur Moitra and Daniel Wichs},
  title = {{Improved Pseudorandom Codes from Permuted Puzzles}},
  booktitle = {STOC},
  year = {2026},
  doi = {10.1145/3798129.3800916},
}
Figure