MarkTune: Improving the Quality-Detectability Trade-off in Model-Embedded LLM Watermarking

Yizhou Zhao, Steven Wu, Adam BlockNeurIPS 2026

TL;DR

Watermarking open-weight language models is notoriously tricky: users can easily strip out decoding-time watermarks, while baking watermarks directly into model weights usually makes the model noticeably dumber. MarkTune solves this by using reinforcement learning to amplify a subtle weight-space watermark while anchoring the model's quality to an external, high-quality reference—not the original base model. The result is an open-weight watermark that rivals proprietary API watermarks in detectability, adds zero latency, and keeps the model sharp.

What Problem Does This Paper Address?

Most popular LLM watermarks work at inference time—when you ask ChatGPT or Gemini a question, the server subtly nudges token probabilities during generation to hide a statistical signature. That works great behind a closed API, even if it adds a bit of latency.

However, in the world of open-weight models (like Llama or Qwen), users download the weights and control the sampling code themselves. Anyone can turn off a decoding watermark with a single line of code.

Overview comparing inference-time watermarking (easily disabled on open-weight models) with model-embedded approaches like GaussMark and MarkTune.

To watermark open-weight models, the signal has to live inside the weights themselves (model-embedded watermarking). A recent method called GaussMark does this by injecting secret, keyed Gaussian noise into a subset of weights, then checking if generated text aligns with that noise key. The catch? There is a harsh trade-off: cranking up the noise makes the watermark easy to detect, but rapidly degrades the model’s text quality and reasoning abilities. How do you get strong detectability without lobotomizing the model?

Methods

MarkTune turns watermark embedding into an on-policy reinforcement learning (RL) problem, optimized via GRPO (Group Relative Policy Optimization—a standard RL algorithm). What’s new is how they set up the reward and regularization:

  1. Soft Activation: Starting from a base model, MarkTune applies a tiny, nearly imperceptible GaussMark noise perturbation using a secret key $\xi_\sigma$. A frozen copy of the unperturbed base model is saved as a reference for computing gradients.
  2. Intrinsic Watermark Reward: The model generates text rollouts, and MarkTune uses the standard GaussMark test statistic—which measures alignment between the secret key and the reference model's log-likelihood gradients—directly as the RL reward. No external reward model needed.
  3. Decoupled Quality Regularization: In standard RLHF, you penalize the model for drifting away from the base model (via KL divergence). MarkTune ditches the base-model anchor. Instead, it regularizes toward an external high-quality target—either via cross-entropy loss on human text or KL divergence toward a larger "oracle" model from the same family (e.g., guiding Llama2-7B using Llama2-13B).

Datasets

MarkTune introduces no new benchmarks, relying instead on established datasets to prove cross-domain generalization:

  • Training: A subset of OpenWebText (64–256 token prompts) for on-policy RL fine-tuning, plus a disjoint subset for simulating adversarial LoRA fine-tuning attacks.
  • Generation & Detection Evaluation: C4-RealNewsLike (text completion) and ELI5 (long-form question answering)—both unseen during training.
  • Downstream Utility: MMLU (general knowledge), GSM8K (math), and MBPP (coding).

Key Insights and Ideas

  • Don't anchor to the base model: Conventional RL keeps weights close to the starting model to preserve quality. For watermarking, this is self-defeating—amplifying the watermark requires moving away from the base distribution! Because base models aren't perfect oracles anyway, anchoring to human text or a stronger sibling model lets the optimizer move freely away from the base weights while staying inside a flat, high-quality loss basin.
Figure 2: Stylized one-dimensional landscape along a watermark-sensitive direction. Both θGAUSSMARK and θMARKTUNE lie at nontrivial distances from the base model θ along this direction, leading to significant watermark detectability, but θMARKTUNE resides within the flat high-quality basin around θ⋆and therefore incurs substantially less quality degradation than θGAUSSMARK.
  • Exact false-positive guarantees survive RL: Even though the weights are heavily fine-tuned via RL, detection under the null hypothesis (unwatermarked text) still compares an independent Gaussian key against text gradients, preserving exact, mathematically guaranteed Type-I error control.
  • Generalizability of the framework: While built around GaussMark, MarkTune's dual-objective recipe works with other computable detection statistics too (such as distilling KGW $z$-scores).

