paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Free lunch for testing

测试的免费午餐
ICSE Proceedings of the 44th International Conference on Software Engineering2022匹配度 2/10 · 论文属于机器学习库的模糊测试/动态分析,与“机器学习系统与程序语言”有边缘交叉;但核心是动态 fuzzing 而非静态分析,也不涉及 Agentic/LLM、浮点程序分析或贝叶斯程序分析,与用户当前追的问题匹配度较低。引用 160 inbox
Anjiang Wei, Yinlin Deng, Chenyuan Yang, Lingming Zhang
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 FreeFuzz,通过挖掘开源代码追踪动态信息来模糊测试深度学习库,发现 49 个缺陷。

深度学习库是构建和运行模型的基础,但其公共 API 主要暴露于 Python,动态类型使自动确定输入参数类型困难,底层库测试工作有限。论文提出 FreeFuzz,首个通过挖掘开源资源模糊测试 DL 库的方法。它从库文档、开发者测试和野外模型中收集代码,插桩运行并追踪每个 API 的参数类型与值、输入/输出张量形状等动态信息,据此进行模糊测试。在 PyTorch 和 TensorFlow 上,FreeFuzz 追踪并测试了 1158 个热门 API,比 LEMON 多 9 倍、开销低 3.5 倍;发现 49 个 bug,其中 38 个被开发者确认为此前未知。

问题
深度学习库的公共 API 主要暴露于 Python,动态类型给自动确定 API 输入参数类型带来困难,导致面向底层 DL 库的测试工作有限。
方法
FreeFuzz 从库文档代码片段、库开发者测试和野外 DL 模型中挖掘代码/模型,插桩运行以追踪每个被覆盖 API 的参数类型/值和张量形状,再利用这些动态信息对 API 进行模糊测试。
评估
在 PyTorch 和 TensorFlow 上评估,覆盖 1158 个热门 API,比 LEMON 多 9 倍、开销低 3.5 倍,并检测到 49 个 bug(38 个已确认此前未知)。
原文摘要(Abstract)

Deep learning (DL) systems can make our life much easier, and thus are gaining more and more attention from both academia and industry. Meanwhile, bugs in DL systems can be disastrous, and can even threaten human lives in safety-critical applications. To date, a huge body of research efforts have been dedicated to testing DL models. However, interestingly, there is still limited work for testing the underlying DL libraries, which are the foundation for building, optimizing, and running DL models. One potential reason is that test generation for the underlying DL libraries can be rather challenging since their public APIs are mainly exposed in Python, making it even hard to automatically determine the API input parameter types due to dynamic typing. In this paper, we propose FreeFuzz, the first approach to fuzzing DL libraries via mining from open source. More specifically, FreeFuzz obtains code/models from three different sources: 1) code snippets from the library documentation, 2) library developer tests, and 3) DL models in the wild. Then, FreeFuzz automatically runs all the collected code/models with instrumentation to trace the dynamic information for each covered API, including the types and values of each parameter during invocation, and shapes of input/output tensors. Lastly, FreeFuzz will leverage the traced dynamic information to perform fuzz testing for each covered API. The extensive study of FreeFuzz on PyTorch and TensorFlow, two of the most popular DL libraries, shows that FreeFuzz is able to automatically trace valid dynamic information for fuzzing 1158 popular APIs, 9X more than state-of-the-art LEMON with 3.5X lower overhead than LEMON. To date, FreeFuzz has detected 49 bugs for PyTorch and TensorFlow (with 38 already confirmed by developers as previously unknown).

链接与引用

DOI 原文 · arXiv · DBLP

BibTeX
@inproceedings{abs-2201-06589,
  title = {Free lunch for testing},
  author = {Anjiang Wei and Yinlin Deng and Chenyuan Yang and Lingming Zhang},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510041}
}