xtransferbench
[ICML 2025] X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP
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
Repository
[ICML 2025] X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP
Basic Info
- Host: GitHub
- Owner: HanxunH
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://hanxunh.github.io/XTransferBench/
- Size: 107 MB
Statistics
- Stars: 27
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP
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
- L_inf Non-Targeted: Refer to collections/linfnon_targeted.md for configuration details.
- L_inf Targeted: Refer to collections/linftargeted.md for configuration details.
- L_2 Non-Targeted: Refer to collections/l2non_targeted.md for configuration details.
- L_2 Targeted: Refer to collections/l2targeted.md for configuration details.
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
- Repositories: 7
- Profile: https://github.com/HanxunH
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.
- Homepage: https://github.com/HanxunH/XTransferBench
- Documentation: https://xtransferbench.readthedocs.io/
- License: MIT License
-
Latest release: 0.1.2
published 12 months ago
Rankings
Maintainers (1)
Funding
- https://github.com/HanxunH/XTransferBench
Dependencies
- pycocotools >=2.0.2
- accelerate *
- open_clip_torch *
- timm *
- tokenizers *
- transformers *
- timm ==0.4.12
- transformers ==4.33.2
- accelerate *
- timm ==0.6.13
- tokenizers ==0.15.1
- transformers ==4.37.2
- accelerate ==0.20.3
- bitsandbytes ==0.43.0
- peft ==0.2.0
- timm ==0.6.13
- tokenizers ==0.13.2
- transformers ==4.30.0
- huggingface-hub *
- torch *
- torchvision *