一句话:提出 LEMON,通过变异规则与启发式模型生成测试深度学习库,发现 24 个新缺陷。
深度学习库是构建深度学习模型的基础,其缺陷会直接影响系统行为,但现有测试研究多关注模型而少关注库。本文提出 LEMON:设计一系列针对 DL 模型的变异规则,以探索库代码的不同调用序列和难以触发的行为;并提出启发式策略,引导模型生成过程放大不同深度学习库之间由缺陷导致的不一致程度,以缓解库中不确定因素带来的噪声。作者在 TensorFlow、Theano、CNTK、MXNet 的 20 个发布版本上开展实证评估。结果表明,LEMON 在这些库的最新版本中检测到 24 个新缺陷,其中 7 个已被确认,1 个已被修复;启发式策略确实能有效放大缺陷导致的不一致程度。
Deep learning (DL) techniques are rapidly developed and have been widely adopted in practice. However, similar to traditional software systems, DL systems also contain bugs, which could cause serious impacts especially in safety-critical domains. Recently, many research approaches have focused on testing DL models, while little attention has been paid for testing DL libraries, which is the basis of building DL models and directly affects the behavior of DL systems. In this work, we propose a novel approach, LEMON, to testing DL libraries. In particular, we (1) design a series of mutation rules for DL models, with the purpose of exploring different invoking sequences of library code and hard-to-trigger behaviors; and (2) propose a heuristic strategy to guide the model generation process towards the direction of amplifying the inconsistent degrees of the inconsistencies between different DL libraries caused by bugs, so as to mitigate the impact of potential noise introduced by uncertain factors in DL libraries. We conducted an empirical study to evaluate the effectiveness of LEMON with 20 release versions of 4 widely-used DL libraries, i.e., TensorFlow, Theano, CNTK, MXNet. The results demonstrate that LEMON detected 24 new bugs in the latest release versions of these libraries, where 7 bugs have been confirmed and one bug has been fixed by developers. Besides, the results confirm that the heuristic strategy for model generation indeed effectively guides LEMON in amplifying the inconsistent degrees for bugs.
DOI 原文 ·
@inproceedings{paperbot5779,
title = {Deep learning library testing via effective model generation},
author = {Zan Wang and Ming Yan and Junjie Chen and Shuang Liu and Dongdi Zhang},
booktitle = {FSE},
year = {2020},
doi = {10.1145/3368089.3409761}
}