SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.20030 · 2023

Tree-Ring Watermarks: Fingerprints for Diffusion Images that are Invisible and Robust

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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; 3 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 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/2305.20030.json · badge: /api/ran/2305.20030.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
YuxinWenRick/tree-ring-watermark canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
deepvk/metr extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
approx_standard_normal_cdf Ran
ran; our contract draft was wrong, not the code
YuxinWenRick/tree-ring-watermark/guided_diffusion/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from quandao10/slct, is pointer only (licence: NONE) · get_code("cfd76fd0d89574a4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from quandao10/slct, and GitHub detected no licence in that repository when it was checked. 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.

backward_ddim Ran
ran, honoured the contract we drafted
YuxinWenRick/tree-ring-watermark/inverse_stable_diffusion.py
pointer only (licence: MIT); the stored copy get_code serves, from Kasraarabi/Hidden-in-the-Noise, is pointer only (licence: NONE) · get_code("b9d521d7021e46bb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Kasraarabi/Hidden-in-the-Noise, and GitHub detected no licence in that repository when it was checked. 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.

discretized_gaussian_log_likelihood Ran
ran; our contract draft was wrong, not the code
YuxinWenRick/tree-ring-watermark/guided_diffusion/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from quandao10/slct, is pointer only (licence: NONE) · get_code("cd33283d615fb3d7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from quandao10/slct, and GitHub detected no licence in that repository when it was checked. 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.

forward_ddim Ran
ran, honoured the contract we drafted
YuxinWenRick/tree-ring-watermark/inverse_stable_diffusion.py
pointer only (licence: MIT); the stored copy get_code serves, from Kasraarabi/Hidden-in-the-Noise, is pointer only (licence: NONE) · get_code("3b89ab9f937dccdd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Kasraarabi/Hidden-in-the-Noise, and GitHub detected no licence in that repository when it was checked. 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.

import_from_stable_sig Ran
ran; our contract draft was wrong, not the code
deepvk/metr/src/metr/finetune_ldm_decoder.py
code served (permissive licence) · get_code("df9010a43659b4f5")
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 MagicMock. 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 importlib
import sys
from unittest.mock import MagicMock

torch = MagicMock()

# The function import_from_stable_sig takes a 'name' parameter
# and attempts to import a module from '.stable_sig.' + name
# 
# To make this work, we need to:
# 1. Provide a valid module name string
# 2. Mock the importlib or ensure the module path exists
#
# Since this is importing from a relative package path '.stable_sig.',
# we need to set up a minimal mock environment or provide a string
# that would be valid for the import attempt.

# Create a mock module that will be returned
mock_stable_sig_module = MagicMock()
mock_stable_sig_module.__name__ = 'stable_sig.example'

# Set up the mock to intercept importlib.import_module calls
original_import_module = importlib.import_module

def mock_import_module(name, package=None):
    if '.stable_sig.' in name:
        return mock_stable_sig_module
    return original_import_module(name, package)

importlib.import_module = mock_import_module

# Now define the ARGS dict
ARGS = {
    'name': 'example'
}
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 MagicMock — a MagicMock output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MagicMock output the recorded ndim 1 and dtype family None 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
load_keys Ran
ran on a synthesized input
YuxinWenRick/tree-ring-watermark/src/tree_ring_watermark/_detect.py
code served (permissive licence) · get_code("3576785daaa257bd")
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
import os
import tempfile
import shutil

# Create a temporary directory with some .npy files
temp_cache_dir = tempfile.mkdtemp()

# Create and save some numpy arrays as .npy files
array1 = np.array([1, 2, 3, 4])
array2 = np.array([[1, 2], [3, 4], [5, 6]])
array3 = np.random.rand(2, 3, 4)

np.save(os.path.join(temp_cache_dir, 'data1.npy'), array1)
np.save(os.path.join(temp_cache_dir, 'data2.npy'), array2)
np.save(os.path.join(temp_cache_dir, 'data3.npy'), array3)

# Also create a non-.npy file that should be ignored
with open(os.path.join(temp_cache_dir, 'readme.txt'), 'w') as f:
    f.write('This should be ignored')

ARGS = {
    'cache_dir': temp_cache_dir
}
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
normal_kl Ran
ran, honoured the contract we drafted
YuxinWenRick/tree-ring-watermark/guided_diffusion/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/agrol, is pointer only (licence: NOASSERTION) · get_code("cf2798b666b231ca")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from facebookresearch/agrol, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

detect Not yet run
unverified (harvested, no recorded run)
YuxinWenRick/tree-ring-watermark/src/tree_ring_watermark/_detect.py
code served (permissive licence) · get_code("7a4c2a17586b3e13")
How it ran

no invocation recorded.

get_noise Not yet run
unverified (harvested, no recorded run)
YuxinWenRick/tree-ring-watermark/src/tree_ring_watermark/_get_noise.py
code served (permissive licence) · get_code("648e9cd35d6b74d0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 3 the same month, 5 later) and 4 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
normal_kl 160 other papers
37 dated earlier, 3 the same month, 118 later, 2 same year, order not determinable · 19 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 157 more not named here
approx_standard_normal_cdf 154 other papers
37 dated earlier, 2 the same month, 113 later, 2 same year, order not determinable · 17 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 151 more not named here
discretized_gaussian_log_likelihood 128 other papers
37 dated earlier, 2 the same month, 87 later, 2 same year, order not determinable · 16 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 125 more not named here
backward_ddim 5 other papers
5 later
2310.00076 (2023-10)
Robustness of AI-Image Detectors: Fundamental Limits and Practical Attacks
2404.04956 (2024-04)
Gaussian Shading: Provable Performance-Lossless Image Watermarking for Diffusion Models
2404.14055 (2024-04)
RingID: Rethinking Tree-Ring Watermarking for Enhanced Multi-Key Identification
and 2 more not named here
forward_ddim 5 other papers
5 later
2310.00076 (2023-10)
Robustness of AI-Image Detectors: Fundamental Limits and Practical Attacks
2404.04956 (2024-04)
Gaussian Shading: Provable Performance-Lossless Image Watermarking for Diffusion Models
2404.14055 (2024-04)
RingID: Rethinking Tree-Ring Watermarking for Enhanced Multi-Key Identification
and 2 more not named here

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

Watermarking the outputs of generative models is a crucial technique for tracing copyright and preventing potential harm from AI-generated content. In this paper, we introduce a novel technique called Tree-Ring Watermarking that robustly fingerprints diffusion model outputs. Unlike existing methods that perform post-hoc modifications to images after sampling, Tree-Ring Watermarking subtly influences the entire sampling process, resulting in a model fingerprint that is invisible to humans. The watermark embeds a pattern into the initial noise vector used for sampling. These patterns are structured in Fourier space so that they are invariant to convolutions, crops, dilations, flips, and rotations. After image generation, the watermark signal is detected by inverting the diffusion process to retrieve the noise vector, which is then checked for the embedded signal. We demonstrate that this technique can be easily applied to arbitrary diffusion models, including text-conditioned Stable Diffusion, as a plug-in with negligible loss in FID. Our watermark is semantically hidden in the image space and is far more robust than watermarking alternatives that are currently deployed. Code is available at https://github.com/YuxinWenRick/tree-ring-watermark.

For agents

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

get_harvested_code_for_paper("2305.20030")
get_code_for_paper("2305.20030")
have("2305.20030")

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

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

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

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

Connect an agent — have() is free.