Key Results

Tested on Qwen3-4B-Base and Llama2-7B (generating 200 tokens), MarkTune pushes the quality-detectability frontier dramatically forward:

Figure 3: Quality-detectability trade-off at 200 generated tokens. Black ‘×’ marks the MARKTUNE configuration used elsewhere.
  • Near-API Detectability with Preserved Quality: At a strict 1% false positive rate on C4, MarkTune boosts Llama2-7B’s true positive rate (TPR) from GaussMark's 71.2% up to 98.2% (and from 78.8% to 96.4% on Qwen3-4B), matching inference-time schemes like SynthID while keeping perplexity nearly identical to the unwatermarked model (6.75 vs. 6.55 on Llama2).
  • Zero Inference Overhead: Generation takes standard decoding time (~2.4s on Llama2-7B vs. ~2.88s for SynthID), and detection takes just 18.1 ms.
  • Downstream Tasks & Paraphrase Robustness: MarkTune preserves accuracy on MMLU, GSM8K, and MBPP, substantially beating GaussMark on coding. Under roundtrip translation attacks on Llama2-7B, MarkTune achieves 83.4% TPR, outperforming every baseline—including inference-time Gumbel-max (79.6%) and SynthID (61.2%). It also retains strong detectability after 1,500 steps of adversarial LoRA fine-tuning, INT8 quantization, pruning, and model merging.

Limitations and Future Work

  • Offline Training Cost: While inference is free of latency, embedding the watermark requires an upfront, one-time offline GRPO fine-tuning run (as opposed to GaussMark's instant noise addition).
  • Crude Token-Level Edits: Under heavy brute-force token deletion or synonym substitution (e.g., deleting 50% of words), MarkTune's signal decays—though the authors note such aggressive edits severely degrade text perplexity anyway.
  • Detector Requirements & Extensions: Detection isn't purely keyless—the detector must store the reference base model weights to compute sequence gradients. Additionally, extending MarkTune to semantic-level watermarks that require resampling at detection time remains nontrivial and an open direction.

Summary updated

Abstract

Language model watermarking schemes fall into two broad categories: inference-time methods, which modify the decoding process at generation time, and model-embedded methods, which encode a secret signal directly into the model weights. Inference-time watermarking methods incur additional inference overhead and are not applicable in the increasingly prevalent open-weight model settings. In contrast, model-embedded watermarks introduce no additional inference latency—generation uses the standard sampling pipeline—and are particularly well-suited to open-weight settings. However, existing model-embedded approaches such as GaussMark face a fundamental quality-detectability trade-off: achieving strong detection power typically requires weight perturbations that noticeably degrade generation quality. Our key insight is that regularizing toward a high-quality reference distribution decouples quality preservation from proximity to the base model, enabling a better quality-detectability trade-off. Building on this insight, we introduce MarkTune, a theoretically grounded on-policy fine-tuning framework that uses the GaussMark detection statistic as a reward while preserving generation quality through cross-entropy on high-quality human text or KL divergence to a stronger oracle model. Empirically, MarkTune substantially improves the quality-detectability frontier of GaussMark, approaching the detectability of strong inference-time schemes while preserving generation quality and downstream task performance. Marktune also remains robust under the evaluated text-editing and open-weight attacks and generalizes across datasets, retaining substantial detection power on corpora unseen during training. Code is available at https://github.com/zhyzmath/MarkTune-LLM-Watermarking.
BibTeX
@inproceedings{zhao2026marktune,
  author = {Yizhou Zhao and Steven Wu and Adam Block},
  title = {{MarkTune: Improving the Quality-Detectability Trade-off in Model-Embedded LLM Watermarking}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=42tU2vcTxH},
}
Figure