SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.06737 · ICML · 2024

Disguised Copyright Infringement of Latent Diffusion Models

Yaoliang Yu, Gautam Kamath, Yiwei Lu, Matthew Yang, Zuoqiu Liu

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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; 2 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 5 failures of our instrument; 1 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/2404.06737.json · badge: /api/ran/2404.06737.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
watml/disguised_copyright_infringement canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
createEpochData Ran
ran; our contract draft was wrong, not the code
watml/disguised_copyright_infringement/FSSAAD/utils.py
code served (permissive licence) · get_code("82124ed781e43e8b")
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 4, 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 os
import random
import tempfile
import shutil

# Create a temporary directory structure with frame files
temp_dir = tempfile.mkdtemp()

# Create task directories (0, 1, 2)
for task_id in range(3):
    task_dir = os.path.join(temp_dir, str(task_id))
    os.makedirs(task_dir)
    
    # Create video folders within each task
    for video_id in range(2):
        video_folder = os.path.join(task_dir, f"video_{video_id}")
        os.makedirs(video_folder)
        
        # Create frame files (at least 10 frames to satisfy range(3, video_length))
        for frame_id in range(15):
            frame_file = os.path.join(video_folder, f"frame{frame_id}.jpg")
            with open(frame_file, 'w') as f:
                f.write("")

