TL;DR
When you release an open-source AI model into the wild, anyone can download its weights, tweak them, and strip away standard decoding-time watermarks. This paper introduces OpenMarkX, a unified platform for embedding and stress-testing watermarks directly inside open-source model weights across text, agents, images, and physics simulations. Alongside it, the authors propose OpenMark, a training technique that teaches models to speak with a resilient, subtle statistical accent that survives even when users fine-tune or merge the weights.
What Problem Does This Paper Address?
Watermarking closed-source models (like GPT-4) is relatively straightforward: because the provider controls the server, they can secretly nudge the token-sampling probabilities during generation—creating a "green list" of favored tokens that a detector can spot later.
Open-source models break this paradigm. Once a user downloads the model weights, they control the inference code and will simply run standard decoding, bypassing any external watermarking script. Consequently, the watermark must live inside the weights themselves.
Existing "learning-based" methods try to bake watermarks into weights via distillation: a teacher model generates watermarked text using a rigid, predefined cryptographic rule, and a student model is trained to mimic it. Two things go wrong here:
- The Learnability Gap: Neural networks struggle to internalize arbitrary, hash-based token rules. The student only partially learns the rule, causing detection accuracy to drop unless you crank up the watermark strength—which ruins text quality.
- Fragility to Edits: Downstream users routinely fine-tune, quantize, prune, or merge open-source models. Fine-tuning on normal text quickly overwrites and erases the learned watermark.
Methods
The authors tackle this on two fronts: an extensible evaluation platform (OpenMarkX) and a new weight-watermarking algorithm (OpenMark).
OpenMarkX standardizes the watermarking lifecycle: you plug in a backbone model, a private key, and a compatible watermarking method, and the platform outputs watermarked weights alongside benchmark reports on quality, detectability, and robustness against weight and output edits.
Within this platform, OpenMark replaces rigid distillation rules with two complementary mechanisms:
- Co-Adaptive Watermark Policy (CAWP): Instead of forcing the student LLM to learn a fixed hash rule, OpenMark turns the watermark generator into a tiny trainable MLP (1.16M parameters) sitting atop frozen BERT embeddings. The MLP and the student LLM are trained jointly. The MLP adapts to produce watermark patterns that the LLM naturally finds easy to learn, while regularization losses ensure the shifts stay balanced, unbiased, and non-vanishing. At detection time, the owner uses this co-adapted MLP to score text—eliminating the mismatch between what was taught and what is tested.
- Forgotten Perturbation-aware Learning (FPL): Rather than building separate defenses for merging, pruning, and fine-tuning, FPL targets the root cause of watermark erasure. The authors create "anti-watermarked" text (inverting the watermark logits) to find the exact gradient direction that erases the signal fastest. Using sharpness-aware minimization (SAM), FPL flattens the loss landscape along this worst-case erasure direction so future weight updates slide right over the watermark without destroying it.
Datasets
No new datasets are introduced; instead, OpenMarkX unifies existing benchmarks across modalities:
- Text & OOD Generalization: C4 (training, detector calibration, and 200-token continuation evaluation) and Wikipedia prompts.
- Downstream Reasoning: HellaSwag, ARC-Challenge, AGIEval-Math, and GSM8K.
- Weight Fine-Tuning Attacks: OpenMathInstruct and OpenCodeInstruct.
- Multimodal & Agent Workflows: ImageNet (via Taming Transformers), aircraft physics fields (GeoPT), medical VQA, and ReAct agent benchmarks.
Key Insights and Ideas
- Don't dictate the watermark; negotiate it: Trying to distill a rigid cryptographic hash into neural weights fights against the model's natural representations. Letting the watermark policy and LLM co-evolve yields higher detectability and better fluency simultaneously.
- "Red tokens" drive watermark forgetting: Why does fine-tuning on ordinary text wipe out a watermark? Because ordinary text contains many "red" (unfavored) tokens. Gradients from green tokens preserve the watermark, while gradients from red tokens actively dismantle it. Simulating an extreme red-token attack ("anti-watermarked" text) gives you a universal proxy for the worst-case weight drift.
Key Results
Evaluated across LLaMA3-8B, LLaMA3.2-3B, and Phi2-2.7B, OpenMark consistently improves the quality–detectability–robustness Pareto frontier:
- Fluency & Detection: Achieves a 0.92 True Positive Rate (TPR) at a 1% False Positive Rate (FPR) while reducing perplexity (PPL, where lower means more natural text) by 20.5% on average compared to the strongest prior distillation baseline (Gu et al.-KGW). Downstream reasoning drops by at most 0.43 percentage points.
- Surviving Weight Edits: After merging watermarked LLaMA3-8B weights 50/50 with the unwatermarked base model, OpenMark retains 0.57 TPR at 5% FPR, whereas prior baselines drop to at most 0.34. After 300 and 1,500 fine-tuning steps on OpenMathInstruct, it retains 0.70 and 0.37 TPR (at 5% FPR), outperforming baseline highs of 0.48 and 0.23.
- Attribution & Cross-Modal Reach: Across three independently watermarked models, detectors identify their own model's text >90.9% of the time while flagging other watermarked models ≤1.3% of the time. Beyond standalone text, OpenMarkX successfully watermarks vision-language answers (0.86 TPR@1%), ReAct agent final answers (0.82 TPR@1%), generated images (0.90 TPR@1%), and 3D physics fields (1.00 TPR@1%).
Limitations and Future Work
- Agent scope is content-only: In the ReAct agent workflow, OpenMarkX only watermarks and verifies the agent's final text answer—it does not authenticate intermediate tool calls or the broader behavioral trajectory. Furthermore, the agent configuration exhibited an 8.4% relative drop in task accuracy, the steepest quality trade-off observed across modalities.
- Eventual erosion under heavy attacks: While substantially more resilient than prior methods, sustained fine-tuning (e.g., 1,500 steps, dropping TPR@1% to 0.17) or multi-round LLM paraphrasing (3 rounds with Qwen3.5-9B, dropping TPR@1% to 0.17) still noticeably degrades the signal. Future extensions can leverage OpenMarkX's modular adapters to integrate trajectory-level agent watermarks and stronger edit-resistant schemes.
Summary updated