[论文解读] BackdoorBox: A Python Toolbox for Backdoor Learning
BackdoorBox 是一个开源的 Python 工具箱,在一个统一、灵活的框架下实现并比较广泛的后门攻击和防御,用于深度神经网络安全研究。
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 exttt{BackdoorBox}, is available at \url{https://github.com/THUYimingLi/BackdoorBox}.
研究动机与目标
- 提供一个统一、灵活的框架,用于实现并比较后门攻击和防御。
- 通过一致的接口和可配置的管线,促进可重复的研究。
- 支持本地数据集和模型,便于定制化实验。
- 通过共同开发和开源托管,鼓励协作。
- 提供现成的示例和文档,降低入门门槛。
提出的方法
- 实现一个基类架构,用于仅中毒的后门攻击和受训练控制的攻击,以确保一致性。
- 通过 torchvision.transforms 集成触发器插入,配置化的 poisoned_transform_train_index/poisoned_transform_test_index 以实现真实场景。
- 将防御分为六类(预处理、模型修复、污染抑制、模型诊断、样本诊断、认证防御),并实现具有代表性的方法。
- 提供受支持的数据集(MINIST、CIFAR-10)和通过 torchvision 的本地数据集,基于 PyTorch 实现,并附有 requirements.txt 以便于搭建。
- 提供开源代码托管(GitHub),以促进共同开发和快速更新。
- 包含实用的演示和测试文件,以演示后门攻击和防御的用法。

实验结果
研究问题
- RQ1统一框架的设计,支持多种后门攻击和防御方法,是怎样的?
- RQ2在单一、一致的接口下,能实现多少个具有代表性的后门攻击和防御?
- RQ3使用通用工具箱时,攻击/防御实验有多灵活、可重复?
- RQ4工具箱支持哪些数据集和模型,用户如何整合自己的数据和架构?
- RQ5工具箱是否能在基准测试中实现攻击与防御模块的联合或分开使用?
主要发现
- 该工具箱实现了超过 20 种具有代表性的后门攻击和防御。
- 所有方法都在统一框架下开发,具有高一致性和共享基类。
- 用户可以对用户指定的样本和模型应用攻击/防御,模块可以联合使用或分开使用。
- BackdoorBox 支持 PyTorch 与 Python 3,依赖项在 requirements.txt 中列出。
- 项目强调一致性、简洁性、灵活性和共同开发,并在 GitHub 上进行开源协作。
- 它提供实用的演示、文档和测试文件以便于采用,包括 BadNets 和 PhysicalBA 的示例。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。