SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.03163 · ICCV · 2023

CGBA: Curvature-aware Geometric Black-box Attack

Ali Rahmati, Huaiyu Dai, Md Farhamdur, Tianfu Wu

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-24; 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/2308.03163.json · badge: /api/ran/2308.03163.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
farhamdur/cgba canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
Farhamdur/CGBA community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
Proposed_attack Ran
ran on a synthesized input · constructed an object; no result was computed
Farhamdur/CGBA/proposed_attack.py
code served (permissive licence) · get_code("c037dbeb35dbf0c7")
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, Proposed_attack: the run constructed the object and did not call it, so no result was computed. 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 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
import numpy as np
from torch.autograd import Variable

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(48, 10)
    
    def forward(self, x):
        batch_size = x.shape[0]
        x_flat = x.view(batch_size, -1)
        return self.fc(x_flat)

model = SimpleModel()
model.eval()

src_img = torch.randn(1, 3, 4, 4)
tar_img = torch.randn(1, 3, 4, 4)

mean = torch.tensor([0.485, 0.456, 0.406]).view(1, 3, 1, 1)
std = torch.tensor([0.229, 0.224, 0.225]).view(1, 3, 1, 1)
lb = torch.tensor(0.0)
ub = torch.tensor(1.0)

ARGS = {
    'model': model,
    'src_img': src_img,
    'mean': mean,
    'std': std,
    'lb': lb,
    'ub': ub,
    'tar_img': tar_img,
    'dim_reduc_factor': 4,
    'attack_method': 'CGBA_H',
    'iteration': 93,
    'initial_query': 30,
    'tol': 0.0001,
    'sigma': 0.0002,
    'verbose_control': 'Yes'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Proposed_attack — 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 Proposed_attack 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
clip_image_values Ran
ran; our contract draft was wrong, not the code
farhamdur/cgba/utils.py
code served (permissive licence) · get_code("58e05164be3f07cb")
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

torch.manual_seed(0)

# Create a small tensor to clip (batch_size=2, channels=4)
x = torch.randn(2, 4)

# Define min and max scalar values for clipping
minv = torch.tensor(-0.5)
maxv = torch.tensor(0.5)

ARGS = {
    "x": x,
    "minv": minv,
    "maxv": maxv,
}
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
inv_tf Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
farhamdur/cgba/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from yanemcovsky/SparsePatches, is pointer only (licence: NONE) · get_code("4cc853931342a664")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yanemcovsky/SparsePatches, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

valid_bounds Ran
ran, honoured the contract we drafted
farhamdur/cgba/utils.py
code served (permissive licence) · get_code("49e59007032d7068")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 3, 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 numpy as np
import copy

# Create a small test image as a numpy array
# Shape: (4, 3) to have distinct dimensions for probing
test_image = np.array([
    [100, 150, 200],
    [50, 75, 125],
    [200, 225, 250],
    [10, 30, 60]
], dtype=np.uint8)

ARGS = {
    'img': test_image,
    'delta': 255
}
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 tuple, ndim 3, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
clip_image_values
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later
1811.02248 (2018-11)
SparseFool: a few pixels make a big difference
2411.16162 (2024-11)
Sparse patches adversarial attacks via extrapolating point-wise information
2503.12827 (2025-03)
GSBA K : top-K GEOMETRIC SCORE-BASED BLACK-BOX ATTACK
inv_tf 3 other papers
2 dated earlier, 1 later
1811.02248 (2018-11)
SparseFool: a few pixels make a big difference
2003.06468 (2020-03)
GeoDA: a geometric framework for black-box adversarial attacks
2411.16162 (2024-11)
Sparse patches adversarial attacks via extrapolating point-wise information

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

Decision-based black-box attacks often necessitate a large number of queries to craft an adversarial example. Moreover, decision-based attacks based on querying boundary points in the estimated normal vector direction often suffer from inefficiency and convergence issues. In this paper, we propose a novel query-efficient c ¯urvatureaware g ¯eometric decision-based b ¯lack-box a ¯ttack (CGBA) that conducts boundary search along a semicircular path on a restricted 2D plane to ensure finding a boundary point successfully irrespective of the boundary curvature. While the proposed CGBA attack can work effectively for an arbitrary decision boundary, it is particularly efficient in exploiting the low curvature to craft high-quality adversarial examples, which is widely seen and experimentally verified in commonly used classifiers under non-targeted attacks. In contrast, the decision boundaries often exhibit higher curvature under targeted attacks. Thus, we develop a new query-efficient variant, CGBA-H, that is adapted for the targeted attack. In addition, we further design an algorithm to obtain a better initial boundary point at the expense of some extra queries, which considerably enhances the performance of the targeted attack. Extensive experiments are conducted to evaluate the performance of our proposed methods against some well-known classifiers on the Ima-geNet and CIFAR10 datasets, demonstrating the superiority of CGBA and CGBA-H over state-of-the-art non-targeted and targeted attacks, respectively. The source code is available at https://github.com/Farhamdur/CGBA.

For agents

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

get_harvested_code_for_paper("2308.03163")
get_code_for_paper("2308.03163")
have("2308.03163")

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

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

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

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

Connect an agent — have() is free.