SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2208.11342 · ECCV · 2022

Discovering Transferable Forensic Features for CNN-generated Images Detection

Ngoc-Trung Tran, Ngai-Man Cheung, Keshigeyan Chandrasegaran, Alexander Binder

arXiv · PDF · Open in the Atlas

Code that ran

20 of 24 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (17 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 18 have no contract verdict; 2 failures of our instrument; 4 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/2208.11342.json · badge: /api/ran/2208.11342.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
sutd-visual-computing-group/transferable-forensic-features marked official in Papers with Code
Papers with Code archive
20 ran · 4 no recorded run
FunctionStatusWhere it lives
anysign_conv Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("1b10aaafa5ffab6a")
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 an instance of its own class, anysign_conv: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a base Conv2d module to pass to anysign_conv
base_conv = nn.Conv2d(
    in_channels=3,
    out_channels=4,
    kernel_size=3,
    stride=1,
    padding=1,
    dilation=1,
    groups=1,
    bias=True
)

# Initialize with some weights and bias
base_conv.weight.data = torch.randn(4, 3, 3, 3)
base_conv.bias.data = torch.randn(4)

ARGS = {
    'conv': base_conv,
    'ignorebias': False
}
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 anysign_conv — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a anysign_conv 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
clamplayer Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("5c84599d73380ab1")
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 an instance of its own class, clamplayer: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# The clamplayer constructor takes:
# - thresh: a tensor that gets reshaped if forconv=True
# - w_bn_sign: a tensor that gets reshaped if forconv=True
# - forconv: a boolean flag

# For forconv=True, these tensors should be 1D (will be reshaped to (-1, 1, 1))
# For forconv=False, they can stay as-is

# Let's create tiny tensors with distinct sizes
thresh = torch.randn(4)  # 1D tensor, 4 elements
w_bn_sign = torch.randn(4)  # 1D tensor, 4 elements
forconv = True

ARGS = {
    'thresh': thresh,
    'w_bn_sign': w_bn_sign,
    'forconv': forconv
}
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 clamplayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a clamplayer 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
conv2d_beta0_wrapper_fct Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("821c88d2437ded8b")
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 an instance of its own class, conv2d_beta0_wrapper_fct: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a small Conv2d module
conv_module = nn.Conv2d(
    in_channels=3,
    out_channels=4,
    kernel_size=3,
    stride=1,
    padding=1,
    dilation=1,
    groups=1,
    bias=True
)

# Create input tensor: batch=2, channels=3, height=5, width=5
x = torch.randn(2, 3, 5, 5, requires_grad=True)

# lrpignorebias parameter
lrpignorebias = False

ARGS = {
    'x': x,
    'module': conv_module,
    'lrpignorebias': lrpignorebias
}
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_beta0_wrapper_fct — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a conv2d_beta0_wrapper_fct 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
conv2d_betaadaptive_wrapper_fct Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("0a9bf0583b9082f9")
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 an instance of its own class, conv2d_betaadaptive_wrapper_fct: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a simple Conv2d module for testing
conv_module = nn.Conv2d(
    in_channels=3,
    out_channels=4,
    kernel_size=3,
    stride=1,
    padding=1,
    dilation=1,
    groups=1,
    bias=True
)

# Create input tensor with shape (batch=2, channels=3, height=4, width=5)
x = torch.randn(2, 3, 4, 5, requires_grad=True)

# Set lrpignorebias parameter
lrpignorebias = False

# Set maxbeta parameter
maxbeta = torch.tensor([2.0])

ARGS = {
    'x': x,
    'module': conv_module,
    'lrpignorebias': lrpignorebias,
    'maxbeta': maxbeta
}
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_betaadaptive_wrapper_fct — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a conv2d_betaadaptive_wrapper_fct 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
conv2d_betaany_wrapper_fct Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("7f841ae57d02476e")
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 an instance of its own class, conv2d_betaany_wrapper_fct: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a simple Conv2d module
conv_module = nn.Conv2d(
    in_channels=3,
    out_channels=4,
    kernel_size=3,
    stride=1,
    padding=1,
    dilation=1,
    groups=1,
    bias=True
)

# Create input tensor (batch=2, channels=3, height=8, width=8)
x = torch.randn(2, 3, 8, 8, requires_grad=True)

# Create beta parameter
beta = torch.tensor(0.5, dtype=torch.float32)

# Create lrpignorebias flag
lrpignorebias = False

ARGS = {
    'x': x,
    'module': conv_module,
    'lrpignorebias': lrpignorebias,
    'beta': beta
}
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_betaany_wrapper_fct — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a conv2d_betaany_wrapper_fct 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
conv2d_zbeta_wrapper_fct Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("9e93c92453d76d41")
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 an instance of its own class, conv2d_zbeta_wrapper_fct: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a simple Conv2d module
conv_module = nn.Conv2d(
    in_channels=3,
    out_channels=5,
    kernel_size=3,
    stride=1,
    padding=1,
    dilation=1,
    groups=1,
    bias=True
)

# Initialize with some small weights
conv_module.weight.data = torch.randn(5, 3, 3, 3)
conv_module.bias.data = torch.randn(5)

# Create small input tensor: batch_size=2, channels=3, height=4, width=4
x = torch.randn(2, 3, 4, 4)

# Create lowest and highest tensors for clamping/range specification
lowest = torch.tensor([-1.0])
highest = torch.tensor([1.0])

# Define parameters for the function
ARGS = {
    'x': x,
    'module': conv_module,
    'lrpignorebias': False,
    'lowest': lowest,
    'highest': highest
}
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_zbeta_wrapper_fct — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a conv2d_zbeta_wrapper_fct 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
invertedposnegconv Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("cb64f4447a9ba0f8")
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 an instance of its own class, invertedposnegconv: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a base Conv2d module to pass to invertedposnegconv
base_conv = nn.Conv2d(
    in_channels=3,
    out_channels=4,
    kernel_size=3,
    stride=1,
    padding=1,
    dilation=1,
    groups=1,
    bias=True
)

# Initialize weights with mixed positive and negative values
base_conv.weight.data = torch.randn(4, 3, 3, 3)
base_conv.bias.data = torch.randn(4)

ARGS = {
    'conv': base_conv,
    'ignorebias': False
}
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 invertedposnegconv — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a invertedposnegconv 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
lrp_backward Ran
ran; our contract draft was wrong, not the code
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("50923b0f141f095a")
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
import torch.nn as nn

torch.manual_seed(0)

# Create a simple layer that takes input and produces output
class SimpleLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create input tensor with requires_grad=True so we can compute gradients
_input = torch.randn(2, 4, requires_grad=True)

# Create the layer
layer = SimpleLayer()

# Create relevance_output with same shape as layer output (batch=2, features=3)
relevance_output = torch.randn(2, 3)

# eps0 and eps are small constants for numerical stability
eps0 = 1e-9
eps = 1e-9

ARGS = {
    "_input": _input,
    "layer": layer,
    "relevance_output": relevance_output,
    "eps0": eps0,
    "eps": eps
}
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
lrplookupnotfounderror Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("4f2c64e82470851e")
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 an instance of its own class, lrplookupnotfounderror: the run constructed the object and did not call it, so no result was computed. 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

ARGS = {}
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 lrplookupnotfounderror — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a lrplookupnotfounderror 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
oneparam_wrapper_class Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("4baeba022cff9de1")
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 an instance of its own class, oneparam_wrapper_class: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a small nn.Module to use as the wrapped module
class SimpleModule(nn.Module):
    def __init__(self):
        super(SimpleModule, self).__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a custom autograd function
class CustomAutogradFunction(torch.autograd.Function):
    @staticmethod
    def forward(ctx, x, module, parameter1):
        ctx.save_for_later(x)
        ctx.module = module
        ctx.parameter1 = parameter1
        output = module(x) * parameter1
        return output
    
    @staticmethod
    def backward(ctx, grad_output):
        x, = ctx.saved_tensors
        module = ctx.module
        parameter1 = ctx.parameter1
        grad_x = grad_output * parameter1
        return grad_x, None, None

# Construct arguments
module = SimpleModule()
autogradfunction = CustomAutogradFunction()
parameter1 = 2.5

ARGS = {
    'module': module,
    'autogradfunction': autogradfunction,
    'parameter1': parameter1
}
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 oneparam_wrapper_class — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a oneparam_wrapper_class 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
posnegconv Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("f927f8950ba9d466")
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 an instance of its own class, posnegconv: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a base Conv2d layer to pass to posnegconv
base_conv = nn.Conv2d(
    in_channels=3,
    out_channels=4,
    kernel_size=3,
    stride=1,
    padding=1,
    dilation=1,
    groups=1,
    bias=True
)

# Initialize with some small weights and bias
base_conv.weight.data = torch.randn(4, 3, 3, 3) * 0.1
base_conv.bias.data = torch.randn(4) * 0.1

ARGS = {
    'conv': base_conv,
    'ignorebias': False
}
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 posnegconv — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a posnegconv 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
safe_divide Ran
ran; our contract draft was wrong, not the code
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("a215b24b1c0382ec")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Construct small tensors for the safe_divide function
# The function performs: numerator / (divisor + eps0 * (divisor == 0).to(divisor) + eps * divisor.sign())
# It needs:
# - numerator: a tensor
# - divisor: a tensor (same shape as numerator for broadcasting)
# - eps0: a scalar (added when divisor == 0)
# - eps: a scalar (multiplied by divisor.sign())

numerator = torch.randn(2, 4)
divisor = torch.randn(2, 4)
eps0 = 1e-8
eps = 1e-6

ARGS = {
    "numerator": numerator,
    "divisor": divisor,
    "eps0": eps0,
    "eps": eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
sum_stacked2 Ran
ran on a synthesized input
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("8cbafe92b9230b91")
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; 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

class sum_stacked2(nn.Module):

    def __init__(self):
        super(sum_stacked2, self).__init__()

    @staticmethod
    def forward(x):
        assert x.shape[0] == 2
        return torch.sum(x, dim=0)


INIT_ARGS = {}

ARGS = {
    'x': torch.randn(2, 4, 3)
}

if __name__ == '__main__':
    model = sum_stacked2(**INIT_ARGS)
    output = model(**ARGS)
    print(output)
    print(output.shape)
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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)
tensorbiased_convlayer Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("db981f380a0a2297")
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 an instance of its own class, tensorbiased_convlayer: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a base Conv2d layer
baseconv = nn.Conv2d(in_channels=3, out_channels=5, kernel_size=3, stride=1, padding=1, dilation=1, groups=1)

# Create new weight tensor with same shape as baseconv.weight
newweight = torch.randn_like(baseconv.weight)

# Create inputfornewbias - a 1D tensor of size matching in_channels
inputfornewbias = torch.randn(3)

ARGS = {
    'newweight': newweight,
    'baseconv': baseconv,
    'inputfornewbias': inputfornewbias
}
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 tensorbiased_convlayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a tensorbiased_convlayer 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
tensorbiased_linearlayer Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("3e42844a6a729935")
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 an instance of its own class, tensorbiased_linearlayer: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Define dimensions - use distinct sizes for clarity
in_features = 4
out_features = 3

# Create weight tensor: shape (out_features, in_features) = (3, 4)
newweight = torch.randn(out_features, in_features)

# Create bias tensor: shape (out_features,) = (3,)
newbias = torch.randn(out_features)

ARGS = {
    'in_features': in_features,
    'out_features': out_features,
    'newweight': newweight,
    'newbias': newbias
}
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 tensorbiased_linearlayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a tensorbiased_linearlayer 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
tensorbiasedconv2d_beta0_wrapper_fct Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("e38d338dc9d2c79e")
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 an instance of its own class, tensorbiasedconv2d_beta0_wrapper_fct: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a simple base Conv2d layer
base_conv = nn.Conv2d(in_channels=3, out_channels=4, kernel_size=3, stride=1, padding=1)

# Create input for new bias (small tensor)
input_for_new_bias = torch.randn(5)

# Create a tensorbiased_convlayer instance
tensorbiased_layer = nn.Module()
tensorbiased_layer.conv = nn.Conv2d(in_channels=3, out_channels=4, kernel_size=3, stride=1, padding=1)
tensorbiased_layer.baseconv = base_conv
tensorbiased_layer.inputfornewbias = input_for_new_bias
tensorbiased_layer.biasmode = 'neutr'

# Create input tensor (batch_size=2, channels=3, height=4, width=4)
x = torch.randn(2, 3, 4, 4, requires_grad=True)

# Create a tensorbiasedconv class (mock)
class MockTensorbiasedConv:
    def __init__(self):
        self.conv = nn.Conv2d(in_channels=3, out_channels=4, kernel_size=3, stride=1, padding=1)
        self.baseconv = base_conv
        self.inputfornewbias = input_for_new_bias

tensorbiased_class = MockTensorbiasedConv()

# Define arguments for tensorbiasedconv2d_beta0_wrapper_fct.forward
ARGS = {
    'ctx': None,  # Will be provided by autograd framework
    'x': x,
    'tensorbiasedclass': tensorbiased_class,
    'lrpignorebias': False
}
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 tensorbiasedconv2d_beta0_wrapper_fct — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a tensorbiasedconv2d_beta0_wrapper_fct 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
tensorbiasedconv2d_betaadaptive_wrapper_fct Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("a9191d22ad9fbd1d")
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 an instance of its own class, tensorbiasedconv2d_betaadaptive_wrapper_fct: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a base convolutional layer
base_conv = nn.Conv2d(in_channels=3, out_channels=4, kernel_size=3, stride=1, padding=1, dilation=1, groups=1)

# Create weight tensor for the tensorbiased_convlayer
new_weight = torch.randn(4, 3, 3, 3)

# Create input for new bias - shape should be (out_channels,)
input_for_new_bias = torch.randn(4)

# Create the tensorbiased_convlayer
tensorbiased_layer = nn.Module()
tensorbiased_layer.conv = nn.Conv2d(in_channels=3, out_channels=4, kernel_size=3, stride=1, padding=1)
tensorbiased_layer.conv.weight = nn.Parameter(new_weight.clone())
tensorbiased_layer.conv.bias = None
tensorbiased_layer.baseconv = base_conv
tensorbiased_layer.inputfornewbias = input_for_new_bias

# Create the tensorbiasedconv object that will be passed to the constructor
tensorbiasedconv = nn.Module()
tensorbiasedconv.conv = tensorbiased_layer.conv
tensorbiasedconv.baseconv = base_conv
tensorbiasedconv.inputfornewbias = input_for_new_bias

ARGS = {
    'tensorbiasedconv': tensorbiasedconv,
    'ignorebias': False
}
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 tensorbiasedconv2d_betaadaptive_wrapper_fct — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a tensorbiasedconv2d_betaadaptive_wrapper_fct 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
tensorbiasedconv2d_betaany_wrapper_fct Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("cfb50acee5dfcbe7")
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 an instance of its own class, tensorbiasedconv2d_betaany_wrapper_fct: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a base convolution layer
base_conv = nn.Conv2d(
    in_channels=3,
    out_channels=4,
    kernel_size=3,
    stride=1,
    padding=1,
    dilation=1,
    groups=1
)

# Create input for new bias - should be 1D tensor with shape matching out_channels
input_for_new_bias = torch.randn(4)

# Create a weight tensor for the tensorbiased conv
weight = torch.randn(4, 3, 3, 3)

# Create the tensorbiased_convlayer
tensorbiased_conv_layer = nn.Module()
tensorbiased_conv_layer.conv = nn.Conv2d(
    in_channels=3,
    out_channels=4,
    kernel_size=3,
    stride=1,
    padding=1,
    dilation=1,
    groups=1
)
tensorbiased_conv_layer.conv.weight = torch.nn.Parameter(weight)
tensorbiased_conv_layer.baseconv = base_conv
tensorbiased_conv_layer.inputfornewbias = input_for_new_bias

# Test input for lrp_backward
test_input = torch.randn(2, 3, 8, 8, requires_grad=True)
test_relevance_output = torch.randn(2, 4, 8, 8)

# Create a simple layer (can be a Conv2d)
test_layer = nn.Conv2d(3, 4, kernel_size=3, padding=1)

ARGS = {
    '_input': test_input,
    'layer': test_layer,
    'relevance_output': test_relevance_output,
    'eps0': 1e-4,
    'eps': 1e-6
}
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 tensorbiasedconv2d_betaany_wrapper_fct — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a tensorbiasedconv2d_betaany_wrapper_fct 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
twoparam_wrapper_class Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("5b89691311760655")
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 an instance of its own class, twoparam_wrapper_class: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a simple module that will be wrapped
class SimpleModule(nn.Module):
    def __init__(self):
        super(SimpleModule, self).__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a simple autograd function
class SimpleAutogradFunction(torch.autograd.Function):
    @staticmethod
    def forward(ctx, x, module, parameter1, parameter2):
        ctx.save_for_backward(x)
        ctx.module = module
        ctx.parameter1 = parameter1
        ctx.parameter2 = parameter2
        output = module(x)
        return output
    
    @staticmethod
    def backward(ctx, grad_output):
        x, = ctx.saved_tensors
        return grad_output, None, None, None

# Construct arguments
module = SimpleModule()
autogradfunction = SimpleAutogradFunction
parameter1 = torch.tensor([1.0, 2.0, 3.0, 4.0])
parameter2 = torch.tensor([[1.0, 2.0], [3.0, 4.0]])

ARGS = {
    'module': module,
    'autogradfunction': autogradfunction,
    'parameter1': parameter1,
    'parameter2': parameter2
}
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 twoparam_wrapper_class — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a twoparam_wrapper_class 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
zeroparam_wrapper_class Ran
ran on a synthesized input · constructed an object; no result was computed
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("42cfb2a071642abe")
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 an instance of its own class, zeroparam_wrapper_class: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Define a simple module that will be wrapped
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Define a custom autograd function that takes (x, module) as arguments
class CustomAutogradFunction(torch.autograd.Function):
    @staticmethod
    def forward(ctx, x, module):
        ctx.save_for_backward(x)
        ctx.module = module
        return module(x)
    
    @staticmethod
    def backward(ctx, grad_output):
        x, = ctx.saved_tensors
        return grad_output, None

# Create instances
module = SimpleModule()
autogradfunction = CustomAutogradFunction

# Create input tensor (batch_size=2, features=4)
x = torch.randn(2, 4)

ARGS = {
    'module': module,
    'autogradfunction': autogradfunction
}
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 zeroparam_wrapper_class — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a zeroparam_wrapper_class 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
conv2d_zbeta_wrapper_class Not yet run
unverified (harvested, no recorded run)
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("bee51e3019e752b5")
How it ran

no invocation recorded.

get_lrpwrapperformodule Not yet run
unverified (harvested, no recorded run)
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("7b712b5d43f45b25")
How it ran

no invocation recorded.

invertedposnegconv_tensorbiased Not yet run
unverified (harvested, no recorded run)
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("c96113c193c0bf5c")
How it ran

no invocation recorded.

posnegconv_tensorbiased Not yet run
unverified (harvested, no recorded run)
sutd-visual-computing-group/transferable-forensic-features/src/lrp/ef_lrp_general.py
code served (permissive licence) · get_code("57cc99f817a6e87b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 24 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 24 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.

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

Visual counterfeits 4 are increasingly causing an existential conundrum in mainstream media with rapid evolution in neural image synthesis methods. Though detection of such counterfeits has been a taxing problem in the image forensics community, a recent class of forensic detectors -universal detectors -are able to surprisingly spot counterfeit images regardless of generator architectures, loss functions, training datasets, and resolutions [61]. This intriguing property suggests the possible existence of transferable forensic features (T-FF) in universal detectors. In this work, we conduct the first analytical study to discover and understand T-FF in universal detectors. Our contributions are 2-fold: 1) We propose a novel forensic feature relevance statistic (FF-RS) to quantify and discover T-FF in universal detectors and, 2) Our qualitative and quantitative investigations uncover an unexpected finding: color is a critical T-FF in universal detectors. Code and models are available at https://keshik6.github.io/transferable-forensic-features/

For agents

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

get_harvested_code_for_paper("2208.11342")
get_code_for_paper("2208.11342")
have("2208.11342")

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

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

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

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

Connect an agent — have() is free.