SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2609.15657 · September 2026

Predictive Likelihood Ratios for Language Model Watermark Detection

Li Ma

arXiv · PDF · Open in the Atlas

Code that ran

17 of 21 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; 5 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 11 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/2609.15657.json · badge: /api/ran/2609.15657.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
MaStatLab/PLRWatermark canonical (classifier label)
classifier basis: census
17 ran · 4 no recorded run
FunctionStatusWhere it lives
beta_grid_prior Ran
ran, honoured the contract we drafted
MaStatLab/PLRWatermark/code/bayesian_watermark.py
code served (permissive licence) · get_code("0d62387e56d267c5")
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, through the batch API) and returned tuple, ndim 2, 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
import math

ARGS = {
    "alpha": 2.0,
    "beta": 5.0,
    "low": 0.1,
    "high": 0.9,
    "size": 51,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 2, 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 Ran
ran; our contract draft was wrong, not the code
MaStatLab/PLRWatermark/code/build_prompts.py
code served (permissive licence) · get_code("3d1069cecaec3698")
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, through the batch API) and returned tuple. 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 gzip
import json
from pathlib import Path
import numpy as np
import tempfile
import os

# Create a minimal stand-in tokenizer
class MockTokenizer:
    def encode(self, text, return_tensors=None, truncation=False, max_length=None):
        # Return a simple sequence of token ids
        # Simulate tokenization by returning enough tokens
        tokens = np.arange(300, dtype=np.int64)  # Return 300 tokens to satisfy need (50 + 200)
        if return_tensors == 'pt':
            import torch
            return [torch.from_numpy(tokens).long()]
        return tokens

# Create temporary gzip file with mock data
def create_mock_shard():
    temp_dir = tempfile.mkdtemp()
    shard_path = Path(temp_dir) / "mock_shard.jsonl.gz"
    
    with gzip.open(shard_path, 'wt') as f:
        for i in range(100):
            record = {'text': f'Sample text number {i} with enough content to tokenize properly'}
            f.write(json.dumps(record) + '\n')
    
    return shard_path

# Mock the transformers module to return our mock tokenizer
import sys
from unittest.mock import MagicMock

mock_transformers = MagicMock()
mock_transformers.AutoTokenizer.from_pretrained.return_value = MockTokenizer()
sys.modules['transformers'] = mock_transformers

# Patch the TOKENIZERS dictionary in the function's module context
shard_path = create_mock_shard()

ARGS = {
    'model': '1p3B',
    'count': 10,
    'shard': shard_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
effective_prior_support Ran
ran, honoured the contract we drafted
MaStatLab/PLRWatermark/code/benchmark_paper_experiment.py
code served (permissive licence) · get_code("b962cb2c40a0473b")
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, through the batch API) 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 torch

class BenchmarkConfig:
    def __init__(self, prior_low, prior_high, vocabulary_size):
        self.prior_low = prior_low
        self.prior_high = prior_high
        self.vocabulary_size = vocabulary_size

config = BenchmarkConfig(
    prior_low=0.1,
    prior_high=0.95,
    vocabulary_size=1000
)

