Saved in:
Bibliographic Details
Main Authors: Yu, Yunrui, Su, Hang, Xu, Cheng-zhong, Su, Zhizhong, Zhu, Jun
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2507.22428
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908472776327168
author Yu, Yunrui
Su, Hang
Xu, Cheng-zhong
Su, Zhizhong
Zhu, Jun
author_facet Yu, Yunrui
Su, Hang
Xu, Cheng-zhong
Su, Zhizhong
Zhu, Jun
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2507_22428
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Theoretical Analysis of Relative Errors in Gradient Computations for Adversarial Attacks with CE Loss
Yu, Yunrui
Su, Hang
Xu, Cheng-zhong
Su, Zhizhong
Zhu, Jun
Machine Learning
Artificial Intelligence
Computer Vision and Pattern Recognition
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.
title Theoretical Analysis of Relative Errors in Gradient Computations for Adversarial Attacks with CE Loss
topic Machine Learning
Artificial Intelligence
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2507.22428