SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.14077 · CVPR · 2024

Learning to Transform Dynamically for Better Adversarial Transferability

Susan Liang, Chenliang Xu, Zeliang Zhang, Rongyi Zhu, Zhuo Liu

arXiv · PDF · Open in the Atlas

Code that ran

12 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (7 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 9 have no contract verdict; 1 failure of our instrument; 7 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/2405.14077.json · badge: /api/ran/2405.14077.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
ZhangAIPI/TransferAttack community
Papers with Code archive
10 ran · 4 no recorded run
rongyizhu/l2t marked official in Papers with Code
Papers with Code archive
1 ran · 3 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
affine Ran
ran on a synthesized input · constructed an object; no result was computed
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("76ec6ea1c611aa1b")
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, affine: 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
from torchvision import transforms

torch.manual_seed(0)

# The affine class expects:
# - offset: a numeric value used to scale translations
# - num_scale: an integer for the number of scales (default 5)

# Looking at the __call__ method, it takes x which should be a tensor
# that can be passed to transforms.functional.affine
# The function expects a PIL Image or a tensor with shape (C, H, W) or (B, C, H, W)

# Create a small test tensor with shape (3, 4, 4) - 3 channels, 4x4 spatial dims
test_image = torch.rand(3, 4, 4)

ARGS = {
    "offset": 10,
    "num_scale": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type affine — 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 affine 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
crop Ran
ran on a synthesized input · constructed an object; no result was computed
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("3270095b250d07ba")
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, crop: 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
from torchvision import transforms

torch.manual_seed(0)

# Create a small test tensor with shape (batch=2, channels=3, height=256, width=256)
# The crop function expects 4D tensor with shape (B, C, H, W)
x = torch.randn(2, 3, 256, 256)

# Define ARGS dict with all parameters for crop.__init__
ARGS = {
    "ratio": 0.5,
    "num_scale": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type crop — 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 crop 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
dim Ran
ran on a synthesized input
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("7a38c7f0ecdc2bb8")
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 4, 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

class dim:

    def __init__(self, resize_rate=1.1, diversity_prob=0.5) -> None:
        self.resize_rate = resize_rate
        self.diversity_prob = diversity_prob

    def __call__(self, x):
        """
        Random transform the input images
        """
        img_size = x.shape[-1]
        img_resize = int(img_size * self.resize_rate)
        rnd = torch.randint(low=min(img_size, img_resize), high=max(img_size, img_resize), size=(1,), dtype=torch.int32)
        rescaled = F.interpolate(x, size=[rnd, rnd], mode='bilinear', align_corners=False)
        h_rem = img_resize - rnd
        w_rem = img_resize - rnd
        pad_top = torch.randint(low=0, high=h_rem.item(), size=(1,), dtype=torch.int32)
        pad_bottom = h_rem - pad_top
        pad_left = torch.randint(low=0, high=w_rem.item(), size=(1,), dtype=torch.int32)
        pad_right = w_rem - pad_left
        padded = F.pad(rescaled, [pad_left.item(), pad_right.item(), pad_top.item(), pad_bottom.item()], value=0)
        return F.interpolate(padded, size=[img_size, img_size], mode='bilinear', align_corners=False)


INIT_ARGS = {
    'resize_rate': 1.1,
    'diversity_prob': 0.5
}

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

if __name__ == '__main__':
    instance = dim(**INIT_ARGS)
    output = instance(**ARGS)
    print(f"Input shape: {ARGS['x'].shape}")
    print(f"Output shape: {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 4, 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)
ide Ran
ran on a synthesized input · constructed an object; no result was computed
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("98e0628573515149")
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, ide: 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
from torch.nn import Dropout

torch.manual_seed(0)

# The ide class __call__ method takes x as input
# It applies Dropout with different probabilities and concatenates results
# x should be a tensor that Dropout can process

# Create a small tensor for testing
# Dropout expects input shape (batch_size, features) or similar
x = torch.randn(2, 4)

# The __init__ parameter is dropout_prob with a default list
dropout_prob = [0, 0.1, 0.2, 0.3, 0.4, 0.5]

ARGS = {
    "dropout_prob": dropout_prob
}
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 ide — 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 ide 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
identity Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from dholzmueller/universal_double_descent
pointer only; the stored copy get_code serves, from dholzmueller/universal_double_descent, is pointer only (licence: NONE) · get_code("9910e2fc297f8665")
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.

masked Ran
ran on a synthesized input · constructed an object; no result was computed
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("7882898c7bd1f8d5")
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, masked: 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 random

torch.manual_seed(0)
random.seed(0)

# The masked class takes:
# - num_block: int (number of blocks to divide each dimension)
# - num_scale: int (number of scaled versions to concatenate)

# Looking at the code:
# - __init__ takes num_block and num_scale
# - blockmask expects x to be a 4D tensor (batch, channels, width, height)
# - The function checks if w == h (square images)
# - It creates random block masks and zeros out regions
# - __call__ concatenates num_scale masked versions

# Create a small square tensor: batch=2, channels=4, height=8, width=8
x = torch.randn(2, 4, 8, 8)

ARGS = {
    "num_block": 2,
    "num_scale": 3,
}
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 masked — 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 masked 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
rotate Ran
ran on a synthesized input · constructed an object; no result was computed
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("8b44d6dad87b7938")
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, rotate: 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
from torchvision import transforms

torch.manual_seed(0)

# The rotate class takes an angle and num_scale as constructor arguments
# In __call__, it applies rotate transformations to a tensor x
# The input x should be a PIL Image or tensor that transforms.functional.rotate can handle

# Create a small tensor that can be rotated
# transforms.functional.rotate expects a PIL Image or a tensor
# Let's create a small tensor (2, 4, 4) - 2 images of 4x4
x = torch.randn(2, 4, 4)

ARGS = {
    "angle": 45,
    "num_scale": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type rotate — 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 rotate 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
select_op Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("28ce88cbcad7b395")
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 list, ndim 1, dtype family int; 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

torch.manual_seed(0)

# op_params: a tensor that will be passed through softmax
# Should be 1D tensor with num_elements to sample from
op_params = torch.randn(5)

# num_ops: number of operations to sample
num_ops = 3

ARGS = {
    "op_params": op_params,
    "num_ops": num_ops,
}
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 list, ndim 1, dtype family int — 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
sim Ran
ran on a synthesized input · constructed an object; no result was computed
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("b7715794a192878f")
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, sim: 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

torch.manual_seed(0)

# The sim class takes num_copy as a parameter
# In __call__, it takes x (a tensor) and returns a concatenation of x divided by powers of 2

# Create a small test tensor (batch=2, dim=4)
x = torch.randn(2, 4)

# Define ARGS mapping every parameter
ARGS = {
    "num_copy": 3
}
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 sim — 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 sim 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
ssm Ran
ran on a synthesized input
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("d0569b886ab791b6")
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 4, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np

class ssm:

    def __init__(self, rho=0.5, num_spectrum=10):
        self.epsilon = 16 / 255
        self.rho = rho
        self.num_spectrum = num_spectrum

    def dct(self, x, norm=None):
        """
        Discrete Cosine Transform, Type II (a.k.a. the DCT)
        (This code is copied from https://github.com/yuyang-long/SSA/blob/master/dct.py)

        Arguments:
            x: the input signal
            norm: the normalization, None or 'ortho'

        Return:
            the DCT-II of the signal over the last dimension
        """
        x_shape = x.shape
        N = x_shape[-1]
        x = x.contiguous().view(-1, N)
        v = torch.cat([x[:, ::2], x[:, 1::2].flip([1])], dim=1)
        Vc = torch.fft.fft(v)
        k = -torch.arange(N, dtype=x.dtype, device=x.device)[None, :] * np.pi / (2 * N)
        W_r = torch.cos(k)
        W_i = torch.sin(k)
        V = Vc.real * W_r - Vc.imag * W_i
        if norm == 'ortho':
            V[:, 0] /= np.sqrt(N) * 2
            V[:, 1:] /= np.sqrt(N / 2) * 2
        V = 2 * V.view(*x_shape)
        return V

    def idct(self, X, norm=None):
        """
        The inverse to DCT-II, which is a scaled Discrete Cosine Transform, Type III
        Our definition of idct is that idct(dct(x)) == x
        (This code is copied from https://github.com/yuyang-long/SSA/blob/master/dct.py)

        Arguments:
            X: the input signal
            norm: the normalization, None or 'ortho'

        Return:
            the inverse DCT-II of the signal over the last dimension
        """
        x_shape = X.shape
        N = x_shape[-1]
        X_v = X.contiguous().view(-1, x_shape[-1]) / 2
        if norm == 'ortho':
            X_v[:, 0] *= np.sqrt(N) * 2
            X_v[:, 1:] *= np.sqrt(N / 2) * 2
        k = torch.arange(x_shape[-1], dtype=X.dtype, device=X.device)[None, :] * np.pi / (2 * N)
        W_r = torch.cos(k)
        W_i = torch.sin(k)
        V_t_r = X_v
        V_t_i = torch.cat([X_v[:, :1] * 0, -X_v.flip([1])[:, :-1]], dim=1)
        V_r = V_t_r * W_r - V_t_i * W_i
        V_i = V_t_r * W_i + V_t_i * W_r
        V = torch.cat([V_r.unsqueeze(2), V_i.unsqueeze(2)], dim=2)
        tmp = torch.complex(real=V[:, :, 0], imag=V[:, :, 1])
        v = torch.fft.ifft(tmp)
        x = v.new_zeros(v.shape)
        x[:, ::2] += v[:, :N - N // 2]
        x[:, 1::2] += v.flip([1])[:, :N // 2]
        return x.view(*x_shape).real

    def dct_2d(self, x, norm=None):
        """
        2-dimentional Discrete Cosine Transform, Type II (a.k.a. the DCT)
        (This code is copied from https://github.com/yuyang-long/SSA/blob/master/dct.py)

        Arguments:
            x: the input signal
            norm: the normalization, None or 'ortho'

        Return:
            the DCT-II of the signal over the last 2 dimensions
        """
        X1 = self.dct(x, norm=norm)
        X2 = self.dct(X1.transpose(-1, -2), norm=norm)
        return X2.transpose(-1, -2)

    def idct_2d(self, X, norm=None):
        """
        The inverse to 2D DCT-II, which is a scaled Discrete Cosine Transform, Type III
        Our definition of idct is that idct_2d(dct_2d(x)) == x
        (This code is copied from https://github.com/yuyang-long/SSA/blob/master/dct.py)

        Arguments:
            X: the input signal
            norm: the normalization, None or 'ortho'

        Return:
            the DCT-II of the signal over the last 2 dimensions
        """
        x1 = self.idct(X, norm=norm)
        x2 = self.idct(x1.transpose(-1, -2), norm=norm)
        return x2.transpose(-1, -2)

    def __call__(self, x):
        x_idct = []
        for _ in range(self.num_spectrum):
            gauss = torch.randn(x.size()[0], 3, 224, 224) * self.epsilon
            x_dct = self.dct_2d(x + gauss)
            mask = (torch.rand_like(x) * 2 * self.rho + 1 - self.rho)
            x_idct.append(self.idct_2d(x_dct * mask))
        return torch.cat(x_idct)


INIT_ARGS = {
    'rho': 0.5,
    'num_spectrum': 2
}

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

METHOD = '__call__'

if __name__ == '__main__':
    model = ssm(**INIT_ARGS)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, 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)
ssm Ran
ran on a synthesized input · constructed an object; no result was computed
rongyizhu/l2t/l2t.py
pointer only (licence: NONE) · get_code("66827411a5708f30")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rongyizhu/l2t 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.

trace_prob Ran
ran, violated the contract we drafted
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("29e23c69b7369fa0")
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

torch.manual_seed(0)

# op_params: a tensor that will be passed to softmax
# The softmax is applied with dim=0, so we need a 1D tensor
# We'll create a small tensor of size 4
op_params = torch.randn(4)

# op_ids: a list/sequence of indices that index into the softmax output
# These indices should be valid (0-3 for a tensor of size 4)
op_ids = [0, 2, 1]

ARGS = {
    "op_params": op_params,
    "op_ids": op_ids,
}
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
Attack Not yet run
unverified (harvested, no recorded run)
rongyizhu/l2t/l2t.py
pointer only (licence: NONE) · get_code("27a0edca5630cc99")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rongyizhu/l2t 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. No invocation recorded.

L2T Not yet run
unverified (harvested, no recorded run)
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("09ad6d82e0bfd17e")
How it ran

no invocation recorded.

L2T Not yet run
unverified (harvested, no recorded run)
rongyizhu/l2t/l2t.py
pointer only (licence: NONE) · get_code("e810c2cac2611d1d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rongyizhu/l2t 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. No invocation recorded.

RWAug_Search Not yet run
unverified (harvested, no recorded run)
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("1c20a036849844e1")
How it ran

no invocation recorded.

RWAug_Search Not yet run
unverified (harvested, no recorded run)
rongyizhu/l2t/l2t.py
pointer only (licence: NONE) · get_code("73cfc6839c8a87e5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rongyizhu/l2t 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. No invocation recorded.

admix Not yet run
unverified (harvested, no recorded run)
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("eb6887fb7eb0a115")
How it ran

no invocation recorded.

blockshuffle Not yet run
unverified (harvested, no recorded run)
ZhangAIPI/TransferAttack/transferattack/input_transformation/l2t.py
code served (permissive licence) · get_code("fc8d40755d69834d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 3 later) and 15 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
identity
brick of this paper's assembly: data_transform
69 other papers
51 dated earlier, 2 the same month, 16 later · 5 only as an assembly brick
1706.07296 (2017-06)
A Minimal Developmental Model Can Increase Evolvability in Soft Robots
1802.09419 (2018-02)
Stochastic Hyperparameter Optimization through Hypernetworks
1804.06055 (2018-04)
Co-occurrence Feature Learning from Skeleton Data for Action Recognition and Detection with Hierarchical Aggregation
and 66 more not named here
select_op
brick of this paper's assembly: helper, sampler
1 other paper
1 later
2410.20197 (2024-10)
Transferable Adversarial Attacks on SAM and Its Downstream Models
trace_prob
brick of this paper's assembly: helper, sampler
1 other paper
1 later
2410.20197 (2024-10)
Transferable Adversarial Attacks on SAM and Its Downstream 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-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

Adversarial examples, crafted by adding perturbations imperceptible to humans, can deceive neural networks. Recent studies identify the adversarial transferability across various models, i.e., the cross-model attack ability of adversarial samples. To enhance such adversarial transferability, existing input transformation-based methods diversify input data with transformation augmentation. However, their effectiveness is limited by the finite number of available transformations. In our study, we introduce a novel approach named Learning to Transform (L2T). L2T increases the diversity of transformed images by selecting the optimal combination of operations from a pool of candidates, consequently improving adversarial transferability. We conceptualize the selection of optimal transformation combinations as a trajectory optimization problem and employ a reinforcement learning strategy to effectively solve the problem. Comprehensive experiments on the ImageNet dataset, as well as practical tests with Google Vision and GPT-4V, reveal that L2T surpasses current methodologies in enhancing adversarial transferability, thereby confirming its effectiveness and practical significance. The code is available at https: //github.com/ZhangAIPI/TransferAttack.

For agents

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

get_harvested_code_for_paper("2405.14077")
get_code_for_paper("2405.14077")
have("2405.14077")

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

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

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

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

Connect an agent — have() is free.