[Paper Review] Learning to Watermark LLM-generated Text via Reinforcement Learning
This paper proposes a reinforcement learning-based framework that co-trains a large language model (LLM) and a detector to embed watermarks directly into the model weights, enabling robust, accurate, and adaptable watermarking. Unlike token-level methods, this model-level watermarking allows open-sourcing of watermarked models and achieves near-perfect detection accuracy with low overhead when integrated into alignment pipelines.
We study how to watermark LLM outputs, i.e. embedding algorithmically detectable signals into LLM-generated text to track misuse. Unlike the current mainstream methods that work with a fixed LLM, we expand the watermark design space by including the LLM tuning stage in the watermark pipeline. While prior works focus on token-level watermark that embeds signals into the output, we design a model-level watermark that embeds signals into the LLM weights, and such signals can be detected by a paired detector. We propose a co-training framework based on reinforcement learning that iteratively (1) trains a detector to detect the generated watermarked text and (2) tunes the LLM to generate text easily detectable by the detector while keeping its normal utility. We empirically show that our watermarks are more accurate, robust, and adaptable (to new attacks). It also allows watermarked model open-sourcing. In addition, if used together with alignment, the extra overhead introduced is low - only training an extra reward model (i.e. our detector). We hope our work can bring more effort into studying a broader watermark design that is not limited to working with a fixed LLM. We open-source the code: https://github.com/xiaojunxu/learning-to-watermark-llm .
Motivation & Objective
- To address the limitations of fixed-model, token-level watermarking methods that suffer from low accuracy, vulnerability to paraphrasing, and inability to support model open-sourcing.
- To expand the watermark design space by incorporating LLM fine-tuning into the watermarking pipeline, enabling model-level watermarking.
- To develop a co-training framework using reinforcement learning that jointly optimizes watermark detectability and model utility.
- To enable robust and adaptable watermarking that can be updated in response to new adversarial attacks through data-driven retraining.
- To support open-sourcing of watermarked LLMs by embedding watermarks directly into model weights rather than applying post-hoc distortions.
Proposed method
- The framework uses a reinforcement learning (RL) setup where the LLM is fine-tuned to generate text that is easily detectable by a paired detector, while the detector is trained to distinguish watermarked from non-watermarked text.
- The reward model in the RLHF (Reinforcement Learning from Human Feedback) pipeline is repurposed as the watermark detector, enabling end-to-end training with a utility-preserving objective.
- Watermark signals are embedded in the model weights during instruction tuning, making the watermark persistent and undetectable via simple statistical analysis.
- The co-training process alternates between fine-tuning the LLM to enhance detectability and training the detector to improve accuracy, leveraging the generalization of RL algorithms.
- The method supports adversarial data augmentation by incorporating paraphrased or attack-generated texts into the training data to improve robustness.
- Detection is performed via inference on a language model detector, enabling high-accuracy detection at the cost of increased inference overhead compared to statistical tests.

Experimental results
Research questions
- RQ1Can watermarking be effectively embedded at the model level by fine-tuning LLM weights, rather than through post-hoc output distortion?
- RQ2How does co-training an LLM and a detector via reinforcement learning improve watermark detection accuracy and robustness compared to token-level methods?
- RQ3Can the proposed framework support open-sourcing of watermarked LLMs without releasing unwatermarked versions?
- RQ4How adaptable is the watermark to new adversarial attacks, such as paraphrasing or rephrasing, and can it be updated efficiently?
- RQ5What is the computational and deployment overhead of using a model-based detector compared to lightweight statistical tests in fixed-model watermarking?
Key findings
- The proposed method achieves near-perfect detection accuracy, significantly outperforming existing token-level watermarking approaches in terms of reliability and robustness.
- Watermarks are robust against paraphrasing and adversarial attacks due to the model-level embedding and data-driven co-training with adversarial examples.
- The framework enables open-sourcing of watermarked LLMs because watermarks are embedded in the model weights and do not require runtime injection.
- Detection overhead is higher than statistical tests, but the cost is minimal when integrated into standard alignment pipelines, requiring only an additional reward model.
- The method is adaptable: new attack types can be mitigated by retraining with adversarially generated data, enabling continuous improvement of the watermark system.
- Spoofing attacks are less effective because the watermark is not algorithmically generated but learned through data, making it less susceptible to manipulation by attackers.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.