ARGS = {
    "config": config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
identical_to_four_decimals Ran
ran; our contract draft was wrong, not the code
MaStatLab/PLRWatermark/code/check_clean_quadrature.py
code served (permissive licence) · get_code("199955359ab1bd15")
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, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 numpy as np

torch.manual_seed(0)

# The function takes a list of float values and checks if they all
# display identically when formatted to 4 decimal places.
# We need to construct a list of floats that all round to the same
# 4-decimal representation.

ARGS = {
    "values": [1.00001, 1.00002, 1.00004, 1.00009]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
indicator_key Ran
ran; our contract draft was wrong, not the code
MaStatLab/PLRWatermark/code/benchmark_contamination.py
code served (permissive licence) · get_code("ea0154500e106d6d")
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, through the batch API) 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 numpy as np

torch.manual_seed(0)

ARGS = {
    'scheme': 'rejection_sampling',
    'rho_true': 0.75,
    'horizon': 10,
    'method': 'importance_weighting'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
instrument Ran
ran; our contract draft was wrong, not the code
MaStatLab/PLRWatermark/code/check_figure_geometry.py
code served (permissive licence) · get_code("6c4cde22d84f6fa6")
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, through the batch API) 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 re

# Analyze the function to understand what it needs:
# - body: str - a string containing TikZ code with \node commands
# - label: str - a label for the panel
# - plate: str - a plate identifier

# The function:
# 1. Searches for \node[options](name) patterns in body
# 2. Filters nodes by checking if their options contain any of: 'latentnode', 'obsnode', 'detnode', 'priornode'
# 3. Checks for duplicate node names
# 4. Constructs a probe block and inserts it before \end{tikzpicture}

# Create valid test arguments:

body = r'''
\begin{tikzpicture}
  \node[latentnode] (x1) {$X_1$};
  \node[obsnode] (y1) {$Y_1$};
  \node[detnode] (z1) {$Z_1$};
  \path (x1) -- (y1);
\end{tikzpicture}
'''

label = "panel_A"

plate = "plate_1"

ARGS = {
    "body": body,
    "label": label,
    "plate": plate,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
is_point_mass_method Ran
ran, violated the contract we drafted
MaStatLab/PLRWatermark/code/benchmark_contamination.py
code served (permissive licence) · get_code("2f8f5e75ac9d73f1")
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, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

ARGS = {
    'method': 'bayes_shared_rho0_example_method'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
least_favorable_probabilities Ran
ran, honoured the contract we drafted
MaStatLab/PLRWatermark/code/bayesian_watermark.py
code served (permissive licence) · get_code("2a5ab900a8ddd7da")
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, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 math
import numpy as np

# Test case 1: delta = 0.3, no vocabulary_size specified
delta_1 = 0.3
vocabulary_size_1 = None

# Test case 2: delta = 0.2, with vocabulary_size = 10
delta_2 = 0.2
vocabulary_size_2 = 10

# Test case 3: delta = 0.0, with vocabulary_size = 5
delta_3 = 0.0
vocabulary_size_3 = 5

# Test case 4: delta = 0.5, no vocabulary_size
delta_4 = 0.5
vocabulary_size_4 = None

# Use the first test case as the main ARGS
ARGS = {
    'delta': 0.3,
    'vocabulary_size': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
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
logsumexp Ran
ran; our contract draft was wrong, not the code
MaStatLab/PLRWatermark/code/bayesian_watermark.py
code served (permissive licence) · get_code("ea708dfa2b17d157")
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, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (3,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

# Test case 1: scalar input
values_scalar = 5.0

# Test case 2: list of floats
values_list = [1.0, 2.0, 3.0, 4.0]

# Test case 3: 1D numpy array
values_1d = np.array([1.0, 2.0, 3.0, 4.0])

# Test case 4: 2D numpy array for axis testing
values_2d = np.array([[1.0, 2.0, 3.0],
                      [4.0, 5.0, 6.0]])

# Test case 5: 3D numpy array
values_3d = np.array([[[1.0, 2.0],
                       [3.0, 4.0]],
                      [[5.0, 6.0],
                       [7.0, 8.0]]])

# Use 2D array with axis=0 as the primary test case
ARGS = {
    "values": values_2d,
    "axis": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) as a later run recorded it
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
panels Ran
ran; our contract draft was wrong, not the code
MaStatLab/PLRWatermark/code/check_figure_geometry.py
code served (permissive licence) · get_code("a7ed6ccc4e9dbce6")
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, through the batch API) and returned list, 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 re

# Create a LaTeX source string with tikzpicture environments and a label
source = r"""
\documentclass{article}
\usepackage{tikz}

\begin{figure}
\begin{tikzpicture}
\draw (0,0) -- (1,1);
\node at (0,0) {A};
\end{tikzpicture}

\begin{tikzpicture}
\draw (2,2) -- (3,3);
\node at (2,2) {B};
\end{tikzpicture}

\label{myfigure}
\end{figure}

\begin{figure}
\begin{tikzpicture}
\draw (0,0) -- (1,1);
\end{tikzpicture}
\label{otherfigure}
\end{figure}
"""

ARGS = {
    "source": source,
    "label": "myfigure",
    "want": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
parse_geometry Ran
ran; our contract draft was wrong, not the code
MaStatLab/PLRWatermark/code/check_figure_geometry.py
code served (permissive licence) · get_code("cb135715278b995d")
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, through the batch API) and returned dict. 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 re

LINE = re.compile('^GEO (\\w+) (\\w+) SW ([-\\d.]+)pt ([-\\d.]+)pt NE ([-\\d.]+)pt ([-\\d.]+)pt')

def parse_geometry(log: str) -> dict[str, dict[str, tuple[float, ...]]]:
    boxes: dict[str, dict[str, tuple[float, ...]]] = {}
    for line in log.splitlines():
        m = LINE.match(line.strip())
        if m:
            if m.group(2) in boxes.get(m.group(1), {}):
                raise ValueError(f'duplicate geometry for panel {m.group(1)} node {m.group(2)}')
            boxes.setdefault(m.group(1), {})[m.group(2)] = tuple((float(v) for v in m.groups()[2:]))
    return boxes

# Construct valid log string with geometry entries matching the regex pattern
log_content = """GEO panel1 node1 SW 10.5pt 20.3pt NE 100.2pt 150.7pt
GEO panel1 node2 SW 5.1pt 15.9pt NE 95.6pt 145.2pt
GEO panel2 nodeA SW 30.0pt 40.0pt NE 120.5pt 180.3pt
"""

ARGS = {
    'log': log_content
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
point_mass_method Ran
ran; our contract draft was wrong, not the code
MaStatLab/PLRWatermark/code/benchmark_contamination.py
code served (permissive licence) · get_code("049125724c2f4330")
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, through the batch API) 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 numpy as np

ARGS = {
    'rho_zero': 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
sha256 Ran
ran; our contract draft was wrong, not the code
MaStatLab/PLRWatermark/code/build_prompts.py
code served (permissive licence) · get_code("683398569d564d3b")
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, through the batch API) 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 hashlib
from pathlib import Path
import tempfile
import os

# Create a temporary file with some content
temp_dir = tempfile.mkdtemp()
temp_file_path = Path(temp_dir) / "test_file.txt"

# Write some test data to the file
with temp_file_path.open('wb') as f:
    f.write(b"Hello, this is test data for SHA256 hashing." * 100)

ARGS = {
    "path": temp_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
simulate_gumbel_pivots Ran
ran, honoured the contract we drafted
MaStatLab/PLRWatermark/code/check_delta_learning.py
code served (permissive licence) · get_code("5591653eea552fbf")
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, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

# Set random seed for reproducibility
np.random.seed(42)
rng = np.random.default_rng(42)

# Define arguments
ARGS = {
    "delta": 0.1,
    "n_documents": 2,
    "horizon": 4,
    "rng": rng,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
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
spike_log_density Ran
ran, honoured the contract we drafted
MaStatLab/PLRWatermark/code/contamination_asymmetry.py
code served (permissive licence) · get_code("1cbdaf288020b782")
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, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 math
import numpy as np

VOCABULARY = 1000

def spike_log_density(log_pivots: np.ndarray, deltas: np.ndarray) -> np.ndarray:
    """Log of ``f_Delta(r) = r**(Delta/(1-Delta)) + (V-1) r**((V-1)/Delta - 1)``.

    ``log_pivots`` and ``deltas`` broadcast against each other.
    """
    top = deltas / (1.0 - deltas)
    tail = (VOCABULARY - 1.0) / deltas - 1.0
    return np.logaddexp(top * log_pivots, math.log(VOCABULARY - 1.0) + tail * log_pivots)


# Create small numpy arrays for testing
np.random.seed(0)

# log_pivots: shape (2, 4) - log space pivot values
log_pivots = np.random.randn(2, 4).astype(np.float64)

# deltas: shape (2, 4) - delta values, must be in (0, 1) to avoid division by zero
# Use values strictly between 0 and 1
deltas = np.random.uniform(0.1, 0.9, size=(2, 4)).astype(np.float64)

ARGS = {
    "log_pivots": log_pivots,
    "deltas": deltas,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
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
summarize Ran
ran; our contract draft was wrong, not the code
MaStatLab/PLRWatermark/code/check_delta_learning.py
code served (permissive licence) · get_code("030536d64258273e")
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, through the batch API) and returned dict. 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 numpy as np

# Construct a small grid of values (parameter space)
grid = np.linspace(0, 10, 50)

# Construct a posterior distribution over the grid
# Create a simple posterior (e.g., normal-like distribution)
posterior = np.exp(-0.5 * ((grid - 5) ** 2) / (1 ** 2))
posterior = posterior / np.sum(posterior)  # Normalize to sum to 1

# Define a truth value that should fall within the credible interval
truth = 5.2

ARGS = {
    'grid': grid,
    'posterior': posterior,
    'truth': truth,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
visible_tex Ran
ran; our contract draft was wrong, not the code
MaStatLab/PLRWatermark/code/check_manuscript_tables.py
code served (permissive licence) · get_code("3b25a3fe9619ed87")
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, through the batch API) 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

# Create a simple test case for the visible_tex function
# The function takes a single parameter: tex (a string containing TeX source code)

# Test case 1: Simple TeX with comments and escaped percentages
tex_input = r"""
This is a line with an escaped percentage: \%
This is a normal line.
% This is a comment
This line has a digit 5% unescaped - this should fail
Another normal line.
"""

# However, since the function will raise an AssertionError on unescaped percentages
# after digits, we should provide valid TeX that won't trigger the error

tex_input_valid = r"""
This is a line with an escaped percentage: \%
This is a normal line.
% This is a comment that gets removed
This line continues after comment removal.
Multiple escaped percentages: \% and \% work fine.
Some text without percentages.
"""

ARGS = {
    "tex": tex_input_valid
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
delta_grid Not yet run
unverified (harvested, no recorded run)
MaStatLab/PLRWatermark/code/check_delta_learning.py
code served (permissive licence) · get_code("a37526267894a76f")
How it ran

no invocation recorded.

fetch_shard Not yet run
unverified (harvested, no recorded run)
MaStatLab/PLRWatermark/code/build_prompts.py
code served (permissive licence) · get_code("63657202a66cac76")
How it ran

no invocation recorded.

read_csv Not yet run
unverified (harvested, no recorded run)
MaStatLab/PLRWatermark/code/check_manuscript_tables.py
code served (permissive licence) · get_code("6bd801e493fd8147")
How it ran

no invocation recorded.

read_json Not yet run
unverified (harvested, no recorded run)
MaStatLab/PLRWatermark/code/check_manuscript_tables.py
code served (permissive licence) · get_code("905fbfaea546ab77")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 21 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.

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

Keyed watermark detection tests dependence between observed tokens and pseudorandom variables reconstructed from a secret key. Building on the pivotal framework of Li et al. (2025), we construct predictive likelihood ratios that average over uncertain probability deficits and residual-tail distributions. The aim is robust detection power across alternative specifications without requiring a single signal-strength tuning. A mixture prior combines tail shape and effective width; hierarchical extensions allow within-document variation in deficit or width. The test maximizes prior-averaged power at a fixed size, but is not generally uniformly most powerful or minimax. Under the exact conditional pivot null, normalized predictive alternatives selected before each observation yield a Bayes factor that is also a test martingale: Type I error control is unaffected by alternative misspecification and remains valid under optional stopping. This guarantee does not cover violations of the conditional null, and the interpolated implementation has no certified anytime guarantee. Gumbel marginal likelihoods are evaluated by fixed quadrature. Across the evaluated tail-shape and tail-width alternatives and three horizons, the union-tail mixture has maximum observed Type II error regret .0080, compared with .0962 for the equal-tail mixture, relative to the best tested rule. On temperature-matched outputs from two open models, it improves AUC over the equal-tail baseline in all eight non-saturated model-temperature cells, although the leading reference score generally has higher AUC. Supplementary experiments show retained power under independent null-like replacement and smaller changes from hierarchical dependence modeling. The evidence supports robustness across the evaluated alternatives, not uniform power guarantees or resistance to arbitrary text edits.

For agents

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

get_harvested_code_for_paper("2609.15657")
get_code_for_paper("2609.15657")
have("2609.15657")

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

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

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

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

Connect an agent — have() is free.