SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2112.05588 · 2021

Copy, Right? A Testing Framework for Copyright Protection of Deep Learning Models

arXiv · PDF · Open in the Atlas

Code that ran

6 of 11 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 5 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/2112.05588.json · badge: /api/ran/2112.05588.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
testing4ai/deepjudge canonical (classifier label)
classifier basis: census
6 ran · 5 no recorded run
FunctionStatusWhere it lives
LOD Ran
ran, honoured the contract we drafted
testing4ai/deepjudge/DeepJudge/metrics.py
code served (permissive licence) · get_code("ff100878ce7ea2de")
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 float32, 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 numpy as np
import tensorflow as tf
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Input, Dense, Flatten, Reshape
import tensorflow.keras.backend as K

# Create a small victim model
def create_model(input_shape=(2, 4), num_layers=3):
    inputs = Input(shape=input_shape)
    x = Flatten()(inputs)
    for i in range(num_layers):
        x = Dense(8, activation='relu')(x)
    outputs = Dense(4)(x)
    model = Model(inputs=inputs, outputs=outputs)
    return model

# Create models
model1 = create_model()
model2 = create_model()

# Create test cases dict with layer indices and test inputs
# Format: {(layer_index, idx): test_input_tensor}
# model1 has: Input -> Flatten -> Dense -> Dense -> Dense -> Dense
# We'll use layer indices 1 (Flatten), 2 (first Dense), 3 (second Dense)
test_input_1 = tf.constant(np.random.randn(2, 2, 4).astype(np.float32))
test_input_2 = tf.constant(np.random.randn(2, 2, 4).astype(np.float32))
test_input_3 = tf.constant(np.random.randn(2, 2, 4).astype(np.float32))

tests = {
    (1, 0): test_input_1,
    (2, 0): test_input_2,
    (3, 0): test_input_3,
}

