paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Exposing numerical bugs in deep learning via gradient back-propagation

通过梯度反向传播暴露深度学习中的数值缺陷
FSE Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2021匹配度 4/10 · 论文面向深度学习程序中的数值缺陷检测,属于 PL 技术在 ML 系统中的周边应用,与“机器学习系统可靠性/数值程序分析”有部分交集;但其核心是动态梯度反传生成输入,而非用户重点关注的静态分析、LLM/Agent 或浮点程序分析,也未涉及贝叶斯程序分析,因此匹配度有限。引用 47 inbox
Ming Yan, Junjie Chen, Xiangyu Zhang, Lin Tan, Gan Wang, Zan Wang
crossref: 2026-09-12

AI 速览

一句话:提出首个动态技术 GRIST,利用梯度反向传播自动生成小输入以暴露深度学习程序中的数值缺陷。

深度学习程序以数值计算为主,数值缺陷是其主要缺陷之一。特殊输入可能导致 log() 等内部数学操作出现非法参数值,进而产生 NaN 或 INF 并传播,最终引发崩溃或无效输出。本文提出首个动态技术 GRIST,它借助深度学习基础设施内置的梯度计算功能,通过梯度反向传播自动生成能够暴露数值缺陷的小输入。作者在 63 个真实深度学习程序上评估,GRIST 检测到 78 个缺陷,其中 56 个为未知缺陷;提交至相应 issue 仓库后,8 个被确认、3 个被修复。相比用所提供的输入运行原程序,GRIST 可节省 8.79 倍执行时间。与静态技术 DEBAR 相比,DEBAR 产生 12 个假阳性并漏报 31 个真实缺陷(其中 30 个可被 GRIST 发现),而 GRIST 仅漏报一个已知缺陷且无假阳性,证明了其有效性。

问题
深度学习程序广泛依赖数值计算,特殊输入可在 log() 等内部数学操作中引发非法参数值,导致 NaN/INF 传播并造成崩溃或无效输出;如何自动暴露此类数值缺陷是关键问题。
方法
GRIST 是首个动态技术,利用深度学习基础设施内置的梯度计算功能进行反向传播,自动生成能触发数值缺陷的小输入。
评估
在 63 个真实深度学习程序上,GRIST 检测到 78 个缺陷(含 56 个未知缺陷),提交后 8 个被确认、3 个被修复;相比原程序运行节省 8.79 倍时间,并优于静态技术 DEBAR(DEBAR 有 12 个假阳性、漏报 31 个缺陷,而 GRIST 仅漏报一个已知缺陷且无假阳性)。
原文摘要(Abstract)

Numerical computation is dominant in deep learning (DL) programs. Consequently, numerical bugs are one of the most prominent kinds of defects in DL programs. Numerical bugs can lead to exceptional values such as NaN (Not-a-Number) and INF (Infinite), which can be propagated and eventually cause crashes or invalid outputs. They occur when special inputs cause invalid parameter values at internal mathematical operations such as log(). In this paper, we propose the first dynamic technique, called GRIST, which automatically generates a small input that can expose numerical bugs in DL programs. GRIST piggy-backs on the built-in gradient computation functionalities of DL infrastructures. Our evaluation on 63 real-world DL programs shows that GRIST detects 78 bugs including 56 unknown bugs. By submitting them to the corresponding issue repositories, eight bugs have been confirmed and three bugs have been fixed. Moreover, GRIST can save 8.79X execution time to expose numerical bugs compared to running original programs with its provided inputs. Compared to the state-of-the-art technique DEBAR (which is a static technique), DEBAR produces 12 false positives and misses 31 true bugs (of which 30 bugs can be found by GRIST), while GRIST only misses one known bug in those programs and no false positive. The results demonstrate the effectiveness of GRIST.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6473,
  title = {Exposing numerical bugs in deep learning via gradient back-propagation},
  author = {Ming Yan and Junjie Chen and Xiangyu Zhang and Lin Tan and Gan Wang and Zan Wang},
  booktitle = {FSE},
  year = {2021},
  doi = {10.1145/3468264.3468612}
}