SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2008.04115 · ICML · 2020

T-GD: Transferable GAN-generated Images Detection Framework

Hyeonseong Jeon, Youngoh Bang, Junyaup Kim, Simon Woo

arXiv · PDF · Open in the Atlas

Code that ran

7 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, 0 violated it and 1 has no contract verdict; 4 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2008.04115.json · badge: /api/ran/2008.04115.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
cutz-j/T-GD canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
conv1x1 Ran
ran; our contract draft was wrong, not the code
cutz-j/T-GD/resnext/model.py
code served (permissive licence) · get_code("6cb5d4e4f17a979b")
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 Conv2d. 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 torch.nn import functional as F

torch.manual_seed(0)

class Conv2d(nn.Conv2d):

    def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True):
        super(Conv2d, self).__init__(in_channels, out_channels, kernel_size, stride, padding, dilation, groups, bias)

    def forward(self, x):
        weight = self.weight
        weight_mean = weight.mean(dim=1, keepdim=True).mean(dim=2, keepdim=True).mean(dim=3, keepdim=True)
        weight = weight - weight_mean
        std = weight.view(weight.size(0), -1).std(dim=1).view(-1, 1, 1, 1) + 1e-05
        weight = weight / std.expand_as(weight)
        return F.conv2d(x, weight, self.bias, self.stride, self.padding, self.dilation, self.groups)

def conv1x1(in_planes, out_planes, stride=1):
    """1x1 convolution"""
    return Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, bias=False)

ARGS = {
    "in_planes": 3,
    "out_planes": 4,
    "stride": 1,
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv3x3 Ran
ran on a synthesized input
cutz-j/T-GD/resnext/model.py
code served (permissive licence) · get_code("83b10a4972562225")
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 Conv2d. 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 torch.nn import functional as F

torch.manual_seed(0)

class Conv2d(nn.Conv2d):

    def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True):
        super(Conv2d, self).__init__(in_channels, out_channels, kernel_size, stride, padding, dilation, groups, bias)

    def forward(self, x):
        weight = self.weight
        weight_mean = weight.mean(dim=1, keepdim=True).mean(dim=2, keepdim=True).mean(dim=3, keepdim=True)
        weight = weight - weight_mean
        std = weight.view(weight.size(0), -1).std(dim=1).view(-1, 1, 1, 1) + 1e-05
        weight = weight / std.expand_as(weight)
        return F.conv2d(x, weight, self.bias, self.stride, self.padding, self.dilation, self.groups)

def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1):
    """3x3 convolution with padding"""
    return Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=dilation, groups=groups, bias=False, dilation=dilation)

