BackdoorBox: A Python Toolbox for Backdoor Learning

Yiming Li, Mengxi Ya, Yang Bai, Yong Jiang, Shu-Tao Xia
2/1/2023
cs.CRcs.CVcs.LG

Official code: THUYimingLi/BackdoorBox (679 stars, GPL-2.0, last commit 2025-09-27).

Abstract

Third-party resources ($e.g.$, samples, backbones, and pre-trained models) are usually involved in the training of deep neural networks (DNNs), which brings backdoor attacks as a new training-phase threat. In general, backdoor attackers intend to implant hidden backdoor in DNNs, so that the attacked DNNs behave normally on benign samples whereas their predictions will be maliciously changed to a pre-defined target label if hidden backdoors are activated by attacker-specified trigger patterns. To facilitate the research and development of more secure training schemes and defenses, we design an open-sourced Python toolbox that implements representative and advanced backdoor attacks and defenses under a unified and flexible framework. Our toolbox has four important and promising characteristics, including consistency, simplicity, flexibility, and co-development. It allows researchers and developers to easily implement and compare different methods on benchmark or their local datasets. This Python toolbox, namely \texttt{BackdoorBox}, is available at \url{https://github.com/THUYimingLi/BackdoorBox}.

View on arXivView PDF

Code Implementations(1)

GPL-2.0

The open-sourced Python toolbox for backdoor attacks and defenses.

67997Python, Jupyter NotebookOct 26, 20211 years agoGPL-2.0
backdoor-attacksbackdoor-defensesbackdoor-learningtrustworthy-aitrustworthy-machine-learning

Similar Papers

Cite this paper

@article{li2023backdoorbox,
  title  = {BackdoorBox: A Python Toolbox for Backdoor Learning},
  author = {Yiming Li and Mengxi Ya and Yang Bai and Yong Jiang and Shu-Tao Xia},
  year   = {2023},
  eprint = {2302.01762},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2302.01762v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2302.01762.svg)](https://codeofpaper.com/paper/2302.01762)

Discussion