SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.03310 · CVPR · 2021

Regularizing Generative Adversarial Networks under Limited Data

Hung-Yu Tseng, Ming-Hsuan Yang, Lu Jiang, Ce Liu, Weilong Yang

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-21; 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/2104.03310.json · badge: /api/ran/2104.03310.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
google/lecam-gan canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
google/compare_gan canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
3 ran · 0 no recorded run
FunctionStatusWhere it lives
DiffAugment Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from mit-han-lab/data-efficient-gans
pointer only · get_code("b0bbabd6de30f612")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

lecam_reg Ran
ran; our contract draft was wrong, not the code
google/lecam-gan/biggan_cifar/losses.py
code served (permissive licence) · get_code("9a5f33c78f0acedd")
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 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 torch.nn as nn

torch.manual_seed(0)

# Create a simple stand-in class for the ema object
class EMABuffer:
    def __init__(self):
        # These are tensors that will be accessed as attributes
        self.D_real = torch.randn(2, 4)
        self.D_fake = torch.randn(2, 4)

# Create the arguments
dis_real = torch.randn(2, 4)
dis_fake = torch.randn(2, 4)
ema = EMABuffer()

ARGS = {
    "dis_real": dis_real,
    "dis_fake": dis_fake,
    "ema": ema
}
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 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
loss_dcgan_dis Ran
ran; our contract draft was wrong, not the code
google/lecam-gan/biggan_cifar/losses.py
code served (permissive licence) · get_code("ddfce8dee1e135a4")
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.functional as F

torch.manual_seed(0)

# The function takes dis_fake, dis_real (tensors used in F.softplus and torch.mean)
# and optional ema, it parameters (not used in the function body)

dis_fake = torch.randn(2, 4)
dis_real = torch.randn(2, 4)
ema = None
it = None

ARGS = {
    "dis_fake": dis_fake,
    "dis_real": dis_real,
    "ema": ema,
    "it": it,
}
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
loss_dcgan_gen Ran
ran; our contract draft was wrong, not the code
google/lecam-gan/biggan_cifar/losses.py
code served (permissive licence) · get_code("9e775a46ccc9ac84")
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 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 torch.nn.functional as F

torch.manual_seed(0)

# The function takes dis_fake (required) and dis_real (optional, not used in the body)
# dis_fake is used in F.softplus(-dis_fake) and torch.mean(), so it needs to be a tensor

# Create a small tensor for dis_fake (batch_size=2, some discriminator output dimension=4)
dis_fake = torch.randn(2, 4)

# dis_real is optional and not used in the function body, but we can include it
dis_real = torch.randn(2, 4)

ARGS = {
    "dis_fake": dis_fake,
    "dis_real": dis_real,
}
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 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
rand_brightness Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from postech-cvlab/pytorch-studiogan
pointer only; the stored copy get_code serves, from postech-cvlab/pytorch-studiogan, is pointer only (licence: NOASSERTION) · get_code("011230b2b9b8fb6f")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

rand_saturation Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from postech-cvlab/pytorch-studiogan
pointer only; the stored copy get_code serves, from postech-cvlab/pytorch-studiogan, is pointer only (licence: NOASSERTION) · get_code("5b0d8787e670fc63")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

sample_fake_dataset Ran
ran, honoured the contract we drafted
google/compare_gan/compare_gan/eval_utils.py
code served (permissive licence) · get_code("6101cf824227f899")
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 4, dtype family float, shape (4, 4, 5, 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
from unittest.mock import MagicMock

class FakeSession:
    """Mock TensorFlow session that generates fake images."""
    def __init__(self, batch_size=2, height=4, width=5, channels=1):
        self.batch_size = batch_size
        self.height = height
        self.width = width
        self.channels = channels
        self.call_count = 0
    
    def run(self, generator):
        """Returns a batch of fake images as numpy array."""
        self.call_count += 1
        # Generate fake images with shape [batch, height, width, channels]
        fake_batch = np.random.randn(
            self.batch_size, 
            self.height, 
            self.width, 
            self.channels
        ).astype(np.float32)
        return fake_batch

def fake_generator():
    """Stand-in generator that returns a batch of images."""
    batch_size = 2
    height = 4
    width = 5
    channels = 1
    return np.random.randn(batch_size, height, width, channels).astype(np.float32)

# Create test session and generator
sess = FakeSession(batch_size=2, height=4, width=5, channels=1)
generator = fake_generator

ARGS = {
    "sess": sess,
    "generator": generator,
    "num_batches": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
absl, numpy, six — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (4, 4, 5, 3) — shape (4, 4, 5, 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
unpool Ran
ran on a synthesized input
google/compare_gan/compare_gan/architectures/resnet_ops.py
code served (permissive licence) · get_code("8723174331740386")
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 EagerTensor, ndim 4, dtype family float, shape (2, 6, 8, 5) 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 tensorflow as tf
import numpy as np

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

# Create a small test tensor
# Shape: [batch=2, d0=3, d1=4, channels=5]
# This represents a 2D spatial tensor (height=3, width=4) with batch size 2 and 5 channels
value = tf.constant(
    np.random.randn(2, 3, 4, 5).astype(np.float32)
)

ARGS = {
    'value': value,
    'name': 'unpool'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 6, 8, 5) — shape (2, 6, 8, 5) 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_real_images Not yet run
unverified (harvested, no recorded run)
google/compare_gan/compare_gan/eval_utils.py
code served (permissive licence) · get_code("22bf6d2dba9c8d78")
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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 6 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
rand_brightness 17 other papers
3 dated earlier, 14 later
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2006.10738 (2020-06)
Differentiable Augmentation for Data-Efficient GAN Training
2007.15646 (2020-07)
Rewriting a Deep Generative Model
and 14 more not named here
rand_saturation 16 other papers
3 dated earlier, 13 later
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2006.10738 (2020-06)
Differentiable Augmentation for Data-Efficient GAN Training
2007.15646 (2020-07)
Rewriting a Deep Generative Model
and 13 more not named here
DiffAugment 9 other papers
1 dated earlier, 8 later
2006.10738 (2020-06)
Differentiable Augmentation for Data-Efficient GAN Training
2111.01007 (2021-11)
Projected GANs Converge Faster
2112.09130 (2021-12)
Ensembling Off-the-shelf Models for GAN Training
and 6 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-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

BigGAN + DA + DA + ! !" (Ours) Size of ImageNet training set BigGAN + DA BigGAN + DA + ! !" (Ours) 10% ImageNet training set 10% ImageNet FID↓ BigGAN 42.99

For agents

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

get_harvested_code_for_paper("2104.03310")
get_code_for_paper("2104.03310")
have("2104.03310")

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

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

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

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

Connect an agent — have() is free.