Skip to main content
QUICK REVIEW

[Paper Review] Torchattacks: A PyTorch Repository for Adversarial Attacks

Hoki Kim|arXiv (Cornell University)|Sep 24, 2020
Adversarial Robustness in Machine LearningComputer Science16 references102 citations
TL;DR

Torchattacks is a PyTorch library that implements multiple adversarial attack algorithms to generate adversarial examples and assess model robustness, with usage guidance and implementation details.

ABSTRACT

Torchattacks is a PyTorch library that contains adversarial attacks to generate adversarial examples and to verify the robustness of deep learning models. The code can be found at https://github.com/Harry24k/adversarial-attacks-pytorch.

Motivation & Objective

  • Motivate and enable robust evaluation of deep learning models against adversarial examples.
  • Provide a comprehensive list of implemented adversarial attacks and their algorithmic details.
  • Offer practical guidance for applying attacks within PyTorch models and data pipelines.

Proposed method

  • Describe the attack formulation as optimization over perturbations within an epsilon-ball under L0, L2, or L_infinity norms.
  • Implement core attacks including FGSM, BIM, CW, R+FGSM, PGD, EOT+PGD, TPGD, FFGSM, MI-FGSM, and MultiAttack.
  • Present step-by-step algorithmic equations for each attack and their PyTorch implementation parameters (model, eps, steps, etc.).
  • Introduce a unified Attack class and usage utilities for mode control, output type, saving adversarial examples, and combining attacks via MultiAttack.

Experimental results

Research questions

  • RQ1What adversarial attacks are implemented in Torchattacks and how are they formulated mathematically?
  • RQ2How can users apply these attacks to generate adversarial examples within a PyTorch workflow?
  • RQ3What utilities does Torchattacks provide to manage attack modes, outputs, and combinations of attacks?

Key findings

  • A library of multiple well-known adversarial attacks implemented in PyTorch with explicit formulas and implementation examples.
  • Clearly documented precautions and input/output shape requirements for attacking models.
  • Practical usage guidance including Attack class methods and MultiAttack for combining attacks.
  • Examples demonstrate how to instantiate attacks (e.g., FGSM, BIM, CW) with typical parameter settings.
  • Support for diverse attack variants such as RFGSM, PGDL2, EOTPGD, TPGD, FFGSM, and MIFGSM.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.