nielsr's picture
nielsr HF Staff
Update pipeline tag and add usage instructions
f4176bc verified
|
raw
history blame
2.65 kB
metadata
library_name: XTransferBench
license: mit
pipeline_tag: image-to-image
tags:
  - not-for-all-audiences
  - pytorch_model_hub_mixin
  - model_hub_mixin

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

arXiv GitHub HuggingFace Spaces

Baseline attacker GD-UAP used in ICML2025 paper "X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP"


X-TransferBench

X-TransferBench is an open-source benchmark that provides a comprehensive collection of UAPs/TUAPs capable of achieving universal adversarial transferability. These UAPs can simultaneously transfer across data,\xa0domains,\xa0models, and tasks. Essentially, they represent perturbations that can transform any sample into an adversarial example, effective against any model and for any task.

Model Details

  • Surrogate Model: ResNet
  • Surrogate Dataset:
  • Threat Model: L_inf_eps=12/255
  • Perturbation Size: 3 x 513 x 513

Model Usage

import XTransferBench
import XTransferBench.zoo

# List threat models
print(XTransferBench.zoo.list_threat_model())

# List UAPs under L_inf threat model
print(XTransferBench.zoo.list_attacker('linf_non_targeted'))

# Load X-Transfer with the Large search space (N=64) non-targeted
attacker = XTransferBench.zoo.load_attacker('linf_non_targeted', 'xtransfer_large_linf_eps12_non_targeted')

# Perturbe images to adversarial example
images = # Tensor [b, 3, h, w]
adv_images = attacker(images) # adversarial examples

Citation

If you use this model in your work, please cite the accompanying paper:

@article{mopuri2018generalizable,
  title={Generalizable data-free objective for crafting universal adversarial perturbations},
  author={Mopuri, Konda Reddy and Ganeshan, Aditya and Babu, R Venkatesh},
  journal={TPAMI},
  year={2018},
}
@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},
}