ARGS = {
    'in_planes': 4,
    'out_planes': 8,
    'stride': 1,
    'groups': 1,
    'dilation': 1
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
cv2_jpg Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
cutz-j/T-GD/utils/aug.py
code served (permissive licence) · get_code("86961d87fd5fab69")
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 3, dtype family int, shape (4, 3, 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 cv2
import numpy as np

# Create a valid image array in BGR format (as expected by cv2)
# Image shape: (height, width, channels) with values in uint8 range [0, 255]
img = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

# Compression quality value (JPEG quality, typically 0-100)
compress_val = 80

ARGS = {
    'img': img,
    'compress_val': compress_val
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (4, 3, 3) — shape (4, 3, 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
drop_connect Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
cutz-j/T-GD/models/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from yoctta/multiple-attention, is pointer only (licence: NONE) · get_code("2dd5dfa94542911e")
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 yoctta/multiple-attention, 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.

plot_overlap Ran
ran; our contract draft was wrong, not the code
cutz-j/T-GD/utils/logger.py
code served (permissive licence) · get_code("50afa2863ffd9fde")
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 list, 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 matplotlib.pyplot as plt
import numpy as np

class MockLogger:
    def __init__(self):
        self.title = "TestPlot"
        self.names = ["loss", "accuracy", "f1_score"]
        self.numbers = {
            "loss": [0.5, 0.4, 0.3, 0.2],
            "accuracy": [0.7, 0.75, 0.8, 0.85],
            "f1_score": [0.65, 0.72, 0.78, 0.82]
        }

logger = MockLogger()

ARGS = {
    "logger": logger,
    "names": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, 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
round_filters Ran
ran, honoured the contract we drafted
cutz-j/T-GD/models/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from yoctta/multiple-attention, is pointer only (licence: NONE) · get_code("826e2e91d6a9ec09")
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 yoctta/multiple-attention, 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.

round_repeats Ran
ran, honoured the contract we drafted
cutz-j/T-GD/models/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from yoctta/multiple-attention, is pointer only (licence: NONE) · get_code("4d8e794b593d34a0")
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 yoctta/multiple-attention, 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.

data_augment Not yet run
unverified (harvested, no recorded run)
cutz-j/T-GD/utils/aug.py
code served (permissive licence) · get_code("c8be44e6212f29a4")
How it ran

no invocation recorded.

rand_bbox Not yet run
unverified (harvested, no recorded run)
cutz-j/T-GD/utils/aug.py
pointer only (licence: MIT); the stored copy get_code serves, from deeplearning-wisc/dream-ood, is pointer only (licence: NOASSERTION) · get_code("d34a085d71b8f4b5")
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 deeplearning-wisc/dream-ood, 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. No invocation recorded.

resnext50_32x4d Not yet run
unverified (harvested, no recorded run)
cutz-j/T-GD/resnext/model.py
code served (permissive licence) · get_code("0e92c0e1d8007b4f")
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, 8 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 3 the same month, 8 later) and 2 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
plot_overlap 31 other papers
15 dated earlier, 16 later
1612.06321 (2016-12)
Large-Scale Image Retrieval with Attentive Deep Local Features
1805.07925 (2018-05)
Batch-Instance Normalization for Adaptively Style-Invariant Neural Networks
1806.04606 (2018-06)
Knowledge Distillation by On-the-Fly Native Ensemble
and 28 more not named here
round_filters 31 other papers
6 dated earlier, 1 the same month, 24 later · 3 only as an assembly brick
1808.08127 (2018-08)
Recalibrating Fully Convolutional Networks with Spatial and Channel 'Squeeze & Excitation' Blocks
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
1911.09070 (2019-11)
EfficientDet: Scalable and Efficient Object Detection
and 28 more not named here
round_repeats 30 other papers
6 dated earlier, 1 the same month, 23 later · 3 only as an assembly brick
1808.08127 (2018-08)
Recalibrating Fully Convolutional Networks with Spatial and Channel 'Squeeze & Excitation' Blocks
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
1911.09070 (2019-11)
EfficientDet: Scalable and Efficient Object Detection
and 27 more not named here
drop_connect 15 other papers
4 dated earlier, 1 the same month, 10 later · 2 only as an assembly brick
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
1911.09070 (2019-11)
EfficientDet: Scalable and Efficient Object Detection
1912.06218 (2019-12)
YOLACT++: Better Real-time Instance Segmentation
and 12 more not named here
rand_bbox 13 other papers
4 dated earlier, 9 later
1905.04899 (2019-05)
CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features
2002.11102 (2020-02)
On Feature Normalization and Data Augmentation
2003.05438 (2020-03)
Un-Mix: Rethinking Image Mixtures for Unsupervised Visual Representation Learning
and 10 more not named here
conv1x1 8 other papers
2 dated earlier, 6 later
2001.06838 (2020-01)
Towards Stabilizing Batch Statistics in Backward Propagation of Batch Normalization
2004.00288 (2020-04)
CurricularFace: Adaptive Curriculum Learning Loss for Deep Face Recognition
2107.08621 (2021-07)
Face.evoLVe: A High-Performance Face Recognition Library
and 5 more not named here
cv2_jpg 3 other papers
3 later
2402.12927 (2024-02)
CLIPping the Deception: Adapting Vision-Language Models for Universal Deepfake Detection
2407.20337 (2024-07)
Contrasting Deepfakes Diffusion via Contrastive Learning and Global-Local Similarities
2503.18286 (2025-03)
CO-SPY: Combining Semantic and Pixel Features to Detect Synthetic Images by AI
resnext50_32x4d 1 other paper
1 later
2107.02156 (2021-07)
Do Different Tracking Tasks Require Different Appearance Models?

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-22.

Repositories linked to this paper

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

Abstract

Recent advancements in Generative Adversarial Networks (GANs) enable the generation of highly realistic images, raising concerns about their misuse for malicious purposes. Detecting these GAN-generated images (GAN-images) becomes increasingly challenging due to the significant reduction of underlying artifacts and specific patterns. The absence of such traces can hinder detection algorithms from identifying GAN-images and transferring knowledge to identify other types of GAN-images as well. In this work, we present the Transferable GAN-images Detection framework (T-GD), a robust transferable framework for an effective detection of GAN-images. T-GD is composed of a teacher and a student model that can iteratively teach and evaluate each other to improve the detection performance. First, we train the teacher model on the source dataset and use it as a starting point for learning the target dataset. To train the student model, we inject noise by mixing up the source and target datasets, while constraining the weight variation to preserve the starting point. Our approach is a self-training method, but distinguishes itself from prior approaches by focusing on improving the transferability of GANimage detection. T-GD achieves high performance on the source dataset by overcoming catastrophic forgetting and effectively detecting state-of-theart GAN-images with only a small volume of data without any metadata information.

For agents

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

get_harvested_code_for_paper("2008.04115")
get_code_for_paper("2008.04115")
have("2008.04115")

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

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

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

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

Connect an agent — have() is free.