ARGS = {
    "model1": model1,
    "model2": model2,
    "tests": tests,
    "order": 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, 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
Lenet1 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
testing4ai/deepjudge/baselines/watermarking-blackbox/lenet5.py
code served (permissive licence) · get_code("16b3b4e8cc974d18")
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 Functional. 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 tensorflow as tf
from tensorflow import keras

def Lenet1(shape):
    input_tensor = keras.layers.Input(shape=shape)
    x = keras.layers.Conv2D(4, (5, 5), activation='relu', padding='same')(input_tensor)
    x = keras.layers.MaxPooling2D(pool_size=(2, 2))(x)
    x = keras.layers.Conv2D(12, (5, 5), activation='relu', padding='same')(x)
    x = keras.layers.MaxPooling2D(pool_size=(2, 2))(x)
    x = keras.layers.Flatten()(x)
    x = keras.layers.Dense(10, activation='softmax')(x)
    return keras.models.Model(input_tensor, x)

ARGS = {
    "shape": (4, 4, 3)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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
Lenet5 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
testing4ai/deepjudge/baselines/watermarking-blackbox/lenet5.py
code served (permissive licence) · get_code("6b990fd5ae030a18")
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 Functional. 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 tensorflow as keras

# The function Lenet5 takes a single parameter: shape
# shape is used as input to keras.layers.Input(shape=shape)
# It should be a tuple representing the input dimensions (height, width, channels)
# For a small stand-in, we use (4, 4, 3) - small spatial dimensions with 3 color channels

shape = (4, 4, 3)

ARGS = {
    "shape": shape
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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
MLP Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
testing4ai/deepjudge/baselines/watermarking-blackbox/lenet5.py
code served (permissive licence) · get_code("811034f64e9e6eb3")
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 Functional. 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 tensorflow as tf
from tensorflow import keras

# Define a small input shape for the MLP
# The function expects a shape parameter (without batch dimension)
shape = (4, 3)  # 4x3 tensor as input

ARGS = {
    'shape': shape
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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
RTAL Ran
ran; our contract draft was wrong, not the code
testing4ai/deepjudge/attacks/tune.py
code served (permissive licence) · get_code("6347b98cede3b625")
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 Functional. 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 tensorflow as tf
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Dense, Activation, Input
import numpy as np

# Set seed for reproducibility
np.random.seed(0)
tf.random.set_seed(0)

# Build a small victim model
def build_victim_model(input_dim=4, num_classes=3):
    inputs = Input(shape=(input_dim,))
    x = Dense(8, activation='relu')(inputs)
    x = Dense(6, activation='relu')(x)
    x = Dense(num_classes, activation='softmax')(x)
    model = Model(inputs=inputs, outputs=x)
    model.compile(optimizer=tf.keras.optimizers.Adam(learning_rate=0.001), 
                  loss='categorical_crossentropy', 
                  metrics=['accuracy'])
    return model

# Create victim model
victim_model = build_victim_model(input_dim=4, num_classes=3)

# Create tiny training data
batch_size = 2
num_samples = 6
input_dim = 4
num_classes = 3

x_train = np.random.randn(num_samples, input_dim).astype(np.float32)
y_train = np.eye(num_classes)[np.random.randint(0, num_classes, num_samples)].astype(np.float32)

ARGS = {
    'model': victim_model,
    'x': x_train,
    'y': y_train,
    'epochs': 2,
    'lr': 0.001,
    'batch_size': 2,
    'aug': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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
Rob Ran
ran; our contract draft was wrong, not the code
testing4ai/deepjudge/DeepJudge/metrics.py
code served (permissive licence) · get_code("05cd3f4d1a34a81d")
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 float64, ndim 0, 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple model that has a predict method
class SimpleModel(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super().__init__()
        self.linear = nn.Linear(input_dim, num_classes)
    
    def forward(self, x):
        return self.linear(x)
    
    def predict(self, x):
        """Return predictions as numpy array with shape (batch_size, num_classes)"""
        with torch.no_grad():
            if isinstance(x, np.ndarray):
                x = torch.from_numpy(x).float()
            output = self.forward(x)
            return output.numpy()

# Instantiate the model
model = SimpleModel(input_dim=4, num_classes=3)

# Create adversarial examples: shape (2, 4) - batch size 2, 4 features
advx = np.random.randn(2, 4).astype(np.float32)

# Create ground-truth labels: shape (2, 3) - batch size 2, 3 classes (one-hot encoded)
advy = np.array([
    [1, 0, 0],
    [0, 1, 0]
], dtype=np.float32)

ARGS = {
    "model": model,
    "advx": advx,
    "advy": advy
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
FTAL Not yet run
unverified (harvested, no recorded run)
testing4ai/deepjudge/attacks/tune.py
code served (permissive licence) · get_code("8cddedd0fa6b4937")
How it ran

no invocation recorded.

FTLL Not yet run
unverified (harvested, no recorded run)
testing4ai/deepjudge/attacks/tune.py
code served (permissive licence) · get_code("04e2a22fe1c4d8f5")
How it ran

no invocation recorded.

JSD Not yet run
unverified (harvested, no recorded run)
testing4ai/deepjudge/DeepJudge/metrics.py
code served (permissive licence) · get_code("7f03f1160f2f8506")
How it ran

no invocation recorded.

NNOD_Matrix Not yet run
unverified (harvested, no recorded run)
testing4ai/deepjudge/DeepJudge/extensions.py
code served (permissive licence) · get_code("280cf09e64c114a9")
How it ran

no invocation recorded.

seedSelection Not yet run
unverified (harvested, no recorded run)
testing4ai/deepjudge/DeepJudge/seed_selection.py
code served (permissive licence) · get_code("c9d6ee09a57da95a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 10 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
Rob 1 other paper
1 later
2210.03312 (2022-10)
Distillation-Resistant Watermarking for Model Protection in NLP

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

Deep learning (DL) models, especially those large-scale and high-performance ones, can be very costly to train, demanding a great amount of data and computational resources. Unauthorized reproduction of DL models can lead to copyright infringement and cause huge economic losses to model owners. Existing copyright protection techniques are mostly based on watermarking, which embeds an owner-specified watermark into the model. While being able to provide exact ownership verification, these techniques are 1) invasive, as they need to tamper with the training process, which may affect the utility or introduce new security risks; 2) prone to adaptive attacks that attempt to remove the watermark; and 3) not robust to the emerging model extraction attacks. Latest fingerprinting work, though being non-invasive, also falls short when facing the diverse and ever-growing attack scenarios. In this paper, we propose a novel testing framework for DL copyright protection: DEEPJUDGE. DEEPJUDGE quantitatively tests the similarities between two DL models: a victim model and a suspect model. It leverages a diverse set of testing metrics and test case generation methods to produce a chain of supporting evidence to help determine whether a suspect model is a copy of the victim model. Advantages of DEEPJUDGE include: 1) non-invasive, as it works directly on the model and does not tamper with the training process; 2) efficient, as it only needs a small set of test cases and a quick scan of models; 3) flexible, as it can easily incorporate new metrics or generation methods to obtain more confident judgement; and 4) fairly robust to model extraction and adaptive attacks. We verify the effectiveness of DEEPJUDGE under typical copyright infringement scenarios, including model finetuning, pruning and extraction, via extensive experiments on both image and speech datasets with a variety of model architectures.

For agents

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

get_harvested_code_for_paper("2112.05588")
get_code_for_paper("2112.05588")
have("2112.05588")

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

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

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

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

Connect an agent — have() is free.