SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.15860 · ICCV · 2023

What can Discriminator do? Towards Box-free Ownership Verification of Generative Adversarial Networks

Boheng Li, Run Wang, Jing Chen, Shangwei Guo, Liming Fang, Lina Wang, Yan Cai, Ziheng Huang

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 5 failures of our instrument; 0 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/2307.15860.json · badge: /api/ran/2307.15860.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
abstractteen/gan_ownership_verification canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
AbstractTeen/gan_ownership_verification community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
Discriminator_oneclass64 Ran
ran on a synthesized input
AbstractTeen/gan_ownership_verification/models/dcgan.py
code served (permissive licence) · get_code("69fc958b5c4dccbf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float, shape (2, 64) 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 torch.nn as nn
import torch.nn.functional as F

class Discriminator_oneclass64(nn.Module):

    def __init__(self, d=128, latent_dim=128):
        super(Discriminator_oneclass64, self).__init__()
        self.rep_dim = 64
        self.conv1 = nn.Conv2d(3, d, 4, 2, 1, bias=False)
        self.conv2 = nn.Conv2d(d, d * 2, 4, 2, 1, bias=False)
        self.conv2_bn = nn.BatchNorm2d(d * 2, eps=0.0001, affine=False)
        self.conv3 = nn.Conv2d(d * 2, d * 4, 4, 2, 1, bias=False)
        self.conv3_bn = nn.BatchNorm2d(d * 4, eps=0.0001, affine=False)
        self.conv4 = nn.Conv2d(d * 4, d * 8, 4, 2, 1, bias=False)
        self.conv4_bn = nn.BatchNorm2d(d * 8, eps=0.0001, affine=False)
        self.adv_layer = nn.Sequential(nn.Linear(1024 * 4 * 4, latent_dim, bias=False), nn.LeakyReLU(0.2))
        self.fc2 = nn.Linear(latent_dim, self.rep_dim, bias=False)

    def forward(self, input):
        x = F.leaky_relu(self.conv1(input), 0.2)
        x = F.leaky_relu(self.conv2_bn(self.conv2(x)), 0.2)
        x = F.leaky_relu(self.conv3_bn(self.conv3(x)), 0.2)
        x = F.leaky_relu(self.conv4_bn(self.conv4(x)), 0.2)
        x = x.view(x.shape[0], -1)
        feats = self.adv_layer(x)
        outputs = self.fc2(feats)
        return outputs

INIT_ARGS = {
    'd': 128,
    'latent_dim': 128
}

ARGS = {
    'input': torch.randn(2, 3, 64, 64)
}

model = Discriminator_oneclass64(**INIT_ARGS)
output = model(**ARGS)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 2, dtype family float, shape (2, 64) — shape (2, 64) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
denorm Ran
ran; our contract draft was wrong, not the code
abstractteen/gan_ownership_verification/utils.py
code served (permissive licence) · get_code("8466931f776cda0a")
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 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 torch

torch.manual_seed(0)

# Create a small tensor in the range [-1, 1]
x = torch.randn(2, 4)
x = x.clamp(-1, 1)

ARGS = {
    "x": x
}
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 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
get_loader Ran
ran; our contract draft was wrong, not the code
abstractteen/gan_ownership_verification/data_loader.py
code served (permissive licence) · get_code("9eb551a5d4ef16a1")
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 DataLoader. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from torchvision import transforms as T
from PIL import Image
import tempfile
import os

torch.manual_seed(0)

# Create temporary directories and files for the dataset
temp_dir = tempfile.mkdtemp()
image_dir = os.path.join(temp_dir, 'images')
os.makedirs(image_dir, exist_ok=True)

# Create a small dummy image file
dummy_image = Image.new('RGB', (256, 256), color='red')
dummy_image.save(os.path.join(image_dir, 'image_001.jpg'))

# Create a dummy attributes file
attr_path = os.path.join(temp_dir, 'list_attr_celeba.txt')
with open(attr_path, 'w') as f:
    f.write('202599\n')  # Number of images
    f.write('5_o_Clock_Shadow Arched_Eyebrows Attractive Bags_Under_Eyes Bald Bangs Big_Ears Big_Lips Big_Nose Bushy_Eyebrows Chubby Double_Chin Eyeglasses Goatee Gray_Hair Heavy_Makeup High_Cheekbones Male Mouth_Slightly_Open Mustache Narrow_Eyes No_Beard Oval_Face Pale_Skin Pointy_Nose Receding_Hairline Rosy_Cheeks Sideburns Smiling Straight_Hair Stubble Sunglasses Wearing_Earrings Wearing_Hat Wearing_Lipstick Wearing_Necklace Wearing_Necktie Young\n')
    # Write some sample data lines
    for i in range(2500):
        line = f'image_{i+1:06d}.jpg'
        for _ in range(40):
            line += ' ' + ('1' if torch.rand(1).item() > 0.5 else '-1')
        f.write(line + '\n')

ARGS = {
    'image_dir': image_dir,
    'attr_path': attr_path,
    'selected_attrs': ['Male', 'Young', 'Smiling'],
    'crop_size': 178,
    'image_size': 128,
    'batch_size': 2,
    'dataset': 'CelebA',
    'mode': 'train',
    'num_workers': 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
get_radius Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
abstractteen/gan_ownership_verification/utils.py
code served (permissive licence) · get_code("13b5c5a954dcfee5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned 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 torch
import numpy as np

torch.manual_seed(0)

# Create a small distance tensor
# The function expects a tensor of distances that will be:
# 1. Cloned
# 2. Converted to numpy via .data.cpu().numpy()
# 3. Square-rooted with np.sqrt()
# 4. Passed to np.quantile()
dist = torch.tensor([[1.0, 4.0, 9.0, 16.0], [25.0, 36.0, 49.0, 64.0]], dtype=torch.float32)

# nu parameter: a float between 0 and 1 representing the quantile level
# The function computes the (1-nu)-quantile, so nu should be in (0, 1)
nu = 0.1

ARGS = {
    "dist": dist,
    "nu": nu,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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
l2normalize Ran
ran; our contract draft was wrong, not the code
abstractteen/gan_ownership_verification/models/spectral_norm.py
pointer only (licence: MIT); the stored copy get_code serves, from xxxliu95/RA_FA_Cardiac, is pointer only (licence: NONE) · get_code("bedff51745d2cf84")
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 xxxliu95/RA_FA_Cardiac, 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.

pearson Ran
ran; our contract draft was wrong, not the code
abstractteen/gan_ownership_verification/utils.py
code served (permissive licence) · get_code("cef20a0949e4f556")
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 2, dtype family float, shape (2, 1) 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)

# Create two tensors with shape (batch_size=2, feature_dim=4)
# The function operates on dim=1, so we need at least 2 dimensions
x = torch.randn(2, 4)
y = torch.randn(2, 4)

ARGS = {
    "x": x,
    "y": y,
}
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 2, dtype family float, shape (2, 1) — shape (2, 1) 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 1 later) and 3 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
l2normalize 27 other papers
21 dated earlier, 5 later, 1 same year, order not determinable · 2 only as an assembly brick
1703.09452 (2017-03)
SEGAN: Speech Enhancement Generative Adversarial Network
1802.05957 (2018-02)
Spectral Normalization for Generative Adversarial Networks
1806.03589 (2018-06)
Free-Form Image Inpainting with Gated Convolution
and 24 more not named here
denorm 5 other papers
5 dated earlier
1805.08318 (2018-05)
Self-Attention Generative Adversarial Networks
1809.11096 (2018-09)
Large Scale GAN Training for High Fidelity Natural Image Synthesis
2010.02637 (2020-10)
Weakly Supervised Disentangled Generative Causal Representation Learning
and 2 more not named here
get_radius 2 other papers
2 dated earlier
2011.08785 (2020-11)
PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localization
2212.09518 (2022-12)
FedTADBench: Federated Time-Series Anomaly Detection Benchmark

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

In recent decades, Generative Adversarial Network (GAN) and its variants have achieved unprecedented success in image synthesis. However, well-trained GANs are under the threat of illegal steal or leakage. The prior studies on remote ownership verification assume a black-box setting where the defender can query the suspicious model with specific inputs, which we identify is not enough for generation tasks. To this end, in this paper, we propose a novel IP protection scheme for GANs where ownership verification can be done by checking outputs only, without choosing the inputs (i.e., box-free setting). Specifically, we make use of the unexploited potential of the discriminator to learn a hypersphere that captures the unique distribution learned by the paired generator. Extensive evaluations on two popular GAN tasks and more than 10 GAN architectures demonstrate our proposed scheme to effectively verify the ownership. Our proposed scheme shown to be immune to popular input-based removal attacks and robust against other existing attacks. The source code and models are available at https://github.com/AbstractTeen/gan_ownership_verification.

For agents

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

get_harvested_code_for_paper("2307.15860")
get_code_for_paper("2307.15860")
have("2307.15860")

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

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

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

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

Connect an agent — have() is free.