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}.
翻译:深度神经网络(DNN)的训练通常涉及第三方资源(例如样本、骨干网络及预训练模型),由此引入了后门攻击这一新的训练阶段威胁。后门攻击者旨在向DNN中植入隐藏后门,使得被攻击的DNN在良性样本上表现正常,但当攻击者指定的触发模式激活隐藏后门时,其预测结果会被恶意篡改为预设的目标标签。为促进更安全训练方案及防御机制的研究与发展,我们设计了一个开源Python工具箱,该工具箱在统一且灵活的框架下实现了代表性及先进的后门攻击与防御方法。本工具箱具有四项重要且具备前景的特性:一致性、简洁性、灵活性与协同开发性。研究人员和开发者可借助该工具箱在基准数据集或本地数据集上轻松实现并比较不同方法。该Python工具箱名为\texttt{BackdoorBox},可通过\url{https://github.com/THUYimingLi/BackdoorBox}获取。