SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2302.09491 · 2023

X-Adv: Physical Adversarial Object Attacks against X-ray Prohibited Item Detection

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 5 failures of our instrument; 2 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/2302.09491.json · badge: /api/ran/2302.09491.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
dig-beihang/x-adv canonical (classifier label)
classifier basis not recorded on the link
8 ran · 2 no recorded run
FunctionStatusWhere it lives
add_extras Ran
ran; our contract draft was wrong, not the code
dig-beihang/x-adv/model/ssd_doam.py
code served (permissive licence) · get_code("2a8545e480332b47")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function expects:
# - cfg: a list/tuple that can contain integers and 'S' strings
# - i: an integer representing initial in_channels
# - batch_norm: a boolean (default False)

# Looking at the function logic:
# - It iterates over cfg with enumerate
# - cfg elements can be 'S' or integers (representing out_channels)
# - When v == 'S', it looks at cfg[k+1] for the next value
# - in_channels starts as i and gets updated to v in each iteration
# - flag alternates between False and True to choose kernel_size (1 or 3)

# A valid cfg would be a list with integers and 'S' markers
# Example: [256, 'S', 512, 128, 'S', 256, 128]
# This means: 
# - First layer: in_channels=i, out_channels=256, kernel_size=1
# - Second layer: in_channels=256, out_channels=512 (from cfg[k+1]), kernel_size=3, stride=2
# - Third layer: in_channels=512, out_channels=128, kernel_size=1
# - Fourth layer: in_channels=128, out_channels=256 (from cfg[k+1]), kernel_size=3, stride=2
# - Fifth layer: in_channels=256, out_channels=128, kernel_size=1

cfg = [256, 'S', 512, 128, 'S', 256, 128]
i = 1024
batch_norm = False

ARGS = {
    'cfg': cfg,
    'i': i,
    'batch_norm': batch_norm
}
Setup block drafted by
a language model, Claude Sonnet 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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_pad Ran
ran on a synthesized input
dig-beihang/x-adv/layers/doam.py
code served (permissive licence) · get_code("365bff967b0ae6db")
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 int, ndim 0, dtype family int, 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

def get_pad(in_, ksize, stride, atrous=1):
    out_ = np.ceil(float(in_) / stride)
    return int(((out_ - 1) * stride + atrous * (ksize - 1) + 1 - in_) / 2)

ARGS = {
    "in_": 64,
    "ksize": 3,
    "stride": 2,
    "atrous": 1
}
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 int, ndim 0, dtype family int, 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
intersect Ran
ran; our contract draft was wrong, not the code
dig-beihang/x-adv/layers/box_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from NVlabs/AL-MDN, is pointer only (licence: NOASSERTION) · get_code("f01c5f73515770a5")
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 NVlabs/AL-MDN, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

multibox Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dig-beihang/x-adv/model/ssd_doam.py
code served (permissive licence) · get_code("b490ac8699f5a7ad")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned tuple. 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)

# First, we need to create a VGG configuration and build the vgg layers
vgg_cfg = [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 'C', 512, 512, 512, 'M', 512, 512, 512]

def vgg(cfg, i, batch_norm=False):
    layers = []
    in_channels = i
    for v in cfg:
        if v == 'M':
            layers += [nn.MaxPool2d(kernel_size=2, stride=2)]
        elif v == 'C':
            layers += [nn.MaxPool2d(kernel_size=2, stride=2, ceil_mode=True)]
        else:
            conv2d = nn.Conv2d(in_channels, v, kernel_size=3, padding=1)
            if batch_norm:
                layers += [conv2d, nn.BatchNorm2d(v), nn.ReLU(inplace=True)]
            else:
                layers += [conv2d, nn.ReLU(inplace=True)]
            in_channels = v
    pool5 = nn.MaxPool2d(kernel_size=3, stride=1, padding=1)
    conv6 = nn.Conv2d(512, 1024, kernel_size=3, padding=6, dilation=6)
    conv7 = nn.Conv2d(1024, 1024, kernel_size=1)
    layers += [pool5, conv6, nn.ReLU(inplace=True), conv7, nn.ReLU(inplace=True)]
    return layers

