一句话:提出 Predoo,用模糊测试与搜索最大化 DL 算子精度误差,发现超越 TensorFlow 测试阈值的错误。
深度学习算子作为深度学习库的基础组件,其实现缺陷可能导致模型缺陷。然而算子种类繁多、实现复杂,有限测试用例难以揭示隐藏缺陷;现有模型到库的测试方法还需额外人力与时间来识别和定位错误。本文提出基于模糊测试的算子级精度测试方法,将算子测试视为搜索问题,通过生成满足有效形状约束的变量输入并细粒度评估精度误差,以最大化输出精度误差。作者实现了工具 Predoo,并在 TensorFlow 的七个深度学习算子上开展实验。结果表明,Predoo 能触发比 TensorFlow 仓库测试脚本所声明误差阈值更大的精度误差。
Deep learning(DL) techniques attract people from various fields with superior performance in making progressive breakthroughs. To ensure the quality of DL techniques, researchers have been working on testing and verification approaches. Some recent studies reveal that the underlying DL operators could cause defects inside a DL model. DL operators work as fundamental components in DL libraries. Library developers still work on practical approaches to ensure the quality of operators they provide. However, the variety of DL operators and the implementation complexity make it challenging to evaluate their quality. Operator testing with limited test cases may fail to reveal hidden defects inside the implementation. Besides, the existing model-to-library testing approach requires extra labor and time cost to identify and locate errors, i.e., developers can only react to the exposed defects. This paper proposes a fuzzing-based operator-level precision testing approach to estimate individual DL operators' precision errors to bridge this gap. Unlike conventional fuzzing techniques, valid shape variable inputs and fine-grained precision error evaluation are implemented. The testing of DL operators is treated as a searching problem to maximize output precision errors. We implement our approach in a tool named Predoo and conduct an experiment on seven DL operators from TensorFlow. The experiment result shows that Predoo can trigger larger precision errors compared to the error threshold declared in the testing scripts from the TensorFlow repository.
DOI 原文 ·
@inproceedings{paperbot6650,
title = {Predoo: precision testing of deep learning operators},
author = {Xufan Zhang and Ning Sun and Chunrong Fang and Jiawei Liu and Jia Liu and Dong Chai and Jiang Wang and Zhenyu Chen},
booktitle = {ISSTA},
year = {2021},
doi = {10.1145/3460319.3464843}
}