PatchCensor:通过穷举测试实现 Transformer 的补丁鲁棒性认证
PatchCensor: Patch Robustness Certification for Transformers via Exhaustive Testing
AI总结:
本文提出 PatchCensor,通过变异注意力掩码的多推理投票与穷举式完全覆盖测试检测异常补丁,为 ViT 提供高干净准确率下的补丁鲁棒性认证。
摘要:
众所周知,Vision Transformer(ViT)与其他经典神经网络一样具有高度非线性,并且很容易被自然和对抗性补丁扰动所欺骗。这一局限性可能会对 ViT 在真实工业环境中的部署构成威胁,尤其是在安全攸关场景中。在本工作中,我们提出 PatchCensor,旨在通过应用穷举测试来认证 ViT 的补丁鲁棒性。我们尝试通过考虑最坏情况下的补丁攻击情形来提供可证明的保证。与可能被自适应突破的针对对抗性补丁的经验性防御不同,经过认证的鲁棒方法能够在特定条件下针对任意攻击提供认证准确率。然而,现有的鲁棒性认证大多基于鲁棒训练,这通常需要大量训练工作,并牺牲模型在正常样本上的性能。为弥补这一差距,PatchCensor 试图通过检测异常输入来提升整个系统的鲁棒性,而不是训练一个鲁棒模型并要求其对每个输入都给出可靠结果,因为后者不可避免地会损害准确率。具体而言,每个输入都会通过对使用不同变异注意力掩码的多次推理进行投票来测试,其中至少有一次推理被保证排除异常补丁。这可以被视为完全覆盖测试,能够在测试时为推理提供统计保证。我们的综合评估表明,PatchCensor 能够实现较高的认证准确率(例如,在 ImageNet 上针对 2% 像素对抗性补丁达到 67.1%),显著优于最先进技术,同时达到相近的干净准确率(在 ImageNet 上为 81.8%)。同时,我们的技术还支持灵活配置,只需更改掩码策略即可处理不同的对抗性补丁尺寸(最高达 25%)。
英文摘要:
Vision Transformer (ViT) is known to be highly nonlinear like other classical neural networks and could be easily fooled by both natural and adversarial patch perturbations. This limitation could pose a threat to the deployment of ViT in the real industrial environment, especially in safety-critical scenarios. In this work, we propose PatchCensor, aiming to certify the patch robustness of ViT by applying exhaustive testing. We try to provide a provable guarantee by considering the worst patch attack scenarios. Unlike empirical defenses against adversarial patches that may be adaptively breached, certified robust approaches can provide a certified accuracy against arbitrary attacks under certain conditions. However, existing robustness certifications are mostly based on robust training, which often requires substantial training efforts and the sacrifice of model performance on normal samples. To bridge the gap, PatchCensor seeks to improve the robustness of the whole system by detecting abnormal inputs instead of training a robust model and asking it to give reliable results for every input, which may inevitably compromise accuracy. Specifically, each input is tested by voting over multiple inferences with different mutated attention masks, where at least one inference is guaranteed to exclude the abnormal patch. This can be seen as complete-coverage testing, which could provide a statistical guarantee on inference at the test time. Our comprehensive evaluation demonstrates that PatchCensor is able to achieve high certified accuracy (e.g. 67.1% on ImageNet for 2%-pixel adversarial patches), significantly outperforming state-of-the-art techniques while achieving similar clean accuracy (81.8% on ImageNet). Meanwhile, our technique also supports flexible configurations to handle different adversarial patch sizes (up to 25%) by simply changing the masking strategy.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。