ARGS = {
    "frame_path": temp_dir,
    "numTasks": 2,
    "k_shots": 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 4, 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
default Ran
ran, violated the contract we drafted
watml/disguised_copyright_infringement/ldm/modules/attention.py
code served (permissive licence) · get_code("424012cb37b31172")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned int, ndim 0, dtype family int, 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.

from inspect import isfunction

def exists(val):
    return val is not None

def default(val, d):
    if exists(val):
        return val
    return d() if isfunction(d) else d

# Test case 1: val exists (not None), d is a regular value
ARGS_1 = {
    'val': 42,
    'd': 100
}

# Test case 2: val is None, d is a regular value
ARGS_2 = {
    'val': None,
    'd': 100
}

# Test case 3: val is None, d is a function
def default_func():
    return 200

ARGS_3 = {
    'val': None,
    'd': default_func
}

# Test case 4: val exists, d is a function
ARGS_4 = {
    'val': "existing_value",
    'd': lambda: "default_value"
}

# Use one of the test cases as the final ARGS
ARGS = ARGS_3
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 int, ndim 0, dtype family int, 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
double_conv Ran
ran; our contract draft was wrong, not the code
watml/disguised_copyright_infringement/FSSAAD/rGAN.py
pointer only (licence: MIT); the stored copy get_code serves, from EvgenyDyshlyuk/Oil_Seep_Detection, is pointer only (licence: NONE) · get_code("3e9ea4498e4b8a8d")
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 EvgenyDyshlyuk/Oil_Seep_Detection, 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.

exists Ran
ran, violated the contract we drafted
watml/disguised_copyright_infringement/ldm/modules/attention.py
pointer only (licence: MIT); the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("aa5486a3650902d8")
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 ThomasMrY/VCT, 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.

generate_k_shot_frames Ran
ran; our contract draft was wrong, not the code
watml/disguised_copyright_infringement/FSSAAD/utils.py
code served (permissive licence) · get_code("9d88c63e86f77b0b")
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 os
import tempfile
import random

# Create a temporary directory with mock frame files
temp_dir = tempfile.mkdtemp()
video_folder = temp_dir

# Create mock frame files named in the expected format
for i in range(10):
    frame_file = os.path.join(video_folder, f'frame{i}.jpg')
    with open(frame_file, 'w') as f:
        f.write('')

# Define arguments
ARGS = {
    'video_folder': video_folder,
    'k_shots': 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 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
get_clip_token_for_string Ran
ran, honoured the contract we drafted
watml/disguised_copyright_infringement/merge_embeddings.py
code served (permissive licence) · get_code("e466f56ae7a8bea6")
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 Tensor, ndim 0, dtype family int, 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)

class MockTokenizer:
    def __call__(self, string, truncation=True, max_length=77, return_length=True, return_overflowing_tokens=False, padding='max_length', return_tensors='pt'):
        # Return a batch encoding dict with input_ids
        # The function checks if torch.count_nonzero(tokens - 49407) == 2
        # This means exactly 2 tokens are not equal to 49407
        # Let's create tokens where most are 49407, but 2 are different
        tokens = torch.full((1, 77), 49407, dtype=torch.long)
        # Set positions 1 and some other position to different values
        tokens[0, 1] = 50000  # Different from 49407
        tokens[0, 50] = 50001  # Different from 49407
        
        return {
            'input_ids': tokens,
            'length': torch.tensor([77])
        }

tokenizer = MockTokenizer()
string = "test string"

ARGS = {
    'tokenizer': tokenizer,
    'string': string
}
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 Tensor, ndim 0, dtype family int, 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
get_placeholder_loop Ran
ran; our contract draft was wrong, not the code
watml/disguised_copyright_infringement/merge_embeddings.py
code served (permissive licence) · get_code("cb1a19e61d70046b")
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
import torch.nn as nn

torch.manual_seed(0)

# Stand-in tokenizer for CLIP (SD)
class CLIPTokenizer:
    def __call__(self, string, truncation=True, max_length=77, return_length=True, 
                 return_overflowing_tokens=False, padding='max_length', return_tensors='pt'):
        # Return a batch_encoding dict with input_ids
        # We need to construct tokens such that:
        # - torch.count_nonzero(tokens - 49407) == 2 for the function to return a token
        # - This means exactly 2 non-zero differences from 49407
        # Create a token tensor where most values are 49407 (pad token) and exactly 2 differ
        tokens = torch.full((1, 77), 49407, dtype=torch.long)
        tokens[0, 0] = 101  # Start token
        tokens[0, 1] = 1000  # Actual token (will be returned)
        return {'input_ids': tokens}

# Stand-in tokenizer for BERT
class BertTokenizer:
    def __call__(self, string):
        # Return a token tensor where exactly 3 elements are non-zero
        tokens = torch.zeros((1, 10), dtype=torch.long)
        tokens[0, 0] = 101    # CLS token
        tokens[0, 1] = 2054   # Token to return
        tokens[0, 2] = 102    # SEP token
        return tokens

# Stand-in embedder for SD (uses CLIP tokenizer)
class SDEmbedder:
    def __init__(self):
        self.tokenizer = CLIPTokenizer()

# Stand-in embedder for BERT
class BertEmbedder:
    def __init__(self):
        self.tknz_fn = BertTokenizer()

# Mock input function - return a valid placeholder string
original_input = input
def mock_input(prompt):
    return "valid_placeholder"

# Replace input with mock during setup
import builtins
builtins.input = mock_input

ARGS = {
    'placeholder_string': 'old_placeholder',
    'embedder': SDEmbedder(),
    'is_sd': True
}
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
load_image_toTensor Ran
ran, honoured the contract we drafted
watml/disguised_copyright_infringement/create_poison.py
code served (permissive licence) · get_code("6cb663ec812f1740")
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 Tensor, ndim 4, dtype family float, shape (1, 3, 4, 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 torch
import numpy as np
from PIL import Image
import io

# Create a small test image in memory
# Create a simple RGB image (4x3 pixels)
img_array = np.random.randint(0, 256, (4, 3, 3), dtype=np.uint8)
img = Image.fromarray(img_array, mode='RGB')

# Save image to a bytes buffer and then to a temporary file-like path
# Since we can't do real file I/O, we'll create the image in a way that can be opened
img_buffer = io.BytesIO()
img.save(img_buffer, format='PNG')
img_buffer.seek(0)

# Create a temporary image file using a common approach
import tempfile
import os

# Create a temporary directory and file
temp_dir = tempfile.mkdtemp()
image_path = os.path.join(temp_dir, 'test_image.png')
img.save(image_path)

ARGS = {
    'path': image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (1, 3, 4, 3) — shape (1, 3, 4, 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
uniq Ran
ran; our contract draft was wrong, not the code
watml/disguised_copyright_infringement/ldm/modules/attention.py
pointer only (licence: MIT); the stored copy get_code serves, from JingWu321/MUNBa, is pointer only (licence: NONE) · get_code("9a299fe5ae09e407")
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 JingWu321/MUNBa, 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.

get_bert_token_for_string Not yet run
unverified (harvested, no recorded run)
watml/disguised_copyright_infringement/merge_embeddings.py
code served (permissive licence) · get_code("91610d6e2f2a67b4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 3 the same month, 4 later) and 1 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
exists 486 other papers
329 dated earlier, 6 the same month, 140 later, 9 same year, order not determinable, 2 undated · 78 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1804.04637 (2018-04)
EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models
and 483 more not named here
default 207 other papers
140 dated earlier, 4 the same month, 57 later, 6 same year, order not determinable · 41 only as an assembly brick
1711.11585 (2017-11)
High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.08162 (2020-10)
SidechainNet: An All-Atom Protein Structure Dataset for Machine Learning
and 204 more not named here
uniq 115 other papers
74 dated earlier, 2 the same month, 35 later, 4 same year, order not determinable
2112.10752 (2021-12)
High-Resolution Image Synthesis with Latent Diffusion Models
2204.06125 (2022-04)
Hierarchical Text-Conditional Image Generation with CLIP Latents
2206.02779 (2022-06)
Blended Latent Diffusion
and 112 more not named here
double_conv 4 other papers
3 dated earlier, 1 later
1505.04597 (2015-05)
U-Net: Convolutional Networks for Biomedical Image Segmentation
1912.05074 (2019-12)
UNet++: Redesigning Skip Connections to Exploit Multiscale Features in Image Segmentation
2007.07843 (2020-07)
Few-shot Scene-adaptive Anomaly Detection
and 1 more not named here
get_bert_token_for_string 4 other papers
4 dated earlier
2210.09477 (2022-10)
UniTune: Text-Driven Image Editing by Fine Tuning a Diffusion Model on a Single Image
2304.08818 (2023-04)
Align your Latents: High-Resolution Video Synthesis with Latent Diffusion Models
2306.00926 (2023-06)
Inserting Anybody in Diffusion Models via Celeb Basis
and 1 more not named here
get_clip_token_for_string 4 other papers
4 dated earlier
2210.09477 (2022-10)
UniTune: Text-Driven Image Editing by Fine Tuning a Diffusion Model on a Single Image
2304.08818 (2023-04)
Align your Latents: High-Resolution Video Synthesis with Latent Diffusion Models
2306.00926 (2023-06)
Inserting Anybody in Diffusion Models via Celeb Basis
and 1 more not named here
get_placeholder_loop 4 other papers
4 dated earlier
2210.09477 (2022-10)
UniTune: Text-Driven Image Editing by Fine Tuning a Diffusion Model on a Single Image
2304.08818 (2023-04)
Align your Latents: High-Resolution Video Synthesis with Latent Diffusion Models
2306.00926 (2023-06)
Inserting Anybody in Diffusion Models via Celeb Basis
and 1 more not named here
createEpochData 1 other paper
1 dated earlier
2007.07843 (2020-07)
Few-shot Scene-adaptive Anomaly Detection
generate_k_shot_frames 1 other paper
1 dated earlier
2007.07843 (2020-07)
Few-shot Scene-adaptive Anomaly Detection

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

Copyright infringement may occur when a generative model produces samples substantially similar to some copyrighted data that it had access to during the training phase. The notion of access usually refers to including copyrighted samples directly in the training dataset, which one may inspect to identify an infringement. We argue that such visual auditing largely overlooks a concealed copyright infringement, where one constructs a disguise that looks drastically different from the copyrighted sample yet still induces the effect of training Latent Diffusion Models on it. Such disguises only require indirect access to the copyrighted material and cannot be visually distinguished, thus easily circumventing the current auditing tools. In this paper, we provide a better understanding of such disguised copyright infringement by uncovering the disguises generation algorithm, the revelation of the disguises, and importantly, how to detect them to augment the existing toolbox. Additionally, we introduce a broader notion of acknowledgment for comprehending such indirect access. Our code is available at https://github.com/watml/d isguised_copyright_infringement.

For agents

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

get_harvested_code_for_paper("2404.06737")
get_code_for_paper("2404.06737")
have("2404.06737")

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

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

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

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

Connect an agent — have() is free.