一句话:提出 EAGLE,用等价图对单个深度学习库做差分测试,以检测不一致性 bug。
测试深度学习软件至关重要且充满挑战。现有差分测试常跨库交叉检查相同功能,但要求两个 DL 库实现同一功能,往往不可得;它们还依赖 Keras 补全缺失功能,成本极高且已不再维护。EAGLE 从另一维度做差分测试:用等价图测试单个 DL 实现。等价图通过不同 API、数据类型或优化实现相同功能。作者设计 16 条深度学习等价规则,据此构造等价图对,并在同一实现上交叉检查输出,以检测不一致性缺陷。在 TensorFlow 和 PyTorch 上评估,EAGLE 检测到 25 个 bug(TensorFlow 18 个、PyTorch 7 个),其中 13 个此前未知。
Testing deep learning (DL) software is crucial and challenging. Recent approaches use differential testing to cross-check pairs of implementations of the same functionality across different libraries. Such approaches require two DL libraries implementing the same functionality, which is often unavailable. In addition, they rely on a high-level library, Keras, that implements missing functionality in all supported DL libraries, which is prohibitively expensive and thus no longer maintained. To address this issue, we propose EAGLE, a new technique that uses differential testing in a different dimension, by using equivalent graphs to test a single DL implementation (e.g., a single DL library). Equivalent graphs use different Application Programming Interfaces (APIs), data types, or optimizations to achieve the same functionality. The rationale is that two equivalent graphs executed on a single DL implementation should produce identical output given the same input. Specifically, we design 16 new DL equivalence rules and propose a technique, EAGLE, that (1) uses these equivalence rules to build concrete pairs of equivalent graphs and (2) cross-checks the output of these equivalent graphs to detect inconsistency bugs in a DL library. Our evaluation on two widely-used DL libraries, i.e., Tensor Flow and PyTorch, shows that EAGLE detects 25 bugs (18 in Tensor Flow and 7 in PyTorch), including 13 previously unknown bugs.