# Build vgg layers
vgg_layers = vgg(vgg_cfg, 3, batch_norm=False)

# Create extra_layers - these should be conv layers with out_channels attribute
# The function accesses extra_layers[1::2] (every other element starting from index 1)
# and expects them to have .out_channels
extra_layers = [
    nn.Conv2d(1024, 256, kernel_size=1),
    nn.Conv2d(256, 512, kernel_size=3, stride=2, padding=1),
    nn.Conv2d(512, 128, kernel_size=1),
    nn.Conv2d(128, 256, kernel_size=3, stride=2, padding=1),
]

# cfg is a list of numbers representing the number of boxes per feature map
# The function expects len(cfg) >= 2 + len(extra_layers[1::2])
# extra_layers[1::2] has length 2, so cfg needs at least 4 elements
cfg = [4, 6, 6, 4]

# num_classes
num_classes = 21

ARGS = {
    'vgg': vgg_layers,
    'extra_layers': extra_layers,
    'cfg': cfg,
    'num_classes': num_classes
}
Setup block drafted by
a language model, Claude Sonnet 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 tuple — a tuple output has no array shape of its own; none is 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
multibox_fpn Ran
ran on a synthesized input
dig-beihang/x-adv/model/ssd_lim.py
code served (permissive licence) · get_code("9f9e4cbaf961a8f2")
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 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

torch.manual_seed(0)

# cfg is used as an iterable that is indexed by k
# It should have 5 elements (since fpn_source has 5 elements)
# Each element cfg[k] is multiplied by 4 for loc_layers and by num_classes for conf_layers
cfg = [6, 6, 6, 6, 6]

# num_classes is a simple integer used in multiplication
num_classes = 21

ARGS = {
    "cfg": cfg,
    "num_classes": num_classes
}
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 tuple, ndim 2, dtype family float — 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
nograd Ran
ran on a synthesized input
dig-beihang/x-adv/model/faster_rcnn.py
code served (permissive licence) · get_code("2a631501adce8730")
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 function. 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 as t

t.manual_seed(0)

# The function `nograd` is a decorator that wraps a function `f` to execute it
# within torch.no_grad() context. It takes a single parameter `f` which should
# be a callable (function).

# Create a simple test function to pass as the parameter
def sample_function(x, y):
    """A simple function that performs some tensor operations."""
    return x + y

