图像识别中深度学习框架转换错误的故障定位
Fault Localization for Buggy Deep Learning Framework Conversions in Image Recognition
AI总结:
本文针对深度学习框架转换易出错的问题,提出了一种基于转换工具、参数、超参数和图表示四阶段分析的故障定位与修复方法,并在 Apache TVM 上成功检测并修复了 InceptionV3 模型转换中的精度误差,将转换错误降至零。
摘要:
在部署深度神经网络(DNNs)时,开发者经常将模型从一个深度学习框架转换到另一个(例如从 TensorFlow 到 PyTorch)。然而,这个过程容易出错,并可能影响目标模型的准确率。为了确定这种影响的程度,我们对广泛用于图像识别的三个 DNNs(MobileNetV2、ResNet101 和 InceptionV3)在四个知名深度学习框架(PyTorch、Keras、TensorFlow (TF) 和 TFLite)之间进行转换后,执行并简要展示了一项差异分析,该分析揭示了大量的模型崩溃和高达 100% 的输出标签差异。为了减轻此类错误,我们提出了一种针对预训练图像识别模型中存在缺陷的深度学习框架转换进行故障定位和修复的新方法。我们的技术包含四个分析阶段:1) 转换工具,2) 模型参数,3) 模型超参数,以及 4) 图表示。此外,我们提出了针对所检测到故障的多种修复策略。我们在 Apache TVM 深度学习编译器之上实现了我们的技术,并通过对 InceptionV3 从 TF 转换到 TFLite 进行初步的故障定位分析来对其进行测试。我们的方法在一个常见的 DNN 转换器工具中检测到了一个故障,该故障在权重中引入了精度误差,从而降低了模型准确率。经过我们的故障定位后,我们修复了该问题,将我们的转换错误降至零。
英文摘要:
When deploying Deep Neural Networks (DNNs), developers often convert models from one deep learning framework to another (e.g., TensorFlow to PyTorch). However, this process is error-prone and can impact target model accuracy. To identify the extent of such impact, we perform and briefly present a differential analysis against three DNNs widely used for image recognition (MobileNetV2, ResNet101, and InceptionV3) converted across four well-known deep learning frameworks (PyTorch, Keras, TensorFlow (TF), and TFLite), which revealed numerous model crashes and output label discrepancies of up to 100%. To mitigate such errors, we present a novel approach towards fault localization and repair of buggy deep learning framework conversions, focusing on pre-trained image recognition models. Our technique consists of four stages of analysis: 1) conversion tools, 2) model parameters, 3) model hyperparameters, and 4) graph representation. In addition, we propose various strategies towards fault repair of the faults detected. We implement our technique on top of the Apache TVM deep learning compiler, and we test it by conducting a preliminary fault localization analysis for the conversion of InceptionV3 from TF to TFLite. Our approach detected a fault in a common DNN converter tool, which introduced precision errors in weights, reducing model accuracy. After our fault localization, we repaired the issue, reducing our conversion error to zero.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。