Manuscript Offprint

arXiv:2610.02817

RMCW: A Deletion-Robust Watermark Based on Reed--Muller Codes for Language Models

Yi Wang, Baicheng Chen, Yu Wang, Jian Zhao, Yilei Chen, Tianxing He

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large Language Model (LLM) watermarking provides a lightweight mechanism for identifying text generated by a specific model, but its robustness remains fragile under post-processing attacks. Deletion attacks are particularly challenging because they shift token positions and break the alignment between observed tokens and their original watermark positions. We propose Reed–Muller Code Watermarking (RMCW), an LLM watermarking method based on Reed–Muller codes. In contrast to global codeword recovery, RMCW searches for surviving local algebraic structure, leveraging the Reed–Solomon consistency induced by affine-line restrictions of Reed–Muller codewords. During generation, RMCW injects a Reed–Muller structure into the sequence via a secret-keyed vocabulary partition. During detection, it maps the given text to keyed vocabulary bins and tests local subsequences for low-degree Reed–Solomon consistency using Berlekamp–Welch tests. Experiments on C4 and ELI5 datasets with OPT-1.3B and Llama-3.1-8B-Instruct show that RMCW preserves strong clean-text detectability and outperforms or matches the baseline methods under several deletion and rewriting attacks. Our code is available at https://github.com/BaichengDanny/RMCW.

1 Introduction

Large language models (LLMs) support a wide range of tasks, including instruction following (Ouyang et al., 2022), knowledge-intensive question answering (Lewis et al., 2020; Wang et al., 2025; Chen et al., 2026), and code generation (Yang et al., 2024; Chen et al., 2026). While these systems improve productivity, they also make it difficult to determine whether a passage is written by a human or produced by a model (Chakraborty et al., 2023). LLM watermarking addresses this problem by injecting a hidden signal during generation, allowing a detector to later identify whether a suspect passage is produced by a watermarked model (Kirchenbauer et al., 2023; Dathathri et al., 2024; Liu et al., 2024b). A practical watermark should remain detectable from a limited amount of text, introduce little degradation in generation quality, and tolerate common post-processing operations (Kirchenbauer et al., 2023; Kuditipudi et al., 2023; Lalai et al., 2025; Kirchenbauer et al., 2024).

Error-correcting codes (ECCs) provide a theoretical way for robust watermarking. By introducing structured redundancy, an ECC can preserve a detectable signal even when some embedded symbols are corrupted (Christ and Gunn, 2024; Qu et al., 2025). However, when the encoded signal is tied to generation positions, deletions introduce an additional challenge for watermark detection in practice. A deletion removes a token and shifts all subsequent token-derived symbols relative to the original watermark positions (Kirchenbauer et al., 2023). We refer to this deletion-induced loss of position alignment as synchronization loss (Levenshtein, 1966), which is common when generated text is shortened, cropped, or only partially reproduced before redistribution (Pan et al., 2024; Christ and Gunn, 2024; Kuditipudi et al., 2023).

To address the synchronization loss challenge, we propose Reed–Muller Code Watermarking (RMCW), an LLM watermarking method based on the Reed–Muller code. Our key observation is that watermark detection is a weaker task than full codeword recovery: the detector only needs to find a structure in the observed sequence that is unlikely to occur in unwatermarked text. Reed–Muller codes are well suited to this goal because their restrictions on affine lines form Reed–Solomon codewords. During generation, a secret-keyed vocabulary partition assigns each token a q-ary bin label, and the model is biased toward a structured

∗^{*}Equal contribution; order decided by a coin flip.

†^{\dagger}Corresponding authors.

Figure

Figure 1: Overview of Reed–Muller Code Watermarking (RMCW). Generation (top): First, a secret-keyed vocabulary partition assigns each vocabulary token to one of q bins, while a bivariate Reed–Muller codeword is sampled as a q×qq \times q grid (explained in §3.3). Then, the sampled grid is serialized into a structured sequence of target bin indices. At each decoding step, the language model increases the logits of tokens assigned to the target bin. Detection (bottom): Given candidate text that may have undergone deletion or rewriting, the detector maps each token to its secret-keyed bin label and samples local windows at candidate strides (explained in §3.4). It tests each window for low-degree Reed–Solomon consistency, aggregates evidence across the tested windows, and outputs the watermark detection decision.

sequence derived from a Reed–Muller codeword. During detection, RMCW maps candidate text back to bin labels and searches local subsequences for low-degree Reed–Solomon consistency. This local detection design enables the detector to identify surviving algebraic evidence even when deletions break the original position alignment.

We evaluate RMCW on C4 (Raffel et al., 2020) and ELI5 (Fan et al., 2019) using OPT-1.3B (Zhang et al., 2022) and Llama-3.1-8B-Instruct (Grattafiori et al., 2024). We compare against KGW (Kirchenbauer et al., 2023), EXP (Aaronson and Kirchner, 2022), and PRC (Christ and Gunn, 2024) under clean generation and multiple post-processing attacks. Our results show that RMCW preserves strong clean-text detectability, achieving 99.8% TPR@1%FPR on unmodified text, while retaining 98.1% under burst deletion and 86.6% under synonym substitution. Overall, RMCW substantially improves upon or remains competitive with the baseline methods across several post-processing attacks.

Our contributions are as follows:

• We identify deletion-induced synchronization loss as a key challenge for position-aligned coding-based watermarks and formulate detection as local structure testing rather than global codeword recovery.

• We propose RMCW, a new watermarking framework for LLMs that combines Reed–Muller-coded watermark generation with local Reed–Solomon consistency testing.

• We theoretically analyze the local consistency test and empirically evaluate RMCW across multiple models, datasets, and post-processing attacks.

References (33)