arXiv:2507.22428cs.LGcs.AI2025-07被引 1

揭示了对抗攻击中梯度计算的浮点误差问题,提出更精准的损失函数提升攻击效果。

Theoretical Analysis of Relative Errors in Gradient Computations for Adversarial Attacks with CE Loss

  • 从理论出发分析四种攻击场景下的浮点误差,发现下溢和舍入是主因。
  • 提出T-MIFPE损失函数,通过最优缩放因子提升梯度计算精度。
  • 在MNIST、CIFAR-10、CIFAR-100上优于CE、C&W等现有损失函数。

基于交叉熵(CE)损失的梯度攻击常因浮点运算引起的相对误差而出现过估计问题。本文首次对四类攻击场景——(i)未成功的无目标攻击,(ii)成功的无目标攻击,(iii)未成功的有目标攻击,(iv)成功的有目标攻击——中的浮点计算误差进行了系统性理论分析。建立了刻画不同攻击条件下相对数值误差行为的理论基础,揭示了梯度计算不稳定的先前未知模式,确认浮点下溢与舍入是主要成因。基于此,提出理论最优缩放的T-MIFPE损失函数,其中最优缩放因子$T = t^*$可最小化浮点误差影响,从而提升对抗攻击中梯度计算的准确性。在MNIST、CIFAR-10和CIFAR-100数据集上的大量实验表明,T-MIFPE在攻击强度和鲁棒性评估准确性方面均优于现有损失函数,包括CE、C&W、DLR和MIFPE。

原文摘要 · Abstract (English)

Gradient-based adversarial attacks using the Cross-Entropy (CE) loss often suffer from overestimation due to relative errors in gradient computation induced by floating-point arithmetic. This paper provides a rigorous theoretical analysis of these errors, conducting the first comprehensive study of floating-point computation errors in gradient-based attacks across four distinct scenarios: (i) unsuccessful untargeted attacks, (ii) successful untargeted attacks, (iii) unsuccessful targeted attacks, and (iv) successful targeted attacks. We establish theoretical foundations characterizing the behavior of relative numerical errors under different attack conditions, revealing previously unknown patterns in gradient computation instability, and identify floating-point underflow and rounding as key contributors. Building on this insight, we propose the Theoretical MIFPE (T-MIFPE) loss function, which incorporates an optimal scaling factor $T = t^*$ to minimize the impact of floating-point errors, thereby enhancing the accuracy of gradient computation in adversarial attacks. Extensive experiments on the MNIST, CIFAR-10, and CIFAR-100 datasets demonstrate that T-MIFPE outperforms existing loss functions, including CE, C\&W, DLR, and MIFPE, in terms of attack potency and robustness evaluation accuracy.

对抗攻击浮点误差梯度计算损失函数

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。