SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.07138 · 2023

WaterBench: Towards Holistic Evaluation of Watermarks for Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 2 failures of our instrument; 2 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2311.07138.json · badge: /api/ran/2311.07138.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
THU-KEG/WaterBench canonical (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
dortsur/heavywater_simplexwater extension (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
bootstrap_pd Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dortsur/heavywater_simplexwater/detect.py
code served (permissive licence) · get_code("e50c48cad3cee475")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create sample p-values (small array for testing)
pvals = np.array([0.001, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8])

# Define threshold for p-value comparison
threshold = 0.25

# Set up arguments dictionary
ARGS = {
    'pvals': pvals,
    'threshold': threshold,
    'alpha': 0.75,
    'n_boot': 200,
    'seed': 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_chat Ran
ran, violated the contract we drafted
THU-KEG/WaterBench/pred.py
code served (permissive licence) · get_code("ed4be202f208766c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

class MockTokenizer:
    def build_prompt(self, prompt):
        return f"[PROMPT]{prompt}[/PROMPT]"

class MockTokenizerLlama:
    pass

class MockTokenizerXgen:
    pass

class MockTokenizerInternlm:
    pass

class MockTokenizerTulu:
    pass

# Test with chatglm model
tokenizer_chatglm = MockTokenizer()
prompt_text = "Hello, how are you?"
model_name_chatglm = "chatglm-6b"

ARGS = {
    "tokenizer": tokenizer_chatglm,
    "prompt": prompt_text,
    "model_name": model_name_chatglm
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_chat Ran
ran; our contract draft was wrong, not the code
dortsur/heavywater_simplexwater/pred.py
code served (permissive licence) · get_code("f59d3f952a8d5950")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Tokenizer stand-in - the function doesn't actually call any methods on it
class SimpleTokenizer:
    def __init__(self):
        self.vocab_size = 1000
        self.pad_token_id = 0

tokenizer = SimpleTokenizer()

# Prompt is a string
prompt = "What is the meaning of life?"

# Model name is a string
model_name = "mistral-7b"

ARGS = {
    "tokenizer": tokenizer,
    "prompt": prompt,
    "model_name": model_name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
str2bool Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from jwkirchenbauer/lm-watermarking
pointer only · get_code("678874b625786116")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

parse_args Not yet run
unverified (harvested, no recorded run)
THU-KEG/WaterBench/pred.py
code served (permissive licence) · get_code("a37634f5d95e4bc6")
How it ran

no invocation recorded.

parse_args Not yet run
unverified (harvested, no recorded run)
dortsur/heavywater_simplexwater/pred.py
code served (permissive licence) · get_code("07264568683ce46b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 4 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
str2bool 175 other papers
92 dated earlier, 2 the same month, 78 later, 3 same year, order not determinable · 2 only as an assembly brick
1406.6247 (2014-06)
Recurrent Models of Visual Attention
1603.09382 (2016-03)
Deep Networks with Stochastic Depth
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
and 172 more not named here
build_chat 3 other papers
1 dated earlier, 2 later
2307.15593 (2023-07)
Robust Distortion-free Watermarks for Language Models
aaai_34662 (2025 (year only))
3D-RPE: Enhancing Long-Context Modeling Through 3D Rotary Position Encoding
2506.06409 (2025-06)
HeavyWater and SimplexWater: Distortion-Free LLM Watermarks for Low-Entropy Next-Token Predictions
bootstrap_pd 2 other papers
1 dated earlier, 1 later
2307.15593 (2023-07)
Robust Distortion-free Watermarks for Language Models
2506.06409 (2025-06)
HeavyWater and SimplexWater: Distortion-Free LLM Watermarks for Low-Entropy Next-Token Predictions
parse_args 2 other papers
1 dated earlier, 1 later
2307.15593 (2023-07)
Robust Distortion-free Watermarks for Language Models
2506.06409 (2025-06)
HeavyWater and SimplexWater: Distortion-Free LLM Watermarks for Low-Entropy Next-Token Predictions

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

To mitigate the potential misuse of large language models (LLMs), recent research has developed watermarking algorithms, which restrict the generation process to leave an invisible trace for watermark detection. Due to the two-stage nature of the task, most studies evaluate the generation and detection separately, thereby presenting a challenge in unbiased, thorough, and applicable evaluations. In this paper, we introduce WaterBench, the first comprehensive benchmark for LLM watermarks, in which we design three crucial factors: (1) For benchmarking procedure, to ensure an apples-to-apples comparison, we first adjust each watermarking method's hyper-parameter to reach the same watermarking strength, then jointly evaluate their generation and detection performance. (2) For task selection, we diversify the input and output length to form a five-category taxonomy, covering $9$ tasks. (3) For evaluation metric, we adopt the GPT4-Judge for automatically evaluating the decline of instruction-following abilities after watermarking. We evaluate $4$ open-source watermarks on $2$ LLMs under $2$ watermarking strengths and observe the common struggles for current methods on maintaining the generation quality. The code and data are available at https://github.com/THU-KEG/WaterBench.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2311.07138")
get_code_for_paper("2311.07138")
have("2311.07138")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2311.07138.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2311.07138.svg)](https://syntology.ai/paper/2311.07138)

Connect an agent — have() is free.