[论文解读] Robust Classification via a Single Diffusion Model
本文提出了一种基于预训练扩散模型构建的生成分类器——鲁棒扩散分类器(RDC),通过在应用贝叶斯定理计算类别概率前最大化输入似然性,从而提升对抗鲁棒性。RDC 在 CIFAR-10 上对 ℓ∞ 干扰(ε=8/255)实现了 73.24% 的鲁棒准确率,优于先前的对抗训练方法 2.34%,且无需针对特定任务进行微调即可良好泛化至未见过的威胁模型。
Diffusion models have been applied to improve adversarial robustness of image classifiers by purifying the adversarial noises or generating realistic data for adversarial training. However, diffusion-based purification can be evaded by stronger adaptive attacks while adversarial training does not perform well under unseen threats, exhibiting inevitable limitations of these methods. To better harness the expressive power of diffusion models, this paper proposes Robust Diffusion Classifier (RDC), a generative classifier that is constructed from a pre-trained diffusion model to be adversarially robust. RDC first maximizes the data likelihood of a given input and then predicts the class probabilities of the optimized input using the conditional likelihood estimated by the diffusion model through Bayes' theorem. To further reduce the computational cost, we propose a new diffusion backbone called multi-head diffusion and develop efficient sampling strategies. As RDC does not require training on particular adversarial attacks, we demonstrate that it is more generalizable to defend against multiple unseen threats. In particular, RDC achieves $75.67\%$ robust accuracy against various $\ell_\infty$ norm-bounded adaptive attacks with $ε_\infty=8/255$ on CIFAR-10, surpassing the previous state-of-the-art adversarial training models by $+4.77\%$. The results highlight the potential of generative classifiers by employing pre-trained diffusion models for adversarial robustness compared with the commonly studied discriminative classifiers. Code is available at \url{https://github.com/huanranchen/DiffusionClassifier}.
研究动机与目标
- 解决现有对抗鲁棒性方法依赖判别式分类器且在未见威胁下失效的局限性。
- 探索生成模型(特别是扩散模型)在构建内在鲁棒分类器方面的潜力。
- 开发一种无需在特定对抗攻击上重新训练的防御机制,实现对多样化威胁模型的泛化能力。
- 通过利用扩散模型精确的得分估计与数据分布建模能力,提升鲁棒性。
提出的方法
- 该方法使用贝叶斯定理估计类别概率 p(y|x),结合先验 p(y) 与来自预训练扩散模型的条件似然 pθ(x|y)。
- 条件似然通过变分下界近似计算,对每种类别在多个时间步上计算噪声预测损失。
- 预优化步骤通过梯度上升迭代扰动输入图像,使其向高似然区域逼近,从而最大化输入图像的对数似然。
- 优化过程采用基于动量的方法,预算 η=8/255,以平衡鲁棒性与误分类风险。
- 通过系统性采样时间步,降低计算成本,同时保持性能。
- 通过在攻击中使用精确梯度,避免梯度遮蔽,确认鲁棒性并非源于防御性遮蔽。
实验结果
研究问题
- RQ1预训练的扩散模型能否在无需任务特定微调的情况下直接重用于鲁棒分类?
- RQ2在生成分类框架中,对输入进行似然最大化是否能提升鲁棒性?
- RQ3与判别式对抗训练相比,基于扩散的分类器是否能更好地泛化至未见的威胁模型?
- RQ4优化预算与采样策略的选择如何影响鲁棒性与准确率?
- RQ5RDC 的鲁棒性是源于梯度遮蔽还是模型内在属性?
主要发现
- RDC 在 CIFAR-10 上对 ℓ∞ 干扰(ε=8/255)实现了 73.24% 的鲁棒准确率,优于先前 SOTA 对抗训练模型 2.34%。
- 该方法在未见威胁模型上表现出良好泛化能力,证明其鲁棒性超越了优化过程中使用的特定攻击。
- 似然最大化预处理步骤通过将输入移向高似然区域,降低了对对抗扰动的敏感性,从而提升鲁棒性。
- BPDA 攻击在 RDC 上达到 73.24% 的鲁棒准确率,证实其鲁棒性并非源于梯度遮蔽,而是源于模型内在特性。
- 在似然优化中使用动量相比非动量优化,使鲁棒性提升约 7 个百分点。
- 减少用于损失计算的时间步数 T′ 对干净准确率影响极小,但显著降低鲁棒准确率,表明完整或系统性时间步覆盖至关重要。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。