SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.11815 · 2026

Learning with Bilevel-Minimax Optimization for Efficient and Reliable Transfer Attacks

Yaohua Liu, Jiaxin Gao, Yifan Guo

arXiv · PDF

Code that ran

6 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 3 no recorded run), measured 2026-11-24; 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/2608.11815.json · badge: /api/ran/2608.11815.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
callous-youth/BMAT community
Papers with Code archive
6 ran · 3 no recorded run
FunctionStatusWhere it lives
apply_transform Ran
ran; our contract draft was wrong, not the code
callous-youth/BMAT/bmat/bmat_attack.py
code served (permissive licence) · get_code("752132b1edb824c8")
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 float, shape (4, 5, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from scipy.ndimage import interpolation

# Create a small 2D image with 3 channels
# Shape will be (height, width, channels) = (4, 5, 3)
x = np.random.rand(4, 5, 3).astype(np.float32)

# Create a 2x3 affine transformation matrix
# This should be a 2x3 matrix for 2D transforms (rotation, translation, scaling)
# Format: [[a, b, tx], [c, d, ty]] where (a,b,c,d) define linear transform and (tx,ty) is translation
transform_matrix = np.array([
    [1.0, 0.0, 0.5],
    [0.0, 1.0, -0.3]
], dtype=np.float32)

# channel_axis parameter - index of the channels axis in x
channel_axis = 2

# fill_mode parameter - how to fill points outside boundaries
fill_mode = 'constant'

# cval parameter - fill value for constant mode
cval = 0.0

ARGS = {
    'x': x,
    'transform_matrix': transform_matrix,
    'channel_axis': channel_axis,
    'fill_mode': fill_mode,
    'cval': cval
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 float, shape (4, 5, 3) — shape (4, 5, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ens_distort Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
callous-youth/BMAT/bmat/bmat_attack.py
code served (permissive licence) · get_code("75d8aeb01426ff03")
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 float, shape (32, 48, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small test image (height=32, width=48, channels=3)
# The function expects a numpy array with shape (height, width, channels)
image = np.random.randint(0, 256, size=(32, 48, 3), dtype=np.uint8).astype(np.float32)

ARGS = {
    "image": image
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 float, shape (32, 48, 3) — shape (32, 48, 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
inc_distort Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
callous-youth/BMAT/bmat/bmat_attack.py
code served (permissive licence) · get_code("f3ac2757378e8607")
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 float, shape (28, 28, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from scipy.ndimage import interpolation

np.random.seed(0)

# Create a small test image with shape (28, 28, 3)
# The function expects a 3D array (height, width, channels)
# Values should be in a normalized range like [-1, 1]
image = np.random.uniform(-1, 1, size=(28, 28, 3)).astype(np.float32)

ARGS = {
    "image": image
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 float, shape (28, 28, 3) — shape (28, 28, 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
jitter Ran
ran, honoured the contract we drafted
callous-youth/BMAT/bmat/bmat_attack.py
code served (permissive licence) · get_code("9fc5283d840a329b")
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 float, 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 numpy as np

np.random.seed(0)

ARGS = {
    "num": 42.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
normalize Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
callous-youth/BMAT/bmat/bmat_attack.py
code served (permissive licence) · get_code("a3268937736bc478")
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, 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 torch

torch.manual_seed(0)

# The function normalizes a tensor x along dimension 1 (channels)
# using mean and standard deviation values from ms
# ms should be a list/tuple of two tuples: (means, stds)
# x should be a tensor with shape (batch_size, channels, ...)

x = torch.randn(2, 3)  # batch_size=2, channels=3

ms = [(0.485, 0.456, 0.406), (0.229, 0.224, 0.225)]

ARGS = {
    "x": x,
    "ms": ms
}
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, 3) — shape (2, 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
transform_matrix_offset_center Ran
ran; our contract draft was wrong, not the code
callous-youth/BMAT/bmat/bmat_attack.py
code served (permissive licence) · get_code("3c85a6426b383b41")
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 ndarray, ndim 2, dtype family float, shape (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 numpy as np

# Construct a 3x3 transformation matrix (e.g., a rotation or affine transformation)
matrix = np.array([
    [0.9, -0.1, 0.0],
    [0.1, 0.9, 0.0],
    [0.0, 0.0, 1.0]
], dtype=np.float32)

# Image dimensions
x = 64
y = 48

ARGS = {
    "matrix": matrix,
    "x": x,
    "y": y
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 3) — shape (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
nips_test Not yet run
unverified (harvested, no recorded run)
callous-youth/BMAT/bmat/bmat_attack.py
code served (permissive licence) · get_code("0dafef926494ae19")
How it ran

no invocation recorded.

trans_incep Not yet run
unverified (harvested, no recorded run)
callous-youth/BMAT/bmat/bmat_attack.py
code served (permissive licence) · get_code("31707de7c8467ef6")
How it ran

no invocation recorded.

trans_ori Not yet run
unverified (harvested, no recorded run)
callous-youth/BMAT/bmat/bmat_attack.py
code served (permissive licence) · get_code("dfcd56b35c45f266")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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
transform_matrix_offset_center
brick of this paper's assembly: helper
3 other papers
3 dated earlier
1811.11168 (2018-11)
Deformable ConvNets v2: More Deformable, Better Results
1904.09546 (2019-04)
DeepCaps: Going Deeper with Capsule Networks
2204.00008 (2022-04)
Improving Adversarial Transferability via Neuron Attribution-based Attacks
apply_transform
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2204.00008 (2022-04)
Improving Adversarial Transferability via Neuron Attribution-based Attacks
inc_distort
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2204.00008 (2022-04)
Improving Adversarial Transferability via Neuron Attribution-based Attacks
normalize
brick of this paper's assembly: data_transform
1 other paper
1 dated earlier
2306.12685 (2023-06)
Rethinking the Backward Propagation for Adversarial Transferability

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

Repositories linked to this paper

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

Abstract

Transfer-based adversarial attacks craft adversarial examples using surrogate models to mislead black-box victim models. Beyond perturbation generation, transferability is fundamentally governed by the coupling of initialization, surrogate adaptation, and gradient dynamics. We revisit this challenge from a Bilevel-Minimax perspective and instantiate it in BMAT (Bilevel-Minimax Adversarial Transfer). The bilevel formulation captures the dependency between initialization and perturbation, while the inner minimax problem promotes surrogate robustness for cross-architecture generalization. Algorithmically, we design an integrated bottom-up solver that combines a Soft Weight Modulator and an Implicit Gradient Approximator for ternary coupling interaction. We further provide theoretical insights into the optimization dynamics of the proposed bilevel-minimax framework. Extensive experiments on classification and segmentation benchmarks show that BMAT surpasses 10+ strong baselines across 30+ victim models, improving both intraand cross-architecture transfer, and yielding up to 2× mIoU reduction. Code is available at https://github.com/callous-youth/BMAT.

For agents

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

get_harvested_code_for_paper("2608.11815")
get_code_for_paper("2608.11815")
have("2608.11815")

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

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

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

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

Connect an agent — have() is free.