xtransferbench

[ICML 2025] X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP

https://github.com/hanxunh/xtransferbench

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.1%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

[ICML 2025] X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP

Basic Info
Statistics
  • Stars: 27
  • Watchers: 1
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Created about 1 year ago · Last pushed 12 months ago
Metadata Files
Readme License Citation

README.md

X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP

XTransfer Logo
arXiv HuggingFace Community License Made with Python

Code for ICML2025 Paper "X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP"


X-TransferBench

X-TransferBench is an open-source benchmark that offers a comprehensive collection of Universal Adversarial Perturbations (UAPs) capable of achieving super adversarial transferability. These UAPs can simultaneously transfer across data distributions, domains, model architectures, and downstream tasks. In essence, they are perturbations that can convert virtually any input sample into an adversarial exampleeffective against any model and any task.


Installation

Nightly Build (latest features from source)

shell git clone https://github.com/hanxunh/XTransferBench.git cd XTransferBench pip3 install .

Stable Build (from PyPI)

shell pip3 install XTransferBench


Usage

```python import XTransferBench import XTransferBench.zoo

List threat models

print(XTransferBench.zoo.listthreatmodel())

List UAPs under L_inf threat model

print(XTransferBench.zoo.listattacker('linfnon_targeted'))

Load X-Transfer with the Large search space (N=64) non-targeted

attacker = XTransferBench.zoo.loadattacker('linfnontargeted', 'xtransferlargelinfeps12nontargeted')

Perturbe images to adversarial example

images = # Tensor [b, 3, h, w] adv_images = attacker(images) ```


Demo

We provide a web demo usingX-TransferBenchthat allows you to transform any image into an adversarial example using our curated collection of UAPs and TUAPs. You can access the demo at the link below. Once generated, the adversarial example can be tested on any model and task of your choice.


UAPs/TUAPs Collections


Reproduce results from the paper

The repository includes sample code and all necessary files to reproduce the results reported in the paper.

For evaluation instructions, please refer to evaluations/README.md.

For generating UAPs/TUAPs, see xtransfer/README.md.


Security and Ethical Use Statement

The perturbations provided in this project are intended solely for research purposes. They are shared with the academic and research community to advance understanding of super transferable attacks and defenses.

Any other use of the data, model weights, or methods derived from this project, including but not limited to unauthorized access, modification, or malicious deployment, is strictly prohibited and not endorsed by this project. The authors and contributors of this project are not responsible for any misuse or unethical applications of the provided resources. Users are expected to adhere to ethical standards and ensure that their use of this research aligns with applicable laws and guidelines.


Citation

bibtex @inproceedings{ huang2025xtransfer, title={X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP}, author={Hanxun Huang and Sarah Erfani and Yige Li and Xingjun Ma and James Bailey}, booktitle={ICML}, year={2025}, }


Owner

  • Name: Hanxun Huang
  • Login: HanxunH
  • Kind: user
  • Location: Melbourne / Beijing
  • Company: The University of Melbourne

GitHub Events

Total
  • Issues event: 1
  • Watch event: 18
  • Issue comment event: 1
  • Push event: 6
  • Fork event: 2
  • Create event: 1
Last Year
  • Issues event: 1
  • Watch event: 18
  • Issue comment event: 1
  • Push event: 6
  • Fork event: 2
  • Create event: 1

Issues and Pull Requests

Last synced: 9 months ago

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 23 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
pypi.org: xtransferbench

This package provides UAPs for robustness evaluation.

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 23 Last month
Rankings
Dependent packages count: 9.0%
Stargazers count: 16.1%
Forks count: 24.2%
Average: 25.0%
Dependent repos count: 50.8%
Maintainers (1)
Funding
  • https://github.com/HanxunH/XTransferBench
Last synced: 9 months ago

Dependencies

evaluations/pycocoevalcap/setup.py pypi
  • pycocotools >=2.0.2
evaluations/requirements.txt pypi
  • accelerate *
  • open_clip_torch *
  • timm *
  • tokenizers *
  • transformers *
evaluations/requirements_blip2.txt pypi
  • timm ==0.4.12
  • transformers ==4.33.2
evaluations/requirements_llava.txt pypi
  • accelerate *
  • timm ==0.6.13
  • tokenizers ==0.15.1
  • transformers ==4.37.2
evaluations/requirements_minigpt4.txt pypi
  • accelerate ==0.20.3
  • bitsandbytes ==0.43.0
  • peft ==0.2.0
  • timm ==0.6.13
  • tokenizers ==0.13.2
  • transformers ==4.30.0
pyproject.toml pypi
  • huggingface-hub *
  • torch *
  • torchvision *