With the growing prevalence of large language model (LLM) generated content, watermarking is considered a promising approach for attributing text to LLMs and distinguishing it from human-written content. A prominent class of techniques embeds subtle but detectable signals in generated text by modifying token sampling probabilities. However, such methods are unsuitable for open-source models, where users have white-box access and can easily disable watermarking during inference. In this work, we introduce OpenStamp, a watermarking technique that encodes the watermarking logic directly into the model weights by modifying only the final projection, or unembedding, layer. Through experiments across two models, we show that OpenStamp achieves superior detection performance, with minimal degradation in model capabilities compared to prior methods. The implanted watermark is explicitly designed, and empirically confirmed, to be more robust to paraphrasing attacks and harder to scrub off through post-hoc fine-tuning than prior open-source watermarks. To enable developers to watermark their models, we release our code alongside watermarked versions of 4 popular open-source models.
Figures & tables
Figure 1: Overview of OpenStamp , our watermarking method. We add an offset matrix ΔW to the unembedding layer’s weights U to produce watermark logits that bias token sampling, favoring tokens with higher watermark logit values. The watermark can be detected using a log-likelihood ratio (LLR) based score which measures how much more likely the observed tokens are under the watermarked model compared to the unwatermarked model.
Figure 2: Trade-off between detectability and text quality for various watermarking methods on Llama-2-7B . OpenStamp is on the Pareto frontier and outperforms all open-source compatible methods (shown in green) by a substantial margin. Vanilla KGW performs slightly worse than KGW + LLR, highlighting the effectiveness of the LLR detection method.
Method
Model
ArXiv
BookSum
Wikipedia
TPR
PPL
TPR
PPL
TPR
PPL
KGW †
Llama-2-7B
0.994 ± 0.005
32.3 ± 1.8
0.998 ± 0.002
24.1 ± 1.4
0.914 ± 0.036
13.8 ± 0.6
Mistral-7B
0.998 ± 0.002
30.2 ± 2.4
0.998 ± 0.002
24.6 ± 0.7
0.911 ± 0.092
13.2 ± 0.6
KGW + LLR †
Llama-2-7B
0.994 ± 0.010
32.0 ± 1.1
1.000 ± 0.001
23.2 ± 0.4
0.996 ± 0.004
12.7 ± 0.4
Mistral-7B
1.000 ± 0.000
29.2 ± 1.2
1.000 ± 0.001
23.6 ± 0.5
0.992 ± 0.009
13.0 ± 1.0
KGW Distilled
Llama-2-7B
0.886 ± 0.076
43.48 ± 0.7
0.927 ± 0.035
28.6 ± 2.4
0.813 ± 0.141
16.4 ± 1.7
Table 1: Comparing different watermarking approaches across multiple datasets. We report [email protected]%FPR (labeled TPR) to measure detectability and perplexity (PPL) to characterize text quality. Bold values indicate the best [email protected]%FPR at the lowest PPL for each dataset and model. KGW † and KGW + LLR † are decoding-based watermark methods included for reference. For both models, OpenStamp achieves near-perfect detection with PPL competitive with Unremovable and lower than GaussMark and KGW Distilled, demonstrating a superior tradeoff between text quality and detectability across the three datasets.
Llama-2-7B
Mistral-7B
Method
AUROC
TPR@1%FPR
AUROC
TPR@1%FPR
SIR
0.973 ± 0.007
0.753 ± 0.035
0.971 ± 0.007
0.763 ± 0.043
KGW Distilled
0.950 ± 0.004
0.602 ± 0.021
0.954 ± 0.013
0.596 ± 0.051
GaussMark
0.946 ± 0.002
0.550 ± 0.035
0.925 ± 0.016
0.409 ± 0.061
Unremovable
0.966 ± 0.009
0.724 ± 0.098
0.966 ± 0.008
0.715 ± 0.010
OpenStamp w/o sem-align
0.971 ± 0.005
0.762 ± 0.024
0.960 ± 0.012
0.732 ± 0.038
Table 2: Detectability of paraphrased text. On both models, OpenStamp achieves the highest TPR@1%FPR on paraphrased text, outperforming SIR and the open-source baselines. OpenStamp w/o sem-align degrades performance, confirming that the projection matrix contributes to robustness against paraphrasing attacks.
Figure 5
RealNewsLike
AlpacaEval
Method
AUROC
TPR@1%FPR
AUROC
TPR@1%FPR
KGW Distilled
0.996 ± 0.002
0.952 ± 0.006
0.634 ± 0.206
0.090 ± 0.135
GaussMark
0.980 ± 0.003
0.775 ± 0.014
0.885 ± 0.027
0.301 ± 0.092
Unremovable
0.996 ± 0.001
0.965 ± 0.010
0.984 ± 0.005
0.707 ± 0.101
OpenStamp
1.000 ± 0.000
1.000 ± 0.000
0.977 ± 0.005
0.699 ± 0.038
Table 3: Llama-2-7B detectability under instruction fine-tuning. TPR@1%FPR remains high on RealNewsLike but drops on AlpacaEval. Bold values mark the best in each column.
Method
Model
Unquantized
NF4
INT8
OpenStamp
Llama-2-7B
0.998
1.000
1.000
Mistral-7B
1.000
1.000
1.000
KGW Distilled
Llama-2-7B
0.986
0.976
0.988
Mistral-7B
0.990
1.000
0.994
GaussMark
Llama-2-7B
0.846
0.854
0.842
Mistral-7B
0.746
0.736
0.704
Table 4: Detectability under quantization. TPR@1%FPR remains high for OpenStamp and the baselines under both NF4 and INT8.
Condition
PPL
Watermarked baseline
15.1
After 2,500 steps (80M tokens)
78,529.4
After 25,000 steps (800M tokens)
351.7
Table 5: Perplexity after retraining a reinitialized unembedding layer. Only the unembedding layer is reinitialized and retrained on FineWeb; all other weights remain frozen.
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 9
RealNewsLike
AlpacaEval
Method
AUROC
TPR@1%FPR
AUROC
TPR@1%FPR
KGW Distilled
0.997 ± 0.002
0.936 ± 0.049
0.597 ± 0.178
0.066 ± 0.087
GaussMark
0.963 ± 0.007
0.595 ± 0.064
0.853 ± 0.044
0.223 ± 0.128
Unremovable
0.996 ± 0.001
0.939 ± 0.015
0.979 ± 0.003
0.589 ± 0.133
OpenStamp
1.000 ± 0.000
0.998 ± 0.002
0.948 ± 0.020
0.454 ± 0.009
Appendix
Table 6: Mistral-7B detectability under instruction fine-tuning. TPR@1%FPR remains high on RealNewsLike but drops on AlpacaEval, matching Table 3 . Bold values mark the best in each column.
Table 7: Generalizability across LLMs. OpenStamp achieves perfect TPR@1%FPR across all four models, demonstrating its robustness and generalizability. The difference between WM PPL and Baseline PPL indicates the impact of watermarking on the model’s perplexity.
Method
Model
OpenWebMath
FineWeb-2 (Ja)
StarCoderData
TPR
PPL
TPR
PPL
TPR
PPL
KGW †
Llama-2-7B
0.748 ± 0.269
16.3 ± 1.0
0.678 ± 0.470
18.6 ± 0.7
0.491 ± 0.261
6.5 ± 0.3
Mistral-7B
0.596 ± 0.496
15.1 ± 0.2
0.980 ± 0.015
27.3 ± 1.0
0.414 ± 0.180
7.1 ± 0.7
KGW + LLR †
Llama-2-7B
0.998 ± 0.002
15.4 ± 0.5
0.998 ± 0.001
17.7 ± 1.3
0.915 ± 0.006
6.6 ± 0.3
Mistral-7B
0.988 ± 0.005
14.4 ± 0.7
1.000 ± 0.000
27.4 ± 0.7
0.868 ± 0.075
6.4 ± 0.2
KGW Distilled
Llama-2-7B
0.247 ± 0.329
20.5 ± 1.1
0.247 ± 0.222
25.5 ± 0.0
0.133 ± 0.100
8.3 ± 0.3
Appendix
Table 8: Detection under significant distribution shift. We report [email protected]%FPR (labeled TPR) and perplexity (PPL) on OpenWebMath ( Paster et al., 2024 ) , the Japanese subset of FineWeb-2 ( Penedo et al., 2025 ) , and the Python subset of StarCoderData ( Li et al., 2023a ) . Bold values indicate the highest TPR among open-weight watermarking methods for each dataset and model.
Figure 13
Figure 8: Effectiveness of Projection Matrix P . The distribution of cosine similarities between original and paraphrased text pairs is shown for both raw hidden states and projected hidden states. The projection significantly increases the similarity, indicating that P successfully aligns hidden states with semantic similarity.
Embedding Model
AUROC
TPR@1%FPR
OpenStamp w/o sem-align
0.971 ± 0.005
0.762 ± 0.024
Qwen3-Embedding-8B
0.990 ± 0.003
0.907 ± 0.003
multilingual-e5-large
0.988 ± 0.003
0.877 ± 0.018
bge-m3
0.989 ± 0.005
0.861 ± 0.055
Appendix
Table 9: Effect of the embedding model used to train the projection matrix P . Paraphrasing robustness on Llama-2-7B . The OpenStamp w/o sem-align row removes the projection matrix and trains the selector on raw hidden states.
Figure 9: Quality of Paraphrased Completions. The distribution of cosine similarities between original and paraphrased completions shows a high mean similarity of 0.92, indicating that the paraphrasing attack successfully preserves the semantic content of the original completions.
Method
Multinomial
Greedy
TPR@1%FPR
seq-rep-3
TPR@1%FPR
seq-rep-3
RL Watermarking
0.25
0.03
0.99
0.58
OpenStamp
1.0
0.03
1.0
0.03
Appendix
Table 10: Detectability (TPR@1%FPR) and text repetition (mean seq-rep-3) for RL watermarking and OpenStamp under multinomial and greedy decoding. While RL watermarking achieves high detectability with greedy decoding, it causes severe repetition, whereas OpenStamp maintains both strong detectability and low repetition across settings.
Figure 18
Figure 12: Variability in Watermark Logits. As L increases, the mean Jaccard similarity between different top-biased token sets decreases, indicating greater variability in watermark logits across different contexts.
Figure 13: Prompt Independence of Watermark Detection. Per-token LLR scores for (a) watermarked and (b) unwatermarked text, computed with and without the prompt. The red highlight indicates tokens with a negative score whereas the green highlight indicates tokens with a positive score. The text in blue is the prompt. Scores are similar in both settings, indicating that detection is robust to the absence of the original prompt.
Condition
ARI
NMI
Different Dataset
0.44
0.65
Different Seed
0.46
0.67
Different Dataset & Seed
0.37
0.63
Appendix
Table 11: Agreement between cluster assignments from different selector matrices. The ARI and NMI scores indicate moderate agreement, showing that reconstructing the original selector matrix is challenging even with knowledge of L .
Table 12: Comparing LLR to alternative detectors . The discretized-signal variants perform worse than the full LLR detector, indicating that collapsing the mixed green list structure into a single discrete choice loses useful information.
Method
Model
Native
LLR
GaussMark
Llama-2-7B
0.737 ± 0.089
0.922 ± 0.017
Mistral-7B
0.349 ± 0.121
0.566 ± 0.155
KGW Distilled
Llama-2-7B
0.965 ± 0.023
1.000 ± 0.000
Mistral-7B
0.996 ± 0.007
1.000 ± 0.000
Unremovable
Llama-2-7B
0.966 ± 0.016
1.000 ± 0.000
Mistral-7B
0.979 ± 0.011
1.000 ± 0.000
Appendix
Table 13: Effect of the LLR detector on baselines Replacing each method’s native detector with the LLR improves [email protected]%FPR on both models, with the largest gain for GaussMark.