[论文解读] CosPGD: an efficient white-box adversarial attack for pixel-wise prediction tasks
CosPGD 是一种统一的白盒对抗攻击,针对像素级预测任务,使用每像素余弦相似度来缩放损失,在语义分割上优于 SegPGD 和 PGD,并扩展到光流和图像复原。
While neural networks allow highly accurate predictions in many tasks, their lack of robustness towards even slight input perturbations often hampers their deployment. Adversarial attacks such as the seminal projected gradient descent (PGD) offer an effective means to evaluate a model's robustness and dedicated solutions have been proposed for attacks on semantic segmentation or optical flow estimation. While they attempt to increase the attack's efficiency, a further objective is to balance its effect, so that it acts on the entire image domain instead of isolated point-wise predictions. This often comes at the cost of optimization stability and thus efficiency. Here, we propose CosPGD, an attack that encourages more balanced errors over the entire image domain while increasing the attack's overall efficiency. To this end, CosPGD leverages a simple alignment score computed from any pixel-wise prediction and its target to scale the loss in a smooth and fully differentiable way. It leads to efficient evaluations of a model's robustness for semantic segmentation as well as regression models (such as optical flow, disparity estimation, or image restoration), and it allows it to outperform the previous SotA attack on semantic segmentation. We provide code for the CosPGD algorithm and example usage at https://github.com/shashankskagnihotri/cospgd.
研究动机与目标
- 推动在对抗扰动下对像素级预测模型(分割、光流、复原/ restoration)的鲁棒性评估。
- 提供一个统一的攻击框架,适用于分类式和回归式的像素级任务。
- 通过使用基于余弦的损失缩放来进行逐像素鲁棒性评估,提升相对于先前的像素级攻击(SegPGD、PGD)的效果。
- 在多种任务和架构下展示其在无目标和有目标设置中的适用性。
提出的方法
- 在优化过程中,扩展 PGD,使预测与目标之间的逐像素余弦相似度用于缩放损失。
- 对预测分布与目标分布在每个像素上计算余弦相似度,形成用于反向传播的 L_cos。
- 支持 L_infinity 和 L2 范围的扰动,以及有目标和无目标攻击模式。
- 通过对像素级预测使用基于 softmax 的预测和合适的目标表示来应用(分割为 one-hot,向量目标为 softmax)。
- 用 L_cos 的梯度迭代更新对抗样本,然后投影/裁剪到可允许的扰动和输入范围。

实验结果
研究问题
- RQ1基于逐像素余弦相似度的统一白盒攻击,是否能为像素级预测任务提供比现有方法更强的对抗扰动?
- RQ2CosPGD 在语义分割、光流和图像恢复等任务,以及在有目标和无目标设置下的泛化程度如何?
- RQ3在常用 epsilon 和 alpha 设置下,CosPGD 相较于 SegPGD 和 PGD,在 L_infinity 和 L2 范数下的有效性如何?
主要发现
- CosPGD 在语义分割方面,跨测试架构和数据集显著提高了对抗强度,胜过 SegPGD 和 PGD。
- 在 PASCAL VOC 2012 与 DeepLabV3 设置下,CosPGD 的 mIoU 和 mAcc 的下降幅度远大于 SegPGD/PGD(例如,在给定设置下,CosPGD 在迭代 40 次后获得 0.08% mIoU,而 PGD 为 6.79%,SegPGD 为 2.69%)。
- CosPGD 扩展到光流,实现更强的有目标攻击,使端点误差 (epe) 更接近目标(例如在 Sintel 最终帧,epe 低至 1.55)。
- CosPGD 还揭示了图像复原模型(Baseline 与 NAFNet)的鲁棒性较弱,并且在像素级信息被利用时,优于 SegPGD。
- 在各任务中,CosPGD 一直从通过余弦相似度进行逐像素损失缩放中受益,在可比扰动预算下优于传统的 PGD 和 SegPGD。
- 该方法适合作为像素级模型鲁棒性基准测试工具,适用于回归式和分类式像素任务。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。