SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.16934 · NeurIPS · 2023

On Evaluating Adversarial Robustness of Large Vision-Language Models

Tianyu Pang, Xiao Yang, Min Lin, Chongxuan Li, Ngai-Man Cheung, Yunqing Zhao, Chao Du

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 (0 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-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/2305.16934.json · badge: /api/ran/2305.16934.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
yunqing-me/attackvlm canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
FunctionStatusWhere it lives
find_max Ran
ran on a synthesized input
yunqing-me/attackvlm/unidiff_tool/_train_trans_and_query_fixed_budget.py
code served (permissive licence) · get_code("71dfa6ec4fceb241")
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 torch
import numpy as np

torch.manual_seed(0)

# The function find_max takes an array-like object and finds the maximum value
# It iterates through elements and compares them with max_value
# So arr needs to be iterable and contain comparable numbers

# Construct a simple list of numbers
arr = [3, 1, 4, 1, 5, 9, 2, 6]

ARGS = {
    'arr': arr
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
stable_diffusion_beta_schedule Ran
ran, honoured the contract we drafted
yunqing-me/attackvlm/unidiff_tool/_eval_adv_img_i2t.py
pointer only (licence: MIT); the stored copy get_code serves, from thu-ml/unidiffuser, is pointer only (licence: AGPL-3.0) · get_code("2ee6e353f1dd4cf3")
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 thu-ml/unidiffuser, and AGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

to_tensor Ran
ran; our contract draft was wrong, not the code
yunqing-me/attackvlm/LAVIS_tool/_train_adv_img_query.py
code served (permissive licence) · get_code("948955a5b23f1937")
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 3, dtype family float, shape (3, 3, 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 numpy as np
import torch
from PIL import Image

torch.manual_seed(0)

# Create a mock PIL Image object with the required attributes and methods
class MockPILImage:
    def __init__(self, size, mode, data):
        self.size = size  # (width, height)
        self.mode = mode
        self._data = data
    
    def getbands(self):
        # Return number of bands based on mode
        if self.mode == 'RGB':
            return ('R', 'G', 'B')
        elif self.mode == 'RGBA':
            return ('R', 'G', 'B', 'A')
        elif self.mode == 'L':
            return ('L',)
        elif self.mode == 'I':
            return ('I',)
        elif self.mode == 'F':
            return ('F',)
        else:
            return ('L',)
    
    def __array__(self, dtype=None):
        # Support numpy array conversion
        if dtype is None:
            dtype = np.uint8
        return np.array(self._data, dtype=dtype, copy=True)

# Create a small test image (4x3 RGB image)
width, height = 4, 3
num_channels = 3
image_data = np.random.randint(0, 256, (height, width, num_channels), dtype=np.uint8)
pic = MockPILImage(size=(width, height), mode='RGB', data=image_data)

ARGS = {
    'pic': pic
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL, 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 3, dtype family float, shape (3, 3, 4) — shape (3, 3, 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
unpreprocess Ran
ran; our contract draft was wrong, not the code
yunqing-me/attackvlm/unidiff_tool/_eval_adv_img_i2t.py
pointer only (licence: MIT); the stored copy get_code serves, from Sherrylone/PQDiff, is pointer only (licence: NONE) · get_code("30642020bc46ce62")
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 Sherrylone/PQDiff, 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.

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, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 3 later) and 1 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
stable_diffusion_beta_schedule 3 other papers
2 dated earlier, 1 later
2302.10586 (2023-02)
Diffusion Models and Semi-Supervised Learners Benefit Mutually with Few Labels
2303.06555 (2023-03)
One Transformer Fits All Distributions in Multi-Modal Diffusion at Scale
2405.14224 (2024-05)
DiM: Diffusion Mamba for Efficient High-Resolution Image Synthesis
to_tensor 2 other papers
2 later
2312.01886 (2023-12)
InstructTA: Instruction-Tuned Targeted Attack for Large Vision-Language Models
2503.10635 (2025-03)
A Frustratingly Simple Yet Highly Effective Attack Baseline: Over 90% Success Rate Against the Strong Black-box Models of GPT-4.5/4o/o1
unpreprocess 2 other papers
1 dated earlier, 1 later
2303.06555 (2023-03)
One Transformer Fits All Distributions in Multi-Modal Diffusion at Scale
2401.15652 (2024-01)
Continuous-Multiple Image Outpainting in One-Step via Positional Query and A Diffusion-based Approach

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

Large vision-language models (VLMs) such as GPT-4 have achieved unprecedented performance in response generation, especially with visual inputs, enabling more creative and adaptable interaction than large language models such as ChatGPT. Nonetheless, multimodal generation exacerbates safety concerns, since adversaries may successfully evade the entire system by subtly manipulating the most vulnerable modality (e.g., vision). To this end, we propose evaluating the robustness of open-source large VLMs in the most realistic and high-risk setting, where adversaries have only black-box system access and seek to deceive the model into returning the targeted responses. In particular, we first craft targeted adversarial examples against pretrained models such as CLIP and BLIP, and then transfer these adversarial examples to other VLMs such as MiniGPT-4, LLaVA, UniDiffuser, BLIP-2, and Img2Prompt. In addition, we observe that black-box queries on these VLMs can further improve the effectiveness of targeted evasion, resulting in a surprisingly high success rate for generating targeted responses. Our findings provide a quantitative understanding regarding the adversarial vulnerability of large VLMs and call for a more thorough examination of their potential security flaws before deployment in practice. Our project page: yunqing-me.github.io/AttackVLM/.

For agents

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

get_harvested_code_for_paper("2305.16934")
get_code_for_paper("2305.16934")
have("2305.16934")

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

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

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

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

Connect an agent — have() is free.