ARGS = {
    "f": sample_function
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
point_form Ran
ran; our contract draft was wrong, not the code
dig-beihang/x-adv/layers/box_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from NVlabs/AL-MDN, is pointer only (licence: NOASSERTION) · get_code("3bea1addc1e14162")
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 NVlabs/AL-MDN, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

vgg Ran
ran; our contract draft was wrong, not the code
dig-beihang/x-adv/model/ssd_doam.py
code served (permissive licence) · get_code("6921f7ed00595a4f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function expects:
# - cfg: a list/tuple containing integers (number of channels) and strings 'M' or 'C' for pooling
# - i: integer representing input channels
# - batch_norm: boolean flag

# Looking at the function body, cfg is iterated over and can contain:
# - 'M' or 'C' for MaxPool2d layers
# - integers for Conv2d output channels
# The function builds a VGG-style network

# Create a simple configuration
cfg = [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 'C', 512, 512, 512, 'M', 512, 512, 512]

# Input channels (typically 3 for RGB images)
i = 3

# Batch normalization flag
batch_norm = False

ARGS = {
    'cfg': cfg,
    'i': i,
    'batch_norm': batch_norm
}
Setup block drafted by
a language model, Claude Sonnet 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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
center_size Not yet run
unverified (harvested, no recorded run)
dig-beihang/x-adv/layers/box_utils.py
code served (permissive licence) · get_code("aa1d78402838820a")
How it ran

no invocation recorded.

decom_vgg16 Not yet run
unverified (harvested, no recorded run)
dig-beihang/x-adv/model/faster_rcnn_vgg16.py
code served (permissive licence) · get_code("4502ecd1913e6a18")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 4 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
intersect 14 other papers
11 dated earlier, 3 later
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1512.02325 (2015-12)
SSD: Single Shot MultiBox Detector
and 11 more not named here
point_form 12 other papers
9 dated earlier, 3 later
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1512.02325 (2015-12)
SSD: Single Shot MultiBox Detector
and 9 more not named here
vgg 11 other papers
11 dated earlier
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1512.02325 (2015-12)
SSD: Single Shot MultiBox Detector
1611.08563 (2016-11)
Online Real-time Multiple Spatiotemporal Action Localisation and Prediction
and 8 more not named here
center_size 9 other papers
6 dated earlier, 3 later
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1512.02325 (2015-12)
SSD: Single Shot MultiBox Detector
and 6 more not named here
add_extras 6 other papers
6 dated earlier
1512.02325 (2015-12)
SSD: Single Shot MultiBox Detector
1611.08563 (2016-11)
Online Real-time Multiple Spatiotemporal Action Localisation and Prediction
1901.02446 (2019-01)
Panoptic Feature Pyramid Networks
and 3 more not named here
multibox 6 other papers
6 dated earlier
1512.02325 (2015-12)
SSD: Single Shot MultiBox Detector
1908.07129 (2019-08)
Zero-Shot Grounding of Objects from Natural Language Queries
1911.10033 (2019-11)
Domain Adaptation for Object Detection via Style Consistency
and 3 more not named here
get_pad 3 other papers
2 dated earlier, 1 later
1908.00463 (2019-08)
DIODE: A Dense Indoor and Outdoor DEpth Dataset
136780474 (2022 (year only))
Hourglass Attention Network for Image Inpainting
aaai_28245 (2024 (year only))
ViTEraser: Harnessing the Power of Vision Transformers for Scene Text Removal with SegMIM Pretraining
nograd 2 other papers
2 dated earlier
1910.11089 (2019-10)
Real-World Image Datasets for Federated Learning
2001.06202 (2020-01)
FedVision: An Online Visual Object Detection Platform Powered by Federated Learning

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

Adversarial attacks are valuable for evaluating the robustness of deep learning models. Existing attacks are primarily conducted on the visible light spectrum (e.g., pixel-wise texture perturbation). However, attacks targeting texture-free X-ray images remain underexplored, despite the widespread application of X-ray imaging in safety-critical scenarios such as the X-ray detection of prohibited items. In this paper, we take the first step toward the study of adversarial attacks targeted at X-ray prohibited item detection, and reveal the serious threats posed by such attacks in this safety-critical scenario. Specifically, we posit that successful physical adversarial attacks in this scenario should be specially designed to circumvent the challenges posed by color/texture fading and complex overlapping. To this end, we propose X-adv to generate physically printable metals that act as an adversarial agent capable of deceiving X-ray detectors when placed in luggage. To resolve the issues associated with color/texture fading, we develop a differentiable converter that facilitates the generation of 3D-printable objects with adversarial shapes, using the gradients of a surrogate model rather than directly generating adversarial textures. To place the printed 3D adversarial objects in luggage with complex overlapped instances, we design a policy-based reinforcement learning strategy to find locations eliciting strong attack performance in worst-case scenarios whereby the prohibited items are heavily occluded by other items. To verify the effectiveness of the proposed X-Adv, we conduct extensive experiments in both the digital and the physical world (employing a commercial X-ray security inspection system for the latter case). Furthermore, we present the physical-world X-ray adversarial attack dataset XAD.

For agents

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

get_harvested_code_for_paper("2302.09491")
get_code_for_paper("2302.09491")
have("2302.09491")

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

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

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

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

Connect an agent — have() is free.