paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Fuzzing Automatic Differentiation in Deep-Learning Libraries

深度学习库中自动微分的模糊测试
ICSE 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)2023匹配度 3/10 · 论文针对深度学习库的自动微分组件做差分模糊测试,属于ML系统测试与可靠性方向,与画像核心关注的“静态分析在ML/Agentic程序中的应用”“LLM/Agent辅助静态分析与形式化验证”“浮点程序分析”“贝叶斯程序分析”等方向重叠有限;仅因涉及DL库、梯度计算和数值稳定性过滤而与ML系统和浮点有间接关联。引用 62 inbox
Chenyuan Yang, Yinlin Deng, Jiayi Yao, Yuxing Tu, Hanchi Li, Lingming Zhang
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出首个面向深度学习库自动微分组件的通用 API 级差分模糊测试方法 ∇Fuzz。

自动微分(AD)是深度学习系统的基础组件,但已有测试工作大多忽视它。本文提出 ∇Fuzz,首个面向深度学习库 AD 组件的通用实用模糊测试方法。其核心洞察是把 DL 库 API 抽象为处理张量/向量的函数,并在不同执行场景下进行差分测试,以同时检验一阶和高阶梯度,还通过自动过滤策略排除数值不稳定导致的误报。作者在 PyTorch、TensorFlow、JAX 与 OneFlow 上开展实验,表明 ∇Fuzz 在代码覆盖率和缺陷检测上显著优于现有模糊器;共发现 173 个 bug,144 个获确认,其中 117 个此前未知、107 个与 AD 相关,并贡献了两个月内 PyTorch 和 JAX 全部高优先级 AD bug 的 58.3%。

问题
现有深度学习库测试工作大多忽视自动微分(AD)这一关键组件,缺乏系统且可实践的 AD 缺陷检测方法。
方法
提出 ∇Fuzz,将 DL 库 API 抽象为张量/向量上的函数,在不同执行场景下做差分测试,覆盖一阶与高阶梯度,并用自动过滤策略去除数值不稳定造成的误报。
评估
在 PyTorch、TensorFlow、JAX、OneFlow 上与现有模糊器比较代码覆盖率和缺陷检测;共发现 173 个 bug,其中 144 个获确认(117 个新 bug、107 个 AD 相关),并贡献 PyTorch/JAX 两个月内 58.3% 的高优先级 AD bug。
原文摘要(Abstract)

Deep learning (DL) has attracted wide attention and has been widely deployed in recent years. As a result, more and more research efforts have been dedicated to testing DL libraries and frameworks. However, existing work largely overlooked one crucial component of any DL system, automatic differentiation (AD), which is the basis for the recent development of DL. To this end, we propose ∇Fuzz, the first general and practical approach specifically targeting the critical AD component in DL libraries. Our key insight is that each DL library API can be abstracted into a function processing tensors/vectors, which can be differentially tested under various execution scenarios (for computing outputs/gradients with different implementations). We have implemented $\nabla \text{Fuzz}$ as a fully automated API-level fuzzer targeting AD in DL libraries, which utilizes differential testing on different execution scenarios to test both first-order and high-order gradients, and also includes automated filtering strategies to remove false positives caused by numerical instability. We have performed an extensive study on four of the most popular and actively-maintained DL libraries, PyTorch, TensorFlow, JAX, and OneFlow. The result shows that $\nabla \text{Fuzz}$ substantially outperforms state-of-the-art fuzzers in terms of both code coverage and bug detection. To date, $\nabla \text{Fuzz}$ has detected 173 bugs for the studied DL libraries, with 144 already confirmed by developers (117 of which are previously unknown bugs and 107 are related to AD). Remarkably, $\nabla \text{Fuzz}$ contributed 58.3% (7/12) of all high-priority AD bugs for PyTorch and JAX during a two-month period. None of the confirmed AD bugs were detected by existing fuzzers.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{abs-2302-04351,
  title = {Fuzzing Automatic Differentiation in Deep-Learning Libraries},
  author = {Chenyuan Yang and Yinlin Deng and Jiayi Yao and Yuxing Tu and Hanchi Li and Lingming Zhang},
  booktitle = {ICSE},
  year = {2023},
  doi = {10.1109/icse48619.2023.00105}
}