一句话:首次对深度学习程序中的数值错误开展大规模实证研究,收集400个错误并按根因归为九类。
深度学习程序需要执行大量数值计算,其数值计算的鲁棒性与稳定性直接决定程序质量。然而数值错误在深度学习程序中十分常见,会产生 NaN(Not-a-Number)与 INF(Infinite),进而使模型失准、应用不可用。本文首次针对深度学习程序中的数值错误开展实证研究,分析基于两个主流深度学习库(TensorFlow 与 PyTorch)实现的程序。作者构建了一个包含 400 个数值错误的数据集,依据根因将这些错误划分为九类,并在此基础上总结出两点发现。最后,论文给出了该研究对深度学习程序中数值错误检测的启示,为后续检测工具的设计提供了实证依据。
The task of a deep learning (DL) program is to train a model with high precision and apply it to different scenarios. A DL program often involves massive numerical calculations. Therefore, the robustness and stability of the numerical calculations are dominant in the quality of DL programs. Indeed, numerical bugs are common in DL programs, producing NaN (Not-a-Number) and INF (Infinite). A numerical bug may render the DL models inaccurate, causing the DL applications unusable. In this work, we conduct the first empirical study on numerical bugs in DL programs by analyzing the programs implemented on the top of two popular DL libraries (i.e., TensorFlow and PyTorch). Specifically, We collect a dataset of 400 numerical bugs in DL programs. Then, we classify these numerical bugs into nine categories based on their root causes and summarize two findings. Finally, we provide the implications of our study on detecting numerical bugs in DL programs.