Image recognition tasks typically use deep learning and require enormous processing power, thus relying on hardware accelerators like GPUs and TPUs for fast, timely processing. Failure in real-time image recognition tasks can occur due to sub-optimal mapping on hardware accelerators during model deployment, which may lead to timing uncertainty and erroneous behavior. Mapping on hardware accelerators is done through multiple software components like deep learning frameworks, compilers, device libraries, that we refer to as the computational environment. Owing to the increased use of image recognition tasks in safety-critical applications like autonomous driving and medical imaging, it is imperative to assess their robustness to changes in the computational environment, as the impact of parameters like deep learning frameworks, compiler optimizations, and hardware devices on model performance and correctness is not well understood. In this paper we present a differential testing framework, which allows deep learning model variant generation, execution, differential analysis and testing for a number of computational environment parameters. Using our framework, we conduct an empirical study of robustness analysis of three popular image recognition models using the ImageNet dataset, assessing the impact of changing deep learning frameworks, compiler optimizations, and hardware devices. We report the impact in terms of misclassifications and inference time differences across different settings. In total, we observed up to 72% output label differences across deep learning frameworks, and up to 82% unexpected performance degradation in terms of inference time, when applying compiler optimizations. Using the analysis tools in our framework, we also perform fault analysis to understand the reasons for the observed differences.
翻译:图像识别任务通常采用深度学习技术,需要巨大的处理能力,因此依赖GPU和TPU等硬件加速器以实现快速、及时的处理。在模型部署过程中,由于硬件加速器上的次优映射可能导致时序不确定性和错误行为,实时图像识别任务可能发生故障。硬件加速器上的映射通过多个软件组件完成,包括深度学习框架、编译器、设备库等,我们将其统称为计算环境。随着图像识别任务在自动驾驶和医学影像等安全关键型应用中的广泛使用,评估其对计算环境变化的鲁棒性势在必行,因为深度学习框架、编译器优化和硬件设备等参数对模型性能和正确性的影响尚不明确。本文提出一种差分测试框架,能够针对多种计算环境参数实现深度学习模型变体生成、执行、差分分析及测试。利用该框架,我们以ImageNet数据集为基准,对三种主流图像识别模型开展了鲁棒性分析的实证研究,评估了深度学习框架、编译器优化和硬件设备变化的影响,并通过误分类和推理时间差异报告了不同设置下的影响。总体而言,我们观察到不同深度学习框架之间输出标签差异高达72%,应用编译器优化时推理时间出现最高82%的意外性能下降。借助框架中的分析工具,我们还执行了故障分析以解释观测差异的原因。